From 3d5116ca0cf3bd1cefdd47b5933fef315db7ca4a Mon Sep 17 00:00:00 2001 From: Kaj-Michael Lang Date: Tue, 26 Feb 2008 18:21:39 +0200 Subject: [PATCH] Add some more quick poi categories. Make buttons take up as much space as they can, makes them more thumb friendly on the tablets. --- src/poi-gui.c | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/src/poi-gui.c b/src/poi-gui.c index f4c69bd..653a0d9 100644 --- a/src/poi-gui.c +++ b/src/poi-gui.c @@ -68,18 +68,25 @@ struct _quick_poi_categories { const gchar *name; }; +#define QPBS_X (4) +#define QPBS_Y (3) +#define POI_QUICK_BUTTONS (QPBS_X*QPBS_Y) + static struct _quick_poi_categories quick_poi_categories[] = { { NODE_AMENITY_SPEEDCAM, "Speedcam", }, { NODE_AMENITY_FUEL, "Fuel", }, { NODE_AMENITY_PARKING, "Parking", }, + { NODE_AMENITY_TAXI, "Taxi", }, { NODE_AMENITY_PUB, "Pub", }, { NODE_AMENITY_CAFE, "Cafe", }, - { NODE_AMENITY_FOOD, "Food", }, + { NODE_AMENITY_FOOD, "Fast Food", }, + { NODE_AMENITY_RESTAURANT, "Restaurant", }, { NODE_AMENITY_SHOP, "Shop", }, { NODE_AMENITY_BANK, "Bank", }, { NODE_AMENITY_ATM, "ATM", }, + { NODE_AMENITY_POST_BOX, "Post box", }, }; static poi_quick_data qp; @@ -1027,10 +1034,6 @@ if (icon) { } } -#define QPBS_X (3) -#define QPBS_Y (3) -#define POI_QUICK_BUTTONS (QPBS_X*QPBS_Y) - /** * Return a vbox filled with POI_QUICK_BUTTONS POI buttons and one for other POI, * with an optinal POI label. @@ -1041,21 +1044,21 @@ poi_quick_button_box(poi_quick_data *qpdata) GtkWidget *table, *vbox; GtkWidget *buttons[POI_QUICK_BUTTONS]; GtkWidget *otherbtn; -guint x,y; +guint x, y; -vbox=gtk_vbox_new(FALSE, 3); -table = gtk_table_new(QPBS_X, QPBS_Y, FALSE); +vbox=gtk_vbox_new(FALSE, 6); +table = gtk_table_new(QPBS_Y, QPBS_X, TRUE); gtk_table_set_col_spacings(GTK_TABLE(table), 6); gtk_table_set_row_spacings(GTK_TABLE(table), 6); -gtk_table_set_homogeneous(GTK_TABLE(table), TRUE); -for (x=0;xlabel = gtk_entry_new(), TRUE, TRUE, 0); +gtk_box_pack_start(GTK_BOX(vbox), qpdata->label = gtk_entry_new(), TRUE, FALSE, 0); return vbox; } -- 2.39.5