aboutsummaryrefslogtreecommitdiffstats
path: root/shell/main.c
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2003-01-11 03:57:21 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2003-01-11 03:57:21 +0800
commit62e880130bebe19aef3eef95dc4d66578950c0c2 (patch)
treefbce9bbbe9ca4cd7c6e98b7883825e7150f7eb1d /shell/main.c
parent4a8c1c7323bbde12c2213228f272cdaf5f5039ab (diff)
downloadgsoc2013-evolution-62e880130bebe19aef3eef95dc4d66578950c0c2.tar
gsoc2013-evolution-62e880130bebe19aef3eef95dc4d66578950c0c2.tar.gz
gsoc2013-evolution-62e880130bebe19aef3eef95dc4d66578950c0c2.tar.bz2
gsoc2013-evolution-62e880130bebe19aef3eef95dc4d66578950c0c2.tar.lz
gsoc2013-evolution-62e880130bebe19aef3eef95dc4d66578950c0c2.tar.xz
gsoc2013-evolution-62e880130bebe19aef3eef95dc4d66578950c0c2.tar.zst
gsoc2013-evolution-62e880130bebe19aef3eef95dc4d66578950c0c2.zip
Generate the URI list from the popt context fetched from the GnomeProgram
* main.c (main): Generate the URI list from the popt context fetched from the GnomeProgram object. * e-shell-view.c (setup_defaults): Removed @setup_default_uri arg. Don't load any URI here. (e_shell_view_construct): Open the URI here instead. svn path=/trunk/; revision=19409
Diffstat (limited to 'shell/main.c')
-rw-r--r--shell/main.c21
1 files changed, 14 insertions, 7 deletions
diff --git a/shell/main.c b/shell/main.c
index 10de4e9be3..de11af7b8b 100644
--- a/shell/main.c
+++ b/shell/main.c
@@ -456,6 +456,10 @@ main (int argc, char **argv)
{ NULL, '\0', 0, NULL, 0, NULL, NULL }
};
GSList *uri_list;
+ GValue popt_context_value = { 0, };
+ GnomeProgram *program;
+ poptContext popt_context;
+ const char **args;
/* Make ElectricFence work. */
free (malloc (10));
@@ -464,11 +468,11 @@ main (int argc, char **argv)
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
textdomain (GETTEXT_PACKAGE);
- gnome_program_init (PACKAGE, VERSION, LIBGNOMEUI_MODULE, argc, argv,
- GNOME_PROGRAM_STANDARD_PROPERTIES,
- GNOME_PARAM_POPT_TABLE, options,
- GNOME_PARAM_HUMAN_READABLE_NAME, _("Evolution"),
- NULL);
+ program = gnome_program_init (PACKAGE, VERSION, LIBGNOMEUI_MODULE, argc, argv,
+ GNOME_PROGRAM_STANDARD_PROPERTIES,
+ GNOME_PARAM_POPT_TABLE, options,
+ GNOME_PARAM_HUMAN_READABLE_NAME, _("Evolution"),
+ NULL);
if (start_online && start_offline) {
fprintf (stderr, _("%s: --online and --offline cannot be used together.\n Use %s --help for more information.\n"),
@@ -502,7 +506,9 @@ main (int argc, char **argv)
uri_list = NULL;
-#if 0
+ g_value_init (&popt_context_value, G_TYPE_POINTER);
+ g_object_get_property (G_OBJECT (program), GNOME_PARAM_POPT_CONTEXT, &popt_context_value);
+ popt_context = g_value_get_pointer (&popt_context_value);
args = poptGetArgs (popt_context);
if (args != NULL) {
const char **p;
@@ -510,7 +516,8 @@ main (int argc, char **argv)
for (p = args; *p != NULL; p++)
uri_list = g_slist_prepend (uri_list, (char *) *p);
}
-#endif
+ uri_list = g_slist_reverse (uri_list);
+ g_value_unset (&popt_context_value);
gtk_idle_add (idle_cb, uri_list);