[Xfce4-commits] <midori:master> Add get_command_line_str for debugging output
Christian Dywan
noreply at xfce.org
Thu Aug 30 00:44:07 CEST 2012
Updating branch refs/heads/master
to a0d95170539955aeffbbcf3918f04d5047fcac50 (commit)
from 1ce2b96680125ec034d68ac620ded2380ed95d86 (commit)
commit a0d95170539955aeffbbcf3918f04d5047fcac50
Author: Christian Dywan <christian at twotoasts.de>
Date: Thu Aug 30 00:13:43 2012 +0200
Add get_command_line_str for debugging output
katze/midori-paths.vala | 7 ++++++-
midori/midori-view.c | 5 +----
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/katze/midori-paths.vala b/katze/midori-paths.vala
index c60b3fe..37811f5 100644
--- a/katze/midori-paths.vala
+++ b/katze/midori-paths.vala
@@ -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);
diff --git a/midori/midori-view.c b/midori/midori-view.c
index 0521231..f6c1c09 100644
--- a/midori/midori-view.c
+++ b/midori/midori-view.c
@@ -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);
More information about the Xfce4-commits
mailing list