diff options
author | Matthias Clasen <mclasen@redhat.com> | 2004-11-09 18:08:53 +0000 |
---|---|---|
committer | Matthias Clasen <matthiasc@src.gnome.org> | 2004-11-09 18:08:53 +0000 |
commit | 4ad562fc0cdad6e6dc1d9cdd3eaf0a69d9960428 (patch) | |
tree | 8bf3b1971fd439e30e5e6535fa1d4a7854431198 | |
parent | 857468e46cdd516540bb4801d6f4db1f0a651e5e (diff) | |
download | gdk-pixbuf-4ad562fc0cdad6e6dc1d9cdd3eaf0a69d9960428.tar.gz |
Fix double-click activation.
2004-11-09 Matthias Clasen <mclasen@redhat.com>
* tests/testiconview.c: Fix double-click activation.
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | ChangeLog.pre-2-10 | 2 | ||||
-rw-r--r-- | ChangeLog.pre-2-6 | 2 | ||||
-rw-r--r-- | ChangeLog.pre-2-8 | 2 | ||||
-rw-r--r-- | tests/testiconview.c | 23 |
5 files changed, 24 insertions, 7 deletions
@@ -1,5 +1,7 @@ 2004-11-09 Matthias Clasen <mclasen@redhat.com> + * tests/testiconview.c: Fix double-click activation. + * gtk/gtkstatusbar.c (gtk_statusbar_init): Raise the grip window when appropriate. (gtk_statusbar_init): Instead of cutting the text of, make diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 79c8ed6a9..557cb0c10 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,5 +1,7 @@ 2004-11-09 Matthias Clasen <mclasen@redhat.com> + * tests/testiconview.c: Fix double-click activation. + * gtk/gtkstatusbar.c (gtk_statusbar_init): Raise the grip window when appropriate. (gtk_statusbar_init): Instead of cutting the text of, make diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 79c8ed6a9..557cb0c10 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,5 +1,7 @@ 2004-11-09 Matthias Clasen <mclasen@redhat.com> + * tests/testiconview.c: Fix double-click activation. + * gtk/gtkstatusbar.c (gtk_statusbar_init): Raise the grip window when appropriate. (gtk_statusbar_init): Instead of cutting the text of, make diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 79c8ed6a9..557cb0c10 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,5 +1,7 @@ 2004-11-09 Matthias Clasen <mclasen@redhat.com> + * tests/testiconview.c: Fix double-click activation. + * gtk/gtkstatusbar.c (gtk_statusbar_init): Raise the grip window when appropriate. (gtk_statusbar_init): Instead of cutting the text of, make diff --git a/tests/testiconview.c b/tests/testiconview.c index 142307db3..dac725aa2 100644 --- a/tests/testiconview.c +++ b/tests/testiconview.c @@ -23,6 +23,7 @@ #include "prop-editor.h" #define NUMBER_OF_ITEMS 10 +#define MANY_ITEMS 10000 static void fill_model (GtkTreeModel *model) @@ -116,7 +117,7 @@ add_many (GtkWidget *button, GtkIconView *icon_list) pixbuf = gdk_pixbuf_new_from_file ("gnome-textfile.png", NULL); - for (i = 0; i < 100; i++) + for (i = 0; i < MANY_ITEMS; i++) { str = g_strdup_printf ("Icon %d", count); str2 = g_strdup_printf ("Icon <b>%d</b>", count); @@ -164,19 +165,27 @@ free_item_data (ItemData *data) } static void -item_cb (GtkWidget *menuitem, - ItemData *data) +item_activated (GtkIconView *icon_view, + GtkTreePath *path) { GtkTreeIter iter; GtkTreeModel *model; gchar *text; - model = gtk_icon_view_get_model (data->icon_list); - - gtk_tree_model_get_iter (model, &iter, data->path); + + model = gtk_icon_view_get_model (icon_view); + gtk_tree_model_get_iter (model, &iter, path); gtk_tree_model_get (model, &iter, 1, &text, -1); g_print ("Item activated, text is %s\n", text); g_free (text); + +} + +static void +item_cb (GtkWidget *menuitem, + ItemData *data) +{ + item_activated (data->icon_list, data->path); } static void @@ -278,7 +287,7 @@ main (gint argc, gchar **argv) G_CALLBACK (popup_menu_handler), NULL); g_signal_connect (icon_list, "item_activated", - G_CALLBACK (item_cb), icon_list); + G_CALLBACK (item_activated), NULL); model = create_model (); gtk_icon_view_set_model (GTK_ICON_VIEW (icon_list), model); |