From: Jim Evins Date: Wed, 21 Dec 2005 02:12:08 +0000 (+0000) Subject: 2005-12-20 Jim Evins X-Git-Tag: glabels-2_3_0~389 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=1dd5d023b5989dda77cd4afe03b6a321ae4f78fb;p=glabels 2005-12-20 Jim Evins * src/Makefile.am: Define unique G_LOG_DOMAIN for glabels. * src/critical-error-handler.c: (gl_critical_error_handler_init): * src/warning-handler.c: (gl_warning_handler_init), (warning_handler): Register for G_LOG_DOMAIN instead of NULL. git-svn-id: https://glabels.svn.sourceforge.net/svnroot/glabels/trunk@566 f5e0f49d-192f-0410-a22d-a8d8700d0965 --- diff --git a/glabels2/ChangeLog b/glabels2/ChangeLog index bc1cc733..94b447e2 100644 --- a/glabels2/ChangeLog +++ b/glabels2/ChangeLog @@ -1,3 +1,12 @@ +2005-12-20 Jim Evins + + * src/Makefile.am: + Define unique G_LOG_DOMAIN for glabels. + * src/critical-error-handler.c: (gl_critical_error_handler_init): + * src/warning-handler.c: (gl_warning_handler_init), + (warning_handler): + Register for G_LOG_DOMAIN instead of NULL. + 2005-12-10 Jim Evins * src/merge-evolution.c: diff --git a/glabels2/src/Makefile.am b/glabels2/src/Makefile.am index 7b2ee4f9..23b729fa 100644 --- a/glabels2/src/Makefile.am +++ b/glabels2/src/Makefile.am @@ -15,6 +15,7 @@ INCLUDES = \ -DLIBDIR=\""$(libdir)"\" \ -DGLABELS_LOCALEDIR=\""$(datadir)/locale"\" \ -DGLABELS_GLADE_DIR=\""$(datadir)/glabels/glade/"\" \ + -DG_LOG_DOMAIN=\""glabels\"" \ $(DISABLE_DEPRECATED_CFLAGS) glabels_LDFLAGS = -export-dynamic diff --git a/glabels2/src/critical-error-handler.c b/glabels2/src/critical-error-handler.c index 21b2c509..c35c4e17 100644 --- a/glabels2/src/critical-error-handler.c +++ b/glabels2/src/critical-error-handler.c @@ -49,7 +49,7 @@ gl_critical_error_handler_init (void) critical_error_handler, "libglabels"); - g_log_set_handler (NULL, + g_log_set_handler (G_LOG_DOMAIN, G_LOG_LEVEL_ERROR | G_LOG_LEVEL_CRITICAL | G_LOG_FLAG_FATAL | G_LOG_FLAG_RECURSION, critical_error_handler, "glabels"); diff --git a/glabels2/src/warning-handler.c b/glabels2/src/warning-handler.c index 6a9e9ee9..caa8b1f9 100644 --- a/glabels2/src/warning-handler.c +++ b/glabels2/src/warning-handler.c @@ -49,7 +49,7 @@ gl_warning_handler_init (void) warning_handler, "libglabels"); - g_log_set_handler (NULL, + g_log_set_handler (G_LOG_DOMAIN, G_LOG_LEVEL_WARNING, warning_handler, "glabels"); @@ -68,12 +68,14 @@ warning_handler (const gchar *log_domain, dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL, - GTK_MESSAGE_ERROR, + GTK_MESSAGE_WARNING, GTK_BUTTONS_CLOSE, _("gLabels Error!")); gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog), message); gtk_dialog_run (GTK_DIALOG (dialog)); + + gtk_widget_destroy (GTK_WIDGET (dialog)); }