From 9d83b98a54a420207ed3770bf0d2283d5c7dcd19 Mon Sep 17 00:00:00 2001 From: Ettore Perazzoli Date: Fri, 29 Jun 2001 03:52:44 +0000 Subject: Fix #3756, `--debug' option not working anymore. svn path=/trunk/; revision=10586 --- shell/ChangeLog | 6 ++++++ shell/main.c | 17 ++++++++++++----- 2 files changed, 18 insertions(+), 5 deletions(-) (limited to 'shell') diff --git a/shell/ChangeLog b/shell/ChangeLog index 1f78da058f..7ae532d6e3 100644 --- a/shell/ChangeLog +++ b/shell/ChangeLog @@ -1,3 +1,9 @@ +2001-06-28 Ettore Perazzoli + + [Fix #3756, `--debug' option not working anymore.] + + * main.c (main): Get the URI + 2001-06-28 Ettore Perazzoli [Fix #3382, shortcut bar crashes when checking mail, and all the diff --git a/shell/main.c b/shell/main.c index 8fa4c4a2ef..6329c26d38 100644 --- a/shell/main.c +++ b/shell/main.c @@ -164,7 +164,7 @@ idle_cb (void *data) if (uri_list == NULL) restored = e_shell_restore_from_settings (shell); else - restored = NULL; + restored = FALSE; if (!getenv ("EVOLVE_ME_HARDER")) development_warning (); @@ -215,12 +215,13 @@ main (int argc, char **argv) { NULL, '\0', 0, NULL, 0, NULL, NULL } }; GSList *uri_list; - int i; + const char **args; + poptContext popt_context; bindtextdomain (PACKAGE, EVOLUTION_LOCALEDIR); textdomain (PACKAGE); - gnome_init_with_popt_table ("Evolution", VERSION, argc, argv, options, 0, NULL); + gnome_init_with_popt_table ("Evolution", VERSION, argc, argv, options, 0, &popt_context); if (evolution_debug_log) { int fd; @@ -254,8 +255,14 @@ main (int argc, char **argv) exit (1); uri_list = NULL; - for (i = 1; i < argc; i++) - uri_list = g_slist_prepend (uri_list, argv[i]); + + args = poptGetArgs (popt_context); + if (args == NULL) { + const char **p; + + for (p = args; *p != NULL; p++) + uri_list = g_slist_prepend (uri_list, (char *) *p); + } gtk_idle_add (idle_cb, uri_list); -- cgit v1.2.3