aboutsummaryrefslogtreecommitdiffstats
path: root/modules/mail/e-mail-shell-view.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-05-03 09:01:48 +0800
committerMatthew Barnes <mbarnes@redhat.com>2011-05-03 09:01:48 +0800
commitae28ea4621c9ced08524548ca67a5297c284ce01 (patch)
treecfdedc1510c91df7f11712007fb257e9c5c26791 /modules/mail/e-mail-shell-view.c
parent52844f40f158be11749f5d8dcdf52454e776c9bd (diff)
downloadgsoc2013-evolution-ae28ea4621c9ced08524548ca67a5297c284ce01.tar.gz
gsoc2013-evolution-ae28ea4621c9ced08524548ca67a5297c284ce01.tar.zst
gsoc2013-evolution-ae28ea4621c9ced08524548ca67a5297c284ce01.zip
EMailShellView: Open the selected folder ourselves.
This one's a little involved: - EMailShellView now obtains a CamelFolder itself in response to EMFolderTree::folder-selected signals. Uses EActivity to do so. - Revise EMFolderTree::folder-selected signal arguments to be more useful: emit a CamelStore object instead of a folder URI. - Also revise EMFolderTree::folder-activiated signal arguments the same way while we're at it. - Remove the "folder_uri" argument from e_mail_reader_set_folder(). If you have a CamelFolder object you can obtain the URI string by calling camel_folder_get_uri().
Diffstat (limited to 'modules/mail/e-mail-shell-view.c')
-rw-r--r--modules/mail/e-mail-shell-view.c22
1 files changed, 6 insertions, 16 deletions
diff --git a/modules/mail/e-mail-shell-view.c b/modules/mail/e-mail-shell-view.c
index 4af7de5a1b..0b0f13e5d3 100644
--- a/modules/mail/e-mail-shell-view.c
+++ b/modules/mail/e-mail-shell-view.c
@@ -116,8 +116,7 @@ mail_shell_view_setup_search_results_folder (CamelFolder *folder,
static void
mail_shell_view_show_search_results_folder (EMailShellView *mail_shell_view,
- CamelFolder *folder,
- const gchar *folder_uri)
+ CamelFolder *folder)
{
EMailShellContent *mail_shell_content;
GtkWidget *message_list;
@@ -132,7 +131,7 @@ mail_shell_view_show_search_results_folder (EMailShellView *mail_shell_view,
message_list_freeze (MESSAGE_LIST (message_list));
- e_mail_reader_set_folder (reader, folder, folder_uri);
+ e_mail_reader_set_folder (reader, folder);
e_tree_set_state (E_TREE (message_list), SEARCH_RESULTS_STATE);
message_list_thaw (MESSAGE_LIST (message_list));
@@ -240,7 +239,6 @@ mail_shell_view_execute_search (EShellView *shell_view)
gchar *query;
gchar *temp;
gchar *tag;
- gchar *uri;
const gchar *use_tag;
gint value;
@@ -519,9 +517,7 @@ all_accounts:
* folder URI and let the asynchronous callbacks run
* after we've already kicked off the search. */
folder = em_folder_tree_get_selected_folder (folder_tree);
- uri = em_folder_tree_get_selected_uri (folder_tree);
- e_mail_reader_set_folder (reader, folder, uri);
- g_free (uri);
+ e_mail_reader_set_folder (reader, folder);
gtk_widget_set_sensitive (GTK_WIDGET (combo_box), TRUE);
@@ -606,11 +602,9 @@ all_accounts:
CAMEL_FOLDER (search_folder), list,
priv->search_account_cancel);
- folder_uri = camel_folder_get_uri (CAMEL_FOLDER (search_folder));
-
mail_shell_view_show_search_results_folder (
E_MAIL_SHELL_VIEW (shell_view),
- CAMEL_FOLDER (search_folder), folder_uri);
+ CAMEL_FOLDER (search_folder));
goto execute;
@@ -639,9 +633,7 @@ current_account:
* folder URI and let the asynchronous callbacks run
* after we've already kicked off the search. */
folder = em_folder_tree_get_selected_folder (folder_tree);
- uri = em_folder_tree_get_selected_uri (folder_tree);
- e_mail_reader_set_folder (reader, folder, uri);
- g_free (uri);
+ e_mail_reader_set_folder (reader, folder);
gtk_widget_set_sensitive (GTK_WIDGET (combo_box), TRUE);
@@ -758,11 +750,9 @@ current_account:
CAMEL_FOLDER (search_folder), list,
priv->search_account_cancel);
- folder_uri = camel_folder_get_uri (CAMEL_FOLDER (search_folder));
-
mail_shell_view_show_search_results_folder (
E_MAIL_SHELL_VIEW (shell_view),
- CAMEL_FOLDER (search_folder), folder_uri);
+ CAMEL_FOLDER (search_folder));
execute: