From 0ef04d982b73248fa222035933164be55e8f48c0 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Thu, 5 May 2011 15:09:53 -0400 Subject: EMAccountEditor: Fix a runtime warning. Before selecting a URI in the EMFolderSelectionButton for Drafts and Sent folders, install an EMailSession in each button which is needed for parsing URIs. --- mail/em-account-editor.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'mail/em-account-editor.c') diff --git a/mail/em-account-editor.c b/mail/em-account-editor.c index 1cbc635cea..a535227b9c 100644 --- a/mail/em-account-editor.c +++ b/mail/em-account-editor.c @@ -1109,10 +1109,15 @@ emae_account_folder (EMAccountEditor *emae, const gchar *name, gint item, gint d { EAccount *account; EMFolderSelectionButton *folder; + EMailSession *session; const gchar *uri; account = em_account_editor_get_modified_account (emae); + session = em_account_editor_get_session (emae); + folder = (EMFolderSelectionButton *)e_builder_get_widget (builder, name); + em_folder_selection_button_set_session (folder, session); + uri = e_account_get_string (account, item); if (uri != NULL) { em_folder_selection_button_set_selection (folder, uri); @@ -3044,14 +3049,12 @@ emae_defaults_page (EConfig *ec, EConfigItem *item, GtkWidget *parent, GtkWidget emae, "drafts_button", E_ACCOUNT_DRAFTS_FOLDER_URI, E_MAIL_LOCAL_FOLDER_DRAFTS, builder); - em_folder_selection_button_set_session (button, session); priv->drafts_folder_button = GTK_BUTTON (button); button = emae_account_folder ( emae, "sent_button", E_ACCOUNT_SENT_FOLDER_URI, E_MAIL_LOCAL_FOLDER_SENT, builder); - em_folder_selection_button_set_session (button, session); priv->sent_folder_button = GTK_BUTTON (button); widget = e_builder_get_widget (builder, "trash_folder_check"); -- cgit