]> err.no Git - mapper/commitdiff
Fixes so it builds again under maemo scratchbox.
authorKaj-Michael Lang <milang@onion.tal.org>
Mon, 2 Jul 2007 12:40:04 +0000 (15:40 +0300)
committerKaj-Michael Lang <milang@onion.tal.org>
Mon, 2 Jul 2007 12:40:04 +0000 (15:40 +0300)
13 files changed:
intltool-extract
intltool-merge
intltool-update
src/bt-maemo.c
src/bt.h
src/hildon-wrappers.c
src/iap.c
src/maemo-osso.c
src/mapper.c
src/settings.h
src/ui-common.c
src/ui-maemo.h
src/utils.c

index a3e09116c62ae2f7536efcafe6d92e95c2825aee..3c1b65df232842e8d7376f013ffa5bab6a7f2d20 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w 
+#!/scratchbox/tools/bin/perl -w 
 # -*- Mode: perl; indent-tabs-mode: nil; c-basic-offset: 4  -*-
 
 #
index 6101beca28018ddb773eed34325e5ae1544a28bc..b06d77a3a671892fce0d4f6a77da2121efa6daf9 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/scratchbox/tools/bin/perl -w
 # -*- Mode: perl; indent-tabs-mode: nil; c-basic-offset: 4  -*-
 
 #
index b80bdd6f8265e02a7d11977f04a8edf966e172c9..eff9643dcb22843b5782d609cb7e32433d3e334f 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/perl -w
+#!/scratchbox/tools/bin/perl -w
 # -*- Mode: perl; indent-tabs-mode: nil; c-basic-offset: 4  -*-
 
 #
@@ -565,7 +565,7 @@ sub Console_WriteError_InvalidOption
 
 sub GenerateHeaders
 {
-    my $EXTRACT = "/home/milang/devel/git/mapper/intltool-extract";
+    my $EXTRACT = "/home/milang/src/mapper/intltool-extract";
     chomp $EXTRACT;
 
     $EXTRACT = $ENV{"INTLTOOL_EXTRACT"} if $ENV{"INTLTOOL_EXTRACT"};
@@ -619,7 +619,7 @@ sub GenerateHeaders
 #
 sub GeneratePOTemplate
 {
-    my $XGETTEXT = $ENV{"XGETTEXT"} || "/usr/bin/xgettext";
+    my $XGETTEXT = $ENV{"XGETTEXT"} || "/scratchbox/tools/bin/xgettext";
     my $XGETTEXT_ARGS = $ENV{"XGETTEXT_ARGS"} || '';
     chomp $XGETTEXT;
 
@@ -788,7 +788,7 @@ sub POFile_Update
 {
     -f "$MODULE.pot" or die "$PROGRAM: $MODULE.pot does not exist.\n";
 
-    my $MSGMERGE = $ENV{"MSGMERGE"} || "/usr/bin/msgmerge";
+    my $MSGMERGE = $ENV{"MSGMERGE"} || "/scratchbox/tools/bin/msgmerge";
     my ($lang, $outfile) = @_;
 
     print "Merging $SRCDIR/$lang.po with $MODULE.pot..." if $VERBOSE;
@@ -831,7 +831,7 @@ sub POFile_GetLanguage ($)
 sub Console_Write_TranslationStatus
 {
     my ($lang, $output_file) = @_;
-    my $MSGFMT = $ENV{"MSGFMT"} || "/usr/bin/msgfmt";
+    my $MSGFMT = $ENV{"MSGFMT"} || "/scratchbox/tools/bin/msgfmt";
 
     $output_file = "$SRCDIR/$lang.po" if ($output_file eq "");
 
@@ -840,7 +840,7 @@ sub Console_Write_TranslationStatus
 
 sub Console_Write_CoverageReport
 {
-    my $MSGFMT = $ENV{"MSGFMT"} || "/usr/bin/msgfmt";
+    my $MSGFMT = $ENV{"MSGFMT"} || "/scratchbox/tools/bin/msgfmt";
 
     &GatherPOFiles;
 
index fadc586b168e55ea67bd5a208cf80182a0425555..c817e45a9efdff9c5359af5b3fcf2e8174a32ab9 100644 (file)
@@ -4,19 +4,32 @@
 
 #ifdef WITH_HILDON
 
+#include <unistd.h>
+#include <stdlib.h>
+#include <string.h>
+#include <strings.h>
+#include <stddef.h>
+#include <math.h>
+#include <errno.h>
+#include <sys/wait.h>
+#include <glib/gstdio.h>
+#include <fcntl.h>
+
+#include <dbus/dbus-glib.h>
+#include <bt-dbus.h>
+
 #include <libosso.h>
 #include <osso-helplib.h>
 #include <osso-ic-dbus.h>
 #include <osso-ic.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 "gps.h"
+#include "bt.h"
+#include "settings.h"
+#include "ui-common.h"
+
 /*****************************************************************************/
 
 #ifndef __g_cclosure_user_marshal_MARSHAL_H__
@@ -250,21 +263,17 @@ void rcvr_connect_response(DBusGProxy * proxy, DBusGProxyCall * call_id)
                                            dbus_g_error_get_name(error))
                                    || !fdpath) {
                                        GtkWidget *confirm;
-                                       printf
-                                           ("Caught remote method exception %s: %s",
+                                       printf("Caught remote method exception %s: %s",
                                             dbus_g_error_get_name(error),
                                             error->message);
                                        rcvr_disconnect();
 
                                        /* Ask user to re-connect. */
-                                       confirm =
-                                           hildon_note_new_confirmation
+                                       confirm = hildon_note_new_confirmation
                                            (GTK_WINDOW(_window),
-                                            _
-                                            ("Failed to connect to GPS receiver.  Retry?"));
+                                            _("Failed to connect to GPS receiver.  Retry?"));
 
-                                       if (GTK_RESPONSE_OK ==
-                                           gtk_dialog_run(GTK_DIALOG(confirm)))
+                                       if (GTK_RESPONSE_OK == gtk_dialog_run(GTK_DIALOG(confirm)))
                                                rcvr_connect_later();   /* Try again later. */
                                        else
                                                set_conn_state(RCVR_OFF);
index 6463d9b55bb0cbd1e07e33348f5f38561a95fd31..ebac6c2475d8b842a7323c85e39b76d8ac221398 100644 (file)
--- a/src/bt.h
+++ b/src/bt.h
@@ -3,6 +3,16 @@
 
 #define _GNU_SOURCE
 
+#include "config.h"
+
+#define DBUS_API_SUBJECT_TO_CHANGE
+#include <dbus/dbus.h>
+#include <dbus/dbus-glib.h>
+
+#ifdef WITH_HILDON
+#include <bt-dbus.h>
+#endif
+
 #include "utils.h"
 #include "mapper-types.h"
 
@@ -34,6 +44,8 @@ struct _ScanInfo {
        GtkWidget *banner;
        GtkListStore *store;
        guint sid;
+       DBusGProxy *req_proxy;
+       DBusGProxy *sig_proxy;
 };
 
 ConnState _conn_state;
index 0db0ac53ff2e5f5da4f1d6c333dc6cdad238ab75..73441d102dd4d6483f1a99bbacc9ff49f1c39f74 100644 (file)
@@ -1,11 +1,14 @@
 /****************************************************************************
  * Hildon function Wrappers for non-hildon build
  ****************************************************************************/
+#include "config.h"
+
 #define _GNU_SOURCE
 
+#include <gtk/gtk.h>
+
 #ifndef WITH_HILDON
 
-#include <gtk/gtk.h>
 #include "ui-common.h"
 
 static gint _sb_sid=0;
index 0cbeb5fb38e695ca655415b4a20b1c3f58973a59..8926fb2fcea844343b1273b67e7683a8f8135dac 100644 (file)
--- a/src/iap.c
+++ b/src/iap.c
@@ -2,6 +2,33 @@
 
 #ifdef WITH_HILDON
 
+#include <unistd.h>
+#include <stdlib.h>
+#include <string.h>
+#include <strings.h>
+#include <stddef.h>
+#include <errno.h>
+#include <sys/wait.h>
+#include <glib/gstdio.h>
+#include <gtk/gtk.h>
+#include <fcntl.h>
+
+#include <curl/multi.h>
+
+#include <dbus/dbus-glib.h>
+#include <bt-dbus.h>
+#include <libosso.h>
+#include <osso-helplib.h>
+#include <osso-ic-dbus.h>
+#include <osso-ic.h>
+
+#include "settings.h"
+#include "gps.h"
+#include "map.h"
+
+gboolean _iap_connecting=FALSE;
+gboolean _iap_connected=FALSE;
+
 void iap_callback(struct iap_event_t *event, void *arg)
 {
        printf("%s()\n", __PRETTY_FUNCTION__);
index 646b086a0bbddfedfcdd2d87e41264f82557ed2d..a6869051897fa54d8fbb4dcd3514bc4bb0249207 100644 (file)
@@ -7,14 +7,37 @@
 #define _GNU_SOURCE
 
 #include <glib.h>
+#include <gtk/gtk.h>
 
 #ifdef WITH_HILDON
 
 #include <libosso.h>
-#include <osso-helplib.h>
 #include <osso-ic-dbus.h>
 #include <osso-ic.h>
 
+#include "bt.h"
+#include "gps.h"
+#include "map.h"
+#include "route.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)
+{
+printf("%s()\n", __PRETTY_FUNCTION__);
+     
+if(!strcmp(method, "top_application"))
+       gtk_idle_add((GSourceFunc)window_present, NULL);
+retval->type = DBUS_TYPE_INVALID;
+    
+vprintf("%s(): return\n", __PRETTY_FUNCTION__);
+return OSSO_OK;
+}
+
+
 void osso_cb_hw_state(osso_hw_state_t * state, gpointer data)
 {
        static gboolean _must_save_data = FALSE;
index 85bcd451045e13e1fcdd5cb7f437d5914bc7e563..e7d2ac044653b2468d2c3346551807367f0a076b 100644 (file)
 #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>
+#include "maemo-osso.h"
 #endif
 
 #include <libintl.h>
index 27f413db6060145451effec62a50a442c6206bbf..cc16218a1bdf733feac651d89a2bbe40298ab8d4 100644 (file)
@@ -7,6 +7,7 @@
 #ifndef _MAPPER_SETTINGS_H
 #define _MAPPER_SETTINGS_H
 
+#include "mapper-types.h"
 #include "settings-gconf.h"
 
 /** CONFIGURATION INFORMATION. */
@@ -34,6 +35,9 @@ gboolean _show_velvec;
 gboolean _show_poi;
 gboolean _auto_download;
 
+gboolean _iap_connecting;
+gboolean _iap_connected;
+
 guint _lead_ratio;
 guint _center_ratio;
 guint _draw_width;
index 0c827d74bd5c1292c975e481c14be8df9c06515f..18ef1f35eb1ed4e36f0dc070cbdc353f598a5709 100644 (file)
 #include <locale.h>
 #include <sqlite3.h>
 
+#include <dbus/dbus-glib.h>
+
+#ifdef WITH_HILDON
+#include <bt-dbus.h>
+#include <libosso.h>
+#include <osso-helplib.h>
+#include <osso-ic-dbus.h>
+#include <osso-ic.h>
+#include <hildon-widgets/hildon-banner.h>
+#include "maemo-osso.h"
+#include "iap.h"
+#endif
+
 #include "utils.h"
 #include "poi.h"
 #include "route.h"
@@ -757,9 +770,11 @@ g_signal_connect (item, "clicked", G_CALLBACK (cb_zoom_autozoom), NULL);
 item = gtk_separator_tool_item_new();
 gtk_toolbar_insert (GTK_TOOLBAR (_toolbar), item, -1);
 
+#ifndef WITH_HILDON
 _toolbar_fullscreen_item = gtk_toggle_tool_button_new_from_stock (GTK_STOCK_FULLSCREEN);
 gtk_toolbar_insert (GTK_TOOLBAR (_toolbar), _toolbar_fullscreen_item, -1);
 g_signal_connect (_toolbar_fullscreen_item, "clicked", G_CALLBACK (cb_fullscreen_click), NULL);
+#endif
 
 item = gtk_separator_tool_item_new();
 gtk_toolbar_insert (GTK_TOOLBAR (_toolbar), item, -1);
@@ -1191,8 +1206,8 @@ 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);
 
@@ -1203,6 +1218,7 @@ void mapper_init(gint argc, gchar ** argv)
                                           get_connection_status_signal_cb,
                                           NULL, NULL);
        }
+
        osso_iap_cb(iap_callback);
 
        {
@@ -1210,16 +1226,14 @@ 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 =
-                    dbus_g_proxy_new_for_name(dbus_conn, BTCOND_SERVICE,
+               if (NULL == (_rfcomm_req_proxy = dbus_g_proxy_new_for_name(dbus_conn, 
+                                              BTCOND_SERVICE,
                                               BTCOND_REQ_PATH,
                                               BTCOND_REQ_INTERFACE))) {
                        g_printerr("Failed to open connection to %s.\n",
index fd807e1e8f8e130f431415fa705e66a3920404ae..5f89336271027eb9e261b1837f61ccd2119ab271 100644 (file)
@@ -5,6 +5,22 @@
 
 #ifdef WITH_HILDON
 
+#include <libosso.h>
+#include <osso-helplib.h>
+#include <osso-ic-dbus.h>
+#include <osso-ic.h>
+#include <bt-dbus.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-fm/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>
+
 /** The main GtkWindow of the application. */
 HildonProgram *_program;
 
index d1da6550f1e066b4ee32e8ba86ce034d488f52e0..e090567c35206590e00a836df59a804fafb5bd93 100644 (file)
 #include <gconf/gconf-client.h>
 #include <libxml/parser.h>
 
+#ifdef WITH_HILDON
+#include <hildon-widgets/hildon-system-sound.h>
+#endif
+
 #include "utils.h"
 #include "gps.h"
 #include "mapper-types.h"
 #include "bt.h"
+#include "route.h"
 
 void sound_noise(void)
 {