]> git.street.me.uk Git - andy/viking.git/blobdiff - src/main.c
Only the TrackWaypoint layer should handle it's internal callback type.
[andy/viking.git] / src / main.c
index 4ae2010838f21c97c89117ac38b3c0ea9ec8174b..f20fdcf8c67b693ebfa6e21248ccb362315ff9cb 100644 (file)
@@ -35,6 +35,7 @@
 #include "globals.h"
 #include "vikmapslayer.h"
 #include "vikrouting.h"
+#include "vikutils.h"
 
 #ifdef VIK_CONFIG_GEOCACHES
 void a_datasource_gc_init();
@@ -163,6 +164,10 @@ int main( int argc, char *argv[] )
   XSetErrorHandler(myXErrorHandler);
 #endif
 
+  // Discover if this is the very first run
+  a_vik_very_first_run ();
+
+  a_settings_init ();
   a_preferences_init ();
 
   a_vik_preferences_init ();
@@ -193,9 +198,14 @@ int main( int argc, char *argv[] )
 
   gdk_threads_enter ();
 
+  // Ask for confirmation of default settings on first run
+  vu_set_auto_features_on_first_run ();
+
   /* Create the first window */
   first_window = vik_window_new_window();
 
+  vu_check_latest_version ( GTK_WINDOW(first_window) );
+
   while ( ++i < argc ) {
     if ( strcmp(argv[i],"--") == 0 && !dashdash_already )
       dashdash_already = TRUE; /* hack to open '-' */
@@ -213,6 +223,8 @@ int main( int argc, char *argv[] )
     }
   }
 
+  vik_window_new_window_finish ( first_window );
+
   gtk_main ();
   gdk_threads_leave ();
 
@@ -223,6 +235,7 @@ int main( int argc, char *argv[] )
   a_dems_uninit ();
   a_layer_defaults_uninit ();
   a_preferences_uninit ();
+  a_settings_uninit ();
 
   curl_download_uninit();