diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2010-10-03 02:07:04 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2010-10-03 03:22:07 +0800 |
commit | ec089b4a4129458f7140254607306eec0ef4aebf (patch) | |
tree | 7418aa00b5e9c66b8176ba5e5b69c1b2a7108841 /modules/mail | |
parent | 45b6f58f0a2d3e9e567694febf58882b9f74a257 (diff) | |
download | gsoc2013-evolution-ec089b4a4129458f7140254607306eec0ef4aebf.tar.gz gsoc2013-evolution-ec089b4a4129458f7140254607306eec0ef4aebf.tar.zst gsoc2013-evolution-ec089b4a4129458f7140254607306eec0ef4aebf.zip |
Rewrite the folder subscription editor.
Redesign the "Folder Subscriptions" dialog and use Camel's async API
instead of the MailMsg infrastructure to simplify the implementation.
Diffstat (limited to 'modules/mail')
-rw-r--r-- | modules/mail/e-mail-shell-view-actions.c | 20 | ||||
-rw-r--r-- | modules/mail/e-mail-shell-view-private.h | 2 |
2 files changed, 17 insertions, 5 deletions
diff --git a/modules/mail/e-mail-shell-view-actions.c b/modules/mail/e-mail-shell-view-actions.c index da8b0d729c..b521dc3712 100644 --- a/modules/mail/e-mail-shell-view-actions.c +++ b/modules/mail/e-mail-shell-view-actions.c @@ -833,18 +833,30 @@ static void action_mail_tools_subscriptions_cb (GtkAction *action, EMailShellView *mail_shell_view) { + EMailShellSidebar *mail_shell_sidebar; EShellWindow *shell_window; EShellView *shell_view; + EMFolderTree *folder_tree; + EAccount *account = NULL; GtkWidget *dialog; + gchar *uri; shell_view = E_SHELL_VIEW (mail_shell_view); shell_window = e_shell_view_get_shell_window (shell_view); - dialog = em_subscribe_editor_new (); - gtk_window_set_transient_for ( - GTK_WINDOW (dialog), GTK_WINDOW (shell_window)); + mail_shell_sidebar = mail_shell_view->priv->mail_shell_sidebar; + folder_tree = e_mail_shell_sidebar_get_folder_tree (mail_shell_sidebar); + + uri = em_folder_tree_get_selected_uri (folder_tree); + if (uri != NULL) { + account = mail_config_get_account_by_source_url (uri); + g_free (uri); + } + + dialog = em_subscription_editor_new ( + GTK_WINDOW (shell_window), session, account); gtk_dialog_run (GTK_DIALOG (dialog)); - /* XXX Dialog destroys itself. */ + gtk_widget_destroy (dialog); } static void diff --git a/modules/mail/e-mail-shell-view-private.h b/modules/mail/e-mail-shell-view-private.h index 9fbfadde31..816fcef02d 100644 --- a/modules/mail/e-mail-shell-view-private.h +++ b/modules/mail/e-mail-shell-view-private.h @@ -50,7 +50,7 @@ #include "em-folder-selector.h" #include "em-folder-utils.h" #include "em-search-context.h" -#include "em-subscribe-editor.h" +#include "em-subscription-editor.h" #include "em-utils.h" #include "mail-autofilter.h" #include "mail-config.h" |