From 67ce5f3b140525c2f5944270a9383616f9d67923 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Mon, 8 Feb 2010 14:52:18 -0500 Subject: Add DnD support to e-selection.c. Avoid listing calendar and directory targets explicitly, so that e-selection.c contains the one and only master list. Still need to figure out how to centralize "text/x-source-vcard". --- calendar/gui/e-calendar-selector.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) (limited to 'calendar/gui/e-calendar-selector.c') diff --git a/calendar/gui/e-calendar-selector.c b/calendar/gui/e-calendar-selector.c index 14c635b698..0747b55b59 100644 --- a/calendar/gui/e-calendar-selector.c +++ b/calendar/gui/e-calendar-selector.c @@ -21,6 +21,7 @@ #include "e-calendar-selector.h" #include +#include "e-util/e-selection.h" #include "common/authentication.h" #define E_CALENDAR_SELECTOR_GET_PRIVATE(obj) \ @@ -31,15 +32,6 @@ struct _ECalendarSelectorPrivate { gint dummy_value; }; -enum { - DND_TARGET_TYPE_CALENDAR_LIST -}; - -static GtkTargetEntry drag_types[] = { - { (gchar *) "text/calendar", 0, DND_TARGET_TYPE_CALENDAR_LIST }, - { (gchar *) "text/x-calendar", 0, DND_TARGET_TYPE_CALENDAR_LIST } -}; - static gpointer parent_class; static gboolean @@ -174,8 +166,9 @@ calendar_selector_init (ECalendarSelector *selector) gtk_drag_dest_set ( GTK_WIDGET (selector), GTK_DEST_DEFAULT_ALL, - drag_types, G_N_ELEMENTS (drag_types), - GDK_ACTION_COPY | GDK_ACTION_MOVE); + NULL, 0, GDK_ACTION_COPY | GDK_ACTION_MOVE); + + e_drag_dest_add_calendar_targets (GTK_WIDGET (selector)); } GType -- cgit v1.2.3