diff options
author | Matthias Clasen <matthiasc@src.gnome.org> | 2008-12-31 07:29:23 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2008-12-31 07:29:23 +0000 |
commit | e31eb99c9dce67bccbef825588be84d1aeb64fd8 (patch) | |
tree | c5f88cc1fbf25316bcffd84d6d92592a1bafd46b /tests/testentryicons.c | |
parent | b7ef9c53f73ca2ac4912b91bf99977a058b87138 (diff) | |
download | gtk+-e31eb99c9dce67bccbef825588be84d1aeb64fd8.tar.gz |
Rename GtkEntry icon-related signals
svn path=/trunk/; revision=22023
Diffstat (limited to 'tests/testentryicons.c')
-rw-r--r-- | tests/testentryicons.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/tests/testentryicons.c b/tests/testentryicons.c index 540f04a364..3a71bfde2a 100644 --- a/tests/testentryicons.c +++ b/tests/testentryicons.c @@ -41,6 +41,20 @@ clear_pressed (GtkEntry *entry, gint icon, GdkEvent *event, gpointer data) } static void +drag_begin_cb (GtkWidget *widget, + GdkDragContext *context, + gpointer user_data) +{ + gint pos; + + pos = gtk_entry_get_current_icon_drag_source (GTK_ENTRY (widget)); + if (pos != -1) + gtk_drag_set_icon_stock (context, GTK_STOCK_INFO, 2, 2); + + g_print ("drag begin %d\n", pos); +} + +static void drag_data_get_cb (GtkWidget *widget, GdkDragContext *context, GtkSelectionData *data, @@ -154,6 +168,8 @@ main (int argc, char **argv) gtk_entry_set_icon_drag_source (GTK_ENTRY (entry), GTK_ENTRY_ICON_PRIMARY, tlist, GDK_ACTION_COPY); + g_signal_connect_after (entry, "drag-begin", + G_CALLBACK (drag_begin_cb), NULL); g_signal_connect (entry, "drag-data-get", G_CALLBACK (drag_data_get_cb), NULL); gtk_target_list_unref (tlist); @@ -184,7 +200,7 @@ main (int argc, char **argv) GTK_ENTRY_ICON_SECONDARY, GTK_STOCK_CLEAR); - g_signal_connect (entry, "icon-pressed", G_CALLBACK (clear_pressed), NULL); + g_signal_connect (entry, "icon-press", G_CALLBACK (clear_pressed), NULL); button = gtk_button_new_with_label ("Properties"); gtk_table_attach (GTK_TABLE (table), button, 2, 3, 2, 3, |