GtkWidget *dialog;
guint i;
gchar *buffer;
- printf("%s()\n", __PRETTY_FUNCTION__);
buffer = g_strdup_printf("%s\n\t%s\n%s", _("Delete category?"),
dpoi->txt_label, _("WARNING: All POIs in that category will also be deleted!"));
map_force_redraw();
}
- vprintf("%s(): return TRUE\n", __PRETTY_FUNCTION__);
return TRUE;
}
delete_poi dpoi = { NULL, NULL, 0 };
poi_category *c;
- printf("%s()\n", __PRETTY_FUNCTION__);
if (cat_id > 0) {
if (poi_category_get(cat_id, &c)==FALSE)
g_object_unref(desc_txt);
gtk_widget_hide_all(dialog);
- vprintf("%s(): return\n", __PRETTY_FUNCTION__);
return results;
}
GtkTreeIter iter;
gboolean cat_enabled;
guint cat_id;
- printf("%s()\n", __PRETTY_FUNCTION__);
GtkTreeModel *model = GTK_TREE_MODEL(data);
if (!gtk_tree_model_get_iter_from_string(model, &iter, path))
gtk_list_store_set(GTK_LIST_STORE(model), &iter, CAT_ENABLED, cat_enabled, -1);
}
- vprintf("%s(): return TRUE\n", __PRETTY_FUNCTION__);
}
static gboolean
category_add(GtkWidget * widget, GtkWidget * tree_view)
{
GtkListStore *store;
- printf("%s()\n", __PRETTY_FUNCTION__);
if (category_dialog(0)) {
store = poi_category_generate_store();
GTK_TREE_MODEL(store));
g_object_unref(G_OBJECT(store));
}
- vprintf("%s(): return TRUE\n", __PRETTY_FUNCTION__);
return TRUE;
}
GtkTreeIter iter;
GtkTreeModel *store;
GtkTreeSelection *selection;
- printf("%s()\n", __PRETTY_FUNCTION__);
store = gtk_tree_view_get_model(GTK_TREE_VIEW(tree_view));
selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(tree_view));
g_object_unref(G_OBJECT(new_store));
}
}
- vprintf("%s(): return TRUE\n", __PRETTY_FUNCTION__);
return TRUE;
}
GtkTreeViewColumn *column;
GtkCellRenderer *renderer;
GtkListStore *store;
- printf("%s()\n", __PRETTY_FUNCTION__);
dialog = gtk_dialog_new_with_buttons(_("POI Categories"),
GTK_WINDOW(_window),
}
gtk_widget_destroy(dialog);
- vprintf("%s(): return TRUE\n", __PRETTY_FUNCTION__);
return TRUE;
}
gboolean
menu_cb_category(GtkAction * action)
{
- printf("%s()\n", __PRETTY_FUNCTION__);
if (category_list())
map_force_redraw();
- vprintf("%s(): return TRUE\n", __PRETTY_FUNCTION__);
return TRUE;
}
GtkWidget *dialog;
guint i;
gchar *buffer;
- printf("%s()\n", __PRETTY_FUNCTION__);
buffer = g_strdup_printf("%s\n%s", _("Delete POI?"), dpoi->txt_label);
dialog = hildon_note_new_confirmation(GTK_WINDOW(_window), buffer);
}
}
- vprintf("%s(): return TRUE\n", __PRETTY_FUNCTION__);
return TRUE;
}
GtkTreeIter iter;
gboolean selected = FALSE;
guint num_cats;
- printf("%s()\n", __PRETTY_FUNCTION__);
if (poi_get_list(unitx, unity, &store, &num_cats)==FALSE)
return FALSE;
gtk_widget_destroy(dialog);
- vprintf("%s(): return %d\n", __PRETTY_FUNCTION__, selected);
return selected;
}
GtkTreeIter active;
GtkListStore *store;
gboolean has_active = FALSE;
- printf("%s()\n", __PRETTY_FUNCTION__);
store = GTK_LIST_STORE(gtk_combo_box_get_model(GTK_COMBO_BOX(cmb_category)));
gtk_list_store_clear(store);
gtk_tree_model_get_iter_first(GTK_TREE_MODEL(store), &active);
gtk_combo_box_set_active_iter(GTK_COMBO_BOX(cmb_category), &active);
-
- vprintf("%s(): return\n", __PRETTY_FUNCTION__);
}
typedef struct _PoiCategoryEditInfo PoiCategoryEditInfo;
gboolean
poi_edit_cat(GtkWidget * widget, PoiCategoryEditInfo * data)
{
-printf("%s()\n", __PRETTY_FUNCTION__);
if (category_list())
poi_populate_cat_combo(data->cmb_category, data->cat_id);
-vprintf("%s(): return\n", __PRETTY_FUNCTION__);
return TRUE;
}
GtkTextIter begin, end;
delete_poi dpoi = { NULL, NULL, 0 };
PoiCategoryEditInfo pcedit;
- printf("%s()\n", __PRETTY_FUNCTION__);
if (action == ACTION_EDIT_POI) {
if (!select_poi(unitx, unity, &poi)) {
gtk_widget_hide_all(dialog);
- vprintf("%s(): return TRUE\n", __PRETTY_FUNCTION__);
return TRUE;
}
gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog_qp)->vbox), table = gtk_table_new(3, 3, FALSE), TRUE, TRUE, 0);
-for (x=0;x<3;x++) {
- for (y=0;y<3;y++) {
+gtk_table_set_col_spacings(table, 6);
+gtk_table_set_row_spacings(table, 6);
+gtk_table_set_homogeneous(table, TRUE);
+
+for (x=1;x<=3;x++) {
+ for (y=1;y<=3;y++) {
gchar *btnlabel;
- btnlabel=g_strdup_printf("(%d)", (x+y));
- buttons[x+y]=gtk_button_new_with_label(btnlabel);
- gtk_table_attach(GTK_TABLE(table), buttons[x+y], x, x+1, y, y+1, GTK_FILL, 0, 2, 4);
+ btnlabel=g_strdup_printf("(%d) %s", (x*y), "Poi name goes here...");
+ buttons[x*y]=gtk_button_new_with_label(btnlabel);
+ 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), NULL);
}
}
if (GTK_RESPONSE_REJECT == gtk_dialog_run(GTK_DIALOG(dialog_qp))) {
gtk_widget_destroy(dialog_qp);
+ return TRUE;
}
return TRUE;