aboutsummaryrefslogtreecommitdiffstats
path: root/shell/main.c
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2001-10-06 03:43:23 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2001-10-06 03:43:23 +0800
commitb6c919243e98e9a509018e2cec0fff62d945be7d (patch)
treec0e28987d1850c066a021c0335ac9c9a3f383d1f /shell/main.c
parentba39d4fff529940d5e2a8a2a7e607d2bee644c08 (diff)
downloadgsoc2013-evolution-b6c919243e98e9a509018e2cec0fff62d945be7d.tar
gsoc2013-evolution-b6c919243e98e9a509018e2cec0fff62d945be7d.tar.gz
gsoc2013-evolution-b6c919243e98e9a509018e2cec0fff62d945be7d.tar.bz2
gsoc2013-evolution-b6c919243e98e9a509018e2cec0fff62d945be7d.tar.lz
gsoc2013-evolution-b6c919243e98e9a509018e2cec0fff62d945be7d.tar.xz
gsoc2013-evolution-b6c919243e98e9a509018e2cec0fff62d945be7d.tar.zst
gsoc2013-evolution-b6c919243e98e9a509018e2cec0fff62d945be7d.zip
Also `gdk_flush()'. (idle_cb): If the user doesn't specify at least one
* main.c (quit_box_new): Also `gdk_flush()'. (idle_cb): If the user doesn't specify at least one `evolution:' URI, restore from the settings. [Fixes #6093.] svn path=/trunk/; revision=13459
Diffstat (limited to 'shell/main.c')
-rw-r--r--shell/main.c48
1 files changed, 28 insertions, 20 deletions
diff --git a/shell/main.c b/shell/main.c
index 2e6d95e612..5260ea5696 100644
--- a/shell/main.c
+++ b/shell/main.c
@@ -53,6 +53,7 @@
#include "e-util/e-gtk-utils.h"
+#include "e-shell-constants.h"
#include "e-setup.h"
#include "e-shell.h"
@@ -94,6 +95,7 @@ quit_box_new (void)
/* For some reason, the window fails to update without this
sometimes. */
gtk_widget_queue_draw (window);
+ gdk_flush ();
while (gtk_events_pending ())
gtk_main_iteration ();
@@ -203,7 +205,8 @@ idle_cb (void *data)
GNOME_Evolution_Shell corba_shell;
CORBA_Environment ev;
EShellConstructResult result;
- gboolean restored;
+ GSList *p;
+ gboolean have_evolution_uri;
CORBA_exception_init (&ev);
@@ -219,11 +222,6 @@ idle_cb (void *data)
gtk_signal_connect (GTK_OBJECT (shell), "destroy",
GTK_SIGNAL_FUNC (destroy_cb), NULL);
- if (uri_list == NULL)
- restored = e_shell_restore_from_settings (shell);
- else
- restored = FALSE;
-
if (!getenv ("EVOLVE_ME_HARDER"))
development_warning ();
@@ -240,8 +238,6 @@ idle_cb (void *data)
gtk_main_quit ();
return FALSE;
}
-
- restored = FALSE;
break;
default:
@@ -254,28 +250,40 @@ idle_cb (void *data)
}
- if (! restored && uri_list == NULL) {
- const char *uri = E_SHELL_VIEW_DEFAULT_URI;
+ have_evolution_uri = FALSE;
+ for (p = uri_list; p != NULL; p = p->next) {
+ const char *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);
- } else {
- GSList *p;
-
- for (p = uri_list; p != NULL; p = p->next) {
- char *uri;
+ uri = (const char *) p->data;
+ if (strncmp (uri, E_SHELL_URI_PREFIX, E_SHELL_URI_PREFIX_LEN) == 0)
+ have_evolution_uri = TRUE;
+ }
- uri = (char *) p->data;
+ if (! have_evolution_uri) {
+ if (! e_shell_restore_from_settings (shell)) {
+ const char *uri;
+ 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);
}
+ }
+
+ for (p = uri_list; p != NULL; p = p->next) {
+ const char *uri;
- g_slist_free (uri_list);
+ 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);
+
+ if (strncmp (uri, E_SHELL_URI_PREFIX, E_SHELL_URI_PREFIX_LEN) == 0)
+ have_evolution_uri = TRUE;
}
+ g_slist_free (uri_list);
+
CORBA_Object_release (corba_shell, &ev);
CORBA_exception_free (&ev);