]> spindle.queued.net Git - midori/commitdiff
Add get_command_line_str for debugging output
authorChristian Dywan <christian@twotoasts.de>
Wed, 29 Aug 2012 22:13:43 +0000 (00:13 +0200)
committerChristian Dywan <christian@twotoasts.de>
Wed, 29 Aug 2012 22:43:21 +0000 (00:43 +0200)
katze/midori-paths.vala
midori/midori-view.c

index c60b3fed9d1f5dc5bd328904c1e7aa9bcececf92..37811f5ebea25017e7317b63eab48983adc90a16 100644 (file)
@@ -138,7 +138,7 @@ namespace Midori {
             #endif
             if (strcmp (Environment.get_variable ("MIDORI_DEBUG"), "paths") == 0) {
                 stdout.printf ("command_line: %s\nexec_path: %s\nres: %s\nlib: %s\n",
-                               "".joinv (" ", command_line), exec_path,
+                               get_command_line_str (), exec_path,
                                get_res_filename (""), get_lib_path (PACKAGE_NAME));
             }
         }
@@ -148,6 +148,11 @@ namespace Midori {
             return command_line;
         }
 
+        public static string get_command_line_str () {
+            assert (command_line != null);
+            return "".joinv (" ", command_line).replace (Environment.get_home_dir (), "~");
+        }
+
         public static string get_lib_path (string package) {
             assert (command_line != null);
             string path = Path.build_filename (exec_path, "lib", package);
index 052123175587c4c444a95f3400887e0e8240dc76..f6c1c09f70f300db6f3a926a349d3318d5a0fc30 100644 (file)
@@ -4540,9 +4540,7 @@ midori_view_set_uri (MidoriView*  view,
             }
             else if (!strcmp (uri, "about:") || !strcmp (uri, "about:version"))
             {
-                gchar* arguments = g_strjoinv (" ", midori_paths_get_command_line (NULL));
-                gchar* command_line = sokoke_replace_variables (
-                    arguments, g_get_home_dir (), "~", NULL);
+                gchar* command_line = midori_paths_get_command_line_str ();
                 gchar* architecture, *platform;
                 const gchar* sys_name = midori_web_settings_get_system_name (
                     &architecture, &platform);
@@ -4621,7 +4619,6 @@ midori_view_set_uri (MidoriView*  view,
                 data = g_string_free (tmp, FALSE);
 
                 g_free (command_line);
-                g_free (arguments);
                 g_free (ident);
                 g_free (video_formats);
                 g_string_free (more, TRUE);