aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorSrinivasa Ragavan <sragavan@src.gnome.org>2007-08-07 18:53:12 +0800
committerSrinivasa Ragavan <sragavan@src.gnome.org>2007-08-07 18:53:12 +0800
commit9d8d0e8a3eda20170ed94bd8ec700b87b98b64da (patch)
treefb03ddd76e40c133328e6eeeaf69b5899af040c5 /mail
parent478f23e3d07098620e2dc41737cc6b219dd40431 (diff)
downloadgsoc2013-evolution-9d8d0e8a3eda20170ed94bd8ec700b87b98b64da.tar
gsoc2013-evolution-9d8d0e8a3eda20170ed94bd8ec700b87b98b64da.tar.gz
gsoc2013-evolution-9d8d0e8a3eda20170ed94bd8ec700b87b98b64da.tar.bz2
gsoc2013-evolution-9d8d0e8a3eda20170ed94bd8ec700b87b98b64da.tar.lz
gsoc2013-evolution-9d8d0e8a3eda20170ed94bd8ec700b87b98b64da.tar.xz
gsoc2013-evolution-9d8d0e8a3eda20170ed94bd8ec700b87b98b64da.tar.zst
gsoc2013-evolution-9d8d0e8a3eda20170ed94bd8ec700b87b98b64da.zip
** Fix for bug #464312
svn path=/trunk/; revision=33965
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog12
-rw-r--r--mail/em-folder-tree-model.c4
-rw-r--r--mail/em-folder-tree.c10
-rw-r--r--mail/em-folder-view.c2
-rw-r--r--mail/message-list.c2
5 files changed, 25 insertions, 5 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 08eda88d90..ae9e32289d 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,5 +1,17 @@
2007-08-07 Srinivasa Ragavan <sragavan@novell.com>
+ ** Fix for bug #464312
+
+ * em-folder-tree-model.c: (em_folder_tree_model_get_selected): If the
+ selected uri is empty string, let it be NULL.
+ * em-folder-tree.c: (emft_tree_selection_changed),
+ (em_folder_tree_select_prev_path): If nothing is selected, remove
+ message list and preview.
+ * em-folder-view.c: (emfv_set_folder): Don't dup NULL
+ * message-list.c: (message_list_set_folder): Don't dup NULL
+
+2007-08-07 Srinivasa Ragavan <sragavan@novell.com>
+
** Fix for bug #419690
* message-list.c: (message_list_construct): FALSE isn't really equal
diff --git a/mail/em-folder-tree-model.c b/mail/em-folder-tree-model.c
index 72d86beac2..32172aa961 100644
--- a/mail/em-folder-tree-model.c
+++ b/mail/em-folder-tree-model.c
@@ -1212,6 +1212,10 @@ em_folder_tree_model_get_selected (EMFolderTreeModel *model)
uri = g_strdup (buf);
xmlFree (buf);
+ if (uri && !*uri) {
+ g_free (uri);
+ return NULL;
+ }
return uri;
}
diff --git a/mail/em-folder-tree.c b/mail/em-folder-tree.c
index 1e1a9f3f22..1fe6f50558 100644
--- a/mail/em-folder-tree.c
+++ b/mail/em-folder-tree.c
@@ -2300,9 +2300,13 @@ emft_tree_selection_changed (GtkTreeSelection *selection, EMFolderTree *emft)
GtkTreeIter iter;
guint32 flags;
- if (!emft_selection_get_selected (selection, &model, &iter))
+ if (!emft_selection_get_selected (selection, &model, &iter)) {
+ em_folder_tree_model_set_selected (emft->priv->model, NULL);
+ g_signal_emit (emft, signals[FOLDER_SELECTED], 0, NULL, NULL, 0);
+ emft_queue_save_state (emft);
return;
-
+ }
+
gtk_tree_model_get (model, &iter, COL_STRING_FULL_NAME, &full_name,
COL_STRING_URI, &uri, COL_UINT_FLAGS, &flags, -1);
@@ -2414,7 +2418,7 @@ em_folder_tree_select_prev_path (EMFolderTree *emft, gboolean skip_read_folders)
{
GtkTreeSelection *selection;
GtkTreeModel *model;
- GtkTreeIter iter, parent, child;
+ GtkTreeIter iter, child;
GtkTreePath *path, *current_path = NULL;
unsigned int unread = 0;
struct _EMFolderTreePrivate *priv = emft->priv;
diff --git a/mail/em-folder-view.c b/mail/em-folder-view.c
index bd1868962d..1b52b5c657 100644
--- a/mail/em-folder-view.c
+++ b/mail/em-folder-view.c
@@ -668,7 +668,7 @@ emfv_set_folder(EMFolderView *emfv, CamelFolder *folder, const char *uri)
message_list_set_folder(emfv->list, folder, uri, isout);
g_free(emfv->folder_uri);
- emfv->folder_uri = g_strdup(uri);
+ emfv->folder_uri = uri ? g_strdup(uri):NULL;
if (emfv->folder) {
emfv->hide_deleted = emfv->list->hidedeleted; /* <- a bit nasty but makes it track the display better */
diff --git a/mail/message-list.c b/mail/message-list.c
index ab170cb797..79f6c9e525 100644
--- a/mail/message-list.c
+++ b/mail/message-list.c
@@ -3156,7 +3156,7 @@ message_list_set_folder (MessageList *message_list, CamelFolder *folder, const c
if (message_list->folder_uri != uri) {
g_free(message_list->folder_uri);
- message_list->folder_uri = g_strdup(uri);
+ message_list->folder_uri = uri ? g_strdup(uri):NULL;
}
if (message_list->cursor_uid) {