gboolean
menu_cb_goto_nextway(GtkAction *action)
{
-GtkMapCenterMode *cm;
+GtkMapCenterMode cm;
g_return_val_if_fail(_route, TRUE);
gboolean
menu_cb_goto_nearpoi(GtkAction *action)
{
-GtkMapCenterMode *cm;
+GtkMapCenterMode cm;
gdouble lat, lon;
poi_info *p;
g_free(banner);
poi_free(p);
- if (gtk_map_get_center_mode(_map)!=CENTER_MANUAL)
+ g_object_get(_map, "center-mode", &cm);
+ if (cm!=CENTER_MANUAL)
set_action_activate("autocenter_none", TRUE);
gtk_map_set_center_latlon(_map, p->lat, p->lon);
- map_update_location_from_center();
} else {
MACRO_BANNER_SHOW_INFO(_window, _("No POIs found."));
}
window_cb_key_press(GtkWidget * widget, GdkEventKey * event)
{
CustomKey custom_key;
+GtkMapCenterMode cm;
custom_key=custom_key_get_type(event->keyval);
if (custom_key==CUSTOM_KEY_ENUM_COUNT)
gtk_map_pan(_map, 1, 0);
break;
case CUSTOM_ACTION_TOGGLE_AUTOCENTER:
- switch (gtk_map_get_center_mode(_map)) {
+ g_object_get(_map, "center-mode", &cm);
+ switch (cm) {
case CENTER_LATLON:
case CENTER_WAS_LEAD:
set_action_activate("autocenter_lead", TRUE);
{
poi_info poi;
gdouble lat, lon;
+GtkMapCenterMode cm;
-if (gtk_map_get_center_mode(_map)!=CENTER_MANUAL) {
+g_object_get(_map, "center-mode", &cm);
+if (cm!=CENTER_MANUAL) {
lat=_gps->data.lat;
lon=_gps->data.lon;
} else {