aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2001-09-26 07:26:33 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2001-09-26 07:26:33 +0800
commit71d817f832592435402d899e09b6c719ca951f4d (patch)
tree8b3b72eb305b64fdef69634ca7f323d170c276b4
parent36da2069e0746be7da3377010500c124a3f26a45 (diff)
downloadgsoc2013-evolution-71d817f832592435402d899e09b6c719ca951f4d.tar
gsoc2013-evolution-71d817f832592435402d899e09b6c719ca951f4d.tar.gz
gsoc2013-evolution-71d817f832592435402d899e09b6c719ca951f4d.tar.bz2
gsoc2013-evolution-71d817f832592435402d899e09b6c719ca951f4d.tar.lz
gsoc2013-evolution-71d817f832592435402d899e09b6c719ca951f4d.tar.xz
gsoc2013-evolution-71d817f832592435402d899e09b6c719ca951f4d.tar.zst
gsoc2013-evolution-71d817f832592435402d899e09b6c719ca951f4d.zip
Change the name on the EFolder object too.
* e-shell-folder-commands.c (e_shell_command_rename_folder): Change the name on the EFolder object too. svn path=/trunk/; revision=13134
-rw-r--r--shell/ChangeLog6
-rw-r--r--shell/e-shell-folder-commands.c6
2 files changed, 10 insertions, 2 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog
index 5b2057fc30..f3f4e4ec38 100644
--- a/shell/ChangeLog
+++ b/shell/ChangeLog
@@ -1,7 +1,9 @@
2001-09-25 Ettore Perazzoli <ettore@ximian.com>
- [Implemented the "Rename" command. Warning, it doesn't quite work
- yet, as there seems to be something wrong still.]
+ * e-shell-folder-commands.c (e_shell_command_rename_folder):
+ Change the name on the EFolder object too.
+
+2001-09-25 Ettore Perazzoli <ettore@ximian.com>
* e-storage.c (e_storage_async_xfer_folder): Ooops. Make the
check for CANTMOVETODESCENDANT really work.
diff --git a/shell/e-shell-folder-commands.c b/shell/e-shell-folder-commands.c
index e90b29a12f..1f7b815ab6 100644
--- a/shell/e-shell-folder-commands.c
+++ b/shell/e-shell-folder-commands.c
@@ -475,6 +475,7 @@ e_shell_command_rename_folder (EShell *shell,
const char *folder_path)
{
EStorageSet *storage_set;
+ EFolder *folder;
const char *old_name;
char *prompt;
char *new_name;
@@ -491,6 +492,9 @@ e_shell_command_rename_folder (EShell *shell,
if (folder_path == NULL)
folder_path = e_shell_view_get_current_path (shell_view);
+ 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);
@@ -510,6 +514,8 @@ e_shell_command_rename_folder (EShell *shell,
return;
}
+ e_folder_set_name (folder, new_name);
+
old_base_path = g_strndup (folder_path, old_name - folder_path);
new_path = g_strconcat (old_base_path, new_name, NULL);