aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Toshok <toshok@ximian.com>2001-08-21 18:08:51 +0800
committerChris Toshok <toshok@src.gnome.org>2001-08-21 18:08:51 +0800
commit5db9380c89618f1d5f1d16e812e1b8e7bc60aed4 (patch)
tree6ec47e4433ad307aa3025597060bda0f955ce654
parente25bb4e9dc520a4704878bd34adced03834aac8f (diff)
downloadgsoc2013-evolution-5db9380c89618f1d5f1d16e812e1b8e7bc60aed4.tar
gsoc2013-evolution-5db9380c89618f1d5f1d16e812e1b8e7bc60aed4.tar.gz
gsoc2013-evolution-5db9380c89618f1d5f1d16e812e1b8e7bc60aed4.tar.bz2
gsoc2013-evolution-5db9380c89618f1d5f1d16e812e1b8e7bc60aed4.tar.lz
gsoc2013-evolution-5db9380c89618f1d5f1d16e812e1b8e7bc60aed4.tar.xz
gsoc2013-evolution-5db9380c89618f1d5f1d16e812e1b8e7bc60aed4.tar.zst
gsoc2013-evolution-5db9380c89618f1d5f1d16e812e1b8e7bc60aed4.zip
if we're dragging, drag_button_down won't be true in the BUTTON_RELEASE
2001-08-21 Chris Toshok <toshok@ximian.com> * gui/widgets/e-minicard.c (e_minicard_event): if we're dragging, drag_button_down won't be true in the BUTTON_RELEASE case, since we set it to false in MOTION_NOTIFY once the threshold is reached. (e_minicard_drag_end): remove this function, since it was needed to work around a bug in gnome-canvas. svn path=/trunk/; revision=12337
-rw-r--r--addressbook/ChangeLog8
-rw-r--r--addressbook/gui/widgets/e-minicard.c22
2 files changed, 9 insertions, 21 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog
index 022bf23d08..e987ab876f 100644
--- a/addressbook/ChangeLog
+++ b/addressbook/ChangeLog
@@ -1,3 +1,11 @@
+2001-08-21 Chris Toshok <toshok@ximian.com>
+
+ * gui/widgets/e-minicard.c (e_minicard_event): if we're dragging,
+ drag_button_down won't be true in the BUTTON_RELEASE case, since
+ we set it to false in MOTION_NOTIFY once the threshold is reached.
+ (e_minicard_drag_end): remove this function, since it was needed
+ to work around a bug in gnome-canvas.
+
2001-08-20 Jon Trowbridge <trow@ximian.com>
* gui/component/select-names/e-select-names.c
diff --git a/addressbook/gui/widgets/e-minicard.c b/addressbook/gui/widgets/e-minicard.c
index 1638ee266c..a4b7f1ab26 100644
--- a/addressbook/gui/widgets/e-minicard.c
+++ b/addressbook/gui/widgets/e-minicard.c
@@ -55,7 +55,6 @@ static void e_minicard_resize_children( EMinicard *e_minicard );
static void remodel( EMinicard *e_minicard );
static gint e_minicard_drag_begin (EMinicard *minicard, GdkEvent *event);
-static void e_minicard_drag_end (GtkWidget *canvas, GdkDragContext *context, EMinicard *e_minicard);
static GnomeCanvasGroupClass *parent_class = NULL;
@@ -530,7 +529,7 @@ e_minicard_event (GnomeCanvasItem *item, GdkEvent *event)
return ret_val;
}
case GDK_BUTTON_RELEASE:
- if (e_minicard->drag_button_down && e_minicard->drag_button == event->button.button) {
+ if (e_minicard->drag_button == event->button.button) {
e_minicard->drag_button = 0;
e_minicard->drag_button_down = FALSE;
e_minicard->button_x = -1;
@@ -550,10 +549,6 @@ e_minicard_event (GnomeCanvasItem *item, GdkEvent *event)
ret_val = e_minicard_drag_begin(e_minicard, event);
- /* now we register with drag end on our canvas so we can know when to release our grab */
- gtk_signal_connect (GTK_OBJECT (GNOME_CANVAS_ITEM (e_minicard)->canvas),
- "drag_end", (GtkSignalFunc)e_minicard_drag_end, e_minicard);
-
e_minicard->drag_button_down = FALSE;
return ret_val;
@@ -955,18 +950,3 @@ e_minicard_drag_begin (EMinicard *minicard, GdkEvent *event)
event, &ret_val);
return ret_val;
}
-
-static void
-e_minicard_drag_end (GtkWidget *canvas, GdkDragContext *context, EMinicard *e_minicard)
-{
- e_minicard->drag_button = 0;
- e_minicard->drag_button_down = FALSE;
- e_minicard->button_x = -1;
- e_minicard->button_y = -1;
-
- gtk_grab_remove (GTK_WIDGET (GNOME_CANVAS_ITEM (e_minicard)->canvas));
- gnome_canvas_item_ungrab (GNOME_CANVAS_ITEM (e_minicard), GDK_CURRENT_TIME);
-
- gtk_signal_disconnect_by_func (GTK_OBJECT (GNOME_CANVAS_ITEM (e_minicard)->canvas),
- (GtkSignalFunc)e_minicard_drag_end, e_minicard);
-}