evolution r35502 - trunk/mail
- From: fejj svn gnome org
- To: svn-commits-list gnome org
- Subject: evolution r35502 - trunk/mail
- Date: Thu, 15 May 2008 02:40:03 +0100 (BST)
Author: fejj
Date: Thu May 15 01:40:03 2008
New Revision: 35502
URL: http://svn.gnome.org/viewvc/evolution?rev=35502&view=rev
Log:
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.
Modified:
trunk/mail/ChangeLog
trunk/mail/em-folder-properties.c
Modified: trunk/mail/em-folder-properties.c
==============================================================================
--- trunk/mail/em-folder-properties.c (original)
+++ trunk/mail/em-folder-properties.c Thu May 15 01:40:03 2008
@@ -97,6 +97,12 @@
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 @@
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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]