#define POI_QUICK_BUTTONS (9)
-static GtkWidget *dialog_qp;
-
typedef struct _PoiCategoryEditInfo PoiCategoryEditInfo;
struct _PoiCategoryEditInfo {
GtkWidget *cmb_category;
}
gboolean
-category_dialog(guint cat_id)
+poi_category_dialog(guint cat_id)
{
GtkWidget *dialog;
GtkWidget *table;
{
GtkListStore *store;
-if (category_dialog(0)) {
+if (poi_category_dialog(0)) {
store = poi_category_generate_store();
gtk_tree_view_set_model(GTK_TREE_VIEW(tree_view), GTK_TREE_MODEL(store));
g_object_unref(G_OBJECT(store));
GValue val;
memset(&val, 0, sizeof(val));
gtk_tree_model_get_value(store, &iter, 0, &val);
- if (category_dialog(g_value_get_uint(&val))) {
+ if (poi_category_dialog(g_value_get_uint(&val))) {
GtkListStore *new_store = poi_category_generate_store();
gtk_tree_view_set_model(GTK_TREE_VIEW(tree_view), GTK_TREE_MODEL(new_store));
g_object_unref(G_OBJECT(new_store));
}
gboolean
-category_list()
+poi_category_list()
{
GtkWidget *dialog;
GtkWidget *tree_view;
gboolean
poi_edit_cat(GtkWidget * widget, PoiCategoryEditInfo * data)
{
-if (category_list())
+if (poi_category_list())
poi_category_combo_populate(data->cmb_category, data->cat_id);
return TRUE;
}
gtk_box_pack_start(GTK_BOX(GTK_DIALOG(qp.dialog)->vbox), qp.label = gtk_entry_new(), TRUE, TRUE, 0);
gtk_widget_show_all(qp.dialog);
-if (GTK_RESPONSE_REJECT == gtk_dialog_run(GTK_DIALOG(qp.dialog))) {
+if (gtk_dialog_run(GTK_DIALOG(qp.dialog))==GTK_RESPONSE_REJECT)
gtk_widget_destroy(qp.dialog);
- return TRUE;
-}
return TRUE;
}
#include "poi.h"
gboolean poi_select(guint unitx, guint unity, poi_info *poi);
-gboolean category_dialog(guint cat_id);
-gboolean category_list();
+gboolean poi_category_dialog(guint cat_id);
+gboolean poi_category_list();
gboolean poi_dialog(POIAction action, guint unitx, guint unity);
gboolean poi_search_dialog(GtkListStore *store, poi_info *poi);
+gboolean poi_quick_dialog(guint unitx, guint unity);
#endif