aboutsummaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2002-11-15 07:08:29 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2002-11-15 07:08:29 +0800
commit334b42bda165b9cfd18f60f60742f850f9154c2e (patch)
treea053bcb55aba50c9034752bccac043f4272c29e7 /shell
parenta68ff6bc2f3070cc852456c18d9edfecb31b183c (diff)
downloadgsoc2013-evolution-334b42bda165b9cfd18f60f60742f850f9154c2e.tar
gsoc2013-evolution-334b42bda165b9cfd18f60f60742f850f9154c2e.tar.gz
gsoc2013-evolution-334b42bda165b9cfd18f60f60742f850f9154c2e.tar.bz2
gsoc2013-evolution-334b42bda165b9cfd18f60f60742f850f9154c2e.tar.lz
gsoc2013-evolution-334b42bda165b9cfd18f60f60742f850f9154c2e.tar.xz
gsoc2013-evolution-334b42bda165b9cfd18f60f60742f850f9154c2e.tar.zst
gsoc2013-evolution-334b42bda165b9cfd18f60f60742f850f9154c2e.zip
Use bonobo_main_quit() instead of gtk_main_quit(). (shell_weak_notify):
* main.c (no_views_left_cb): Use bonobo_main_quit() instead of gtk_main_quit(). (shell_weak_notify): Likewise. (idle_cb): Likewise. * e-shell.c (notify_no_views_left_idle_cb): New idle function to emit the "no_views_left" signal. (view_weak_notify): Put it on the idle loop instead of firing the signal here. * e-task-widget.c (e_task_widget_construct): Ref/sink the GtkTooltips object. svn path=/trunk/; revision=18763
Diffstat (limited to 'shell')
-rw-r--r--shell/ChangeLog15
-rw-r--r--shell/e-shell.c27
-rw-r--r--shell/e-task-widget.c2
-rw-r--r--shell/main.c10
4 files changed, 42 insertions, 12 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog
index 202e97a286..adc31f15a4 100644
--- a/shell/ChangeLog
+++ b/shell/ChangeLog
@@ -1,5 +1,20 @@
2002-11-14 Ettore Perazzoli <ettore@ximian.com>
+ * main.c (no_views_left_cb): Use bonobo_main_quit() instead of
+ gtk_main_quit().
+ (shell_weak_notify): Likewise.
+ (idle_cb): Likewise.
+
+ * e-shell.c (notify_no_views_left_idle_cb): New idle function to
+ emit the "no_views_left" signal.
+ (view_weak_notify): Put it on the idle loop instead of firing the
+ signal here.
+
+ * e-task-widget.c (e_task_widget_construct): Ref/sink the
+ GtkTooltips object.
+
+2002-11-14 Ettore Perazzoli <ettore@ximian.com>
+
* e-shell.c (save_settings_for_views): Removed.
(e_shell_save_settings): Do not call it here.
diff --git a/shell/e-shell.c b/shell/e-shell.c
index 4acc386ae0..a02cc1e89b 100644
--- a/shell/e-shell.c
+++ b/shell/e-shell.c
@@ -956,6 +956,24 @@ view_delete_event_cb (GtkWidget *widget,
return ! e_shell_request_close_view (shell, E_SHELL_VIEW (widget));
}
+static gboolean
+notify_no_views_left_idle_cb (void *data)
+{
+ EShell *shell;
+
+ puts (__FUNCTION__);
+
+ shell = E_SHELL (data);
+
+ set_interactive (shell, FALSE);
+
+ bonobo_object_ref (BONOBO_OBJECT (shell));
+ g_signal_emit (shell, signals [NO_VIEWS_LEFT], 0);
+ bonobo_object_unref (BONOBO_OBJECT (shell));
+
+ return FALSE;
+}
+
static void
view_weak_notify (void *data,
GObject *where_the_object_was)
@@ -975,13 +993,8 @@ view_weak_notify (void *data,
shell->priv->views = g_list_remove (shell->priv->views, where_the_object_was);
- if (shell->priv->views == NULL) {
- set_interactive (shell, FALSE);
-
- bonobo_object_ref (BONOBO_OBJECT (shell));
- g_signal_emit (shell, signals [NO_VIEWS_LEFT], 0);
- bonobo_object_unref (BONOBO_OBJECT (shell));
- }
+ if (shell->priv->views == NULL)
+ g_idle_add (notify_no_views_left_idle_cb, shell);
}
static EShellView *
diff --git a/shell/e-task-widget.c b/shell/e-task-widget.c
index cdbeb987e1..9adf84fe4b 100644
--- a/shell/e-task-widget.c
+++ b/shell/e-task-widget.c
@@ -170,6 +170,8 @@ e_task_widget_construct (ETaskWidget *task_widget,
gdk_bitmap_unref (mask);
priv->tooltips = gtk_tooltips_new ();
+ g_object_ref (priv->tooltips);
+ gtk_object_sink (GTK_OBJECT (priv->tooltips));
e_task_widget_update (task_widget, information, -1.0);
}
diff --git a/shell/main.c b/shell/main.c
index 36a5648763..0e09e8338f 100644
--- a/shell/main.c
+++ b/shell/main.c
@@ -170,14 +170,14 @@ no_views_left_cb (EShell *shell, gpointer data)
if (quit_box != NULL)
gtk_widget_destroy (quit_box);
- gtk_main_quit ();
+ bonobo_main_quit ();
}
static void
shell_weak_notify (void *data,
GObject *where_the_object_was)
{
- gtk_main_quit ();
+ bonobo_main_quit ();
}
@@ -376,7 +376,7 @@ idle_cb (void *data)
e_notice (NULL, GNOME_MESSAGE_BOX_ERROR,
_("Cannot access the Ximian Evolution shell."));
CORBA_exception_free (&ev);
- gtk_main_quit ();
+ bonobo_main_quit ();
return FALSE;
}
break;
@@ -386,7 +386,7 @@ idle_cb (void *data)
_("Cannot initialize the Ximian Evolution shell: %s"),
e_shell_construct_result_to_string (result));
CORBA_exception_free (&ev);
- gtk_main_quit ();
+ bonobo_main_quit ();
return FALSE;
}
@@ -456,7 +456,7 @@ idle_cb (void *data)
CORBA_exception_free (&ev);
if (shell == NULL)
- gtk_main_quit ();
+ bonobo_main_quit ();
return FALSE;
}