aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-06-17 12:12:04 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-06-17 12:12:04 +0800
commit8dc6fd1344965e5bd0940e99be3af9be26e3f9bb (patch)
treea2215142e0a57bf579c099471c01f77b6b9eb358 /modules
parent53e86fe162ba90c9457ea63ce1c595e947bd93d3 (diff)
downloadgsoc2013-evolution-8dc6fd1344965e5bd0940e99be3af9be26e3f9bb.tar.gz
gsoc2013-evolution-8dc6fd1344965e5bd0940e99be3af9be26e3f9bb.tar.zst
gsoc2013-evolution-8dc6fd1344965e5bd0940e99be3af9be26e3f9bb.zip
Bug 621839 - Improve auto-selection of messages
Diffstat (limited to 'modules')
-rw-r--r--modules/mail/e-mail-shell-content.c27
1 files changed, 7 insertions, 20 deletions
diff --git a/modules/mail/e-mail-shell-content.c b/modules/mail/e-mail-shell-content.c
index 135888d782..340e323da1 100644
--- a/modules/mail/e-mail-shell-content.c
+++ b/modules/mail/e-mail-shell-content.c
@@ -123,7 +123,6 @@ mail_shell_content_message_list_built_cb (EMailShellContent *mail_shell_content,
EShellWindow *shell_window;
EShellContent *shell_content;
GKeyFile *key_file;
- gchar *uid;
g_signal_handler_disconnect (
message_list, priv->message_list_built_id);
@@ -136,40 +135,28 @@ mail_shell_content_message_list_built_cb (EMailShellContent *mail_shell_content,
key_file = e_shell_view_get_state_key_file (shell_view);
if (message_list->cursor_uid != NULL)
- uid = NULL;
+ ; /* do nothing */
else if (message_list->folder_uri == NULL)
- uid = NULL;
+ ; /* do nothing */
- else if (e_shell_window_get_safe_mode (shell_window)) {
+ else if (e_shell_window_get_safe_mode (shell_window))
e_shell_window_set_safe_mode (shell_window, FALSE);
- uid = NULL;
- } else {
+ else {
const gchar *folder_uri;
const gchar *key;
gchar *group_name;
+ gchar *uid;
key = STATE_KEY_SELECTED_MESSAGE;
folder_uri = message_list->folder_uri;
group_name = g_strdup_printf ("Folder %s", folder_uri);
uid = g_key_file_get_string (key_file, group_name, key, NULL);
g_free (group_name);
- }
-
- if (uid != NULL) {
- CamelFolder *folder;
- CamelMessageInfo *info;
- folder = message_list->folder;
- info = camel_folder_get_message_info (folder, uid);
- if (info != NULL) {
- EMailReader *reader;
-
- reader = E_MAIL_READER (mail_shell_content);
- e_mail_reader_set_message (reader, uid);
- camel_folder_free_message_info (folder, info);
- }
+ /* Use selection fallbacks if UID is not found. */
+ message_list_select_uid (message_list, uid, TRUE);
g_free (uid);
}