From 5db9380c89618f1d5f1d16e812e1b8e7bc60aed4 Mon Sep 17 00:00:00 2001 From: Chris Toshok Date: Tue, 21 Aug 2001 10:08:51 +0000 Subject: if we're dragging, drag_button_down won't be true in the BUTTON_RELEASE 2001-08-21 Chris Toshok * 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 --- addressbook/ChangeLog | 8 ++++++++ addressbook/gui/widgets/e-minicard.c | 22 +--------------------- 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 + + * 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 * 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); -} -- cgit