#include "ui-common.h"
#include "settings.h"
#include "poi-gui.h"
+#include "osm.h"
#define POI_QUICK_BUTTONS (9)
guint cat_id;
};
+/* XXX: Load this from somewhere instead of hc... */
+struct _quick_poi_categories {
+ node_type_t type;
+ const gchar *name;
+};
+
+static struct _quick_poi_categories quick_poi_categories[] = {
+ { NODE_AMENITY_SPEEDCAM, "Speedcam", },
+ { NODE_AMENITY_FUEL, "Fuel", },
+ { NODE_AMENITY_PARKING, "Parking", },
+
+ { NODE_AMENITY_PUB, "Pub", },
+ { NODE_AMENITY_CAFE, "Cafe", },
+ { NODE_AMENITY_FOOD, "Food", },
+
+ { NODE_AMENITY_SHOP, "Shop", },
+ { NODE_AMENITY_BANK, "Bank", },
+ { NODE_AMENITY_ATM, "ATM", },
+};
+
+
static gboolean
category_delete(GtkWidget *widget, delete_poi *dpoi)
{
for (y=1;y<=3;y++) {
gchar *btnlabel;
- btnlabel=g_strdup_printf("(%d) %s", (x*y), "Poi name goes here...");
- buttons[x*y]=gtk_button_new_with_label(btnlabel);
+ buttons[x*y]=gtk_button_new_with_label(quick_poi_categories[x*y-1].name);
gtk_table_attach(GTK_TABLE(table), buttons[x*y], x-1, x, y-1, y, GTK_FILL, 0, 2, 4);
g_free(btnlabel);
- g_signal_connect(G_OBJECT(buttons[x*y]), "clicked", G_CALLBACK(poi_quick_button_cb), NULL);
+ g_signal_connect(G_OBJECT(buttons[x*y]), "clicked", G_CALLBACK(poi_quick_button_cb), GINT_TO_POINTER(quick_poi_categories[x*y-1].type));
}
}