diff options
-rw-r--r-- | mail/ChangeLog | 7 | ||||
-rw-r--r-- | mail/mail-account-gui.c | 26 | ||||
-rw-r--r-- | mail/mail-config.glade | 26 |
3 files changed, 56 insertions, 3 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index 397f46a254..11f375fbc2 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,10 @@ +2002-07-29 Jeffrey Stedfast <fejj@ximian.com> + + * mail-account-gui.c (mail_account_gui_new): Get the "Reset + Defaults" folders button and connect to the clicked signal. + (default_folders_clicked): Set the default uris on for the Drafts + and Sent folders. + 2002-07-26 Peter Williams <peterw@ximian.com> * mail-offline-handler.c (storage_go_online): Call mail_note_store diff --git a/mail/mail-account-gui.c b/mail/mail-account-gui.c index a88a7f246a..7bb9f990fe 100644 --- a/mail/mail-account-gui.c +++ b/mail/mail-account-gui.c @@ -1039,6 +1039,24 @@ folder_selected (EvolutionFolderSelectorButton *button, *folder_name = g_strdup (corba_folder->physicalUri); } +static void +default_folders_clicked (GtkButton *button, gpointer user_data) +{ + MailAccountGui *gui = user_data; + + /* Drafts folder */ + g_free (gui->drafts_folder_uri); + gui->drafts_folder_uri = g_strdup (default_drafts_folder_uri); + evolution_folder_selector_button_set_uri (EVOLUTION_FOLDER_SELECTOR_BUTTON (gui->drafts_folder_button), + gui->drafts_folder_uri); + + /* Sent folder */ + g_free (gui->sent_folder_uri); + gui->sent_folder_uri = g_strdup (default_sent_folder_uri); + evolution_folder_selector_button_set_uri (EVOLUTION_FOLDER_SELECTOR_BUTTON (gui->sent_folder_button), + gui->sent_folder_uri); +} + GtkWidget *mail_account_gui_folder_selector_button_new (char *widget_name, char *string1, char *string2, int int1, int int2); GtkWidget * @@ -1345,8 +1363,9 @@ prepare_signatures (MailAccountGui *gui) MailAccountGui * mail_account_gui_new (MailConfigAccount *account, MailAccountsTab *dialog) { - MailAccountGui *gui; const char *allowed_types[] = { "mail", NULL }; + MailAccountGui *gui; + GtkWidget *button; gui = g_new0 (MailAccountGui, 1); gui->account = account; @@ -1458,6 +1477,11 @@ mail_account_gui_new (MailConfigAccount *account, MailAccountsTab *dialog) gui->sent_folder_uri, allowed_types); + /* Special Folders "Reset Defaults" button */ + button = glade_xml_get_widget (gui->xml, "default_folders_button"); + gtk_signal_connect (GTK_OBJECT (button), "clicked", + GTK_SIGNAL_FUNC (default_folders_clicked), gui); + /* Always Cc */ gui->always_cc = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui->xml, "always_cc")); gtk_toggle_button_set_active (gui->always_cc, account->always_cc); diff --git a/mail/mail-config.glade b/mail/mail-config.glade index 12d2e80be6..add7450e95 100644 --- a/mail/mail-config.glade +++ b/mail/mail-config.glade @@ -1803,9 +1803,9 @@ Kerberos <widget> <class>GtkTable</class> - <name>table7</name> + <name>folders_table</name> <border_width>3</border_width> - <rows>2</rows> + <rows>3</rows> <columns>2</columns> <homogeneous>False</homogeneous> <row_spacing>4</row_spacing> @@ -1910,6 +1910,28 @@ Kerberos <yfill>True</yfill> </child> </widget> + + <widget> + <class>GtkButton</class> + <name>default_folders_button</name> + <can_focus>True</can_focus> + <label>Restore Defaults</label> + <relief>GTK_RELIEF_NORMAL</relief> + <child> + <left_attach>1</left_attach> + <right_attach>2</right_attach> + <top_attach>2</top_attach> + <bottom_attach>3</bottom_attach> + <xpad>0</xpad> + <ypad>0</ypad> + <xexpand>False</xexpand> + <yexpand>False</yexpand> + <xshrink>False</xshrink> + <yshrink>False</yshrink> + <xfill>True</xfill> + <yfill>False</yfill> + </child> + </widget> </widget> </widget> |