diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2011-05-03 09:01:48 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2011-05-03 09:01:48 +0800 |
commit | ae28ea4621c9ced08524548ca67a5297c284ce01 (patch) | |
tree | cfdedc1510c91df7f11712007fb257e9c5c26791 /mail/e-mail-notebook-view.c | |
parent | 52844f40f158be11749f5d8dcdf52454e776c9bd (diff) | |
download | gsoc2013-evolution-ae28ea4621c9ced08524548ca67a5297c284ce01.tar gsoc2013-evolution-ae28ea4621c9ced08524548ca67a5297c284ce01.tar.gz gsoc2013-evolution-ae28ea4621c9ced08524548ca67a5297c284ce01.tar.bz2 gsoc2013-evolution-ae28ea4621c9ced08524548ca67a5297c284ce01.tar.lz gsoc2013-evolution-ae28ea4621c9ced08524548ca67a5297c284ce01.tar.xz 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 'mail/e-mail-notebook-view.c')
-rw-r--r-- | mail/e-mail-notebook-view.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/mail/e-mail-notebook-view.c b/mail/e-mail-notebook-view.c index bd92b52d14..d5a7965bab 100644 --- a/mail/e-mail-notebook-view.c +++ b/mail/e-mail-notebook-view.c @@ -981,7 +981,7 @@ mail_netbook_view_open_mail (EMailView *view, E_MAIL_READER (pane), "folder-loaded", G_CALLBACK (reconnect_folder_loaded_event), nview); e_mail_reader_set_folder ( - E_MAIL_READER (pane), folder, folder_uri); + E_MAIL_READER (pane), folder); e_mail_reader_set_group_by_threads ( E_MAIL_READER (pane), e_mail_reader_get_group_by_threads (E_MAIL_READER (view))); @@ -1078,22 +1078,23 @@ build_histogram (GtkWidget *widget, CamelFolder *folder) static void mail_notebook_view_set_folder (EMailReader *reader, - CamelFolder *folder, - const gchar *folder_uri) + CamelFolder *folder) { EMailNotebookViewPrivate *priv; GtkWidget *new_view; + const gchar *folder_uri; #if HAVE_CLUTTER EMailTab *tab; ClutterActor *clone; ClutterTimeline *timeline; #endif - if (!folder_uri) + if (folder == NULL) return; priv = E_MAIL_NOTEBOOK_VIEW (reader)->priv; + folder_uri = camel_folder_get_uri (folder); new_view = g_hash_table_lookup (priv->views, folder_uri); if (new_view) { gint curr = emnv_get_page_num (E_MAIL_NOTEBOOK_VIEW (reader), new_view); @@ -1123,7 +1124,8 @@ mail_notebook_view_set_folder (EMailReader *reader, return; } - if (folder || folder_uri) { + /* FIXME Redundant NULL check. */ + if (folder != NULL) { gint page; #if HAVE_CLUTTER GtkWidget *list; @@ -1221,7 +1223,7 @@ mail_notebook_view_set_folder (EMailReader *reader, g_object_set_data ((GObject *)list, "actor", priv->actor); #endif - e_mail_reader_set_folder (E_MAIL_READER (priv->current_view), folder, folder_uri); + e_mail_reader_set_folder (E_MAIL_READER (priv->current_view), folder); g_hash_table_insert (priv->views, g_strdup (folder_uri), priv->current_view); g_signal_connect ( priv->current_view, "changed", |