diff options
author | Jeffrey Stedfast <fejj@novell.com> | 2008-05-15 09:40:03 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2008-05-15 09:40:03 +0800 |
commit | 0ede696fe3e0b29e808c6edb46807a2c8c3fa4a9 (patch) | |
tree | 6850eca62a79b5275b104bf0edb5d28e3aaada3e | |
parent | 6d741eea43bd5285080eb7a24e5ac4e9e7e6a23b (diff) | |
download | gsoc2013-evolution-0ede696fe3e0b29e808c6edb46807a2c8c3fa4a9.tar.gz gsoc2013-evolution-0ede696fe3e0b29e808c6edb46807a2c8c3fa4a9.tar.zst gsoc2013-evolution-0ede696fe3e0b29e808c6edb46807a2c8c3fa4a9.zip |
Needed so that IMAP4 can allow users to configure cache expiration
2008-05-14 Jeffrey Stedfast <fejj@novell.com>
Needed so that IMAP4 can allow users to configure cache
expiration per-folder.
* em-folder-properties.c (emfp_get_folder_item): Add support for
CAMEL_ARG_INT and CAMEL_ARG_DBL.
(emfp_commit): Same.
svn path=/trunk/; revision=35502
-rw-r--r-- | mail/ChangeLog | 9 | ||||
-rw-r--r-- | mail/em-folder-properties.c | 34 |
2 files changed, 43 insertions, 0 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index 4c86ba61c4..534338ec3c 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,12 @@ +2008-05-14 Jeffrey Stedfast <fejj@novell.com> + + Needed so that IMAP4 can allow users to configure cache + expiration per-folder. + + * em-folder-properties.c (emfp_get_folder_item): Add support for + CAMEL_ARG_INT and CAMEL_ARG_DBL. + (emfp_commit): Same. + 2008-05-14 Matthew Barnes <mbarnes@redhat.com> ** Fixes bug #463040, Patch by Milan Crha diff --git a/mail/em-folder-properties.c b/mail/em-folder-properties.c index 1af52a1f47..6a926f43bb 100644 --- a/mail/em-folder-properties.c +++ b/mail/em-folder-properties.c @@ -97,6 +97,12 @@ emfp_commit(EConfig *ec, GSList *items, void *data) g_free (arg->ca_str); arg->ca_str = (char *) gtk_entry_get_text ((GtkEntry *) prop_data->widgets[i]); break; + case CAMEL_ARG_INT: + arg->ca_int = gtk_spin_button_get_value_as_int ((GtkSpinButton *) prop_data->widgets[i]); + break; + case CAMEL_ARG_DBL: + arg->ca_double = gtk_spin_button_get_value ((GtkSpinButton *) prop_data->widgets[i]); + break; default: g_warning ("This shouldn't be reached\n"); break; @@ -237,6 +243,34 @@ emfp_get_folder_item(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, gtk_table_attach ((GtkTable *) table, w, 1, 2, row, row + 1, GTK_FILL | GTK_EXPAND, 0, 0, 0); prop_data->widgets[i] = w; break; + case CAMEL_ARG_INT: + label = gtk_label_new (prop->description); + gtk_misc_set_alignment ((GtkMisc *) label, 0.0, 0.5); + gtk_widget_show (label); + gtk_table_attach ((GtkTable *) table, label, 0, 1, row, row + 1, GTK_FILL, 0, 0, 0); + + w = gtk_spin_button_new_with_range (G_MININT, G_MAXINT, 1.0); + gtk_spin_button_set_value ((GtkSpinButton *) w, (double) prop_data->argv->argv[i].ca_int); + gtk_spin_button_set_numeric ((GtkSpinButton *) w, TRUE); + gtk_spin_button_set_digits ((GtkSpinButton *) w, 0); + gtk_widget_show (w); + gtk_table_attach ((GtkTable *) table, w, 1, 2, row, row + 1, GTK_FILL | GTK_EXPAND, 0, 0, 0); + prop_data->widgets[i] = w; + break; + case CAMEL_ARG_DBL: + label = gtk_label_new (prop->description); + gtk_misc_set_alignment ((GtkMisc *) label, 0.0, 0.5); + gtk_widget_show (label); + gtk_table_attach ((GtkTable *) table, label, 0, 1, row, row + 1, GTK_FILL, 0, 0, 0); + + w = gtk_spin_button_new_with_range (G_MININT, G_MAXINT, 1.0); + gtk_spin_button_set_value ((GtkSpinButton *) w, prop_data->argv->argv[i].ca_double); + gtk_spin_button_set_numeric ((GtkSpinButton *) w, TRUE); + gtk_spin_button_set_digits ((GtkSpinButton *) w, 2); + gtk_widget_show (w); + gtk_table_attach ((GtkTable *) table, w, 1, 2, row, row + 1, GTK_FILL | GTK_EXPAND, 0, 0, 0); + prop_data->widgets[i] = w; + break; default: g_warning ("This shouldn't be reached\n"); break; |