aboutsummaryrefslogtreecommitdiffstats
path: root/shell
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
parentd8eb6abb187c001fda9a6626323b41153a58c2ef (diff)
downloadgsoc2013-evolution-171018d3116779391e550cdce5413f1ee893fa68.tar
gsoc2013-evolution-171018d3116779391e550cdce5413f1ee893fa68.tar.gz
gsoc2013-evolution-171018d3116779391e550cdce5413f1ee893fa68.tar.bz2
gsoc2013-evolution-171018d3116779391e550cdce5413f1ee893fa68.tar.lz
gsoc2013-evolution-171018d3116779391e550cdce5413f1ee893fa68.tar.xz
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')
-rw-r--r--shell/ChangeLog9
-rw-r--r--shell/evolution-shell-component.c29
-rw-r--r--shell/evolution-shell-component.h2
3 files changed, 39 insertions, 1 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog
index 004c44a304..884fa7fdef 100644
--- a/shell/ChangeLog
+++ b/shell/ChangeLog
@@ -1,5 +1,14 @@
2001-10-05 Ettore Perazzoli <ettore@ximian.com>
+ * 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".
+
+2001-10-05 Ettore Perazzoli <ettore@ximian.com>
+
* e-shell.c (set_owner_on_components): If setting the owner fails,
print the a warning message out. Then restart the component.
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
diff --git a/shell/evolution-shell-component.h b/shell/evolution-shell-component.h
index 6d273e5337..bf8eaf4776 100644
--- a/shell/evolution-shell-component.h
+++ b/shell/evolution-shell-component.h
@@ -139,6 +139,8 @@ struct _EvolutionShellComponentClass {
EvolutionShellClient *shell_client,
const char *evolution_homedir);
void (* owner_unset) (EvolutionShellComponent *shell_component);
+ void (* owner_died) (EvolutionShellComponent *shell_component);
+
void (* debug) (EvolutionShellComponent *shell_component);
void (* handle_external_uri) (EvolutionShellComponent *shell_component,