aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Toshok <toshok@ximian.com>2002-11-08 15:14:50 +0800
committerChris Toshok <toshok@src.gnome.org>2002-11-08 15:14:50 +0800
commit94c61bbfadcc832956c77837d2d1524482484715 (patch)
tree3b9c30a63ad6183df96dbcf59c440a5e4e05a8fd
parentef7e69f0f3fd13c783e93d49fe39918d21e52dad (diff)
downloadgsoc2013-evolution-94c61bbfadcc832956c77837d2d1524482484715.tar
gsoc2013-evolution-94c61bbfadcc832956c77837d2d1524482484715.tar.gz
gsoc2013-evolution-94c61bbfadcc832956c77837d2d1524482484715.tar.bz2
gsoc2013-evolution-94c61bbfadcc832956c77837d2d1524482484715.tar.lz
gsoc2013-evolution-94c61bbfadcc832956c77837d2d1524482484715.tar.xz
gsoc2013-evolution-94c61bbfadcc832956c77837d2d1524482484715.tar.zst
gsoc2013-evolution-94c61bbfadcc832956c77837d2d1524482484715.zip
guard against multiple calls. fixes a crash whenever a task finishes (the
2002-11-07 Chris Toshok <toshok@ximian.com> * e-task-widget.c (impl_destroy): guard against multiple calls. fixes a crash whenever a task finishes (the addressbook finishing loading, etc.). * e-shell-marshal.list: add NONE:BOOL for evolution-shell-component. * evolution-shell-component.c (class_init): register the signals with g_signal_new. svn path=/trunk/; revision=18661
-rw-r--r--shell/ChangeLog12
-rw-r--r--shell/e-shell-marshal.list1
-rw-r--r--shell/e-task-widget.c13
-rw-r--r--shell/evolution-shell-component.c119
4 files changed, 85 insertions, 60 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog
index 4318d8edfa..a8f6dfe002 100644
--- a/shell/ChangeLog
+++ b/shell/ChangeLog
@@ -1,3 +1,15 @@
+2002-11-07 Chris Toshok <toshok@ximian.com>
+
+ * e-task-widget.c (impl_destroy): guard against multiple calls.
+ fixes a crash whenever a task finishes (the addressbook finishing
+ loading, etc.).
+
+ * e-shell-marshal.list: add NONE:BOOL for
+ evolution-shell-component.
+
+ * evolution-shell-component.c (class_init): register the signals
+ with g_signal_new.
+
2002-11-05 Ettore Perazzoli <ettore@ximian.com>
* e-shell.c (e_shell_show_settings): Allow type being NULL.
diff --git a/shell/e-shell-marshal.list b/shell/e-shell-marshal.list
index de0ad340ba..aa9f7b36b9 100644
--- a/shell/e-shell-marshal.list
+++ b/shell/e-shell-marshal.list
@@ -1,3 +1,4 @@
+NONE:BOOL
NONE:INT
NONE:INT,INT
NONE:INT,POINTER
diff --git a/shell/e-task-widget.c b/shell/e-task-widget.c
index a6d7e773c6..ce936a5b10 100644
--- a/shell/e-task-widget.c
+++ b/shell/e-task-widget.c
@@ -62,15 +62,18 @@ impl_destroy (GtkObject *object)
ETaskWidgetPrivate *priv;
task_widget = E_TASK_WIDGET (object);
- priv = task_widget->priv;
+ if (task_widget->priv) {
+ priv = task_widget->priv;
- g_free (priv->component_id);
+ g_free (priv->component_id);
- g_object_unref (priv->tooltips);
+ g_object_unref (priv->tooltips);
- gdk_pixbuf_unref (priv->icon_pixbuf);
+ gdk_pixbuf_unref (priv->icon_pixbuf);
- g_free (priv);
+ g_free (priv);
+ task_widget->priv = NULL;
+ }
(* GTK_OBJECT_CLASS (parent_class)->destroy) (object);
}
diff --git a/shell/evolution-shell-component.c b/shell/evolution-shell-component.c
index d6392a08bb..3aee87a74c 100644
--- a/shell/evolution-shell-component.c
+++ b/shell/evolution-shell-component.c
@@ -27,6 +27,7 @@
#include "evolution-shell-component.h"
#include "e-shell-corba-icon-utils.h"
+#include "e-shell-marshal.h"
#include <fcntl.h>
#include <unistd.h>
@@ -871,75 +872,83 @@ class_init (EvolutionShellComponentClass *klass)
object_class->finalize = impl_finalize;
signals[OWNER_SET]
- = gtk_signal_new ("owner_set",
- GTK_RUN_FIRST,
- GTK_CLASS_TYPE (object_class),
- GTK_SIGNAL_OFFSET (EvolutionShellComponentClass, owner_set),
- gtk_marshal_NONE__POINTER_POINTER,
- GTK_TYPE_NONE, 2,
- GTK_TYPE_POINTER, GTK_TYPE_POINTER);
+ = g_signal_new ("owner_set",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_FIRST,
+ G_STRUCT_OFFSET (EvolutionShellComponentClass, owner_set),
+ NULL, NULL,
+ e_shell_marshal_NONE__POINTER_POINTER,
+ G_TYPE_NONE, 2,
+ G_TYPE_POINTER, G_TYPE_POINTER);
signals[OWNER_DIED]
- = gtk_signal_new ("owner_died",
- GTK_RUN_FIRST,
- GTK_CLASS_TYPE (object_class),
- GTK_SIGNAL_OFFSET (EvolutionShellComponentClass, owner_died),
- gtk_marshal_NONE__NONE,
- GTK_TYPE_NONE, 0);
+ = g_signal_new ("owner_died",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_FIRST,
+ G_STRUCT_OFFSET (EvolutionShellComponentClass, owner_died),
+ NULL, NULL,
+ e_shell_marshal_NONE__NONE,
+ G_TYPE_NONE, 0);
signals[OWNER_UNSET]
- = gtk_signal_new ("owner_unset",
- GTK_RUN_FIRST,
- GTK_CLASS_TYPE (object_class),
- GTK_SIGNAL_OFFSET (EvolutionShellComponentClass, owner_unset),
- gtk_marshal_NONE__NONE,
- GTK_TYPE_NONE, 0);
+ = g_signal_new ("owner_unset",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_FIRST,
+ G_STRUCT_OFFSET (EvolutionShellComponentClass, owner_unset),
+ NULL, NULL,
+ e_shell_marshal_NONE__NONE,
+ G_TYPE_NONE, 0);
signals[DEBUG]
- = gtk_signal_new ("debug",
- GTK_RUN_FIRST,
- GTK_CLASS_TYPE (object_class),
- GTK_SIGNAL_OFFSET (EvolutionShellComponentClass, debug),
- gtk_marshal_NONE__NONE,
- GTK_TYPE_NONE, 0);
+ = g_signal_new ("debug",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_FIRST,
+ G_STRUCT_OFFSET (EvolutionShellComponentClass, debug),
+ NULL, NULL,
+ e_shell_marshal_NONE__NONE,
+ G_TYPE_NONE, 0);
signals[INTERACTIVE]
- = gtk_signal_new ("interactive",
- GTK_RUN_FIRST,
- GTK_CLASS_TYPE (object_class),
- GTK_SIGNAL_OFFSET (EvolutionShellComponentClass, interactive),
- gtk_marshal_NONE__BOOL,
- GTK_TYPE_NONE, 1,
- GTK_TYPE_BOOL);
+ = g_signal_new ("interactive",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_FIRST,
+ G_STRUCT_OFFSET (EvolutionShellComponentClass, interactive),
+ NULL, NULL,
+ e_shell_marshal_NONE__BOOL,
+ G_TYPE_NONE, 1,
+ G_TYPE_BOOLEAN);
signals[HANDLE_EXTERNAL_URI]
- = gtk_signal_new ("handle_external_uri",
- GTK_RUN_FIRST,
- GTK_CLASS_TYPE (object_class),
- GTK_SIGNAL_OFFSET (EvolutionShellComponentClass, handle_external_uri),
- gtk_marshal_NONE__STRING,
- GTK_TYPE_NONE, 1,
- GTK_TYPE_STRING);
+ = g_signal_new ("handle_external_uri",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_FIRST,
+ G_STRUCT_OFFSET (EvolutionShellComponentClass, handle_external_uri),
+ NULL, NULL,
+ e_shell_marshal_NONE__STRING,
+ G_TYPE_NONE, 1,
+ G_TYPE_STRING);
signals[USER_CREATE_NEW_ITEM]
- = gtk_signal_new ("user_create_new_item",
- GTK_RUN_FIRST,
- GTK_CLASS_TYPE (object_class),
- GTK_SIGNAL_OFFSET (EvolutionShellComponentClass, user_create_new_item),
- gtk_marshal_NONE__POINTER_POINTER_POINTER,
- GTK_TYPE_NONE, 3,
- GTK_TYPE_STRING,
- GTK_TYPE_STRING,
- GTK_TYPE_STRING);
+ = g_signal_new ("user_create_new_item",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_FIRST,
+ G_STRUCT_OFFSET (EvolutionShellComponentClass, user_create_new_item),
+ NULL, NULL,
+ e_shell_marshal_NONE__POINTER_POINTER_POINTER,
+ G_TYPE_NONE, 3,
+ G_TYPE_STRING,
+ G_TYPE_STRING,
+ G_TYPE_STRING);
signals[SEND_RECEIVE]
- = gtk_signal_new ("send_receive",
- GTK_RUN_FIRST,
- GTK_CLASS_TYPE (object_class),
- GTK_SIGNAL_OFFSET (EvolutionShellComponentClass, send_receive),
- gtk_marshal_NONE__BOOL,
- GTK_TYPE_NONE, 1,
- GTK_TYPE_BOOL);
+ = g_signal_new ("send_receive",
+ G_OBJECT_CLASS_TYPE (object_class),
+ G_SIGNAL_RUN_FIRST,
+ G_STRUCT_OFFSET (EvolutionShellComponentClass, send_receive),
+ NULL, NULL,
+ e_shell_marshal_NONE__BOOL,
+ G_TYPE_NONE, 1,
+ G_TYPE_BOOLEAN);
parent_class = gtk_type_class (PARENT_TYPE);