aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2006-01-26 03:48:40 +0800
committerChristian Persch <chpe@src.gnome.org>2006-01-26 03:48:40 +0800
commit40b41c97b0ab8909c67a2f2176b9549bb1cb9e8d (patch)
tree3f2bd950e5c3cd1e62ce2dd026b20d19c253f4e2
parente9a5d18e08352272299d1410f9f62a70d7ac1bde (diff)
downloadgsoc2013-epiphany-40b41c97b0ab8909c67a2f2176b9549bb1cb9e8d.tar
gsoc2013-epiphany-40b41c97b0ab8909c67a2f2176b9549bb1cb9e8d.tar.gz
gsoc2013-epiphany-40b41c97b0ab8909c67a2f2176b9549bb1cb9e8d.tar.bz2
gsoc2013-epiphany-40b41c97b0ab8909c67a2f2176b9549bb1cb9e8d.tar.lz
gsoc2013-epiphany-40b41c97b0ab8909c67a2f2176b9549bb1cb9e8d.tar.xz
gsoc2013-epiphany-40b41c97b0ab8909c67a2f2176b9549bb1cb9e8d.tar.zst
gsoc2013-epiphany-40b41c97b0ab8909c67a2f2176b9549bb1cb9e8d.zip
Don't leak the option context.
2006-01-25 Christian Persch <chpe@cvs.gnome.org> * src/ephy-main.c: (main): Don't leak the option context.
-rw-r--r--ChangeLog6
-rw-r--r--src/ephy-main.c21
2 files changed, 27 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 50e72e06f..065579e24 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2006-01-25 Christian Persch <chpe@cvs.gnome.org>
+ * src/ephy-main.c: (main):
+
+ Don't leak the option context.
+
+2006-01-25 Christian Persch <chpe@cvs.gnome.org>
+
* src/bookmarks/ephy-topic-action.c: (drag_data_received_cb),
(create_tool_item), (ephy_topic_action_sync_label), (get_popup),
(erase_popup), (child_changed_cb), (child_removed_cb),
diff --git a/src/ephy-main.c b/src/ephy-main.c
index 63a2b9b2f..1d14bda0b 100644
--- a/src/ephy-main.c
+++ b/src/ephy-main.c
@@ -110,6 +110,15 @@ static const GOptionEntry libgnome_option_entries[] =
};
#endif /* !GNOME_PARAM_GOPTION_CONTEXT */
+#ifdef GNOME_ENABLE_DEBUG
+static GOptionEntry debug_option_entries[] =
+{
+ { "private-instance", 0, 0, G_OPTION_ARG_NONE, &private_instance,
+ N_("Start a private instance"), NULL },
+ { NULL }
+};
+#endif /* GNOME_ENABLE_DEBUG */
+
/* adapted from gtk+/gdk/x11/gdkdisplay-x11.c */
static guint32
get_startup_id (void)
@@ -508,6 +517,15 @@ main (int argc,
g_option_context_set_main_group (option_context, option_group);
+#ifdef GNOME_ENABLE_DEBUG
+ option_group = g_option_group_new ("debug",
+ "Epiphany debug options",
+ "Epiphany debug options",
+ NULL, NULL);
+ g_option_group_add_entries (option_group, debug_option_entries);
+ g_option_context_add_group (option_context, option_group);
+#endif /* GNOME_ENABLE_DEBUG */
+
#ifdef GNOME_PARAM_GOPTION_CONTEXT
gnome_program_init (PACKAGE, VERSION,
LIBGNOMEUI_MODULE, argc, argv,
@@ -568,6 +586,9 @@ main (int argc,
g_ptr_array_add (fake_argv_array, NULL);
g_strfreev ((char**) g_ptr_array_free (fake_argv_array, FALSE));
+ g_option_context_free (option_context);
+ option_context = NULL;
+
#endif /* GNOME_PARAM_GOPTION_CONTEXT */
/* Get a timestamp manually if need be */