]> spindle.queued.net Git - midori/commitdiff
Introduce about:paths listing common locations
authorChristian Dywan <christian@twotoasts.de>
Thu, 19 Jul 2012 18:08:06 +0000 (20:08 +0200)
committerChristian Dywan <christian@twotoasts.de>
Thu, 19 Jul 2012 19:14:09 +0000 (21:14 +0200)
midori/midori-view.c

index f434566279e58b8dcb2f779fed52442a8657b107..3e8eed2fe69227f9db4327b1c5c19cdad608b6cb 100644 (file)
@@ -4066,6 +4066,7 @@ static const gchar* valid_about_uris[] = {
     "error:nodocs",
     "http://.invalid",
     "about:geolocation",
+    "about:paths",
 };
 
 static void
@@ -4357,6 +4358,24 @@ midori_view_set_uri (MidoriView*  view,
                 list_geolocation (markup);
                 data = g_string_free (markup, FALSE);
             }
+            else if (!strcmp (uri, "about:paths"))
+            {
+                gchar* res_dir = midori_app_find_res_filename ("");
+                gchar* lib_dir = midori_app_get_lib_path (PACKAGE_NAME);
+                gchar* tmp_dir = midori_view_get_tmp_dir ();
+                data = g_strdup_printf ("<body><h1>%s</h1>"
+                    "<p>config: %s</p>"
+                    "<p>res: %s</p>"
+                    "<p>lib: %s</p>"
+                    "<p>cache: %s</p>"
+                    "<p>tmp: %s</p>"
+                    "</body>",
+                    uri, sokoke_set_config_dir (NULL), res_dir, lib_dir, g_get_user_cache_dir (), tmp_dir);
+                g_free (res_dir);
+                g_free (lib_dir);
+                g_free (tmp_dir);
+                katze_assign (view->uri, g_strdup (uri));
+            }
             else if (!strcmp (uri, "about:") || !strcmp (uri, "about:version"))
             {
                 gchar* arguments = g_strjoinv (" ", midori_app_get_command_line ());