aboutsummaryrefslogtreecommitdiffstats
path: root/shell/evolution-shell-component.c
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2001-10-06 02:17:48 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2001-10-06 02:17:48 +0800
commit171018d3116779391e550cdce5413f1ee893fa68 (patch)
tree870b3d4fb29a1ffb122d92b0ffd73eabbef102ab /shell/evolution-shell-component.c
parentd8eb6abb187c001fda9a6626323b41153a58c2ef (diff)
downloadgsoc2013-evolution-171018d3116779391e550cdce5413f1ee893fa68.tar.gz
gsoc2013-evolution-171018d3116779391e550cdce5413f1ee893fa68.tar.zst
gsoc2013-evolution-171018d3116779391e550cdce5413f1ee893fa68.zip
If the owner is dead, emit "owner_died" instead of "owner_unset".
* evolution-shell-component.c (impl_setOwner): If the owner is dead, emit "owner_died" instead of "owner_unset". (impl_owner_died): New, default implementation for "owner_died". (class_init): Install it. * evolution-shell-component.h: New signal "owner_died". svn path=/trunk/; revision=13449
Diffstat (limited to 'shell/evolution-shell-component.c')
-rw-r--r--shell/evolution-shell-component.c29
1 files changed, 28 insertions, 1 deletions
diff --git a/shell/evolution-shell-component.c b/shell/evolution-shell-component.c
index 6fa1210f03..72ea36143b 100644
--- a/shell/evolution-shell-component.c
+++ b/shell/evolution-shell-component.c
@@ -72,6 +72,7 @@ struct _EvolutionShellComponentPrivate {
enum {
OWNER_SET,
OWNER_UNSET,
+ OWNER_DIED,
DEBUG,
HANDLE_EXTERNAL_URI,
USER_CREATE_NEW_ITEM,
@@ -322,7 +323,7 @@ impl_setOwner (PortableServer_Servant servant,
bonobo_object_unref (BONOBO_OBJECT (priv->owner_client));
priv->owner_client = NULL;
- gtk_signal_emit (GTK_OBJECT (shell_component), signals[OWNER_UNSET]);
+ gtk_signal_emit (GTK_OBJECT (shell_component), signals[OWNER_DIED]);
}
return;
@@ -616,11 +617,26 @@ destroy (GtkObject *object)
}
+/* EvolutionShellComponent methods. */
+
+static void
+impl_owner_died (EvolutionShellComponent *shell_component)
+{
+ /* The default implementation for ::owner_died emits ::owner_unset, so
+ that we make the behavior for old components kind of correct without
+ even if they don't handle the new ::owner_died signal correctly
+ yet. */
+
+ gtk_signal_emit (GTK_OBJECT (shell_component), signals[OWNER_UNSET]);
+}
+
+
/* Initialization. */
static void
class_init (EvolutionShellComponentClass *klass)
{
+ EvolutionShellComponentClass *shell_component_class;
GtkObjectClass *object_class;
POA_GNOME_Evolution_ShellComponent__epv *epv = &klass->epv;
@@ -636,6 +652,14 @@ class_init (EvolutionShellComponentClass *klass)
GTK_TYPE_NONE, 2,
GTK_TYPE_POINTER, GTK_TYPE_POINTER);
+ signals[OWNER_DIED]
+ = gtk_signal_new ("owner_died",
+ GTK_RUN_FIRST,
+ object_class->type,
+ GTK_SIGNAL_OFFSET (EvolutionShellComponentClass, owner_died),
+ gtk_marshal_NONE__NONE,
+ GTK_TYPE_NONE, 0);
+
signals[OWNER_UNSET]
= gtk_signal_new ("owner_unset",
GTK_RUN_FIRST,
@@ -689,6 +713,9 @@ class_init (EvolutionShellComponentClass *klass)
epv->xferFolderAsync = impl_xferFolderAsync;
epv->populateFolderContextMenu = impl_populateFolderContextMenu;
epv->userCreateNewItem = impl_userCreateNewItem;
+
+ shell_component_class = EVOLUTION_SHELL_COMPONENT_CLASS (object_class);
+ shell_component_class->owner_died = impl_owner_died;
}
static void