[totem] browser-plugin: Make --g-fatal-warnings work again
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [totem] browser-plugin: Make --g-fatal-warnings work again
- Date: Sun, 4 Dec 2011 11:39:09 +0000 (UTC)
commit e17d2593ab068ab6ff83a82f760b6df941ed8a73
Author: Bastien Nocera <hadess hadess net>
Date: Sun Dec 4 12:13:51 2011 +0100
browser-plugin: Make --g-fatal-warnings work again
The GTK+/Clutter initialisation changes seems to have broken that...
browser-plugin/totem-plugin-viewer.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/browser-plugin/totem-plugin-viewer.c b/browser-plugin/totem-plugin-viewer.c
index e376a81..624b7f7 100644
--- a/browser-plugin/totem-plugin-viewer.c
+++ b/browser-plugin/totem-plugin-viewer.c
@@ -2150,6 +2150,7 @@ static gboolean arg_is_playlist = FALSE;
static gboolean arg_repeat = FALSE;
static gboolean arg_no_autostart = FALSE;
static gboolean arg_audioonly = FALSE;
+static gboolean arg_g_fatal_warnings = FALSE;
static TotemPluginType arg_plugin_type = TOTEM_PLUGIN_TYPE_LAST;
static gboolean
@@ -2190,6 +2191,7 @@ static GOptionEntry option_entries [] =
{ TOTEM_OPTION_NOAUTOSTART, 0, 0, G_OPTION_ARG_NONE, &arg_no_autostart, NULL, NULL },
{ TOTEM_OPTION_AUDIOONLY, 0, 0, G_OPTION_ARG_NONE, &arg_audioonly, NULL, NULL },
{ TOTEM_OPTION_REFERRER, 0, 0, G_OPTION_ARG_STRING, &arg_referrer, NULL, NULL },
+ { "g-fatal-warnings", 0, 0, G_OPTION_ARG_NONE, &arg_g_fatal_warnings, "Make all warnings fatal", NULL },
{ G_OPTION_REMAINING, 0, 0, G_OPTION_ARG_FILENAME_ARRAY /* STRING? */, &arg_remaining, NULL },
{ NULL }
};
@@ -2291,6 +2293,14 @@ int main (int argc, char **argv)
else
g_setenv("PULSE_PROP_media.role", "music", TRUE);
+ if (arg_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);
+ }
+
// FIXME check that ALL necessary params were given!
if (arg_plugin_type == TOTEM_PLUGIN_TYPE_LAST) {
g_warning ("Plugin type is required\n");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]