gnome-commander r1546 - in trunk: . src



Author: epiotr
Date: Fri Jan 25 23:24:59 2008
New Revision: 1546
URL: http://svn.gnome.org/viewvc/gnome-commander?rev=1546&view=rev

Log:
Do not use escaped directory name when runnning editor application

Modified:
   trunk/ChangeLog
   trunk/src/gnome-cmd-file.cc
   trunk/src/gnome-cmd-file.h

Modified: trunk/src/gnome-cmd-file.cc
==============================================================================
--- trunk/src/gnome-cmd-file.cc	(original)
+++ trunk/src/gnome-cmd-file.cc	Fri Jan 25 23:24:59 2008
@@ -370,6 +370,18 @@
 }
 
 
+gchar *gnome_cmd_file_get_unescaped_dirname (GnomeCmdFile *finfo)
+{
+    GnomeVFSURI *uri = gnome_cmd_file_get_uri (finfo);
+    gchar *path = gnome_vfs_uri_extract_dirname (uri);
+    gnome_vfs_uri_unref (uri);
+    gchar *unescaped_path = gnome_vfs_unescape_string (path, NULL);
+    g_free (path);
+
+    return unescaped_path;
+}
+
+
 GnomeVFSURI *gnome_cmd_file_get_uri (GnomeCmdFile *finfo)
 {
     g_return_val_if_fail (GNOME_CMD_IS_FILE (finfo), NULL);
@@ -745,7 +757,7 @@
         return;
 
     gchar *fpath = gnome_cmd_file_get_quoted_real_path (finfo);
-    gchar *dpath = gnome_cmd_file_get_dirname (finfo);
+    gchar *dpath = gnome_cmd_file_get_unescaped_dirname (finfo);
     gchar *command = g_strdup_printf (gnome_cmd_data_get_editor (), fpath);
 
     run_command_indir (command, dpath, FALSE);

Modified: trunk/src/gnome-cmd-file.h
==============================================================================
--- trunk/src/gnome-cmd-file.h	(original)
+++ trunk/src/gnome-cmd-file.h	Fri Jan 25 23:24:59 2008
@@ -78,6 +78,7 @@
 gchar *gnome_cmd_file_get_real_path (GnomeCmdFile *finfo);
 gchar *gnome_cmd_file_get_quoted_real_path (GnomeCmdFile *finfo);
 gchar *gnome_cmd_file_get_dirname (GnomeCmdFile *finfo);
+gchar *gnome_cmd_file_get_unescaped_dirname (GnomeCmdFile *finfo);
 GnomeVFSURI *gnome_cmd_file_get_uri (GnomeCmdFile *finfo);
 gchar *gnome_cmd_file_get_uri_str (GnomeCmdFile *finfo);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]