return TRUE;
}
+gboolean cb_fullscreen_click(GtkAction * action)
+{
+ gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(_menu_fullscreen_item), !_fullscreen);
+ return TRUE;
+}
+
gboolean cb_fullscreen(GtkAction * action)
{
printf("%s()\n", __PRETTY_FUNCTION__);
- if ((_fullscreen = gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM
- (_menu_fullscreen_item))))
+ if ((_fullscreen = gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(_menu_fullscreen_item))))
gtk_window_fullscreen(GTK_WINDOW(_window));
else
gtk_window_unfullscreen(GTK_WINDOW(_window));
rcvr_connect_now();
} else {
popup_error(_window,
- _
- ("Cannot enable GPS until a GPS Receiver MAC "
+ _("Cannot enable GPS until a GPS Receiver MAC "
"is set in the Settings dialog box."));
gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM
(_menu_enable_gps_item),
}
map_move_mark();
gps_show_info();
- gtk_widget_set_sensitive(GTK_WIDGET(_menu_gps_details_item),
- _enable_gps);
+ gtk_widget_set_sensitive(GTK_WIDGET(_menu_gps_details_item), _enable_gps);
gtk_widget_set_sensitive(GTK_WIDGET(_menu_gps_reset_item), _enable_gps);
vprintf("%s(): return TRUE\n", __PRETTY_FUNCTION__);
printf("%s()\n", __PRETTY_FUNCTION__);
if ((_auto_download =
- gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM
- (_menu_auto_download_item)))) {
+ gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(_menu_auto_download_item)))) {
if (_curr_repo->url == REPOTYPE_NONE)
popup_error(_window,
- _
- ("NOTE: You must set a Map URI in the current repository in "
+ _("NOTE: You must set a Map URI in the current repository in "
"order to download maps."));
map_force_redraw();
}
break;
case CUSTOM_ACTION_TOGGLE_FULLSCREEN:
- gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM
- (_menu_fullscreen_item),
- !_fullscreen);
+ gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(_menu_fullscreen_item), !_fullscreen);
break;
case CUSTOM_ACTION_TOGGLE_TRACKS:
gboolean cb_zoomin(GtkAction * action);
gboolean cb_zoomout(GtkAction * action);
gboolean cb_fullscreen(GtkAction * action);
+gboolean cb_fullscreen_click(GtkAction * action);
gboolean menu_cb_show_scale(GtkAction * action);
gboolean menu_cb_show_routes(GtkAction * action);
gboolean menu_cb_show_tracks(GtkAction * action);
#include <string.h>
#include <strings.h>
#include <stddef.h>
-#include <locale.h>
#include <math.h>
#include <errno.h>
#include <sys/wait.h>
#include <libgnomevfs/gnome-vfs.h>
#include <curl/multi.h>
#include <gconf/gconf-client.h>
-#include <libxml/parser.h>
#ifdef WITH_HILDON
#include <libosso.h>
#include <libintl.h>
#include <locale.h>
-#include <sqlite3.h>
-
#include "utils.h"
#include "poi.h"
#include "route.h"
#include "mapper-types.h"
#include "bt.h"
#include "ui-common.h"
-
-/* Callbacks */
#include "cb.h"
-gfloat UNITS_CONVERT[] = {
- 1.85200,
- 1.15077945,
- 1.f,
-};
+gfloat UNITS_CONVERT[] = {1.85200,1.15077945,1.f,};
GdkColor COLORABLE_DEFAULT[COLORABLE_ENUM_COUNT] = {
{0, 0x0000, 0x0000, 0xc000}
void set_var_defaults(void)
{
- _conn_state = RCVR_OFF;
+_conn_state = RCVR_OFF;
}
gint mapper_osso_init(void)
_gmtoffset = time2.tm_gmtoff;
}
-
gint main(gint argc, gchar * argv[])
{
printf("%s()\n", __PRETTY_FUNCTION__);
g_thread_init(NULL);
g_type_init();
-
if (mapper_osso_init()!=0)
return 1;
-
- set_var_defaults();
-
-#ifdef WITH_GSTREAMER
+ set_var_defaults();
gst_init(&argc, &argv);
-#endif
gtk_init(&argc, &argv);
gconf_init(argc, argv, NULL);
gnome_vfs_init();
return 1;
gtk_main();
mapper_destroy();
-
#ifdef WITH_HILDON
osso_deinitialize(_osso);
#endif
-
vprintf("%s(): return\n", __PRETTY_FUNCTION__);
return 0;
}
-- Shared categories for POIs and landmarks
create table category (
cat_id integer PRIMARY KEY,
+ pcat_id int,
priority int,
- label text,
- desc text,
+ label text,
+ desc text,
color char(6),
icon varchar(32),
enabled integer
);
+Categories:
+Fuel
+ - Esso, Teboil, BP, Nest, etc
+Parking
+Residence
+Dining
+ - Restaurant
+Fast food
+Shopping/Services
+Recreation
+Transportation
+ - Bus
+ - Train
+ - Boat/Ferry
+ - Plane
+Lodging
+ - Hotell
+ - Motell
+School
+Business
+Landmark
+Other
+
*/
#ifndef _MAPPER_POI_H
}
/**
- * Call gtk_window_present() on Maemo Mapper. This also checks the
+ * Call gtk_window_present() on Mapper. This also checks the
* configuration and brings up the Settings dialog if the GPS Receiver is
* not set up, the first time it is called.
*/
gtk_window_present(GTK_WINDOW(_window));
#ifdef WITH_HILDON
- confirm =
- hildon_note_new_confirmation(GTK_WINDOW(_window),
- _
+ confirm = hildon_note_new_confirmation(GTK_WINDOW(_window),
("It looks like this is your first time running"
- " Maemo Mapper. Press OK to view the the help pages."
+ " Mapper. Press OK to view the the help pages."
" Otherwise, press Cancel to continue."));
- if (GTK_RESPONSE_OK ==
- gtk_dialog_run(GTK_DIALOG(confirm)))
+ if (GTK_RESPONSE_OK == gtk_dialog_run(GTK_DIALOG(confirm)))
ossohelp_show(_osso, HELP_ID_INTRO, 0);
gtk_widget_destroy(confirm);
#endif
if (settings_dialog()) {
popup_error(_window,
- _
- ("OpenStreetMap.org provides public, free-to-use maps. "
+ _("OpenStreetMap.org provides public, free-to-use maps. "
"You can also download a sample set of repositories from "
" the internet by using the \"Download...\" button."));
repoman_dialog();
if (_curr_repo->type != REPOTYPE_NONE) {
- confirm =
- hildon_note_new_confirmation
+ confirm = hildon_note_new_confirmation
(GTK_WINDOW(_window),
- _
- ("You will now see a blank screen. You can download"
+ _("You will now see a blank screen. You can download"
" maps using the \"Manage Maps\" menu item in the"
" \"Maps\" menu. Or, press OK to enable"
" Auto-Download."));
- if (GTK_RESPONSE_OK ==
- gtk_dialog_run(GTK_DIALOG(confirm)))
- {
+ if (GTK_RESPONSE_OK == gtk_dialog_run(GTK_DIALOG(confirm))) {
gtk_check_menu_item_set_active
(GTK_CHECK_MENU_ITEM
(_menu_auto_download_item),
item = gtk_tool_button_new_from_stock (GTK_STOCK_FULLSCREEN);
gtk_toolbar_insert (GTK_TOOLBAR (_toolbar), item, -1);
-g_signal_connect (item, "clicked", G_CALLBACK (cb_fullscreen), NULL);
+g_signal_connect (item, "clicked", G_CALLBACK (cb_fullscreen_click), NULL);
item = gtk_separator_tool_item_new();
gtk_toolbar_insert (GTK_TOOLBAR (_toolbar), item, -1);
gtk_box_pack_start(GTK_BOX(vbox_main), _toolbar, FALSE, FALSE, 0);
hbox = gtk_hbox_new(FALSE, 0);
- gtk_notebook_append_page(notebook, hbox, label);
+ gtk_notebook_append_page(GTK_WIDGET(notebook), hbox, label);
gtk_box_pack_start(GTK_BOX(vbox_main), notebook, TRUE, TRUE, 0);
_status_bar = gtk_statusbar_new();
popup_error(_window, buffer);
} else {
if (parse_gpx(&_route, buffer, size, 0)) {
- MACRO_BANNER_SHOW_INFO(_window,
- _("Route Opened"));
+ MACRO_BANNER_SHOW_INFO(_window, _("Route Opened"));
} else
- popup_error(_window,
- _("Error parsing GPX file."));
+ popup_error(_window, _("Error parsing GPX file."));
g_free(buffer);
}
g_free(file_uri);