diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2002-07-30 04:14:53 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2002-07-30 04:14:53 +0800 |
commit | 5d46261b279b9d9dad7c6735376d4906396bc0d6 (patch) | |
tree | 3fa63a40c538b66cdc92fd0415ea4700dc911966 /mail/mail-account-gui.c | |
parent | a338bddf3da461473f102288d533882e3d0a40b4 (diff) | |
download | gsoc2013-evolution-5d46261b279b9d9dad7c6735376d4906396bc0d6.tar.gz gsoc2013-evolution-5d46261b279b9d9dad7c6735376d4906396bc0d6.tar.zst gsoc2013-evolution-5d46261b279b9d9dad7c6735376d4906396bc0d6.zip |
Get the "Reset Defaults" folders button and connect to the clicked signal.
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.
svn path=/trunk/; revision=17634
Diffstat (limited to 'mail/mail-account-gui.c')
-rw-r--r-- | mail/mail-account-gui.c | 26 |
1 files changed, 25 insertions, 1 deletions
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); |