diff options
author | Dan Winship <danw@src.gnome.org> | 2002-04-09 23:33:45 +0800 |
---|---|---|
committer | Dan Winship <danw@src.gnome.org> | 2002-04-09 23:33:45 +0800 |
commit | c10d63c7c2449982993a9579a9f0b951632b9401 (patch) | |
tree | 4fed92daeb039ae5d29261b3741c443ead7aee64 | |
parent | f61f9beaaf90d760168e811f69e0f7e6f0a0a844 (diff) | |
download | gsoc2013-evolution-c10d63c7c2449982993a9579a9f0b951632b9401.tar.gz gsoc2013-evolution-c10d63c7c2449982993a9579a9f0b951632b9401.tar.zst gsoc2013-evolution-c10d63c7c2449982993a9579a9f0b951632b9401.zip |
If the shell fails to display all of the requested URIs, fall back to
the default URI (Summary).
svn path=/trunk/; revision=16404
-rw-r--r-- | shell/ChangeLog | 3 | ||||
-rw-r--r-- | shell/main.c | 20 |
2 files changed, 15 insertions, 8 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog index 4a8a91be5e..a8323cd1e4 100644 --- a/shell/ChangeLog +++ b/shell/ChangeLog @@ -1,7 +1,8 @@ 2002-04-09 Dan Winship <danw@ximian.com> * main.c (idle_cb): Check for "default:" URIs and treat them the - same way as "evolution:" URIs. + same way as "evolution:" URIs. If the shell fails to display all + of the requested URIs, fall back to the default URI (Summary). * e-shell.c (impl_Shell_handleURI): Handle "default:" URIs by looking up the default folders in the config db. 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); |