diff options
-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; |