aboutsummaryrefslogtreecommitdiffstats
path: root/shell
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2002-03-23 00:44:23 +0800
committerDan Winship <danw@src.gnome.org>2002-03-23 00:44:23 +0800
commitdfbbbf2bafcc7ea5098e40630b7069ba3e4fc181 (patch)
tree3d95fabdd5f8e8f9331c7f67db69d287a3161549 /shell
parent3e6b83577e82d3d1795ba0fce874abebba44ea22 (diff)
downloadgsoc2013-evolution-dfbbbf2bafcc7ea5098e40630b7069ba3e4fc181.tar
gsoc2013-evolution-dfbbbf2bafcc7ea5098e40630b7069ba3e4fc181.tar.gz
gsoc2013-evolution-dfbbbf2bafcc7ea5098e40630b7069ba3e4fc181.tar.bz2
gsoc2013-evolution-dfbbbf2bafcc7ea5098e40630b7069ba3e4fc181.tar.lz
gsoc2013-evolution-dfbbbf2bafcc7ea5098e40630b7069ba3e4fc181.tar.xz
gsoc2013-evolution-dfbbbf2bafcc7ea5098e40630b7069ba3e4fc181.tar.zst
gsoc2013-evolution-dfbbbf2bafcc7ea5098e40630b7069ba3e4fc181.zip
Use e_folder_get_name. Don't assume it's the same as the last path
* e-shell-folder-commands.c (e_shell_command_rename_folder): Use e_folder_get_name. Don't assume it's the same as the last path element. svn path=/trunk/; revision=16227
Diffstat (limited to 'shell')
-rw-r--r--shell/ChangeLog6
-rw-r--r--shell/e-shell-folder-commands.c9
2 files changed, 9 insertions, 6 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog
index b9729866d2..d9fc450d54 100644
--- a/shell/ChangeLog
+++ b/shell/ChangeLog
@@ -1,3 +1,9 @@
+2002-03-22 Dan Winship <danw@ximian.com>
+
+ * e-shell-folder-commands.c (e_shell_command_rename_folder): Use
+ e_folder_get_name. Don't assume it's the same as the last path
+ element.
+
2002-03-21 Dan Winship <danw@ximian.com>
* e-splash.c (e_splash_construct): Set the wmclass to
diff --git a/shell/e-shell-folder-commands.c b/shell/e-shell-folder-commands.c
index ada09a2b1d..a2b1055b5a 100644
--- a/shell/e-shell-folder-commands.c
+++ b/shell/e-shell-folder-commands.c
@@ -544,10 +544,7 @@ e_shell_command_rename_folder (EShell *shell,
folder = e_storage_set_get_folder (storage_set, folder_path);
g_return_if_fail (folder != NULL);
- /* Note that we don't need to get the display name here, as the stock
- folders cannot be renamed anyway. */
- old_name = g_basename (folder_path);
-
+ old_name = e_folder_get_name (folder);
old_name_locale = e_utf8_to_locale_string (old_name);
prompt = g_strdup_printf (_("Rename the \"%s\" folder to:"), old_name_locale);
g_free (old_name_locale);
@@ -576,8 +573,8 @@ e_shell_command_rename_folder (EShell *shell,
return;
}
- old_base_path = g_strndup (folder_path, old_name - folder_path);
- new_path = g_strconcat (old_base_path, new_name, NULL);
+ old_base_path = g_dirname (folder_path);
+ new_path = g_concat_dir_and_file (old_base_path, new_name);
callback_data = rename_callback_data_new (shell_view, new_path);
e_storage_set_async_xfer_folder (storage_set, folder_path, new_path, TRUE, rename_cb, callback_data);