aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-config-gui.c
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2000-08-09 08:13:32 +0800
committerDan Winship <danw@src.gnome.org>2000-08-09 08:13:32 +0800
commit01f333dee52a481a633858ef563dab221f01b945 (patch)
tree6ba50d0bd008d267aab42b39edce31d253eb41a6 /mail/mail-config-gui.c
parent234e613bc3293628516fc38ad6e695b02a8b11a4 (diff)
downloadgsoc2013-evolution-01f333dee52a481a633858ef563dab221f01b945.tar
gsoc2013-evolution-01f333dee52a481a633858ef563dab221f01b945.tar.gz
gsoc2013-evolution-01f333dee52a481a633858ef563dab221f01b945.tar.bz2
gsoc2013-evolution-01f333dee52a481a633858ef563dab221f01b945.tar.lz
gsoc2013-evolution-01f333dee52a481a633858ef563dab221f01b945.tar.xz
gsoc2013-evolution-01f333dee52a481a633858ef563dab221f01b945.tar.zst
gsoc2013-evolution-01f333dee52a481a633858ef563dab221f01b945.zip
Add "Don't delete messages from server" button to remote SOURCEs that
* mail-config-gui.c: Add "Don't delete messages from server" button to remote SOURCEs that aren't STORAGEs (ie, POP). (provider_list): Only list SOURCEs. (ie, not mh) * mail-config.c: Save/load "keep_on_server" flag. * mail-ops.c (fetch_remote_mail): New function, split out of real_fetch_mail. Deals with copying mail from a remote server into a temporary mbox, possibly using a CamelUIDCache to leave the messages on the server. svn path=/trunk/; revision=4617
Diffstat (limited to 'mail/mail-config-gui.c')
-rw-r--r--mail/mail-config-gui.c23
1 files changed, 21 insertions, 2 deletions
diff --git a/mail/mail-config-gui.c b/mail/mail-config-gui.c
index 2d957af301..fda81c7b43 100644
--- a/mail/mail-config-gui.c
+++ b/mail/mail-config-gui.c
@@ -81,6 +81,7 @@ typedef struct
GList *auth_items;
GtkWidget *auth_html;
GtkWidget *auth_detect;
+ GtkWidget *keep_on_server;
gint pnum;
} MailDialogServicePageItem;
@@ -334,7 +335,8 @@ provider_list (GSList **sources, GSList **news, GSList **transports)
if (strcmp (prov->domain, "mail"))
continue;
- if (prov->object_types[CAMEL_PROVIDER_STORE]) {
+ if (prov->object_types[CAMEL_PROVIDER_STORE] &&
+ prov->flags & CAMEL_PROVIDER_IS_SOURCE) {
*sources = provider_list_add (*sources,
CAMEL_PROVIDER_STORE,
prov);
@@ -670,6 +672,9 @@ service_page_set_url (MailDialogServicePage *page, MailConfigService *service)
}
}
+ if (spitem->keep_on_server)
+ gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (spitem->keep_on_server), service->keep_on_server);
+
camel_exception_free (ex);
camel_url_free (url);
}
@@ -762,8 +767,13 @@ static MailConfigService *
service_page_extract (MailDialogServicePage *page)
{
MailConfigService *source = g_new0 (MailConfigService, 1);
+ MailDialogServicePageItem *spitem = page->spitem;
source->url = service_page_get_url (page);
+ if (spitem->keep_on_server) {
+ source->keep_on_server = gtk_toggle_button_get_active (
+ GTK_TOGGLE_BUTTON (spitem->keep_on_server));
+ }
return source;
}
@@ -894,7 +904,7 @@ service_page_item_new (MailDialogServicePage *page, MailService *mcs)
description->parent->parent,
TRUE, TRUE, 0);
- table = gtk_table_new (5, 3, FALSE);
+ table = gtk_table_new (6, 3, FALSE);
gtk_table_set_row_spacings (GTK_TABLE (table), 2);
gtk_table_set_col_spacings (GTK_TABLE (table), 10);
gtk_container_set_border_width (GTK_CONTAINER (table), 8);
@@ -959,6 +969,15 @@ service_page_item_new (MailDialogServicePage *page, MailService *mcs)
row += 2;
}
+ if ((mcs->provider->flags & CAMEL_PROVIDER_IS_REMOTE) &&
+ !(mcs->provider->flags & CAMEL_PROVIDER_IS_STORAGE)) {
+ item->keep_on_server = gtk_check_button_new_with_label (
+ _("Don't delete messages from server"));
+ gtk_table_attach (GTK_TABLE (table), item->keep_on_server,
+ 0, 3, row, row + 1, GTK_FILL, 0, 0, 0);
+ row++;
+ }
+
if (row != 0) {
GtkWidget *btn;