]> err.no Git - mapper/commitdiff
More maemo/hildon fixes.
authorKaj-Michael Lang <milang@onion.tal.org>
Wed, 25 Jul 2007 10:52:10 +0000 (13:52 +0300)
committerKaj-Michael Lang <milang@onion.tal.org>
Wed, 25 Jul 2007 10:52:10 +0000 (13:52 +0300)
debian/control
src/gps-nmea-parse.c
src/hildon-wrappers.h
src/iap.c
src/maemo-osso.c
src/map.c
src/osm.c
src/settings-gui.c
src/ui-common.c

index a9728b874c9f86162e04d7b5cc5e00b3735c354f..d9ab4d8b869bffa66111eb97d4c93ee65a182e32 100644 (file)
@@ -2,7 +2,7 @@ Source: mapper
 Section: maemo/Applications
 Priority: optional
 Maintainer: Kaj-Michael Lang
-Build-Depends: debhelper (>= 4.0.0), intltool, hildon-base-lib-dev, hildon-libs-dev, hildon-fm-dev, libgtk2.0-dev, libosso-gnomevfs2-dev, libglib2.0-dev, libdbus-glib-1-dev, libosso-dev, libsqlite3-dev, osso-ic-dev
+Build-Depends: debhelper (>= 4.0.0), intltool, hildon-base-lib-dev, hildon-libs-dev, hildon-fm-dev, libgtk2.0-dev, libosso-gnomevfs2-dev, libglib2.0-dev, libdbus-glib-1-dev, libosso-dev, libsqlite3-dev (>=3.3.17), osso-ic-dev
 Standards-Version: 3.6.0
 
 Package: mapper
index e3dfbca10131f9daa684bebbef0745d4a8ce3ee3..069fba5391d801f798025b3313a6c9bbfe279dc9 100644 (file)
 #include <fcntl.h>
 #include <libxml/parser.h>
 
+#ifdef WITH_HILDON
+#include <hildon-widgets/hildon-banner.h>
+#endif
+
 #include "utils.h"
 #include "bt.h"
 #include "gps.h"
index cab0424da04bf1d60dd2f97274e9731650052f44..0cb6dfcb79087c2cd484242d1d4759f3ff9b255c 100644 (file)
@@ -5,6 +5,8 @@
  * Wrappers and defines for non-hildon build
  ****************************************************************************/
 
+#include "config.h"
+
 #ifndef WITH_HILDON
 /* Define hildon key to use gdk keys */
 #define HILDON_HARDKEY_UP                      GDK_Up
index 7bdac9a31c1eb67c0a750e3d524fa6341f58ef7e..1125aa49fe21f30e51beae0ec3a34a15248bb36c 100644 (file)
--- a/src/iap.c
+++ b/src/iap.c
@@ -12,7 +12,7 @@
 #include "gps.h"
 
 gboolean iap_connecting=FALSE;
-gboolean iap_connected=FALSE;
+gboolean iap_connected=TRUE;
 
 void iap_callback(struct iap_event_t *event, void *arg)
 {
index bbefb595e4157302ff7c556c735d6dfb15c4f7b3..ec531ec1f1c409587c9ac32b9266ab014a9c4cbe 100644 (file)
@@ -7,6 +7,7 @@
 #define _GNU_SOURCE
 
 #include <glib.h>
+#include <gtk/gtk.h>
 
 #ifdef WITH_HILDON
 
 #include "gps.h"
 #include "settings-gconf.h"
 #include "settings.h"
+#include "ui-common.h"
+
+gint
+dbus_cb_default(const gchar *interface, const gchar *method,
+        GArray *arguments, gpointer data, osso_rpc_t *retval)
+{
+if(!strcmp(method, "top_application"))
+       gtk_idle_add((GSourceFunc)window_present, NULL);
+retval->type = DBUS_TYPE_INVALID;
+
+return OSSO_OK;
+}
 
 void osso_cb_hw_state(osso_hw_state_t * state, gpointer data)
 {
index f4e5677922fcfe3a175b7fa88b73c68feb0ef541..800c13d415266d0ade86a6f29cd134a982ae79db 100644 (file)
--- a/src/map.c
+++ b/src/map.c
 #include <curl/multi.h>
 #include <libintl.h>
 #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 "utils.h"
 #include "map.h"
 #include "osm.h"
index 0238f003dbc9e1af5cd1829590d831c12d8872e3..913759e12658a78a9871c8f7b8b92f45778db572 100644 (file)
--- a/src/osm.c
+++ b/src/osm.c
@@ -1239,15 +1239,15 @@ osm_node_isin=g_hash_table_new(g_direct_hash, g_direct_equal);
 static void
 storage_free(void)
 {
-g_hash_table_unref(osm_nodes);
-g_hash_table_unref(osm_segments);
-
-g_hash_table_unref(osm_place_country);
-g_hash_table_unref(osm_place_city);
-g_hash_table_unref(osm_place_suburb);
-g_hash_table_unref(osm_place_village);
-g_hash_table_unref(osm_place_region);
-g_hash_table_unref(osm_node_isin);
+g_hash_table_destroy(osm_nodes);
+g_hash_table_destroy(osm_segments);
+
+g_hash_table_destroy(osm_place_country);
+g_hash_table_destroy(osm_place_city);
+g_hash_table_destroy(osm_place_suburb);
+g_hash_table_destroy(osm_place_village);
+g_hash_table_destroy(osm_place_region);
+g_hash_table_destroy(osm_node_isin);
 }
 
 /************************************************************************/
index 772b6f5122bb528f316d5e4609413648c3cfb9a3..249ea63ba54e91a15cad19102243f91ca9cf20eb 100644 (file)
 #include <locale.h>
 #include <sqlite3.h>
 
+#ifdef WITH_HILDON
+#include <libosso.h>
+#include <osso-helplib.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>
+#include <device_symbols.h>
+#endif
+
 #include "utils.h"
 #include "poi.h"
 #include "gps.h"
index b324f41e6273b5396f4946586b91ea2e0b963196..65f4e69bd6bf926ec0813a7d0ec88cc0b7975e9e 100644 (file)
@@ -916,17 +916,18 @@ void mapper_init(gint argc, gchar ** argv)
 
        config_init();
 
+       g_set_application_name("Mapper");
+
 #ifdef WITH_HILDON
        /* Initialize _program. */
        _program = HILDON_PROGRAM(hildon_program_get_instance());
-       g_set_application_name("Tablet Mapper");
 
        /* Initialize _window. */
        _window = GTK_WIDGET(hildon_window_new());
        hildon_program_add_window(_program, HILDON_WINDOW(_window));
 #else
        _window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
-       gtk_window_set_title(GTK_WINDOW(_window), "Desktop Mapper");
+       gtk_window_set_title(GTK_WINDOW(_window), "Mapper");
        gtk_widget_set_size_request(GTK_WIDGET(_window), WINDOW_SIZE_X, WINDOW_SIZE_Y);
        gtk_window_resize(GTK_WINDOW(_window), WINDOW_SIZE_X, WINDOW_SIZE_Y);
        gtk_window_set_resizable(GTK_WINDOW(_window), TRUE);
@@ -948,6 +949,8 @@ void mapper_init(gint argc, gchar ** argv)
        /* Create and add widgets and supporting data. */
        gtk_container_add(GTK_CONTAINER(_window), notebook);
        hildon_program_set_common_toolbar(_program, _toolbar);
+
+       gtk_widget_show_all(notebook);
 #else
        vbox_main = gtk_vbox_new(FALSE, 0);
        gtk_container_add(GTK_CONTAINER(_window), vbox_main);
@@ -1216,8 +1219,7 @@ void mapper_init(gint argc, gchar ** argv)
        /* Add D-BUS signal handler for 'status_changed' */
        {
                DBusConnection *dbus_conn = dbus_bus_get(DBUS_BUS_SYSTEM, NULL);
-               gchar *filter_string =
-                   g_strdup_printf("interface=%s", ICD_DBUS_INTERFACE);
+               gchar *filter_string = g_strdup_printf("interface=%s", ICD_DBUS_INTERFACE);
                /* add match */
                dbus_bus_add_match(dbus_conn, filter_string, NULL);
 
@@ -1235,15 +1237,13 @@ void mapper_init(gint argc, gchar ** argv)
                GError *error = NULL;
 
                /* Initialize D-Bus. */
-               if (NULL ==
-                   (dbus_conn = dbus_g_bus_get(DBUS_BUS_SYSTEM, &error))) {
+               if (NULL == (dbus_conn = dbus_g_bus_get(DBUS_BUS_SYSTEM, &error))) {
                        g_printerr("Failed to open connection to D-Bus: %s.\n",
                                   error->message);
                        error = NULL;
                }
 
-               if (NULL ==
-                   (_rfcomm_req_proxy =
+               if (NULL == (_rfcomm_req_proxy =
                     dbus_g_proxy_new_for_name(dbus_conn, BTCOND_SERVICE,
                                               BTCOND_REQ_PATH,
                                               BTCOND_REQ_INTERFACE))) {
@@ -1252,11 +1252,7 @@ void mapper_init(gint argc, gchar ** argv)
                }
        }
 
-#ifdef DEBUG
-       _iap_connected = TRUE;
 #endif
-#endif
-
        gtk_idle_add((GSourceFunc) window_present, NULL);
 
        vprintf("%s(): return\n", __PRETTY_FUNCTION__);