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
#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"
* 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
#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)
{
#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)
{
#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"
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);
}
/************************************************************************/
#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"
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);
/* 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);
/* 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);
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))) {
}
}
-#ifdef DEBUG
- _iap_connected = TRUE;
#endif
-#endif
-
gtk_idle_add((GSourceFunc) window_present, NULL);
vprintf("%s(): return\n", __PRETTY_FUNCTION__);