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
This commit is contained in:
@ -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
|
||||
|
||||
@ -1188,6 +1188,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,
|
||||
@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user