aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mail/ChangeLog41
-rw-r--r--mail/em-account-prefs.c26
-rw-r--r--mail/em-mailer-prefs.c53
-rw-r--r--mail/em-mailer-prefs.h1
-rw-r--r--mail/evolution-mail.schemas.in.in28
-rw-r--r--mail/mail-account-gui.c63
-rw-r--r--mail/mail-account-gui.h3
-rw-r--r--mail/mail-component.c11
-rw-r--r--mail/mail-config.c45
-rw-r--r--mail/mail-config.glade47
-rw-r--r--mail/mail-config.h22
11 files changed, 309 insertions, 31 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index c87cb09a45..058dd6e83e 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,44 @@
+2004-03-18 Not Zed <NotZed@Ximian.com>
+
+ * mail-config.c (mail_config_writable): started writing this, but
+ i couldn't be fucked right now - apparently gnome is supposed to
+ use the gconf thing which just doens't work. i'll waste a few
+ hours trying to get it to work again first before i keep going
+ with this.
+
+2004-03-17 Not Zed <NotZed@Ximian.com>
+
+ * em-format-html.c (efh_message_deliverystatus): format as plain
+ text too.
+
+ * em-format.c (emf_message_deliverystatus): format delivery
+ status messages as plain text, rather than as messages. since
+ they wont be CamelMimeMessages. Maybe they should be silently
+ hidden.
+
+ * mail-offline-handler.c (store_go_online): split this, only call
+ add_store/note_store once we've actually set the store online.
+ (store_went_online): set the store up once we're fully online.
+ Works around a deadlock in #55618.
+
+ * em-account-prefs.c (account_cursor_change): disable
+ editing/adding/removing accounts etc if accounts aren't editable.
+ (em_account_prefs_construct): call above after setup.
+
+ * mail-component.c (mc_quit_sync): if we have empty on exit days,
+ check that. keep track of the last empty on exit time.
+
+ * em-mailer-prefs.c (emmp_empty_trash_init): init the trash stuff
+ here.
+ (em_mailer_prefs_apply): save empty trash on exit frequency.
+
+2004-03-16 Not Zed <NotZed@Ximian.com>
+
+ * mail-account-gui.c (mail_account_gui_auto_detect_extra_conf):
+ check extra conf items are writable.
+ (mail_account_gui_build_extra_conf): same.
+ (setup_service): add gui arg, and do above for auth and ssl args.
+
2004-03-16 Jeffrey Stedfast <fejj@ximian.com>
Fix for bug #55358.
diff --git a/mail/em-account-prefs.c b/mail/em-account-prefs.c
index e4b3844b2b..ee0337562e 100644
--- a/mail/em-account-prefs.c
+++ b/mail/em-account-prefs.c
@@ -389,18 +389,23 @@ account_cursor_change (GtkTreeSelection *selection, EMAccountPrefs *prefs)
GtkTreeModel *model;
GtkTreeIter iter;
int state;
-
- state = gtk_tree_selection_get_selected (selection, &model, &iter);
+
+ state = gconf_client_key_is_writable(mail_config_get_gconf_client(), "/apps/evolution/mail/accounts", NULL);
if (state) {
- gtk_tree_model_get (model, &iter, 3, &account, -1);
- if (account->source && account->enabled)
- gtk_button_set_label (prefs->mail_able, _("Disable"));
- else
- gtk_button_set_label (prefs->mail_able, _("Enable"));
+ state = gtk_tree_selection_get_selected (selection, &model, &iter);
+ if (state) {
+ gtk_tree_model_get (model, &iter, 3, &account, -1);
+ if (account->source && account->enabled)
+ gtk_button_set_label (prefs->mail_able, _("Disable"));
+ else
+ gtk_button_set_label (prefs->mail_able, _("Enable"));
+ } else {
+ gtk_widget_grab_focus (GTK_WIDGET (prefs->mail_add));
+ }
} else {
- gtk_widget_grab_focus (GTK_WIDGET (prefs->mail_add));
+ gtk_widget_set_sensitive (GTK_WIDGET (prefs->mail_add), FALSE);
}
-
+
gtk_widget_set_sensitive (GTK_WIDGET (prefs->mail_edit), state);
gtk_widget_set_sensitive (GTK_WIDGET (prefs->mail_delete), state);
gtk_widget_set_sensitive (GTK_WIDGET (prefs->mail_default), state);
@@ -557,8 +562,9 @@ em_account_prefs_construct (EMAccountPrefs *prefs)
prefs->mail_able = GTK_BUTTON (glade_xml_get_widget (gui, "cmdAccountAble"));
g_signal_connect (prefs->mail_able, "clicked", G_CALLBACK (account_able_clicked), prefs);
-}
+ account_cursor_change(gtk_tree_view_get_selection(prefs->table), prefs);
+}
GtkWidget *
em_account_prefs_new (GNOME_Evolution_Shell shell)
diff --git a/mail/em-mailer-prefs.c b/mail/em-mailer-prefs.c
index ff8c789be0..8fbb5c9685 100644
--- a/mail/em-mailer-prefs.c
+++ b/mail/em-mailer-prefs.c
@@ -76,6 +76,17 @@ static const struct {
#define EM_FORMAT_HEADER_XMAILER "x-evolution-mailer"
+/* for empty trash on exit frequency */
+static const struct {
+ const char *label;
+ int days;
+} empty_trash_frequency[] = {
+ { N_("Every time"), 0 },
+ { N_("Once per day"), 1 },
+ { N_("Once per week"), 7 },
+ { N_("Once per month"), 30 },
+};
+
GtkType
em_mailer_prefs_get_type (void)
{
@@ -234,7 +245,6 @@ option_menu_connect (GtkOptionMenu *omenu, gpointer user_data)
}
}
-
static void
emmp_header_remove_sensitivity (EMMailerPrefs *prefs)
{
@@ -445,6 +455,36 @@ toggle_button_init (GtkToggleButton *toggle, GConfClient *gconf, const char *key
}
static void
+emmp_empty_trash_init(EMMailerPrefs *prefs)
+{
+ int days, hist = 0, i;
+ GtkWidget *menu, *item;
+
+ toggle_button_init (prefs->empty_trash, prefs->gconf,
+ "/apps/evolution/mail/trash/empty_on_exit",
+ FALSE, G_CALLBACK (settings_changed), prefs);
+
+ days = gconf_client_get_int(prefs->gconf, "/apps/evolution/mail/trash/empty_on_exit_days", NULL);
+ menu = gtk_menu_new();
+ for (i=0;i<sizeof(empty_trash_frequency)/sizeof(empty_trash_frequency[0]);i++) {
+ if (days >= empty_trash_frequency[i].days)
+ hist = i;
+
+ item = gtk_menu_item_new_with_label(_(empty_trash_frequency[i].label));
+ gtk_widget_show(item);
+ gtk_menu_shell_append((GtkMenuShell *)menu, item);
+ }
+
+ gtk_widget_show(menu);
+ gtk_option_menu_set_menu((GtkOptionMenu *)prefs->empty_trash_days, menu);
+ gtk_option_menu_set_history((GtkOptionMenu *)prefs->empty_trash_days, hist);
+ g_signal_connect(prefs->empty_trash_days, "changed", G_CALLBACK(settings_changed), prefs);
+
+ gtk_widget_set_sensitive((GtkWidget *)prefs->empty_trash_days,
+ gconf_client_key_is_writable(prefs->gconf, "/apps/evolution/mail/trash/empty_on_exit_days", NULL));
+}
+
+static void
em_mailer_prefs_construct (EMMailerPrefs *prefs)
{
GSList *list, *header_config_list, *header_add_list, *p;
@@ -507,9 +547,8 @@ em_mailer_prefs_construct (EMMailerPrefs *prefs)
/* Deleting Mail */
prefs->empty_trash = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "chkEmptyTrashOnExit"));
- toggle_button_init (prefs->empty_trash, prefs->gconf,
- "/apps/evolution/mail/trash/empty_on_exit",
- FALSE, G_CALLBACK (settings_changed), prefs);
+ prefs->empty_trash_days = GTK_OPTION_MENU(glade_xml_get_widget (gui, "omenuEmptyTrashDays"));
+ emmp_empty_trash_init(prefs);
prefs->confirm_expunge = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "chkConfirmExpunge"));
toggle_button_init (prefs->confirm_expunge, prefs->gconf,
@@ -813,6 +852,12 @@ em_mailer_prefs_apply (EMMailerPrefs *prefs)
/* Deleting Mail */
gconf_client_set_bool (prefs->gconf, "/apps/evolution/mail/trash/empty_on_exit",
gtk_toggle_button_get_active (prefs->empty_trash), NULL);
+ val = gtk_option_menu_get_history(prefs->empty_trash_days);
+ if (val > sizeof(empty_trash_frequency)/sizeof(empty_trash_frequency[0]))
+ val = sizeof(empty_trash_frequency)/sizeof(empty_trash_frequency[0]);
+ if (val < 0)
+ val = 0;
+ gconf_client_set_int(prefs->gconf, "/apps/evolution/mail/trash/empty_on_exit_days", empty_trash_frequency[val].days, NULL);
gconf_client_set_bool (prefs->gconf, "/apps/evolution/mail/prompts/expunge",
gtk_toggle_button_get_active (prefs->confirm_expunge), NULL);
diff --git a/mail/em-mailer-prefs.h b/mail/em-mailer-prefs.h
index 3a182476ff..0029690fe1 100644
--- a/mail/em-mailer-prefs.h
+++ b/mail/em-mailer-prefs.h
@@ -78,6 +78,7 @@ struct _EMMailerPrefs {
/* Deleting Mail */
GtkToggleButton *empty_trash;
+ GtkOptionMenu *empty_trash_days;
GtkToggleButton *confirm_expunge;
/* New Mail Notification */
diff --git a/mail/evolution-mail.schemas.in.in b/mail/evolution-mail.schemas.in.in
index 56a17130fc..e3040bd930 100644
--- a/mail/evolution-mail.schemas.in.in
+++ b/mail/evolution-mail.schemas.in.in
@@ -652,6 +652,34 @@
</locale>
</schema>
+ <schema>
+ <key>/schemas/apps/evolution/mail/trash/empty_on_exit_days</key>
+ <applyto>/apps/evolution/mail/trash/empty_on_exit_days</applyto>
+ <owner>evolution-mail</owner>
+ <type>int</type>
+ <default>0</default>
+ <locale name="C">
+ <short>Minimum days between emptying the trash on exit</short>
+ <long>
+ Minimum time between emptying the trash on exit, in days.
+ </long>
+ </locale>
+ </schema>
+
+ <schema>
+ <key>/schemas/apps/evolution/mail/trash/empty_date</key>
+ <applyto>/apps/evolution/mail/trash/empty_date</applyto>
+ <owner>evolution-mail</owner>
+ <type>int</type>
+ <default>0</default>
+ <locale name="C">
+ <short>Last time empty trash was run</short>
+ <long>
+ The last time empty trash was run, in days since the epoch.
+ </long>
+ </locale>
+ </schema>
+
<!-- Labels and Colours -->
<schema>
diff --git a/mail/mail-account-gui.c b/mail/mail-account-gui.c
index 6b911eef88..ebf8e6f5a6 100644
--- a/mail/mail-account-gui.c
+++ b/mail/mail-account-gui.c
@@ -286,6 +286,8 @@ mail_account_gui_auto_detect_extra_conf (MailAccountGui *gui)
entries = service->provider->extra_conf;
for (i = 0; entries[i].type != CAMEL_PROVIDER_CONF_END; i++) {
+ GtkWidget *enable_widget = NULL;
+
if (!entries[i].name)
continue;
@@ -297,12 +299,14 @@ mail_account_gui_auto_detect_extra_conf (MailAccountGui *gui)
case CAMEL_PROVIDER_CONF_CHECKBOX:
toggle = g_hash_table_lookup (gui->extra_config, entries[i].name);
gtk_toggle_button_set_active (toggle, atoi (value));
+ enable_widget = (GtkWidget *)toggle;
break;
case CAMEL_PROVIDER_CONF_ENTRY:
entry = g_hash_table_lookup (gui->extra_config, entries[i].name);
if (value)
gtk_entry_set_text (entry, value);
+ enable_widget = (GtkWidget *)entry;
break;
case CAMEL_PROVIDER_CONF_CHECKSPIN:
@@ -321,11 +325,16 @@ mail_account_gui_auto_detect_extra_conf (MailAccountGui *gui)
g_assert (*value == ':');
val = strtod (++value, NULL);
gtk_spin_button_set_value (spin, val);
+ enable_widget = (GtkWidget *)spin;
}
break;
default:
break;
}
+
+ if (enable_widget)
+ gtk_widget_set_sensitive(enable_widget, e_account_writable_option(gui->account, prov->protocol, entries[i].name));
+
}
g_hash_table_foreach (auto_detected, auto_detected_foreach, NULL);
@@ -811,6 +820,8 @@ mail_account_gui_build_extra_conf (MailAccountGui *gui, const char *url_string)
cur_table = main_table;
rows = main_table->nrows;
for (i = 0; ; i++) {
+ GtkWidget *enable_widget = NULL;
+
switch (entries[i].type) {
case CAMEL_PROVIDER_CONF_SECTION_START:
{
@@ -846,10 +857,13 @@ mail_account_gui_build_extra_conf (MailAccountGui *gui, const char *url_string)
if (!strcmp (entries[i].name, "username")) {
gtk_label_set_text_with_mnemonic (GTK_LABEL (username_label), entries[i].text);
+ enable_widget = username_label;
} else if (!strcmp (entries[i].name, "hostname")) {
gtk_label_set_text_with_mnemonic (GTK_LABEL (hostname_label), entries[i].text);
+ enable_widget = hostname_label;
} else if (!strcmp (entries[i].name, "path")) {
gtk_label_set_text_with_mnemonic (GTK_LABEL (path_label), entries[i].text);
+ enable_widget = path_label;
} else {
/* make a new label */
label = gtk_label_new (entries[i].text);
@@ -857,6 +871,7 @@ mail_account_gui_build_extra_conf (MailAccountGui *gui, const char *url_string)
gtk_table_attach (cur_table, label, 0, 2, rows, rows + 1,
GTK_EXPAND | GTK_FILL, 0, 0, 0);
rows++;
+ enable_widget = label;
}
}
break;
@@ -879,6 +894,8 @@ mail_account_gui_build_extra_conf (MailAccountGui *gui, const char *url_string)
g_hash_table_insert (gui->extra_config, entries[i].name, checkbox);
if (entries[i].depname)
setup_toggle (checkbox, entries[i].depname, gui);
+
+ enable_widget = checkbox;
break;
}
@@ -926,7 +943,8 @@ mail_account_gui_build_extra_conf (MailAccountGui *gui, const char *url_string)
}
g_hash_table_insert (gui->extra_config, entries[i].name, entry);
-
+
+ enable_widget = entry;
break;
}
@@ -990,12 +1008,17 @@ mail_account_gui_build_extra_conf (MailAccountGui *gui, const char *url_string)
setup_toggle (spin, entries[i].depname, gui);
setup_toggle (label, entries[i].depname, gui);
}
+
+ enable_widget = hbox;
break;
}
case CAMEL_PROVIDER_CONF_END:
goto done;
}
+
+ if (enable_widget)
+ gtk_widget_set_sensitive(enable_widget, e_account_writable_option(gui->account, gui->source.provider->protocol, entries[i].name));
}
done:
@@ -1099,7 +1122,7 @@ mail_account_gui_folder_selector_button_new (char *widget_name,
}
static gboolean
-setup_service (MailAccountGuiService *gsvc, EAccountService *service)
+setup_service (MailAccountGui *gui, MailAccountGuiService *gsvc, EAccountService *service)
{
CamelURL *url = camel_url_new (service->url, NULL);
gboolean has_auth = FALSE;
@@ -1169,6 +1192,9 @@ setup_service (MailAccountGuiService *gsvc, EAccountService *service)
camel_url_free (url);
gtk_toggle_button_set_active (gsvc->remember, service->save_passwd);
+
+ gtk_widget_set_sensitive((GtkWidget *)gsvc->authtype, e_account_writable_option(gui->account, gsvc->provider->protocol, "auth"));
+ gtk_widget_set_sensitive((GtkWidget *)gsvc->use_ssl, e_account_writable_option(gui->account, gsvc->provider->protocol, "use_ssl"));
return has_auth;
}
@@ -1599,8 +1625,8 @@ mail_account_gui_new (EAccount *account, EMAccountPrefs *dialog)
em_folder_selection_button_set_selection((EMFolderSelectionButton *)gui->sent_folder_button, gui->sent_folder_uri);
/* Special Folders "Reset Defaults" button */
- button = glade_xml_get_widget (gui->xml, "default_folders_button");
- g_signal_connect (button, "clicked", G_CALLBACK (default_folders_clicked), gui);
+ gui->restore_folders_button = glade_xml_get_widget (gui->xml, "default_folders_button");
+ g_signal_connect (gui->restore_folders_button, "clicked", G_CALLBACK (default_folders_clicked), gui);
/* Always Cc */
gui->always_cc = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui->xml, "always_cc"));
@@ -1663,7 +1689,7 @@ mail_account_gui_new (EAccount *account, EMAccountPrefs *dialog)
gtk_widget_destroy (frame);
}
#endif /* HAVE_NSS */
-
+
return gui;
}
@@ -1677,6 +1703,8 @@ mail_account_gui_setup (MailAccountGui *gui, GtkWidget *top)
char *max_authname = NULL;
char *source_proto, *transport_proto;
GList *providers, *l;
+
+ printf("account gui setup\n");
if (gui->account->source && gui->account->source->url) {
source_proto = gui->account->source->url;
@@ -1834,7 +1862,7 @@ mail_account_gui_setup (MailAccountGui *gui, GtkWidget *top)
}
if (source_proto) {
- setup_service (&gui->source, gui->account->source);
+ setup_service (gui, &gui->source, gui->account->source);
gui->source.provider_type = CAMEL_PROVIDER_STORE;
g_free (source_proto);
if (gui->account->source->auto_check) {
@@ -1845,11 +1873,32 @@ mail_account_gui_setup (MailAccountGui *gui, GtkWidget *top)
}
if (transport_proto) {
- if (setup_service (&gui->transport, gui->account->transport))
+ if (setup_service (gui, &gui->transport, gui->account->transport))
gtk_toggle_button_set_active (gui->transport_needs_auth, TRUE);
gui->transport.provider_type = CAMEL_PROVIDER_TRANSPORT;
g_free (transport_proto);
}
+
+ /* FIXME: drive by table?? */
+ if (gui->source.provider) {
+ gtk_widget_set_sensitive((GtkWidget *)gui->source.authtype, e_account_writable_option(gui->account, gui->source.provider->protocol, "auth"));
+ gtk_widget_set_sensitive((GtkWidget *)gui->source.use_ssl, e_account_writable_option(gui->account, gui->source.provider->protocol, "use_ssl"));
+ }
+ if (gui->transport.provider) {
+ gtk_widget_set_sensitive((GtkWidget *)gui->transport.authtype, e_account_writable_option(gui->account, gui->transport.provider->protocol, "auth"));
+ gtk_widget_set_sensitive((GtkWidget *)gui->transport.use_ssl, e_account_writable_option(gui->account, gui->transport.provider->protocol, "use_ssl"));
+ }
+
+ gtk_widget_set_sensitive((GtkWidget *)gui->drafts_folder_button, e_account_writable(gui->account, E_ACCOUNT_DRAFTS_FOLDER_URI));
+ gtk_widget_set_sensitive((GtkWidget *)gui->sent_folder_button, e_account_writable(gui->account, E_ACCOUNT_SENT_FOLDER_URI));
+ gtk_widget_set_sensitive((GtkWidget *)gui->restore_folders_button,
+ e_account_writable(gui->account, E_ACCOUNT_SENT_FOLDER_URI)
+ || e_account_writable(gui->account, E_ACCOUNT_DRAFTS_FOLDER_URI));
+ gtk_widget_set_sensitive((GtkWidget *)gui->source.remember, e_account_writable(gui->account, E_ACCOUNT_SOURCE_SAVE_PASSWD));
+ gtk_widget_set_sensitive((GtkWidget *)gui->transport.remember, e_account_writable(gui->account, E_ACCOUNT_TRANSPORT_SAVE_PASSWD));
+ gtk_widget_set_sensitive((GtkWidget *)gui->sig_option_menu, e_account_writable(gui->account, E_ACCOUNT_ID_DEF_SIGNATURE));
+ gtk_widget_set_sensitive((GtkWidget *)gui->source_auto_check, e_account_writable(gui->account, E_ACCOUNT_SOURCE_AUTO_CHECK));
+ gtk_widget_set_sensitive((GtkWidget *)gui->source_auto_check_min, e_account_writable(gui->account, E_ACCOUNT_SOURCE_AUTO_CHECK_TIME));
}
static void
diff --git a/mail/mail-account-gui.h b/mail/mail-account-gui.h
index 3574eddf28..0b1d16c0da 100644
--- a/mail/mail-account-gui.h
+++ b/mail/mail-account-gui.h
@@ -95,7 +95,8 @@ typedef struct {
char *drafts_folder_uri;
GtkButton *sent_folder_button;
char *sent_folder_uri;
-
+ GtkButton *restore_folders_button;
+
/* always cc/bcc */
GtkToggleButton *always_cc;
GtkEntry *cc_addrs;
diff --git a/mail/mail-component.c b/mail/mail-component.c
index c519e108dd..73d178f47a 100644
--- a/mail/mail-component.c
+++ b/mail/mail-component.c
@@ -539,10 +539,19 @@ mc_quit_sync_done(CamelStore *store, void *data)
static void
mc_quit_sync(CamelStore *store, struct _store_info *si, MailComponent *mc)
{
- int expunge = gconf_client_get_bool(mail_config_get_gconf_client(), "/apps/evolution/mail/trash/empty_on_exit", NULL);
+ GConfClient *gconf = mail_config_get_gconf_client();
+ gboolean expunge;
+ int now = time(NULL)/60/60/24, days;
+
+ expunge = gconf_client_get_bool(gconf, "/apps/evolution/mail/trash/empty_on_exit", NULL)
+ && ((days = gconf_client_get_int(gconf, "/apps/evolution/mail/trash/empty_on_exit_days", NULL)) == 0
+ || (days + gconf_client_get_int(gconf, "/apps/evolution/mail/trash/empty_date", NULL)) <= now);
mc->priv->quit_count++;
mail_sync_store(store, expunge, mc_quit_sync_done, mc);
+
+ if (expunge)
+ gconf_client_set_int(gconf, "/apps/evolution/mail/trash/empty_date", now, NULL);
}
static CORBA_boolean
diff --git a/mail/mail-config.c b/mail/mail-config.c
index 99419f7250..ed578b4b58 100644
--- a/mail/mail-config.c
+++ b/mail/mail-config.c
@@ -1524,3 +1524,48 @@ mail_config_signature_set_html (MailConfigSignature *sig, gboolean html)
mail_config_signature_emit_event (MAIL_CONFIG_SIG_EVENT_HTML_CHANGED, sig);
}
}
+
+static const struct _mc_perm {
+ const char *key;
+ guint32 perm;
+} mc_perms[] = {
+ { "composer/charset", },
+ { "composer/send_html", },
+ { "composer/magic_smileys", },
+ { "composer/inline_spelling", },
+ { "format/forward_style", },
+ { "format/reply_style", },
+ { "trash/empty_on_exit", },
+ { "trash/empty_on_exit_days", },
+ { "display/charset" },
+ { "display/headers" },
+ { "display/labels" },
+ { "display/fonts/monospace" },
+ { "display/fonts/variable" },
+ { "display/load_http_images" },
+};
+
+struct _mc_item {
+} mc_items[MAIL_CONFIG_ITEM_LAST] = {
+ { /* MAIL_CONFIG_ACCOUNTS */ },
+ { /* MAIL_CONFIG_COMPOSER_CHARSET */ },
+ { /* MAIL_CONFIG_COMPOSER_SEND_HTML */ },
+ { /* MAIL_CONFIG_COMPOSER_MAGIC_SMILEYS */ },
+ { /* MAIL_CONFIG_COMPOSER_SPELL_CHECK */ },
+ { /* MAIL_CONFIG_FORMAT_FORWARD_STYLE */ },
+ { /* MAIL_CONFIG_FORMAT_REPLY_STYLE */ },
+ { /* MAIL_CONFIG_TRASH_EMPTY_ON_EXIT */ },
+ { /* MAIL_CONFIG_TRASH_EMPTY_ON_EXIT_DAYS */ },
+ { /* MAIL_CONFIG_DISPLAY_CHARSET */ },
+ { /* MAIL_CONFIG_DISPLAY_HEADERS */ },
+ { /* MAIL_CONFIG_DISPLAY_LABELS */ },
+ { /* MAIL_CONFIG_DISPLAY_FONT_MONO */ },
+ { /* MAIL_CONFIG_DISPLAY_FONT_PROP */ },
+ { /* MAIL_CONFIG_DISPLAY_LOAD_HTTP */ },
+};
+
+gboolean mail_config_writable(mail_config_item_t item)
+{
+
+}
+
diff --git a/mail/mail-config.glade b/mail/mail-config.glade
index 7498de63ee..e3bb60e0dc 100644
--- a/mail/mail-config.glade
+++ b/mail/mail-config.glade
@@ -3764,15 +3764,46 @@ For example: &quot;Work&quot; or &quot;Personal&quot;</property>
<property name="spacing">3</property>
<child>
- <widget class="GtkCheckButton" id="chkEmptyTrashOnExit">
+ <widget class="GtkHBox" id="hbox177">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Empty _trash folders on exit</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
+ <property name="homogeneous">False</property>
+ <property name="spacing">3</property>
+
+ <child>
+ <widget class="GtkCheckButton" id="chkEmptyTrashOnExit">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="label" translatable="yes">Empty _trash folders on exit</property>
+ <property name="use_underline">True</property>
+ <property name="relief">GTK_RELIEF_NORMAL</property>
+ <property name="active">False</property>
+ <property name="inconsistent">False</property>
+ <property name="draw_indicator">True</property>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
+
+ <child>
+ <widget class="GtkOptionMenu" id="omenuEmptyTrashDays">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="history">-1</property>
+
+ <child>
+ <widget class="GtkMenu" id="menu1">
+ </widget>
+ </child>
+ </widget>
+ <packing>
+ <property name="padding">0</property>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ </packing>
+ </child>
</widget>
<packing>
<property name="padding">0</property>
diff --git a/mail/mail-config.h b/mail/mail-config.h
index 36891eccb4..265cac8f8d 100644
--- a/mail/mail-config.h
+++ b/mail/mail-config.h
@@ -179,6 +179,28 @@ void mail_config_signature_emit_event (MailConfigSigEvent event, MailConfigSigna
void mail_config_write_account_sig (EAccount *account, int i);
char *mail_config_signature_run_script (char *script);
+typedef enum _mail_config_item_t {
+ MAIL_CONFIG_ACCOUNTS, /* should this be on e-account-list? */
+ MAIL_CONFIG_COMPOSER_CHARSET,
+ MAIL_CONFIG_COMPOSER_SEND_HTML,
+ MAIL_CONFIG_COMPOSER_MAGIC_SMILEYS,
+ MAIL_CONFIG_COMPOSER_SPELL_CHECK,
+ MAIL_CONFIG_FORMAT_FORWARD_STYLE,
+ MAIL_CONFIG_FORMAT_REPLY_STYLE,
+ MAIL_CONFIG_TRASH_EMPTY_ON_EXIT,
+ MAIL_CONFIG_TRASH_EMPTY_ON_EXIT_DAYS,
+ MAIL_CONFIG_DISPLAY_CHARSET,
+ MAIL_CONFIG_DISPLAY_HEADERS,
+ MAIL_CONFIG_DISPLAY_LABELS,
+ MAIL_CONFIG_DISPLAY_FONT_MONO,
+ MAIL_CONFIG_DISPLAY_FONT_PROP,
+ MAIL_CONFIG_DISPLAY_LOAD_HTTP,
+
+ MAIL_CONFIG_ITEM_LAST
+};
+
+gboolean mail_config_writable(mail_config_item_t item);
+
#ifdef __cplusplus
}
#endif /* __cplusplus */