[eog] Remove unneeded explicit gtk_init call
- From: Felix Riemann <friemann src gnome org>
- To: svn-commits-list gnome org
- Subject: [eog] Remove unneeded explicit gtk_init call
- Date: Fri, 1 May 2009 06:50:23 -0400 (EDT)
commit 58acc8e2dae893e3d49d9d2c3d9fd36dee50eb03
Author: Felix Riemann <friemann svn gnome org>
Date: Fri May 1 12:46:12 2009 +0200
Remove unneeded explicit gtk_init call
One doesn't need to call gtk_init explicitly if one is using
gtk_get_option_group with GOption parsing. Also makes it possible to see
the help output without a running X server again.
---
ChangeLog | 6 ++++++
src/main.c | 5 ++---
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 2ffdfb9..11b81af 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2009-05-01 Felix Riemann <friemann svn gnome org>
+
+ * src/main.c (main): One doesn't need to call gtk_init explicitly if
+ one is using gtk_get_option_group during GOption parsing.
+ Also makes it possible to see help output without an X server again.
+
2009-04-30 Felix Riemann <friemann svn gnome org>
* src/eog-image.c (eog_image_set_exif_data):
diff --git a/src/main.c b/src/main.c
index 3efcf99..a62df51 100644
--- a/src/main.c
+++ b/src/main.c
@@ -184,11 +184,10 @@ main (int argc, char **argv)
ctx = g_option_context_new (NULL);
g_option_context_add_main_entries (ctx, goption_options, PACKAGE);
- /* Option groups are free'd together with the context */
+ /* Option groups are free'd together with the context
+ * Using gtk_get_option_group here initializes gtk during parsing */
g_option_context_add_group (ctx, gtk_get_option_group (TRUE));
- gtk_init (&argc, &argv);
-
if (!g_option_context_parse (ctx, &argc, &argv, &error)) {
gchar *help_msg;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]