aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2009-09-13 06:08:03 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-09-13 06:08:03 +0800
commit43594a8b6eeeb072a672041cd72b2b211dd56958 (patch)
treed4b7da2bebc6f09faa34516f534cc6f94a953d28 /mail
parentcbf5c62ee8d0bf9d1529f65a1baa25c9a8ff46af (diff)
downloadgsoc2013-evolution-43594a8b6eeeb072a672041cd72b2b211dd56958.tar
gsoc2013-evolution-43594a8b6eeeb072a672041cd72b2b211dd56958.tar.gz
gsoc2013-evolution-43594a8b6eeeb072a672041cd72b2b211dd56958.tar.bz2
gsoc2013-evolution-43594a8b6eeeb072a672041cd72b2b211dd56958.tar.lz
gsoc2013-evolution-43594a8b6eeeb072a672041cd72b2b211dd56958.tar.xz
gsoc2013-evolution-43594a8b6eeeb072a672041cd72b2b211dd56958.tar.zst
gsoc2013-evolution-43594a8b6eeeb072a672041cd72b2b211dd56958.zip
Followup fixes for inline folder renames.
Diffstat (limited to 'mail')
-rw-r--r--mail/em-folder-tree.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/mail/em-folder-tree.c b/mail/em-folder-tree.c
index fd7e933cd9..eea990a9cd 100644
--- a/mail/em-folder-tree.c
+++ b/mail/em-folder-tree.c
@@ -392,7 +392,7 @@ folder_tree_cell_edited_cb (EMFolderTree *folder_tree,
GtkTreeModel *model;
GtkTreePath *path;
GtkTreeIter iter;
- gchar *display_name;
+ gchar *old_name = NULL;
gchar *old_full_name = NULL;
gchar *new_full_name = NULL;
gchar **strv;
@@ -417,17 +417,17 @@ folder_tree_cell_edited_cb (EMFolderTree *folder_tree,
gtk_tree_model_get (
model, &iter,
COL_POINTER_CAMEL_STORE, &store,
- COL_STRING_DISPLAY_NAME, &display_name,
+ COL_STRING_DISPLAY_NAME, &old_name,
COL_STRING_FULL_NAME, &old_full_name, -1);
- if (g_strcmp0 (new_name, display_name) == 0)
+ if (g_strcmp0 (new_name, old_name) == 0)
goto exit;
/* Check for invalid characters. */
if (strchr (new_name, '/') != NULL) {
e_error_run (
parent, "mail:no-rename-folder",
- display_name, new_name,
+ old_name, new_name,
_("Folder names cannot contain '/'"), NULL);
goto exit;
}
@@ -446,7 +446,7 @@ folder_tree_cell_edited_cb (EMFolderTree *folder_tree,
if (folder_info != NULL) {
e_error_run (
parent, "mail:no-rename-folder-exists",
- display_name, new_name, NULL);
+ old_name, new_name, NULL);
camel_store_free_folder_info (store, folder_info);
goto exit;
}
@@ -463,7 +463,7 @@ folder_tree_cell_edited_cb (EMFolderTree *folder_tree,
exit:
camel_exception_clear (&ex);
- g_free (display_name);
+ g_free (old_name);
g_free (old_full_name);
g_free (new_full_name);
}
@@ -894,6 +894,7 @@ render_display_name (GtkTreeViewColumn *column, GtkCellRenderer *renderer,
GtkTreeModel *model, GtkTreeIter *iter, gpointer user_data)
{
gboolean is_store, bold, subdirs_unread = FALSE;
+ gboolean editable;
guint unread;
gchar *display;
gchar *name;
@@ -902,6 +903,8 @@ render_display_name (GtkTreeViewColumn *column, GtkCellRenderer *renderer,
COL_BOOL_IS_STORE, &is_store,
COL_UINT_UNREAD, &unread, -1);
+ g_object_get (renderer, "editable", &editable, NULL);
+
bold = is_store || unread;
if (gtk_tree_model_iter_has_child (model, iter)) {
@@ -913,9 +916,9 @@ render_display_name (GtkTreeViewColumn *column, GtkCellRenderer *renderer,
subdirs_unread = subdirs_contain_unread (model, iter);
}
- bold = bold || subdirs_unread;
+ bold = !editable && (bold || subdirs_unread);
- if (!is_store && unread) {
+ if (!is_store && !editable && unread) {
/* Translators: This is the string used for displaying the
* folder names in folder trees. The first "%s" will be
* replaced by the folder's name and "%u" will be replaced