]> spindle.queued.net Git - midori/commitdiff
Use the correct config folder to store speed dial
authorChristian Dywan <christian@twotoasts.de>
Sun, 10 May 2009 12:48:12 +0000 (14:48 +0200)
committerChristian Dywan <christian@twotoasts.de>
Sun, 10 May 2009 12:48:12 +0000 (14:48 +0200)
This is important when using the -c or --config switch

midori/midori-browser.c
midori/midori-view.c

index d058c616c4c3532c1d9ec4b03f37fa6e6ad1cb20..b6af5cdb46fb1668b0ccc792d4dcabde65d3f941 100644 (file)
@@ -879,8 +879,8 @@ midori_browser_speed_dial_get_next_free_slot (void)
     gchar* slot_id = NULL;
     gchar* p = NULL;
 
-    body_fname = g_strdup_printf ("%s%s", g_get_user_config_dir (),
-                                  "/midori/speeddial-body.html");
+    body_fname = g_build_filename (sokoke_set_config_dir (NULL),
+                                   "speeddial-body.html", NULL);
     if (!g_file_test (body_fname, G_FILE_TEST_EXISTS))
     {
         g_file_get_contents (DATADIR "/midori/res/speeddial-body.html",
@@ -953,8 +953,8 @@ midori_browser_add_speed_dial (MidoriBrowser* browser)
         gchar* body_fname;
         gsize sz;
 
-        body_fname = g_strdup_printf ("%s%s", g_get_user_config_dir (),
-                                      "/midori/speeddial-body.html");
+        body_fname = g_build_filename (sokoke_set_config_dir (NULL),
+                                       "speeddial-body.html", NULL);
 
         g_file_get_contents (body_fname, &speed_dial_body, NULL, NULL);
 
index d24673684660aa67507ae09d3a298e9adaf4b94f..142835250fbecc2ca19c2492242c243274fb68df 100644 (file)
@@ -1972,8 +1972,8 @@ midori_view_set_uri (MidoriView*  view,
             res_server = sokoke_get_res_server ();
             port = soup_server_get_port (res_server);
             res_root = g_strdup_printf ("http://localhost:%d/res", port);
-            body_fname = g_strconcat (g_get_user_config_dir (),
-                                      "/midori/speeddial-body.html", NULL);
+            body_fname = g_build_filename (sokoke_set_config_dir (NULL),
+                                           "speeddial-body.html", NULL);
 
             if (!g_file_test (body_fname, G_FILE_TEST_EXISTS))
             {
@@ -2998,7 +2998,8 @@ midori_view_speed_dial_save (GtkWidget*    web_view)
     JSContextRef js_context = webkit_web_frame_get_global_context (
         webkit_web_view_get_main_frame (WEBKIT_WEB_VIEW (web_view)));
     gchar* newdom = sokoke_js_script_eval (js_context,"getSpeeddialContent()", NULL);
-    gchar* fname = g_strconcat (g_get_user_config_dir (), "/midori/speeddial-body.html", NULL);
+    gchar* fname = g_build_filename (sokoke_set_config_dir (NULL),
+                                     "speeddial-body.html", NULL);
     g_file_set_contents (fname, newdom, -1, NULL);
     g_free (fname);
     g_free (newdom);