aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2001-07-03 20:24:29 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2001-07-03 20:24:29 +0800
commit9786eb1d7a796f9e180d8e9d1eed97f603abdb97 (patch)
tree533ea3fdb1ec52f62c8da8ac09c5cf1120480afa
parentfc8b3ba203aa2cd0d8cb07b80f533255053d6bff (diff)
downloadgsoc2013-evolution-9786eb1d7a796f9e180d8e9d1eed97f603abdb97.tar
gsoc2013-evolution-9786eb1d7a796f9e180d8e9d1eed97f603abdb97.tar.gz
gsoc2013-evolution-9786eb1d7a796f9e180d8e9d1eed97f603abdb97.tar.bz2
gsoc2013-evolution-9786eb1d7a796f9e180d8e9d1eed97f603abdb97.tar.lz
gsoc2013-evolution-9786eb1d7a796f9e180d8e9d1eed97f603abdb97.tar.xz
gsoc2013-evolution-9786eb1d7a796f9e180d8e9d1eed97f603abdb97.tar.zst
gsoc2013-evolution-9786eb1d7a796f9e180d8e9d1eed97f603abdb97.zip
Ref/unref the handler so the signal handlers can unref it safely. Also, if
* e-shell-offline-handler.c (e_shell_offline_handler_put_components_offline): Ref/unref the handler so the signal handlers can unref it safely. Also, if `prepare_for_offline()' fails, don't say that there was an internal error, as that's confusing. Just say we couldn't put the components off-line. [Fix #3758, clicking on the online/offline button crashed Evolution.] * Evolution-Offline.idl: Don't derive OfflineProgressListener from Bonobo::Unknown. svn path=/trunk/; revision=10742
-rw-r--r--shell/ChangeLog15
-rw-r--r--shell/Evolution-Offline.idl2
-rw-r--r--shell/e-shell-offline-handler.c10
3 files changed, 25 insertions, 2 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog
index 644fdf6f0e..92a2fa48c6 100644
--- a/shell/ChangeLog
+++ b/shell/ChangeLog
@@ -1,5 +1,20 @@
2001-07-03 Ettore Perazzoli <ettore@ximian.com>
+ * e-shell-offline-handler.c
+ (e_shell_offline_handler_put_components_offline): Ref/unref the
+ handler so the signal handlers can unref it safely. Also, if
+ `prepare_for_offline()' fails, don't say that there was an
+ internal error, as that's confusing. Just say we couldn't put the
+ components off-line.
+
+ [Fix #3758, clicking on the online/offline button crashed
+ Evolution.]
+
+ * Evolution-Offline.idl: Don't derive OfflineProgressListener from
+ Bonobo::Unknown.
+
+2001-07-03 Ettore Perazzoli <ettore@ximian.com>
+
[Fixed #3643, Shell crash when component crashed]
* e-shell-view.c (socket_destroy_cb): Fix Jason's broken fix for
diff --git a/shell/Evolution-Offline.idl b/shell/Evolution-Offline.idl
index 6c86de4289..377132daa3 100644
--- a/shell/Evolution-Offline.idl
+++ b/shell/Evolution-Offline.idl
@@ -19,7 +19,7 @@ struct Connection {
};
typedef sequence<Connection> ConnectionList;
-interface OfflineProgressListener : Bonobo::Unknown {
+interface OfflineProgressListener {
/* Update the shell about the progress of going off-line. The
operation is considered completed when the ConnectionList is empty. */
void updateProgress (in ConnectionList current_active_connections);
diff --git a/shell/e-shell-offline-handler.c b/shell/e-shell-offline-handler.c
index 9b0c247025..b7680f0313 100644
--- a/shell/e-shell-offline-handler.c
+++ b/shell/e-shell-offline-handler.c
@@ -790,12 +790,18 @@ e_shell_offline_handler_put_components_offline (EShellOfflineHandler *offline_ha
priv->procedure_in_progress = TRUE;
priv->parent_shell_view = parent_shell_view;
+ /* Add an extra ref here as the signal handlers might want to unref
+ us. */
+
+ gtk_object_ref (GTK_OBJECT (offline_handler));
+
gtk_signal_emit (GTK_OBJECT (offline_handler), signals[OFFLINE_PROCEDURE_STARTED]);
if (! prepare_for_offline (offline_handler)) {
/* FIXME: Maybe do something smarter here. */
- g_warning ("Couldn't put components off-line for some internal error");
+ g_warning ("Couldn't put components off-line");
gtk_signal_emit (GTK_OBJECT (offline_handler), signals[OFFLINE_PROCEDURE_FINISHED], FALSE);
+ gtk_object_unref (GTK_OBJECT (offline_handler));
return;
}
@@ -803,6 +809,8 @@ e_shell_offline_handler_put_components_offline (EShellOfflineHandler *offline_ha
pop_up_confirmation_dialog (offline_handler);
else
finalize_offline (offline_handler);
+
+ gtk_object_unref (GTK_OBJECT (offline_handler));
}