aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@ximian.com>2001-05-16 13:50:20 +0800
committerChris Lahey <clahey@src.gnome.org>2001-05-16 13:50:20 +0800
commit2e3a3d226c1e9f55f6608108bd6f6d90d401f24f (patch)
treed1f59a812d84ad7b8a3f9f0c5b0227a0d5193f13 /addressbook
parent934524b95cb86abae6b1457ff5d4853fb702cb87 (diff)
downloadgsoc2013-evolution-2e3a3d226c1e9f55f6608108bd6f6d90d401f24f.tar.gz
gsoc2013-evolution-2e3a3d226c1e9f55f6608108bd6f6d90d401f24f.tar.zst
gsoc2013-evolution-2e3a3d226c1e9f55f6608108bd6f6d90d401f24f.zip
Fixed up the lifetime of the drag_data_get signal a bit.
2001-05-16 Christopher James Lahey <clahey@ximian.com> * gui/widgets/e-minicard-view.c: (e_minicard_view_destroy): Fixed up the lifetime of the drag_data_get signal a bit. svn path=/trunk/; revision=9838
Diffstat (limited to 'addressbook')
-rw-r--r--addressbook/ChangeLog5
-rw-r--r--addressbook/gui/widgets/e-minicard-view.c28
2 files changed, 10 insertions, 23 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog
index 7ad1fe032e..6a49145d83 100644
--- a/addressbook/ChangeLog
+++ b/addressbook/ChangeLog
@@ -1,3 +1,8 @@
+2001-05-16 Christopher James Lahey <clahey@ximian.com>
+
+ * gui/widgets/e-minicard-view.c: (e_minicard_view_destroy): Fixed
+ up the lifetime of the drag_data_get signal a bit.
+
2001-05-15 Chris Toshok <toshok@ximian.com>
* gui/widgets/e-minicard-view.c (add_to_list): MinicardViewModel
diff --git a/addressbook/gui/widgets/e-minicard-view.c b/addressbook/gui/widgets/e-minicard-view.c
index d8b3c73d9a..3a9cf6923e 100644
--- a/addressbook/gui/widgets/e-minicard-view.c
+++ b/addressbook/gui/widgets/e-minicard-view.c
@@ -32,8 +32,6 @@
#include <gal/widgets/e-unicode.h>
#include <libgnome/gnome-i18n.h>
-static void canvas_destroy (GtkObject *object, EMinicardView *view);
-
static void e_minicard_view_drag_data_get(GtkWidget *widget,
GdkDragContext *context,
GtkSelectionData *selection_data,
@@ -215,8 +213,6 @@ adapter_changed (EMinicardView *view)
{
char *empty_message;
- view->canvas_drag_data_get_id = 0;
-
empty_message = e_utf8_from_locale_string(_("\n\nThere are no items to show in this view\n\n"
"Double-click here to create a new Contact."));
gtk_object_set (GTK_OBJECT(view),
@@ -304,7 +300,10 @@ e_minicard_view_destroy (GtkObject *object)
{
EMinicardView *view = E_MINICARD_VIEW(object);
-
+ if (view->canvas_drag_data_get_id) {
+ gtk_signal_disconnect (GTK_OBJECT (GNOME_CANVAS_ITEM (view)->canvas),
+ view->canvas_drag_data_get_id);
+ }
gtk_object_unref (GTK_OBJECT (view->adapter));
GTK_OBJECT_CLASS(parent_class)->destroy (object);
@@ -364,24 +363,6 @@ e_minicard_view_selection_event (EReflow *reflow, GnomeCanvasItem *item, GdkEven
return return_val;
}
-static void
-disconnect_signals(EMinicardView *view)
-{
- if (view->canvas_drag_data_get_id)
- gtk_signal_disconnect(GTK_OBJECT (GNOME_CANVAS_ITEM (view)->canvas),
- view->canvas_drag_data_get_id);
-
- view->canvas_drag_data_get_id = 0;
-}
-
-#if 0
-static void
-canvas_destroy(GtkObject *object, EMinicardView *view)
-{
- disconnect_signals(view);
-}
-#endif
-
typedef struct {
EMinicardView *view;
EBookCallback cb;
@@ -498,6 +479,7 @@ static void
e_minicard_view_init (EMinicardView *view)
{
view->adapter = NULL;
+ view->canvas_drag_data_get_id = 0;
}
GtkType