]> err.no Git - mapper/commitdiff
Fix the quick poi dialog buttons.
authorKaj-Michael Lang <milang@onion.tal.org>
Thu, 10 Jan 2008 16:33:34 +0000 (18:33 +0200)
committerKaj-Michael Lang <milang@onion.tal.org>
Thu, 10 Jan 2008 16:33:34 +0000 (18:33 +0200)
src/poi-gui.c

index fec85de895e8ab85dff02a326643fa3377f8beb5..e07a319335d2c61115e8248c85f8bdcc0ad1af72 100644 (file)
@@ -992,11 +992,12 @@ 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=1;x<=3;x++) {
-       for (y=1;y<=3;y++) {
-               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_signal_connect(G_OBJECT(buttons[x*y]), "clicked", G_CALLBACK(poi_quick_button_cb), GINT_TO_POINTER(quick_poi_categories[x*y-1].type));
+for (x=0;x<3;x++) {
+       for (y=0;y<3;y++) {
+               guint p=x+y*3;
+               buttons[p]=gtk_button_new_with_label(quick_poi_categories[p].name);
+               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));
        }
 }