diff options
author | Larry Ewing <lewing@ximian.com> | 2004-04-13 15:10:49 +0800 |
---|---|---|
committer | Larry Ewing <lewing@src.gnome.org> | 2004-04-13 15:10:49 +0800 |
commit | 1dfdac328cf8fd46042513dc9950cedb130f4593 (patch) | |
tree | 5e4ccae619d22c4654410623470d5404e24e627f /addressbook | |
parent | 4354611e365b25b2cc3466cecc402f47758a06b3 (diff) | |
download | gsoc2013-evolution-1dfdac328cf8fd46042513dc9950cedb130f4593.tar gsoc2013-evolution-1dfdac328cf8fd46042513dc9950cedb130f4593.tar.gz gsoc2013-evolution-1dfdac328cf8fd46042513dc9950cedb130f4593.tar.bz2 gsoc2013-evolution-1dfdac328cf8fd46042513dc9950cedb130f4593.tar.lz gsoc2013-evolution-1dfdac328cf8fd46042513dc9950cedb130f4593.tar.xz gsoc2013-evolution-1dfdac328cf8fd46042513dc9950cedb130f4593.tar.zst gsoc2013-evolution-1dfdac328cf8fd46042513dc9950cedb130f4593.zip |
add GDK_ACTION_COPY to the supported drag types. Connect to the
2004-04-13 Larry Ewing <lewing@ximian.com>
* gui/widgets/e-addressbook-view.c (create_table_view): add
GDK_ACTION_COPY to the supported drag types. Connect to the
table_drag_data_delete callback.
(table_drag_data_delete): remove the drag rows.
svn path=/trunk/; revision=25427
Diffstat (limited to 'addressbook')
-rw-r--r-- | addressbook/ChangeLog | 9 | ||||
-rw-r--r-- | addressbook/gui/widgets/e-addressbook-view.c | 37 |
2 files changed, 44 insertions, 2 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog index b4a592d03c..36c8e0c231 100644 --- a/addressbook/ChangeLog +++ b/addressbook/ChangeLog @@ -1,5 +1,12 @@ +2004-04-13 Larry Ewing <lewing@ximian.com> + + * gui/widgets/e-addressbook-view.c (create_table_view): add + GDK_ACTION_COPY to the supported drag types. Connect to the + table_drag_data_delete callback. + (table_drag_data_delete): remove the drag rows. + 2004-04-13 Sivaiah Nallagatla <snallagatla@novell.com> - + * gui/component/addressbook.c (addressbook_authenicate): added a check for new auth type "plain/password" for groupwise in addressbook_authenicate function diff --git a/addressbook/gui/widgets/e-addressbook-view.c b/addressbook/gui/widgets/e-addressbook-view.c index e17e147b9f..cf51653cd9 100644 --- a/addressbook/gui/widgets/e-addressbook-view.c +++ b/addressbook/gui/widgets/e-addressbook-view.c @@ -1189,6 +1189,36 @@ table_white_space_event(ETableScrolled *table, GdkEvent *event, EABView *view) } static void +table_drag_data_delete (ETable *table, + int row, + int col, + GdkDragContext *context, + gpointer user_data) +{ + EABView *view = user_data; + EContact *contact; + EBook *book; + + if (!E_IS_ADDRESSBOOK_TABLE_ADAPTER(view->object)) + return; + + g_object_get(view->model, + "book", &book, + NULL); + + contact = eab_model_contact_at(view->model, row); + /* Remove the card. */ + /* XXX no callback specified... ugh */ + e_book_async_remove_contact (book, + contact, + NULL, + NULL); + + g_object_unref(book); +} + + +static void table_drag_data_get (ETable *table, int row, int col, @@ -1372,12 +1402,17 @@ create_table_view (EABView *view) /* drag & drop signals */ e_table_drag_source_set (E_TABLE(E_TABLE_SCROLLED(table)->table), GDK_BUTTON1_MASK, - drag_types, num_drag_types, GDK_ACTION_MOVE); + drag_types, num_drag_types, GDK_ACTION_MOVE | GDK_ACTION_COPY); g_signal_connect (E_TABLE_SCROLLED(table)->table, "table_drag_data_get", G_CALLBACK (table_drag_data_get), view); + + g_signal_connect (E_TABLE_SCROLLED(table)->table, + "table_drag_data_delete", + G_CALLBACK (table_drag_data_delete), + view); gtk_paned_add1 (GTK_PANED (view->paned), table); |