From 5d46261b279b9d9dad7c6735376d4906396bc0d6 Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Mon, 29 Jul 2002 20:14:53 +0000 Subject: Get the "Reset Defaults" folders button and connect to the clicked signal. 2002-07-29 Jeffrey Stedfast * 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. svn path=/trunk/; revision=17634 --- mail/ChangeLog | 7 +++++++ mail/mail-account-gui.c | 26 +++++++++++++++++++++++++- mail/mail-config.glade | 26 ++++++++++++++++++++++++-- 3 files changed, 56 insertions(+), 3 deletions(-) (limited to 'mail') 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 + + * 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 * 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 GtkTable - table7 + folders_table 3 - 2 + 3 2 False 4 @@ -1910,6 +1910,28 @@ Kerberos True + + + GtkButton + default_folders_button + True + + GTK_RELIEF_NORMAL + + 1 + 2 + 2 + 3 + 0 + 0 + False + False + False + False + True + False + + -- cgit v1.2.3