started writing this, but i couldn't be fucked right now - apparently
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. svn path=/trunk/; revision=25110
This commit is contained in:
@@ -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.
|
||||
|
||||
+16
-10
@@ -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)
|
||||
|
||||
+49
-4
@@ -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)
|
||||
{
|
||||
@@ -444,6 +454,36 @@ toggle_button_init (GtkToggleButton *toggle, GConfClient *gconf, const char *key
|
||||
gtk_widget_set_sensitive ((GtkWidget *) toggle, FALSE);
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
@@ -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);
|
||||
|
||||
@@ -78,6 +78,7 @@ struct _EMMailerPrefs {
|
||||
|
||||
/* Deleting Mail */
|
||||
GtkToggleButton *empty_trash;
|
||||
GtkOptionMenu *empty_trash_days;
|
||||
GtkToggleButton *confirm_expunge;
|
||||
|
||||
/* New Mail Notification */
|
||||
|
||||
@@ -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>
|
||||
|
||||
+56
-7
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
+10
-1
@@ -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
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
+39
-8
@@ -3764,15 +3764,46 @@ For example: "Work" or "Personal"</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>
|
||||
|
||||
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user