]> spindle.queued.net Git - midori/commitdiff
Special case looking for the default search engines file
authorChristian Dywan <christian@twotoasts.de>
Mon, 20 Jul 2009 07:27:47 +0000 (09:27 +0200)
committerChristian Dywan <christian@twotoasts.de>
Mon, 20 Jul 2009 07:30:21 +0000 (09:30 +0200)
midori/main.c

index 78cf5d054f559130bee67b65598e0168e0cc28b1..19f9d250efd184e19d9e3eb91f622bf7bbb1bb21 100644 (file)
@@ -1661,6 +1661,15 @@ main (int    argc,
     }
     if (!error && katze_array_is_empty (search_engines))
     {
+        #ifdef G_OS_WIN32
+        gchar* dir;
+
+        dir = g_win32_get_package_installation_directory_of_module (NULL);
+        katze_assign (config_file,
+            g_build_filename (dir, "etc", "xdg", PACKAGE_NAME, "search", NULL));
+        g_free (dir);
+        search_engines = search_engines_new_from_file (config_file, NULL);
+        #else
         const gchar* const * config_dirs = g_get_system_config_dirs ();
         i = 0;
         while (config_dirs[i])
@@ -1680,6 +1689,7 @@ main (int    argc,
                 g_build_filename (SYSCONFDIR, "xdg", PACKAGE_NAME, "search", NULL));
             search_engines = search_engines_new_from_file (config_file, NULL);
         }
+        #endif
     }
     else if (error)
     {