]> git.street.me.uk Git - andy/viking.git/blobdiff - src/main.c
QA: factorize GObject cast operations (datasource_file.c)
[andy/viking.git] / src / main.c
index ab353b57adf720bbfdbd824573f95f06f8889f90..4ae2010838f21c97c89117ac38b3c0ea9ec8174b 100644 (file)
@@ -34,6 +34,7 @@
 #include "viklayer_defaults.h"
 #include "globals.h"
 #include "vikmapslayer.h"
+#include "vikrouting.h"
 
 #ifdef VIK_CONFIG_GEOCACHES
 void a_datasource_gc_init();
@@ -119,7 +120,9 @@ int main( int argc, char *argv[] )
   bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
   textdomain (GETTEXT_PACKAGE);
 
+#if ! GLIB_CHECK_VERSION (2, 32, 0)
   g_thread_init ( NULL );
+#endif
   gdk_threads_init ();
 
   gui_initialized = gtk_init_with_args (&argc, &argv, "files+", entries, NULL, &error);
@@ -182,14 +185,17 @@ int main( int argc, char *argv[] )
   a_datasource_gc_init();
 #endif
 
+  vik_routing_prefs_init();
+
   /* Set the icon */
   main_icon = gdk_pixbuf_from_pixdata(&viking_pixbuf, FALSE, NULL);
   gtk_window_set_default_icon(main_icon);
 
+  gdk_threads_enter ();
+
   /* Create the first window */
   first_window = vik_window_new_window();
 
-  gdk_threads_enter ();
   while ( ++i < argc ) {
     if ( strcmp(argv[i],"--") == 0 && !dashdash_already )
       dashdash_already = TRUE; /* hack to open '-' */