]> err.no Git - mapper/commitdiff
Add code to set icon for quick POI buttons. Need to add code the get the icon.
authorKaj-Michael Lang <milang@onion.tal.org>
Fri, 11 Jan 2008 11:33:52 +0000 (13:33 +0200)
committerKaj-Michael Lang <milang@onion.tal.org>
Fri, 11 Jan 2008 11:33:52 +0000 (13:33 +0200)
src/poi-gui.c

index e07a319335d2c61115e8248c85f8bdcc0ad1af72..37abe849c3b9b079136132a48b6ee9b7042aab41 100644 (file)
@@ -995,7 +995,13 @@ gtk_table_set_homogeneous(GTK_TABLE(table), TRUE);
 for (x=0;x<3;x++) {
        for (y=0;y<3;y++) {
                guint p=x+y*3;
+               GdkPixbuf *icon=NULL;
+
                buttons[p]=gtk_button_new_with_label(quick_poi_categories[p].name);
+               /* XXX: Add code to get the icon */
+               if (icon) {
+                       gtk_button_set_image(buttons[p], gtk_image_new_from_pixbuf(icon));
+               }
                gtk_table_attach(GTK_TABLE(table), buttons[p], x, x+1, y, y+1, GTK_FILL, 0, 2, 4);
                g_signal_connect(G_OBJECT(buttons[p]), "clicked", G_CALLBACK(poi_quick_button_cb), GINT_TO_POINTER(quick_poi_categories[p].type));
        }