If the shell fails to display all of the requested URIs, fall back to

the default URI (Summary).

svn path=/trunk/; revision=16404
This commit is contained in:
Dan Winship
2002-04-09 15:33:45 +00:00
parent f61f9beaaf
commit c10d63c7c2
2 changed files with 20 additions and 13 deletions

View File

@ -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.

View File

@ -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,7 +272,23 @@ idle_cb (void *data)
}
}
if (display_default) {
displayed_any = FALSE;
for (p = uri_list; p != NULL; p = p->next) {
const char *uri;
uri = (const char *) p->data;
GNOME_Evolution_Shell_handleURI (corba_shell, uri, &ev);
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);
}
}
g_slist_free (uri_list);
if (display_default || !displayed_any) {
const char *uri;
uri = E_SHELL_VIEW_DEFAULT_URI;
@ -280,17 +297,6 @@ idle_cb (void *data)
g_warning ("CORBA exception %s when requesting URI -- %s", ev._repo_id, uri);
}
for (p = uri_list; p != NULL; p = p->next) {
const char *uri;
uri = (const char *) p->data;
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);