]> Pileus Git - ~andy/gtk/commitdiff
Use the new text target functionality in GtkTargetList instead of
authorMatthias Clasen <mclasen@redhat.com>
Wed, 21 Jul 2004 16:53:55 +0000 (16:53 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Wed, 21 Jul 2004 16:53:55 +0000 (16:53 +0000)
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.

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtkcalendar.c

index d28d22ef8f2a01a9f30471ece228b363db3048b6..8a652b95db9bf26b9975878ee771f002e9318f87 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+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.
+
 Tue Jul 20 23:11:23 2004  Matthias Clasen  <maclas@gmx.de>
 
        * gdk/x11/gdkevents-x11.c: Hook up gtk-menu-bar-accel to
index d28d22ef8f2a01a9f30471ece228b363db3048b6..8a652b95db9bf26b9975878ee771f002e9318f87 100644 (file)
@@ -1,3 +1,8 @@
+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.
+
 Tue Jul 20 23:11:23 2004  Matthias Clasen  <maclas@gmx.de>
 
        * gdk/x11/gdkevents-x11.c: Hook up gtk-menu-bar-accel to
index d28d22ef8f2a01a9f30471ece228b363db3048b6..8a652b95db9bf26b9975878ee771f002e9318f87 100644 (file)
@@ -1,3 +1,8 @@
+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.
+
 Tue Jul 20 23:11:23 2004  Matthias Clasen  <maclas@gmx.de>
 
        * gdk/x11/gdkevents-x11.c: Hook up gtk-menu-bar-accel to
index d28d22ef8f2a01a9f30471ece228b363db3048b6..8a652b95db9bf26b9975878ee771f002e9318f87 100644 (file)
@@ -1,3 +1,8 @@
+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.
+
 Tue Jul 20 23:11:23 2004  Matthias Clasen  <maclas@gmx.de>
 
        * gdk/x11/gdkevents-x11.c: Hook up gtk-menu-bar-accel to
index 0082752a6f1c9cbbe248ea410e0ed64e9be77a72..88afc9b8debe23dbf6dbdb0e84631643e1ea63f8 100644 (file)
@@ -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);