summaryrefslogtreecommitdiff
path: root/gtk/gtkcalendar.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2004-07-21 16:53:55 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2004-07-21 16:53:55 +0000
commit4faa361b74f156b47bde0ccf18568f8a075086dc (patch)
treeb35230f523c4d0e032ee300a61472cbae0914eb7 /gtk/gtkcalendar.c
parenta95c976c2b382669fc0a01c3cdbafb44a6180508 (diff)
downloadgdk-pixbuf-4faa361b74f156b47bde0ccf18568f8a075086dc.tar.gz
Use the new text target functionality in GtkTargetList instead of
2004-07-21 Matthias Clasen <mclasen@redhat.com> * gtk/gtkcalendar.c: Use the new text target functionality in GtkTargetList instead of hardcoding a subset of text targets.
Diffstat (limited to 'gtk/gtkcalendar.c')
-rw-r--r--gtk/gtkcalendar.c20
1 files changed, 4 insertions, 16 deletions
diff --git a/gtk/gtkcalendar.c b/gtk/gtkcalendar.c
index 0082752a6..88afc9b8d 100644
--- a/gtk/gtkcalendar.c
+++ b/gtk/gtkcalendar.c
@@ -600,17 +600,6 @@ gtk_calendar_class_init (GtkCalendarClass *class)
G_TYPE_NONE, 0);
}
-enum
-{
- TARGET_TEXT
-};
-
-static const GtkTargetEntry target_table[] = {
- { "TEXT", 0, TARGET_TEXT },
- { "STRING", 0, TARGET_TEXT },
- { "UTF8_STRING", 0, TARGET_TEXT }
-};
-
static void
gtk_calendar_init (GtkCalendar *calendar)
{
@@ -693,10 +682,8 @@ gtk_calendar_init (GtkCalendar *calendar)
private_data->in_drag = 0;
private_data->drag_highlight = 0;
- gtk_drag_dest_set (widget,
- 0,
- target_table, G_N_ELEMENTS (target_table),
- GDK_ACTION_COPY);
+ gtk_drag_dest_set (widget, 0, NULL, 0, GDK_ACTION_COPY);
+ gtk_drag_dest_add_text_targets (widget);
private_data->year_before = 0;
@@ -2824,7 +2811,8 @@ gtk_calendar_motion_notify (GtkWidget *widget,
event->x, event->y))
{
GdkDragContext *context;
- GtkTargetList *target_list = gtk_target_list_new (target_table, G_N_ELEMENTS (target_table));
+ GtkTargetList *target_list = gtk_target_list_new (NULL, 0);
+ gtk_target_list_add_text_targets (target_list);
context = gtk_drag_begin (widget, target_list, GDK_ACTION_COPY,
1, (GdkEvent *)event);