aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/e-calendar-selector.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-02-09 03:52:18 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-02-09 07:57:24 +0800
commit67ce5f3b140525c2f5944270a9383616f9d67923 (patch)
tree167788f4efa12f87ac04c474598d61b5ca446464 /calendar/gui/e-calendar-selector.c
parent9cd1f937a26363aa108f3d2b36606b167597a2eb (diff)
downloadgsoc2013-evolution-67ce5f3b140525c2f5944270a9383616f9d67923.tar.gz
gsoc2013-evolution-67ce5f3b140525c2f5944270a9383616f9d67923.tar.zst
gsoc2013-evolution-67ce5f3b140525c2f5944270a9383616f9d67923.zip
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".
Diffstat (limited to 'calendar/gui/e-calendar-selector.c')
-rw-r--r--calendar/gui/e-calendar-selector.c15
1 files changed, 4 insertions, 11 deletions
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 <libecal/e-cal.h>
+#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