#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"
{
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",
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;
}
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;
// 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;
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" );
+ }
}
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;