From: Kaj-Michael Lang Date: Mon, 2 Jul 2007 12:41:45 +0000 (+0300) Subject: misc X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=142f6294cbd42651864974372a9fc20bd2161bd5;p=mapper misc --- diff --git a/intltool-extract b/intltool-extract index 3c1b65d..a3e0911 100755 --- a/intltool-extract +++ b/intltool-extract @@ -1,4 +1,4 @@ -#!/scratchbox/tools/bin/perl -w +#!/usr/bin/perl -w # -*- Mode: perl; indent-tabs-mode: nil; c-basic-offset: 4 -*- # diff --git a/intltool-merge b/intltool-merge index b06d77a..6101bec 100755 --- a/intltool-merge +++ b/intltool-merge @@ -1,4 +1,4 @@ -#!/scratchbox/tools/bin/perl -w +#!/usr/bin/perl -w # -*- Mode: perl; indent-tabs-mode: nil; c-basic-offset: 4 -*- # diff --git a/intltool-update b/intltool-update index eff9643..b80bdd6 100755 --- a/intltool-update +++ b/intltool-update @@ -1,4 +1,4 @@ -#!/scratchbox/tools/bin/perl -w +#!/usr/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/src/mapper/intltool-extract"; + my $EXTRACT = "/home/milang/devel/git/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"} || "/scratchbox/tools/bin/xgettext"; + my $XGETTEXT = $ENV{"XGETTEXT"} || "/usr/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"} || "/scratchbox/tools/bin/msgmerge"; + my $MSGMERGE = $ENV{"MSGMERGE"} || "/usr/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"} || "/scratchbox/tools/bin/msgfmt"; + my $MSGFMT = $ENV{"MSGFMT"} || "/usr/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"} || "/scratchbox/tools/bin/msgfmt"; + my $MSGFMT = $ENV{"MSGFMT"} || "/usr/bin/msgfmt"; &GatherPOFiles; diff --git a/src/bt-maemo.c b/src/bt-maemo.c index c817e45..fadc586 100644 --- a/src/bt-maemo.c +++ b/src/bt-maemo.c @@ -4,32 +4,19 @@ #ifdef WITH_HILDON -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - #include #include #include #include +#include +#include +#include +#include +#include +#include #include #include -#include "gps.h" -#include "bt.h" -#include "settings.h" -#include "ui-common.h" - /*****************************************************************************/ #ifndef __g_cclosure_user_marshal_MARSHAL_H__ @@ -263,17 +250,21 @@ 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); diff --git a/src/bt.h b/src/bt.h index ebac6c2..6463d9b 100644 --- a/src/bt.h +++ b/src/bt.h @@ -3,16 +3,6 @@ #define _GNU_SOURCE -#include "config.h" - -#define DBUS_API_SUBJECT_TO_CHANGE -#include -#include - -#ifdef WITH_HILDON -#include -#endif - #include "utils.h" #include "mapper-types.h" @@ -44,8 +34,6 @@ struct _ScanInfo { GtkWidget *banner; GtkListStore *store; guint sid; - DBusGProxy *req_proxy; - DBusGProxy *sig_proxy; }; ConnState _conn_state; diff --git a/src/hildon-wrappers.c b/src/hildon-wrappers.c index 73441d1..0db0ac5 100644 --- a/src/hildon-wrappers.c +++ b/src/hildon-wrappers.c @@ -1,14 +1,11 @@ /**************************************************************************** * Hildon function Wrappers for non-hildon build ****************************************************************************/ -#include "config.h" - #define _GNU_SOURCE -#include - #ifndef WITH_HILDON +#include #include "ui-common.h" static gint _sb_sid=0; diff --git a/src/iap.c b/src/iap.c index 8926fb2..0cbeb5f 100644 --- a/src/iap.c +++ b/src/iap.c @@ -2,33 +2,6 @@ #ifdef WITH_HILDON -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#include -#include -#include -#include -#include -#include - -#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__); diff --git a/src/maemo-osso.c b/src/maemo-osso.c index a686905..646b086 100644 --- a/src/maemo-osso.c +++ b/src/maemo-osso.c @@ -7,37 +7,14 @@ #define _GNU_SOURCE #include -#include #ifdef WITH_HILDON #include +#include #include #include -#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; diff --git a/src/mapper.c b/src/mapper.c index e7d2ac0..85bcd45 100644 --- a/src/mapper.c +++ b/src/mapper.c @@ -55,12 +55,12 @@ #include #include #include +#include #include #include #include #include #include -#include "maemo-osso.h" #endif #include diff --git a/src/settings.h b/src/settings.h index cc16218..27f413d 100644 --- a/src/settings.h +++ b/src/settings.h @@ -7,7 +7,6 @@ #ifndef _MAPPER_SETTINGS_H #define _MAPPER_SETTINGS_H -#include "mapper-types.h" #include "settings-gconf.h" /** CONFIGURATION INFORMATION. */ @@ -35,9 +34,6 @@ gboolean _show_velvec; gboolean _show_poi; gboolean _auto_download; -gboolean _iap_connecting; -gboolean _iap_connected; - guint _lead_ratio; guint _center_ratio; guint _draw_width; diff --git a/src/ui-common.c b/src/ui-common.c index 18ef1f3..0c827d7 100644 --- a/src/ui-common.c +++ b/src/ui-common.c @@ -22,19 +22,6 @@ #include #include -#include - -#ifdef WITH_HILDON -#include -#include -#include -#include -#include -#include -#include "maemo-osso.h" -#include "iap.h" -#endif - #include "utils.h" #include "poi.h" #include "route.h" @@ -770,11 +757,9 @@ 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); @@ -1206,8 +1191,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); @@ -1218,7 +1203,6 @@ void mapper_init(gint argc, gchar ** argv) get_connection_status_signal_cb, NULL, NULL); } - osso_iap_cb(iap_callback); { @@ -1226,14 +1210,16 @@ 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", diff --git a/src/ui-maemo.h b/src/ui-maemo.h index 5f89336..fd807e1 100644 --- a/src/ui-maemo.h +++ b/src/ui-maemo.h @@ -5,22 +5,6 @@ #ifdef WITH_HILDON -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - /** The main GtkWindow of the application. */ HildonProgram *_program; diff --git a/src/utils.c b/src/utils.c index e090567..d1da655 100644 --- a/src/utils.c +++ b/src/utils.c @@ -19,15 +19,10 @@ #include #include -#ifdef WITH_HILDON -#include -#endif - #include "utils.h" #include "gps.h" #include "mapper-types.h" #include "bt.h" -#include "route.h" void sound_noise(void) {