]> err.no Git - mapper/commitdiff
Make it possible to build for different gtk/hildon/osso combinations.
authorKaj-Michael Lang <milang@angel.tal.org>
Mon, 6 Aug 2007 09:20:10 +0000 (12:20 +0300)
committerKaj-Michael Lang <milang@angel.tal.org>
Mon, 6 Aug 2007 09:20:10 +0000 (12:20 +0300)
19 files changed:
configure.ac
src/audio-record.c
src/cb.c
src/config.h.in
src/file.c
src/gps-conn.c
src/hildon-mapper.h [new file with mode: 0644]
src/hildon-wrappers.c
src/hildon-wrappers.h
src/maemo-osso.c
src/map-repo.c
src/map.c
src/mapper.c
src/poi-gui.c
src/route.c
src/settings-gui.c
src/ui-common.c
src/ui-maemo.h
src/utils.h

index a1d2e322d1c4c8cc8ede4a5ecd0e85f03ad7ec5c..d59f418508a4ae7fe0038638f20ab58abcb6a6ca 100644 (file)
 
 AC_INIT(Makefile.am)
 AM_INIT_AUTOMAKE(mapper, 1.0.0)
+AM_MAINTAINER_MODE
 
 AC_PROG_CPP
 AC_CONFIG_HEADERS(src/config.h)
 AC_PROG_INSTALL
 AC_PROG_LIBTOOL
+AC_SYS_LARGEFILE
+PKG_PROG_PKG_CONFIG
 
 dnl Debugging options to enable debug macros
 DEBUG_FLAGS=
@@ -42,15 +45,42 @@ PKG_CHECK_MODULES(GLIBGTK, glib-2.0 gconf-2.0 dbus-glib-1 gtk+-2.0)
 AC_SUBST(GLIBGTK_LIBS)
 AC_SUBST(GLIBGTK_CFLAGS)
 
-dnl Ckeck for hildon-libs
-PKG_CHECK_MODULES(HILDON, hildon-libs, HAVE_HILDON=yes, HAVE_HILDON=no)
+AC_ARG_ENABLE([nokia-770],AS_HELP_STRING([--enable-770],[Build for Nokia 770/N800]),
+              [enable_770=$enableval], [enable_770=no])
 
-if test "x$HAVE_HILDON" = "xno"; then
- PKG_CHECK_MODULES(HILDON, hildon-1, HAVE_HILDON=yes, HAVE_HILDON=no)
+AC_ARG_ENABLE([hildon],AS_HELP_STRING([--enable-hildon],[Build for Hildon]),
+              [enable_hildon=$enableval], [enable_hildon=no])
+
+if test "x$enable_770" = "xno" ; then
+  WITH_DEVICE_770=no
+else
+  WITH_DEVICE_770=yes
+  enable_hildon=yes
+  AC_DEFINE([WITH_DEVICE_770], [1], [With 770/N800 specific code])
 fi
 
-if test "x$HAVE_HILDON" = "xyes"; then
+if test "x$enable_hildon" = "xyes" ; then
+ dnl Ckeck for hildon-libs
+ PKG_CHECK_MODULES(HILDON, hildon-libs, HAVE_HILDON=yes, HAVE_HILDON=no)
+
+ if test "x$HAVE_HILDON" = "xno"; then
+  PKG_CHECK_MODULES(HILDON, hildon-1, HAVE_HILDON1=yes, HAVE_HILDON1=no)
+ fi
+
+ if test "x$HAVE_HILDON" = "xyes"; then
+  AC_DEFINE(WITH_HILDON, 1, [build with Maemo/Hildon user interface])
+ else
+  AC_MSG_RESULT(no)
+ fi
+else
+ HAVE_HILDON=no
+ HAVE_HILDON1=no
+fi
+
+if test "x$HAVE_HILDON1" = "xyes"; then
   AC_DEFINE(WITH_HILDON, 1, [build with Maemo/Hildon user interface])
+  AC_DEFINE(WITH_HILDON_NEW, 1, [build with new Hildon libs])
+  HAVE_HILDON=yes
 else
   AC_MSG_RESULT(no)
 fi
index 3b9a67372b9eb1813b8eb50161f40814e1ec6174..6e2a1ea2bec521c3ace38e8cd2d5ab34c5cac59b 100644 (file)
@@ -20,6 +20,11 @@ struct {
        GstElement *filter,
 } pipeline;
 
+gboolean
+audio_bus_cb()
+{
+}
+
 gboolean
 audio_create_record_pipeline(void)
 {
@@ -29,10 +34,16 @@ filter=gst_element_factory_make("wavenc", "filter");
 sink=gst_element_factory_make("filesink", "sink");
 }
 
+gboolean
+audio_create_play_pipelin(void)
+{
+
+}
+
 void
-audio_src_filename(GstElement *src, gchar *file)
+audio_file_set_filename(GstElement *e, gchar *file)
 {
-g_object_set(G_OBJECT(src), "location", file, NULL);
+g_object_set(G_OBJECT(e), "location", file, NULL);
 }
 
 gboolean
index 839a092e375074997321c3f228f947c6c1d2a817..30b338239c6eed137b789925f89afb87a8c64ae6 100644 (file)
--- a/src/cb.c
+++ b/src/cb.c
 #include <libintl.h>
 #include <locale.h>
 
-#ifdef WITH_OSSO
-#include <libosso.h>
-#include <osso-helplib.h>
-#endif
-#ifdef WITH_HILDON
-#include <hildon-widgets/hildon-program.h>
-#include <hildon-widgets/hildon-controlbar.h>
-#include <hildon-widgets/hildon-note.h>
-#include <hildon-widgets/hildon-color-button.h>
-#include <hildon-widgets/hildon-file-chooser-dialog.h>
-#include <hildon-widgets/hildon-number-editor.h>
-#include <hildon-widgets/hildon-banner.h>
-#include <hildon-widgets/hildon-input-mode-hint.h>
-#include <device_symbols.h>
-#endif
+#include "hildon-mapper.h"
 
 #include "utils.h"
 #include "poi.h"
@@ -388,7 +374,7 @@ gboolean menu_cb_goto_latlon(GtkAction * action)
                         1, 2, 1, 2, GTK_FILL, 0, 2, 4);
        gtk_misc_set_alignment(GTK_MISC(label), 0.0f, 0.5f);
 
-#ifdef WITH_HILDON
+#ifdef WITH_DEVICE_770
        g_object_set(G_OBJECT(txt_lat), HILDON_INPUT_MODE_HINT,
                     HILDON_INPUT_MODE_HINT_NUMERICSPECIAL, NULL);
        g_object_set(G_OBJECT(txt_lon), HILDON_INPUT_MODE_HINT,
@@ -700,7 +686,7 @@ gboolean menu_cb_help(GtkAction * action)
 {
        printf("%s()\n", __PRETTY_FUNCTION__);
 
-#ifdef WITH_HILDON
+#ifdef WITH_OSSO
        ossohelp_show(_osso, HELP_ID_INTRO, 0);
 #endif
 
@@ -710,7 +696,7 @@ gboolean menu_cb_help(GtkAction * action)
 
 gboolean menu_cb_about(GtkAction * action)
 {
-#ifdef WITH_HILDON
+#ifdef WITH_OSSO
 ossohelp_show(_osso, HELP_ID_ABOUT, OSSO_HELP_SHOW_DIALOG);
 #else
 gchar *authors[]={
index 69b4b1613de50a4486c546c083487f339ef6ac42..49648ac652abb8336a49ee2c0ee655c6e457ab80 100644 (file)
@@ -90,6 +90,9 @@
 /* Version number of package */
 #undef VERSION
 
+/* With 770/N800 specific code */
+#undef WITH_DEVICE_770
+
 /* build with Geoclue */
 #undef WITH_GEOCLUE
 
 /* build with Maemo/Hildon user interface */
 #undef WITH_HILDON
 
+/* build with Hildon filemanager */
+#undef WITH_HILDONFM
+
+/* build with new Hildon libs */
+#undef WITH_HILDON_NEW
+
 /* build with gpsd */
 #undef WITH_LIBGPS
 
 /* build with Nokia osso */
 #undef WITH_OSSO
+
+/* Number of bits in a file offset, on hosts where this is settable. */
+#undef _FILE_OFFSET_BITS
+
+/* Define for large files, on AIX-style hosts. */
+#undef _LARGE_FILES
index 017f13b56b9054f819922ef7eabe48df22accbf7..987122b1af28dfaa614c6f09cd2ba80f0d582687 100644 (file)
@@ -4,9 +4,10 @@
 #include <gtk/gtk.h>
 #include <libgnomevfs/gnome-vfs.h>
 
+#include "hildon-mapper.h"
+
 #include "utils.h"
 #include "mapper-types.h"
-
 #include "settings.h"
 #include "ui-common.h"
 #include "hildon-wrappers.h"
index ad27bf60a175637a33099e54ac54fb7bb2529973..300eec0b57f6e80d16e3e149f7bd5bc0a63e0d3d 100644 (file)
@@ -14,7 +14,7 @@
 #include <dbus/dbus-glib.h>
 
 #ifdef WITH_HILDON
-#include <hildon-widgets/hildon-banner.h>
+#include <hildon/hildon-banner.h>
 #endif
 
 static GtkWidget *connect_banner = NULL;
diff --git a/src/hildon-mapper.h b/src/hildon-mapper.h
new file mode 100644 (file)
index 0000000..bc47edd
--- /dev/null
@@ -0,0 +1,45 @@
+#ifndef _HILDON_MAPPER_H
+#define _HILDON_MAPPER_H
+
+#include "config.h"
+
+#ifdef WITH_OSSO
+#include <libosso.h>
+#include <osso-helplib.h>
+#include <osso-ic-dbus.h>
+#include <osso-ic.h>
+#include <bt-dbus.h>
+#include "maemo-osso.h"
+#endif
+
+#ifdef WITH_HILDON
+
+#ifdef WITH_HILDON_NEW
+#include <hildon/hildon-program.h>
+#include <hildon/hildon-program.h>
+#include <hildon/hildon-controlbar.h>
+#include <hildon/hildon-note.h>
+#include <hildon/hildon-color-button.h>
+#include <hildon/hildon-number-editor.h>
+#include <hildon/hildon-banner.h>
+#else
+#include <hildon-widgets/hildon-program.h>
+#include <hildon-widgets/hildon-program.h>
+#include <hildon-widgets/hildon-controlbar.h>
+#include <hildon-widgets/hildon-note.h>
+#include <hildon-widgets/hildon-color-button.h>
+#include <hildon-widgets/hildon-number-editor.h>
+#include <hildon-widgets/hildon-banner.h>
+#endif
+
+#ifdef WITH_HILDON_FM
+#include <hildon/hildon-file-chooser-dialog.h>
+#endif
+
+#ifdef WITH_DEVICE_770
+#include <device_symbols.h>
+#include <hildon/hildon-input-mode-hint.h>
+#endif
+
+#endif
+#endif
index 607cca3cc8dcec55dbf9e5b890a7479dc330086a..a8f524c18dd2dba2453d6ec85105e6a4a350363d 100644 (file)
@@ -8,9 +8,7 @@
 #include <gtk/gtk.h>
 #include "ui-common.h"
 
-#ifndef WITH_HILDON
-
-static gint _sb_sid=0;
+#ifndef WITH_HILDON_FM
 
 GtkWidget *hildon_file_chooser_dialog_new(GtkWindow * parent,
                                          GtkFileChooserAction action)
@@ -34,6 +32,12 @@ if (action == GTK_FILE_CHOOSER_ACTION_SAVE) {
 return dialog;
 }
 
+#endif
+
+#ifndef WITH_HILDON
+
+static gint _sb_sid=0;
+
 static gboolean
 status_bar_clear(void)
 {
index 0cb6dfcb79087c2cd484242d1d4759f3ff9b255c..4dfe679b96e321f7143af28aa5ac7cb7298c8be7 100644 (file)
 #define HILDON_HARDKEY_ESC                     GDK_Escape
 #define HILDON_COLOR_BUTTON            GTK_COLOR_BUTTON
 
-#define HWK_BUTTON_UP                  GDK_Up
-#define HWK_BUTTON_DOWN                        GDK_Down
-#define HWK_BUTTON_LEFT                        GDK_Left
-#define HWK_BUTTON_RIGHT               GDK_Right
-#define HWK_BUTTON_SELECT              GDK_Return
-#define HWK_BUTTON_VIEW        GDK_F10
-#define HWK_BUTTON_INCREASE    GDK_F6
-#define HWK_BUTTON_DECREASE    GDK_F5
-#define HWK_BUTTON_CANCEL                      GDK_Escape
-#define HILDON_COLOR_BUTTON            GTK_COLOR_BUTTON
+#define HILDON_COLOR_BUTTON    GTK_COLOR_BUTTON
 
 #define hildon_color_button_new gtk_color_button_new
 #define hildon_color_button_set_color gtk_color_button_set_color
 
 #endif
 
+#ifndef WITH_DEVICE_770
+#define HWK_BUTTON_UP                  GDK_Up
+#define HWK_BUTTON_DOWN                        GDK_Down
+#define HWK_BUTTON_LEFT                        GDK_Left
+#define HWK_BUTTON_RIGHT               GDK_Right
+#define HWK_BUTTON_SELECT              GDK_Return
+#define HWK_BUTTON_VIEW                        GDK_F10
+#define HWK_BUTTON_INCREASE    GDK_F6
+#define HWK_BUTTON_DECREASE    GDK_F5
+#define HWK_BUTTON_CANCEL              GDK_Escape
+#endif
+
 #endif
index ec531ec1f1c409587c9ac32b9266ab014a9c4cbe..c50bf95e8f9229597f7a0feeff1539343bb02d2b 100644 (file)
@@ -9,7 +9,7 @@
 #include <glib.h>
 #include <gtk/gtk.h>
 
-#ifdef WITH_HILDON
+#ifdef WITH_OSSO
 
 #include <libosso.h>
 #include <osso-helplib.h>
index 61dbdc9708203cd96438d2b10dc685b79e7e1df9..2b130f07a14121f773c71f9c2b24a25242e6b16d 100644 (file)
 #include <gconf/gconf-client.h>
 #include <sqlite3.h>
 
-#ifdef WITH_HILDON
-#include <libosso.h>
-#include <osso-helplib.h>
-#include <hildon-widgets/hildon-controlbar.h>
-#include <hildon-widgets/hildon-note.h>
-#include <hildon-widgets/hildon-color-button.h>
-#include <hildon-widgets/hildon-file-chooser-dialog.h>
-#include <hildon-widgets/hildon-number-editor.h>
-#include <hildon-widgets/hildon-banner.h>
-#include <hildon-widgets/hildon-system-sound.h>
-#include <hildon-widgets/hildon-input-mode-hint.h>
-#endif
+#include "hildon-mapper.h"
 
 #include "utils.h"
 #include "gps.h"
@@ -212,8 +201,7 @@ gboolean repoman_dialog_browse(GtkWidget * widget, BrowseInfo * browse_info)
        GtkWidget *dialog;
        printf("%s()\n", __PRETTY_FUNCTION__);
 
-       dialog =
-           GTK_WIDGET(hildon_file_chooser_dialog_new
+       dialog = GTK_WIDGET(hildon_file_chooser_dialog_new
                       (GTK_WINDOW(browse_info->dialog),
                        GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER));
 
@@ -620,7 +608,7 @@ gboolean repoman_dialog()
                                                 GTK_DIALOG_MODAL, GTK_STOCK_OK,
                                                 GTK_RESPONSE_ACCEPT, NULL);
 
-#ifdef WITH_HILDON
+#ifdef WITH_OSSO
        /* Enable the help button. */
        ossohelp_dialog_help_enable(GTK_DIALOG(rmi.dialog), HELP_ID_REPOMAN,
                                    _osso);
@@ -1091,7 +1079,7 @@ gboolean menu_cb_mapman(GtkAction * action)
                                        GTK_RESPONSE_ACCEPT, NULL);
 
        /* Enable the help button. */
-#ifdef WITH_HILDON
+#ifdef WITH_OSSO
        ossohelp_dialog_help_enable(GTK_DIALOG(mapman_info.dialog),
                                    HELP_ID_MAPMAN, _osso);
 #endif
@@ -1258,7 +1246,7 @@ gboolean menu_cb_mapman(GtkAction * action)
                         2, 3, 4, 5, GTK_EXPAND | GTK_FILL, 0, 4, 0);
        gtk_entry_set_alignment(GTK_ENTRY(mapman_info.txt_botright_lon), 1.f);
 
-#ifdef WITH_HILDON
+#ifdef WITH_DEVICE_770
        /* Set hildon input hints */
        g_object_set(G_OBJECT(mapman_info.txt_topleft_lon),
                     HILDON_INPUT_MODE_HINT,
index 0d69ecc55893b54759b0c15b7e8a0c867bc51114..e8f0f1c3677c1f34ddb6e76fa440ca94ec735720 100644 (file)
--- a/src/map.c
+++ b/src/map.c
 #include <locale.h>
 #include <sqlite3.h>
 
-#ifdef WITH_HILDON
-#include <libosso.h>
-#include <hildon-widgets/hildon-program.h>
-#include <hildon-widgets/hildon-controlbar.h>
-#include <hildon-widgets/hildon-note.h>
-#include <hildon-widgets/hildon-color-button.h>
-#include <hildon-widgets/hildon-file-chooser-dialog.h>
-#include <hildon-widgets/hildon-number-editor.h>
-#include <hildon-widgets/hildon-banner.h>
-#include <hildon-widgets/hildon-system-sound.h>
-#include <hildon-widgets/hildon-input-mode-hint.h>
-#endif
-
+#include "hildon-mapper.h"
 
 #include "utils.h"
 #include "map.h"
@@ -517,7 +505,7 @@ gchar *map_construct_url(guint tilex, guint tiley, guint zoom)
        return "";
 }
 
-#ifdef WITH_HILDON
+#ifdef WITH_OSSO
 void con_check_connection(void)
 {
 iap_connect();
@@ -564,7 +552,7 @@ void map_initiate_download(guint tilex, guint tiley, guint zoom, gint retries)
        pui->file = NULL;
 
        g_tree_insert(_pui_tree, pui, pui);
-#ifdef WITH_HILDON
+#ifdef WITH_OSSO
        if (iap_is_connected() && !_curl_sid)
 #endif
                _curl_sid = g_timeout_add(100, (GSourceFunc) curl_download_timeout, NULL);
@@ -703,7 +691,7 @@ gboolean map_download_idle_refresh(ProgressUpdateInfo * pui)
                        /* removal automatically calls progress_update_info_free(). */
                        g_tree_steal(_downloading_tree, pui);
                        g_tree_insert(_pui_tree, pui, pui);
-#ifdef WITH_HILDON
+#ifdef WITH_OSSO
                        if (iap_is_connected() && !_curl_sid)
 #endif
                                _curl_sid = g_timeout_add(100,
index 17d46d6dfc0317542257f796d9644491ea3167a8..77210ef303aa63b1e578d2a665370c6b48d85c50 100644 (file)
 #include <libgnomevfs/gnome-vfs.h>
 #include <curl/multi.h>
 #include <gconf/gconf-client.h>
-
-#ifdef WITH_OSSO
-#include <libosso.h>
-#include <osso-helplib.h>
-#include <osso-ic-dbus.h>
-#include <osso-ic.h>
-#include <bt-dbus.h>
-#include "maemo-osso.h"
-#endif
-#ifdef WITH_HILDON
-#include <hildon-widgets/hildon-program.h>
-#include <hildon-widgets/hildon-controlbar.h>
-#include <hildon-widgets/hildon-note.h>
-#include <hildon-widgets/hildon-input-mode-hint.h>
-#include <device_symbols.h>
-#endif
-
 #include <libintl.h>
 #include <locale.h>
 
+#include "hildon-mapper.h"
+
 #include "utils.h"
 #include "poi.h"
 #include "route.h"
index 64d16ecac2291e05ce2cf5791ac296c525e66294..59a3ed8c67dc05f2e441e12e77a10e0ceab708d3 100644 (file)
@@ -359,7 +359,7 @@ gboolean category_list()
                                             GTK_DIALOG_MODAL, GTK_STOCK_OK,
                                             GTK_RESPONSE_ACCEPT, NULL);
 
-#ifdef WITH_HILDON
+#ifdef WITH_OSSO
        /* Enable the help button. */
        ossohelp_dialog_help_enable(GTK_DIALOG(dialog), HELP_ID_POICAT, _osso);
 #endif
index 8b1452cf381153ba10ce4bc591cf45de27683b1e..50f9aa9a64193829c59fbfdb1ec07341d28634fc 100644 (file)
@@ -206,7 +206,7 @@ gboolean auto_route_dl_idle()
        }
        curl_multi_add_handle(_curl_multi, _autoroute_data.curl_easy);
 
-#ifdef WITH_HILDON
+#ifdef WITH_OSSO
        if (iap_is_connected() && !_curl_sid)
 #else
        if (!_curl_sid)
@@ -243,7 +243,7 @@ gboolean route_download(gchar * to)
        GtkEntryCompletion *to_comp;
        printf("%s()\n", __PRETTY_FUNCTION__);
 
-#ifdef WITH_HILDON
+#ifdef WITH_OSSO
        iap_connect();
 #endif
 
@@ -254,7 +254,7 @@ gboolean route_download(gchar * to)
                                             GTK_STOCK_CANCEL,
                                             GTK_RESPONSE_REJECT, NULL);
 
-#ifdef WITH_HILDON
+#ifdef WITH_OSSO
        /* Enable the help button. */
        ossohelp_dialog_help_enable(GTK_DIALOG(dialog), HELP_ID_DOWNROUTE,
                                    _osso);
index 339f720ae507b9c8809000a6d0793ec59aca36fc..50ef49a86eca86d5896c63608c609aea2bc33ead 100644 (file)
 #include <locale.h>
 #include <sqlite3.h>
 
-#ifdef WITH_OSSO
-#include <libosso.h>
-#include <osso-helplib.h>
-#endif
-#ifdef WITH_HILDON
-#include <hildon-widgets/hildon-program.h>
-#include <hildon-widgets/hildon-controlbar.h>
-#include <hildon-widgets/hildon-note.h>
-#include <hildon-widgets/hildon-color-button.h>
-#include <hildon-widgets/hildon-file-chooser-dialog.h>
-#include <hildon-widgets/hildon-number-editor.h>
-#include <hildon-widgets/hildon-banner.h>
-#include <hildon-widgets/hildon-system-sound.h>
-#include <hildon-widgets/hildon-input-mode-hint.h>
-#include <device_symbols.h>
-#endif
+#include "hildon-mapper.h"
 
 #include "utils.h"
 #include "poi.h"
@@ -445,10 +430,11 @@ settings_dialog(void)
                                             GTK_DIALOG_MODAL, GTK_STOCK_OK,
                                             GTK_RESPONSE_ACCEPT, NULL);
 
-#ifdef WITH_HILDON
+#ifdef WITH_OSSO
        /* Enable the help button. */
        ossohelp_dialog_help_enable(GTK_DIALOG(dialog), HELP_ID_SETTINGS, _osso);
-
+#endif
+#ifdef WITH_DEVICE_770
        gtk_container_add(GTK_CONTAINER(GTK_DIALOG(dialog)->action_area),
                          btn_buttons = gtk_button_new_with_label(_("Hardware Keys...")));
        g_signal_connect(G_OBJECT(btn_buttons), "clicked", G_CALLBACK(settings_dialog_hardkeys), dialog);
index 2b61f0b8d686aebf3b8b2f83273ad06379a0de1c..8091f5a1260b2b5df7f4fc4dfa91ffa77031d1cc 100644 (file)
 #include <locale.h>
 #include <sqlite3.h>
 
-#ifdef WITH_OSSO
-#include <libosso.h>
-#include <osso-helplib.h>
-#include <osso-ic-dbus.h>
-#include <osso-ic.h>
-#include <bt-dbus.h>
-#include "maemo-osso.h"
-#include "iap.h"
-#endif
-#ifdef WITH_HILDON
-#include <hildon-widgets/hildon-program.h>
-#include <hildon-widgets/hildon-controlbar.h>
-#include <hildon-widgets/hildon-note.h>
-#include <hildon-widgets/hildon-color-button.h>
-#include <hildon-widgets/hildon-file-chooser-dialog.h>
-#include <hildon-widgets/hildon-number-editor.h>
-#include <hildon-widgets/hildon-banner.h>
-#include <hildon-widgets/hildon-system-sound.h>
-#include <hildon-widgets/hildon-input-mode-hint.h>
-#include <device_symbols.h>
-#endif
+#include "hildon-mapper.h"
 
 #include "utils.h"
 #include "poi.h"
@@ -219,16 +199,9 @@ gboolean window_present()
 
                        gtk_window_present(GTK_WINDOW(_window));
 
-#ifdef WITH_HILDON
-                       confirm = hildon_note_new_confirmation(GTK_WINDOW(_window),
-                                                        ("It looks like this is your first time running"
-                                                         " Mapper.  Press OK to view the the help pages."
-                                                         " Otherwise, press Cancel to continue."));
-
-                       if (GTK_RESPONSE_OK == gtk_dialog_run(GTK_DIALOG(confirm)))
-                               ossohelp_show(_osso, HELP_ID_INTRO, 0);
-                       gtk_widget_destroy(confirm);
-#endif
+                       popup_error(_window, _("It looks like this is your first time running "
+                                                         "Mapper. Press OK to continue."));
+
                        if (settings_dialog()) {
                                popup_error(_window,
                                            _("OpenStreetMap.org provides public, free-to-use maps.  "
@@ -427,10 +400,6 @@ static void menu_init()
        gtk_menu_append(menu, _menu_close_item = gtk_menu_item_new_with_label(_("Quit")));
 
        /* We need to show menu items. */
-       gtk_widget_show_all(GTK_WIDGET(menu));
-#ifndef WITH_HILDON
-       gtk_widget_show_all(GTK_WIDGET(_menu_bar));
-#endif
 
        /* Connect the "Route" signals. */
        g_signal_connect(G_OBJECT(_menu_route_open_item), "activate",
@@ -579,10 +548,9 @@ static void menu_init()
        gtk_menu_append(submenu, _cmenu_way_distance_to_item
                        = gtk_menu_item_new_with_label(_("Show Distance to")));
        gtk_menu_append(submenu, _cmenu_way_route_to_item
-                       =
-                       gtk_menu_item_new_with_label(_("Download Route to...")));
-       gtk_menu_append(submenu, _cmenu_way_delete_item =
-                       gtk_menu_item_new_with_label(_("Delete...")));
+                       = gtk_menu_item_new_with_label(_("Download Route to...")));
+       gtk_menu_append(submenu, _cmenu_way_delete_item 
+                       = gtk_menu_item_new_with_label(_("Delete...")));
        gtk_menu_append(submenu, gtk_separator_menu_item_new());
        gtk_menu_append(submenu, _cmenu_way_add_poi = gtk_menu_item_new_with_label(_("Add POI...")));
        gtk_widget_set_sensitive(_cmenu_way_add_poi, _db != NULL);
@@ -600,9 +568,7 @@ static void menu_init()
        gtk_menu_append(submenu, _cmenu_poi_distance_to_item
                        = gtk_menu_item_new_with_label(_("Show Distance to")));
        gtk_menu_append(submenu, _cmenu_poi_route_to_item
-                       =
-                       gtk_menu_item_new_with_label(_
-                                                    ("Download Route to...")));
+                       = gtk_menu_item_new_with_label(_("Download Route to...")));
        gtk_menu_append(submenu, gtk_separator_menu_item_new());
        gtk_menu_append(submenu, _cmenu_poi_add_route
                        = gtk_menu_item_new_with_label(_("Add Route Point")));
@@ -665,8 +631,11 @@ static void menu_init()
                         G_CALLBACK(menu_cb_goto_nearpoi), NULL);
 
        gtk_widget_show_all(GTK_WIDGET(menu));
+#ifndef WITH_HILDON
+       gtk_widget_show_all(GTK_WIDGET(_menu_bar));
+#endif
 
-#ifdef WITH_HILDON
+#ifdef WITH_DEVICE_770
        gtk_widget_tap_and_hold_setup(_map_widget, GTK_WIDGET(menu), NULL, 0);
 #else
        _menu_map = menu;
@@ -1047,7 +1016,7 @@ void mapper_init(gint argc, gchar ** argv)
                              | GDK_POINTER_MOTION_MASK
                              | GDK_POINTER_MOTION_HINT_MASK);
 
-#ifdef WITH_HILDON
+#ifdef WITH_OSSO
        osso_hw_set_event_cb(_osso, NULL, osso_cb_hw_state, NULL);
 #endif
 
@@ -1183,7 +1152,7 @@ void mapper_init(gint argc, gchar ** argv)
        /* If we have a route, calculate the next point. */
        route_find_nearest_point();
 
-#ifdef WITH_HILDON
+#ifdef WITH_OSSO
        /* Add D-BUS signal handler for 'status_changed' */
        {
                DBusConnection *dbus_conn = dbus_bus_get(DBUS_BUS_SYSTEM, NULL);
index 5c888790c1d6e7bebae02b4d3418145c0406cde2..7f9a3e54856b1f8a7b52a2b8c8df3678fc465dc5 100644 (file)
 #define HELP_ID_DOWNROUTE HELP_ID_PREFIX"downroute"
 #define HELP_ID_POICAT HELP_ID_PREFIX"poicat"
 
+#ifdef WITH_OSSO
 #include <libosso.h>
-#include <hildon-widgets/hildon-program.h>
+/** The main OSSO context of the application. */
+osso_context_t *_osso;
+#endif
 
+#include <hildon/hildon-program.h>
 /** The main GtkWindow of the application. */
 HildonProgram *_program;
 
-/** The main OSSO context of the application. */
-osso_context_t *_osso;
-
 #endif
 
 #endif
index bbac3067275b502a0f5a8c4b0941853acff88acc..0e6d5ca25590500c1a7e6b151c8d40305006fe4b 100644 (file)
@@ -83,7 +83,7 @@
 #define TILE_SIZE_PIXELS (256)
 #define TILE_SIZE_P2 (8)
 
-#ifdef WITH_HILDON
+#ifdef WITH_DEVICE_770
 #define BUF_WIDTH_TILES (4)
 #define BUF_HEIGHT_TILES (3)
 #define BUF_WIDTH_PIXELS (1024)
         map_render_paths(); \
 }
 
-#ifdef WITH_HILDON
+#ifdef WITH_OSSO
 #define KEEP_DISPLAY_ON() { \
     /* Note that the flag means keep on ONLY when fullscreen. */ \
     if(_always_keep_on || _fullscreen) \