aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--examples/hildon-touch-selector-example.c8
-rw-r--r--examples/hildon-touch-selector-normal-mode-example.c7
2 files changed, 10 insertions, 5 deletions
diff --git a/examples/hildon-touch-selector-example.c b/examples/hildon-touch-selector-example.c
index 996c5fe..21104f9 100644
--- a/examples/hildon-touch-selector-example.c
+++ b/examples/hildon-touch-selector-example.c
@@ -66,9 +66,11 @@ create_selector ()
for (item = icon_list; item; item = g_slist_next (item)) {
GtkTreeIter iter;
gchar *label = item->data;
-
- gtk_list_store_append (store_icons, &iter);
- gtk_list_store_set (store_icons, &iter, 0, label, -1);
+ if (gtk_style_lookup_icon_set (gtk_widget_get_style (selector),
+ label)) {
+ gtk_list_store_append (store_icons, &iter);
+ gtk_list_store_set (store_icons, &iter, 0, label, -1);
+ }
g_free (label);
}
g_slist_free (icon_list);
diff --git a/examples/hildon-touch-selector-normal-mode-example.c b/examples/hildon-touch-selector-normal-mode-example.c
index 4dd5bae..52e56d9 100644
--- a/examples/hildon-touch-selector-normal-mode-example.c
+++ b/examples/hildon-touch-selector-normal-mode-example.c
@@ -78,8 +78,11 @@ create_selector ()
GtkTreeIter iter;
gchar *label = item->data;
- gtk_list_store_append (store_icons, &iter);
- gtk_list_store_set (store_icons, &iter, 0, label, -1);
+ if (gtk_style_lookup_icon_set (gtk_widget_get_style (selector),
+ label)) {
+ gtk_list_store_append (store_icons, &iter);
+ gtk_list_store_set (store_icons, &iter, 0, label, -1);
+ }
g_free (label);
}
g_slist_free (icon_list);