aboutsummaryrefslogtreecommitdiffstats
path: root/shell/main.c
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2002-04-09 23:33:45 +0800
committerDan Winship <danw@src.gnome.org>2002-04-09 23:33:45 +0800
commitc10d63c7c2449982993a9579a9f0b951632b9401 (patch)
tree4fed92daeb039ae5d29261b3741c443ead7aee64 /shell/main.c
parentf61f9beaaf90d760168e811f69e0f7e6f0a0a844 (diff)
downloadgsoc2013-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
Diffstat (limited to 'shell/main.c')
-rw-r--r--shell/main.c20
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);