Skip to content
Snippets Groups Projects
Commit 11611827 authored by Emmanuel Milou's avatar Emmanuel Milou
Browse files

Client error handling - Notify if no audio codecs have been found at startup

The client receives almost no warnings or errors notification.
This should be improved
If no audio codecs have been found, a window pops up and describe the error.
Then the GTK kills the daemon and quits.
parent ce338b90
Branches
Tags
No related merge requests found
...@@ -28,4 +28,5 @@ sflphone_gtk_LDADD = $(DEPS_LIBS) ...@@ -28,4 +28,5 @@ sflphone_gtk_LDADD = $(DEPS_LIBS)
AM_CPPFLAGS = $(DEPS_CFLAGS) \ AM_CPPFLAGS = $(DEPS_CFLAGS) \
-DICONS_DIR=\""$(datadir)/sflphone"\" \ -DICONS_DIR=\""$(datadir)/sflphone"\" \
-DICON_DIR=\""$(datadir)/pixmaps"\" -DICON_DIR=\""$(datadir)/pixmaps"\" \
-DCODECS_DIR=\""$(libdir)/sflphone/codecs"\"
...@@ -619,5 +619,12 @@ sflphone_fill_codec_list() ...@@ -619,5 +619,12 @@ sflphone_fill_codec_list()
codec_list_add(c); codec_list_add(c);
} }
} }
if( codec_list_get_size() == 0) {
gchar* markup = malloc(1000);
sprintf(markup , "<b>Error: No audio codecs found.\n\n</b> SFL audio codecs have to be placed in <i>%s</i> or in the <b>.sflphone</b> directory in your home( <i>%s</i> )", CODECS_DIR , g_get_home_dir());
main_window_error_message( markup );
g_free( markup );
dbus_unregister(getpid());
exit(0);
}
} }
...@@ -41,7 +41,7 @@ void main_window_error_message(gchar * markup); ...@@ -41,7 +41,7 @@ void main_window_error_message(gchar * markup);
void main_window_warning_message(gchar * markup); void main_window_warning_message(gchar * markup);
void main_window_warning_message(gchar * markup); void main_window_info_message(gchar * markup);
void status_bar_message(const gchar * message); void status_bar_message(const gchar * message);
......
...@@ -106,11 +106,8 @@ help_about ( void * foo) ...@@ -106,11 +106,8 @@ help_about ( void * foo)
"Julien Plissonneau Duquene <julien.plissonneau.duquene@savoirfairelinux.com>", "Julien Plissonneau Duquene <julien.plissonneau.duquene@savoirfairelinux.com>",
"Alexandre Bourget <alexandre.bourget@savoirfairelinux.com>", "Alexandre Bourget <alexandre.bourget@savoirfairelinux.com>",
"Pierre-Luc Beaudoin <pierre-luc@squidy.info>", "Pierre-Luc Beaudoin <pierre-luc@squidy.info>",
"Imran Akbar",
"Jean-Philippe Barrette-LaPierre", "Jean-Philippe Barrette-LaPierre",
"Laurielle Lea", "Laurielle Lea",
"Mikael Magnusson",
"Sherry Yang",
NULL}; NULL};
gchar *artists[] = { gchar *artists[] = {
"Pierre-Luc Beaudoin <pierre-luc@squidy.info>", "Pierre-Luc Beaudoin <pierre-luc@squidy.info>",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment