3 * Copyright (C) 2005-2009 Jim Evins <evins@snaught.com>.
5 * This file is part of gLabels.
7 * gLabels is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
12 * gLabels is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with gLabels. If not, see <http://www.gnu.org/licenses/>.
23 #include "warning-handler.h"
26 #include <glib/gi18n.h>
30 static void warning_handler (const gchar *log_domain,
31 GLogLevelFlags log_level,
36 /***************************************************************************/
37 /* Initialize error handler. */
38 /***************************************************************************/
40 gl_warning_handler_init (void)
42 g_log_set_handler ("LibGlabels",
47 g_log_set_handler (G_LOG_DOMAIN,
54 /*-------------------------------------------------------------------------*/
55 /* PRIVATE. Actual error handler. */
56 /*-------------------------------------------------------------------------*/
58 warning_handler (const gchar *log_domain,
59 GLogLevelFlags log_level,
65 dialog = gtk_message_dialog_new (NULL,
70 gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog),
73 gtk_dialog_run (GTK_DIALOG (dialog));
75 gtk_widget_destroy (GTK_WIDGET (dialog));
81 * Local Variables: -- emacs
83 * c-basic-offset: 8 -- emacs
84 * tab-width: 8 -- emacs
85 * indent-tabs-mode: nil -- emacs