diff options
Diffstat (limited to 'shell/main.c')
-rw-r--r-- | shell/main.c | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/shell/main.c b/shell/main.c index 61ad7c7ef6..23926f3101 100644 --- a/shell/main.c +++ b/shell/main.c @@ -191,6 +191,7 @@ idle_cb (void *data) GSList *p; gboolean have_evolution_uri; gboolean display_default; + gboolean displayed_any; CORBA_exception_init (&ev); @@ -271,26 +272,31 @@ idle_cb (void *data) } } - if (display_default) { + displayed_any = FALSE; + for (p = uri_list; p != NULL; p = p->next) { const char *uri; - uri = E_SHELL_VIEW_DEFAULT_URI; + uri = (const char *) p->data; GNOME_Evolution_Shell_handleURI (corba_shell, uri, &ev); - if (ev._major != CORBA_NO_EXCEPTION) + if (ev._major == CORBA_NO_EXCEPTION) + displayed_any = TRUE; + else { g_warning ("CORBA exception %s when requesting URI -- %s", ev._repo_id, uri); + CORBA_exception_free (&ev); + } } - for (p = uri_list; p != NULL; p = p->next) { + g_slist_free (uri_list); + + if (display_default || !displayed_any) { const char *uri; - uri = (const char *) p->data; + uri = E_SHELL_VIEW_DEFAULT_URI; GNOME_Evolution_Shell_handleURI (corba_shell, uri, &ev); if (ev._major != CORBA_NO_EXCEPTION) g_warning ("CORBA exception %s when requesting URI -- %s", ev._repo_id, uri); } - g_slist_free (uri_list); - CORBA_Object_release (corba_shell, &ev); CORBA_exception_free (&ev); |