From fc3440ee9c435bc2fa30fb695caa853d71c17557 Mon Sep 17 00:00:00 2001 From: Chris Toshok Date: Tue, 10 Apr 2001 02:14:08 +0000 Subject: on BUTTON_PRESS: if it's button 1, store the button x, y, and set 2001-04-09 Chris Toshok * gui/widgets/e-minicard.c (e_minicard_event): on BUTTON_PRESS: if it's button 1, store the button x, y, and set drag_button_down to TRUE. on BUTTON_RELEASE: always set drag_button_down to FALSE. for MOTION_NOTIFY: initiate drag if the pointer has moved 3 pixels. * gui/widgets/e-minicard.h (struct _EMinicard): add fields for button x, y, and a bit for if the button has been pressed so we can tell whether a motion should be a drag. (struct _EMinicardClass): add drag_begin signal. * gui/widgets/e-minicard-view.c (e_minicard_view_drag_begin): new function, starts the drag. (book_view_loaded): connect the "drag_data_get" signal. (e_minicard_view_drag_data_get): new function. * gui/widgets/e-minicard-view.h (struct _EMinicardView): add drag_card and id for canvas_drag_data_get_id. * gui/widgets/e-addressbook-view.c (table_drag_data_get): new function. (create_table_view): add d&d stuff. svn path=/trunk/; revision=9209 --- addressbook/gui/widgets/e-minicard.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'addressbook/gui/widgets/e-minicard.h') diff --git a/addressbook/gui/widgets/e-minicard.h b/addressbook/gui/widgets/e-minicard.h index 3ebbe22505..3480d9d071 100644 --- a/addressbook/gui/widgets/e-minicard.h +++ b/addressbook/gui/widgets/e-minicard.h @@ -83,6 +83,11 @@ struct _EMinicard guint editable : 1; + guint drag_button_down : 1; + + gint button_x; + gint button_y; + double width; double height; }; @@ -92,6 +97,7 @@ struct _EMinicardClass GnomeCanvasGroupClass parent_class; gint (* selected) (EMinicard *minicard, GdkEvent *event); + gint (* drag_begin) (EMinicard *minicard, GdkEvent *event); }; -- cgit v1.2.3