]> git.street.me.uk Git - andy/viking.git/blobdiff - src/vikwindow.c
[DOC] Mention map tilesize configuration.
[andy/viking.git] / src / vikwindow.c
index d8beffbe47f7e9f3dbfe47c83624a9fa3f312aaf..3ebda9d822d6eae253e884df89f0e453dbb688d7 100644 (file)
@@ -42,8 +42,8 @@
 #include "vikexttool_datasources.h"
 #include "garminsymbols.h"
 #include "vikmapslayer.h"
+#include "vikrouting.h"
 #include "geonamessearch.h"
-#include "vikutils.h"
 #include "dir.h"
 #include "kmz.h"
 
@@ -352,6 +352,10 @@ VikWindow *vik_window_new_window ()
   {
     VikWindow *vw = window_new ();
 
+    if ( window_count == 0 ) {
+       vik_window_statusbar_update ( vw, _("This is Viking "VIKING_VERSION), VIK_STATUSBAR_INFO );
+    }
+
     g_signal_connect (G_OBJECT (vw), "destroy",
                      G_CALLBACK (destroy_window), NULL);
     g_signal_connect (G_OBJECT (vw), "newwindow",
@@ -1200,11 +1204,9 @@ gboolean draw_buf_done = TRUE;
 static gboolean draw_buf(gpointer data)
 {
   gpointer *pass_along = data;
-  gdk_threads_enter();
   gdk_draw_drawable (pass_along[0], pass_along[1],
                     pass_along[2], 0, 0, 0, 0, -1, -1);
   draw_buf_done = TRUE;
-  gdk_threads_leave();
   return FALSE;
 }
 
@@ -4697,7 +4699,7 @@ static void window_create_ui( VikWindow *window )
 
     action.name = vik_layer_get_interface(i)->name;
     action.stock_id = vik_layer_get_interface(i)->name;
-    action.label = g_strdup_printf( _("New _%s Layer"), vik_layer_get_interface(i)->name);
+    action.label = g_strdup_printf( _("New _%s Layer"), _(vik_layer_get_interface(i)->name));
     action.accelerator = vik_layer_get_interface(i)->accelerator;
     action.tooltip = NULL;
     action.callback = (GCallback)menu_addlayer_cb;
@@ -4740,7 +4742,7 @@ static void window_create_ui( VikWindow *window )
     // This is to avoid clashing with just the layer name used above for the tool actions
     action_dl.name = g_strconcat("Layer", vik_layer_get_interface(i)->fixed_layer_name, NULL);
     action_dl.stock_id = NULL;
-    action_dl.label = g_strconcat("_", vik_layer_get_interface(i)->name, "...", NULL); // Prepend marker for keyboard accelerator
+    action_dl.label = g_strconcat(_(vik_layer_get_interface(i)->name), _("..."), NULL);
     action_dl.accelerator = NULL;
     action_dl.tooltip = NULL;
     action_dl.callback = (GCallback)layer_defaults_cb;
@@ -4773,6 +4775,14 @@ static void window_create_ui( VikWindow *window )
   gtk_ui_manager_ensure_update (uim);
   
   setup_recent_files(window);
+
+  if ( vik_routing_number_of_engines(VIK_ROUTING_METHOD_DIRECTIONS) == 0 ) {
+    GtkWidget *widget = gtk_ui_manager_get_widget ( uim, "/ui/MainMenu/File/Acquire/AcquireRouting" );
+    if ( widget ) {
+      g_object_set ( widget, "sensitive", FALSE, NULL );
+    }
+    g_warning ( "No direction routing engines available" );
+  }
 }
 
 
@@ -4904,6 +4914,7 @@ void vik_window_set_selected_waypoint ( VikWindow *vw, gpointer *vwp, gpointer v
 gboolean vik_window_clear_highlight ( VikWindow *vw )
 {
   gboolean need_redraw = FALSE;
+  vw->containing_vtl = NULL;
   if ( vw->selected_vtl != NULL ) {
     vw->selected_vtl = NULL;
     need_redraw = TRUE;