summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2004-09-29 22:29:21 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2004-09-29 22:29:21 +0000
commit63110fc53df83992d778a169a2a727b76d92af00 (patch)
tree706d4235fc771d95b9ae6fdf5774cbe63dc4e50b
parent48252de3452931721b427c16ab30235f6b4fe0fb (diff)
downloadgtk+-63110fc53df83992d778a169a2a727b76d92af00.tar.gz
Make --g-fatal-warnings a G_OPTION_ARG_NONE, since it doesn't take an
2004-09-29 Matthias Clasen <mclasen@redhat.com> * gtk/gtkmain.c: Make --g-fatal-warnings a G_OPTION_ARG_NONE, since it doesn't take an argument.
-rw-r--r--ChangeLog5
-rw-r--r--ChangeLog.pre-2-105
-rw-r--r--ChangeLog.pre-2-65
-rw-r--r--ChangeLog.pre-2-85
-rw-r--r--gtk/gtkmain.c24
5 files changed, 31 insertions, 13 deletions
diff --git a/ChangeLog b/ChangeLog
index 68e53c6cb5..165d8587be 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2004-09-29 Matthias Clasen <mclasen@redhat.com>
+
+ * gtk/gtkmain.c: Make --g-fatal-warnings a G_OPTION_ARG_NONE,
+ since it doesn't take an argument.
+
2004-09-29 Christopher Blizzard <blizzard@redhat.com>
* gtk/gtkmenutoolbutton.h: Remove trailing semicolon on
diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10
index 68e53c6cb5..165d8587be 100644
--- a/ChangeLog.pre-2-10
+++ b/ChangeLog.pre-2-10
@@ -1,3 +1,8 @@
+2004-09-29 Matthias Clasen <mclasen@redhat.com>
+
+ * gtk/gtkmain.c: Make --g-fatal-warnings a G_OPTION_ARG_NONE,
+ since it doesn't take an argument.
+
2004-09-29 Christopher Blizzard <blizzard@redhat.com>
* gtk/gtkmenutoolbutton.h: Remove trailing semicolon on
diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6
index 68e53c6cb5..165d8587be 100644
--- a/ChangeLog.pre-2-6
+++ b/ChangeLog.pre-2-6
@@ -1,3 +1,8 @@
+2004-09-29 Matthias Clasen <mclasen@redhat.com>
+
+ * gtk/gtkmain.c: Make --g-fatal-warnings a G_OPTION_ARG_NONE,
+ since it doesn't take an argument.
+
2004-09-29 Christopher Blizzard <blizzard@redhat.com>
* gtk/gtkmenutoolbutton.h: Remove trailing semicolon on
diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8
index 68e53c6cb5..165d8587be 100644
--- a/ChangeLog.pre-2-8
+++ b/ChangeLog.pre-2-8
@@ -1,3 +1,8 @@
+2004-09-29 Matthias Clasen <mclasen@redhat.com>
+
+ * gtk/gtkmain.c: Make --g-fatal-warnings a G_OPTION_ARG_NONE,
+ since it doesn't take an argument.
+
2004-09-29 Christopher Blizzard <blizzard@redhat.com>
* gtk/gtkmenutoolbutton.h: Remove trailing semicolon on
diff --git a/gtk/gtkmain.c b/gtk/gtkmain.c
index ec6c9f8cb2..f9d15b1dae 100644
--- a/gtk/gtkmain.c
+++ b/gtk/gtkmain.c
@@ -350,6 +350,7 @@ gtk_disable_setlocale (void)
#endif
static GString *gtk_modules_string = NULL;
+static gboolean g_fatal_warnings = FALSE;
#ifdef G_ENABLE_DEBUG
static gboolean
@@ -389,23 +390,11 @@ gtk_arg_module_cb (const char *key, const char *value, gpointer user_data)
return TRUE;
}
-static gboolean
-gtk_arg_warnings_cb (const char *key, const char *value, gpointer user_data)
-{
- GLogLevelFlags fatal_mask;
-
- fatal_mask = g_log_set_always_fatal (G_LOG_FATAL_MASK);
- fatal_mask |= G_LOG_LEVEL_WARNING | G_LOG_LEVEL_CRITICAL;
- g_log_set_always_fatal (fatal_mask);
-
- return TRUE;
-}
-
static GOptionEntry gtk_args[] = {
{ "gtk-module", 0, 0, G_OPTION_ARG_CALLBACK, gtk_arg_module_cb,
/* Description of --gtk-module=MODULES in --help output */ N_("Load additional GTK+ modules"),
/* Placeholder in --gtk-module=MODULES in --help output */ N_("MODULES") },
- { "g-fatal-warnings", 0, 0, G_OPTION_ARG_CALLBACK, gtk_arg_warnings_cb,
+ { "g-fatal-warnings", 0, 0, G_OPTION_ARG_NONE, &g_fatal_warnings,
/* Description of --g-fatal-warnings in --help output */ N_("Make all warnings fatal"), NULL },
#ifdef G_ENABLE_DEBUG
{ "gtk-debug", 0, 0, G_OPTION_ARG_CALLBACK, gtk_arg_debug_cb,
@@ -460,6 +449,15 @@ static void
do_post_parse_initialization (int *argc,
char ***argv)
{
+ if (g_fatal_warnings)
+ {
+ GLogLevelFlags fatal_mask;
+
+ fatal_mask = g_log_set_always_fatal (G_LOG_FATAL_MASK);
+ fatal_mask |= G_LOG_LEVEL_WARNING | G_LOG_LEVEL_CRITICAL;
+ g_log_set_always_fatal (fatal_mask);
+ }
+
if (gtk_debug_flags & GTK_DEBUG_UPDATES)
gdk_window_set_debug_updates (TRUE);