From a1363c8c62d69c96c0880d505528c32e7c11cc65 Mon Sep 17 00:00:00 2001 From: Claudio Saavedra Date: Fri, 5 Sep 2008 08:02:44 +0000 Subject: [PATCH] 2008-09-05 Claudio Saavedra * examples/hildon-pannable-area-example-2.c: (main): Use the stock labels for the text column, to make it more look more dynamic. --- ChangeLog | 5 +++++ examples/hildon-pannable-area-example-2.c | 10 +++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index ba6a102..fceb47d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-09-05 Claudio Saavedra + + * examples/hildon-pannable-area-example-2.c: (main): Use the stock + labels for the text column, to make it more look more dynamic. + 2008-09-04 Alejandro Pinheiro * src/hildon-time-selector.c diff --git a/examples/hildon-pannable-area-example-2.c b/examples/hildon-pannable-area-example-2.c index 37aa423..ea1546b 100644 --- a/examples/hildon-pannable-area-example-2.c +++ b/examples/hildon-pannable-area-example-2.c @@ -150,10 +150,14 @@ main (int argc, char **args) store = gtk_list_store_new (N_COLUMNS, G_TYPE_STRING, G_TYPE_STRING); for (i = 0; i < 100; i++) { GtkTreeIter iter; - gchar *label = g_strdup_printf ("Row %d", i); + GtkStockItem stock_item; + gchar *stock_id; + + stock_id = (gchar *)item->data; + gtk_stock_lookup (stock_id, &stock_item); gtk_list_store_append (store, &iter); - gtk_list_store_set (store, &iter, PIXBUF_COLUMN, (gchar *)item->data, TEXT_COLUMN, label, -1); - g_free (label); + gtk_list_store_set (store, &iter, PIXBUF_COLUMN, stock_id, TEXT_COLUMN, stock_item.label, -1); + item = item->next? item->next : stocks; } gtk_tree_view_set_model (GTK_TREE_VIEW (tv), GTK_TREE_MODEL (store)); -- 1.7.9.5