]> err.no Git - mapper/commitdiff
Use help.c wrappers
authorKaj-Michael Lang <milang@onion.tal.org>
Fri, 26 Oct 2007 10:40:43 +0000 (13:40 +0300)
committerKaj-Michael Lang <milang@onion.tal.org>
Fri, 26 Oct 2007 10:40:43 +0000 (13:40 +0300)
src/Makefile.am
src/cb.c
src/map-repo.c
src/poi-gui.c
src/route.c
src/settings-gui.c
src/ui-maemo.h

index 0616c4a8883bc8b8f2d48358b642441d59f68332..4564113742be7cebeb8e82e8d1c74278fdff3e4e 100644 (file)
@@ -72,6 +72,7 @@ mapper_SOURCES = utils.c \
        config-gconf.c \
        speak.c \
        audio-note.c \
+       help.c \
        mapper.c
 
 osm2db_CFLAGS = $(EXPAT_CFLAGS) $(SQLITE_CFLAGS) $(GLIBGTK_CFLAGS)
index 96be5f839d291fb186c9c00aa35d02b762f5a5c7..b7ba0c44320ffd8c1ba998d020a747babc36f6b8 100644 (file)
--- a/src/cb.c
+++ b/src/cb.c
@@ -34,6 +34,8 @@
 #include "cb.h"
 #include "gps-panels.h"
 
+#include "help.h"
+
 gboolean 
 menu_cb_route_download(GtkAction * action)
 {
@@ -540,12 +542,7 @@ return TRUE;
 gboolean 
 menu_cb_help(GtkAction * action)
 {
-#ifdef WITH_OSSO_HELP
-ossohelp_show(_osso, HELP_ID_INTRO, 0);
-#endif
-#ifdef WITH_HILDON_HELP
-hildon_help_show(_osso, HELP_ID_INTRO, 0);
-#endif
+help_topic_display(HELP_ID_INTRO, 0);
 return TRUE;
 }
 
index f4fd282071407551b314ab40c07a41b56584c29f..3ab6ed6b39d24a21d060eab04a6239a21eac4646 100644 (file)
@@ -25,6 +25,8 @@
 #include "mapper-types.h"
 #include "ui-common.h"
 
+#include "help.h"
+
 #define MAP_REPO_LIST_URL "http://www.gnuite.com/nokia770/maemo-mapper/repos.txt"
 
 typedef struct _RepoManInfo RepoManInfo;
@@ -567,11 +569,7 @@ repoman_dialog()
                                                 GTK_DIALOG_MODAL, GTK_STOCK_OK,
                                                 GTK_RESPONSE_ACCEPT, NULL);
 
-#ifdef WITH_OSSO_HELP
-       /* Enable the help button. */
-       ossohelp_dialog_help_enable(GTK_DIALOG(rmi.dialog), HELP_ID_REPOMAN,
-                                   _osso);
-#endif
+       help_dialog_help_enable(GTK_DIALOG(rmi.dialog), HELP_ID_REPOMAN);
 
        /* Reset button. */
        gtk_container_add(GTK_CONTAINER(GTK_DIALOG(rmi.dialog)->action_area),
@@ -982,10 +980,7 @@ gboolean menu_cb_mapman(GtkAction * action)
                                        GTK_DIALOG_MODAL, GTK_STOCK_OK,
                                        GTK_RESPONSE_ACCEPT, NULL);
 
-       /* Enable the help button. */
-#ifdef WITH_OSSO_HELP
-       ossohelp_dialog_help_enable(GTK_DIALOG(mapman_info.dialog), HELP_ID_MAPMAN, _osso);
-#endif
+       help_dialog_help_enable(GTK_DIALOG(mapman_info.dialog), HELP_ID_MAPMAN);
 
        /* Clear button. */
        gtk_container_add(GTK_CONTAINER(GTK_DIALOG(dialog)->action_area),
index 8cdd453da16c9bf9fad16abee0c88ab99985ce5c..045c5531dcbe0d92c8e0878fb5332304cb17d735 100644 (file)
@@ -27,6 +27,8 @@
 #include "poi-gui.h"
 #include "osm.h"
 
+#include "help.h"
+
 #define POI_QUICK_BUTTONS (9)
 
 typedef struct _PoiCategoryEditInfo PoiCategoryEditInfo;
@@ -327,10 +329,7 @@ dialog = gtk_dialog_new_with_buttons(_("POI Categories"),
                             GTK_DIALOG_MODAL, GTK_STOCK_OK,
                             GTK_RESPONSE_ACCEPT, NULL);
 
-#ifdef WITH_OSSO_HELP
-       /* Enable the help button. */
-       ossohelp_dialog_help_enable(GTK_DIALOG(dialog), HELP_ID_POICAT, _osso);
-#endif
+       help_dialog_help_enable(GTK_DIALOG(dialog), HELP_ID_POICAT);
 
 gtk_container_add(GTK_CONTAINER(GTK_DIALOG(dialog)->action_area), btn_edit = gtk_button_new_with_label(_("Edit")));
 gtk_container_add(GTK_CONTAINER(GTK_DIALOG(dialog)->action_area), btn_add = gtk_button_new_with_label(_("Add")));
@@ -781,9 +780,8 @@ qp.dialog = gtk_dialog_new_with_buttons(_("Quick POI"),
                        GTK_RESPONSE_REJECT,
                        NULL);
 
-#ifdef WITH_OSSO_NOTYET
-       /* Enable the help button. */
-       ossohelp_dialog_help_enable(GTK_DIALOG(qp.dialog), HELP_ID_POIQUICK, _osso);
+#if 0
+help_dialog_help_enable(GTK_DIALOG(qp.dialog), HELP_ID_POIQUICK);
 #endif
 
 gtk_box_pack_start(GTK_BOX(GTK_DIALOG(qp.dialog)->vbox), table = gtk_table_new(3, 3, FALSE), TRUE, TRUE, 0);
index fe40e956fa873ba5e7c261151d859e588d8dba52..969daf723be1ccbc830d16d1bfae19527b3bfae9 100644 (file)
@@ -31,6 +31,8 @@
 #include "map-download.h"
 #include "iap.h"
 
+#include "help.h"
+
 void route_find_nearest_point(void);
 void cancel_autoroute(gboolean temporary);
 void route_show_distance_to_last(void);
@@ -275,12 +277,7 @@ dialog = gtk_dialog_new_with_buttons(_("Download Route"),
                             GTK_STOCK_CANCEL,
                             GTK_RESPONSE_REJECT, NULL);
 
-#ifdef WITH_OSSO_HELP
-ossohelp_dialog_help_enable(GTK_DIALOG(dialog), HELP_ID_DOWNROUTE, _osso);
-#endif
-#ifdef WITH_HILDON_HELP
-hildon_help_dialog_help_enable(GTK_DIALOG(dialog), HELP_ID_DOWNROUTE, _osso);
-#endif
+help_dialog_help_enable(GTK_DIALOG(dialog), HELP_ID_DOWNROUTE);
 
 gtk_box_pack_start(GTK_BOX(GTK_DIALOG(dialog)->vbox),
           table = gtk_table_new(2, 5, FALSE), TRUE, TRUE, 0);
index 17a94528cde3a53b1a4ac2d1a63fa42bfc7d9780..5b559d85b2475a73f7aed527a7a36a18b9f9d1a2 100644 (file)
@@ -36,6 +36,8 @@
 
 #include "hildon-wrappers.h"
 
+#include "help.h"
+
 #define UPDATE_GC(gc) \
     gdk_gc_set_line_attributes(gc, _draw_width, GDK_LINE_SOLID, GDK_CAP_ROUND, GDK_JOIN_ROUND);
 void 
@@ -405,12 +407,8 @@ settings_dialog(void)
                                             GTK_DIALOG_MODAL, GTK_STOCK_OK,
                                             GTK_RESPONSE_ACCEPT, NULL);
 
-#ifdef WITH_OSSO_HELP
-       ossohelp_dialog_help_enable(GTK_DIALOG(dialog), HELP_ID_SETTINGS, _osso);
-#endif
-#ifdef WITH_HILDON_HELP
-       hildon_help_dialog_help_enable(GTK_DIALOG(dialog), HELP_ID_SETTINGS, _osso);
-#endif
+       help_dialog_help_enable(GTK_DIALOG(dialog), HELP_ID_SETTINGS);
+
 #ifdef WITH_DEVICE_770
        gtk_container_add(GTK_CONTAINER(GTK_DIALOG(dialog)->action_area),
                          btn_buttons = gtk_button_new_with_label(_("Hardware Keys...")));
index 1882704488723feb379d4f532f99ad39c7b5ccf3..32432f4e10105a277e7ee429ca7a34983e7a3768 100644 (file)
@@ -7,16 +7,6 @@
 
 #ifdef WITH_HILDON
 
-#define HELP_ID_PREFIX "help_mapper_"
-#define HELP_ID_INTRO HELP_ID_PREFIX"intro"
-#define HELP_ID_GETSTARTED HELP_ID_PREFIX"getstarted"
-#define HELP_ID_ABOUT HELP_ID_PREFIX"about"
-#define HELP_ID_SETTINGS HELP_ID_PREFIX"settings"
-#define HELP_ID_REPOMAN HELP_ID_PREFIX"repoman"
-#define HELP_ID_MAPMAN HELP_ID_PREFIX"mapman"
-#define HELP_ID_DOWNROUTE HELP_ID_PREFIX"downroute"
-#define HELP_ID_POICAT HELP_ID_PREFIX"poicat"
-
 #ifdef WITH_OSSO
 #include <libosso.h>
 /** The main OSSO context of the application. */