From: Kaj-Michael Lang Date: Thu, 25 Oct 2007 15:55:55 +0000 (+0300) Subject: Fix warnings. Rename some functions. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cf9b2f05e3f60ec3d1fc433d2276a13c28960d7b;p=mapper Fix warnings. Rename some functions. --- diff --git a/src/cb.c b/src/cb.c index e5d83fd..5b760b5 100644 --- a/src/cb.c +++ b/src/cb.c @@ -1191,7 +1191,7 @@ return TRUE; gboolean menu_cb_category(GtkAction * action) { -if (category_list()) +if (poi_category_list()) map_force_redraw(); return TRUE; diff --git a/src/poi-gui.c b/src/poi-gui.c index 2cdb683..8cdd453 100644 --- a/src/poi-gui.c +++ b/src/poi-gui.c @@ -29,8 +29,6 @@ #define POI_QUICK_BUTTONS (9) -static GtkWidget *dialog_qp; - typedef struct _PoiCategoryEditInfo PoiCategoryEditInfo; struct _PoiCategoryEditInfo { GtkWidget *cmb_category; @@ -136,7 +134,7 @@ gtk_combo_box_set_active_iter(GTK_COMBO_BOX(cmb_category), &active); } gboolean -category_dialog(guint cat_id) +poi_category_dialog(guint cat_id) { GtkWidget *dialog; GtkWidget *table; @@ -282,7 +280,7 @@ category_add_cb(GtkWidget *widget, GtkWidget *tree_view) { 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)); @@ -303,7 +301,7 @@ if (gtk_tree_selection_get_selected(selection, &store, &iter)) { 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)); @@ -313,7 +311,7 @@ return TRUE; } gboolean -category_list() +poi_category_list() { GtkWidget *dialog; GtkWidget *tree_view; @@ -568,7 +566,7 @@ return poi_search_dialog(store, poi); 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; } @@ -805,10 +803,8 @@ for (x=1;x<=3;x++) { 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; } diff --git a/src/poi-gui.h b/src/poi-gui.h index a4cb365..0c95043 100644 --- a/src/poi-gui.h +++ b/src/poi-gui.h @@ -5,9 +5,10 @@ #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