aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2010-11-18 20:35:36 +0800
committerMilan Crha <mcrha@redhat.com>2010-11-18 20:35:36 +0800
commitb09b3e9ccacea345fee998ff20ef01ae043eaeac (patch)
tree2d11701190da5f57461d41236bab44d22884a0a0 /modules
parent41117c2b8c8fafe581608cd91f84803cacb08f5d (diff)
downloadgsoc2013-evolution-b09b3e9ccacea345fee998ff20ef01ae043eaeac.tar.gz
gsoc2013-evolution-b09b3e9ccacea345fee998ff20ef01ae043eaeac.tar.zst
gsoc2013-evolution-b09b3e9ccacea345fee998ff20ef01ae043eaeac.zip
Bug #633779 - GtkComboBoxText issues
Diffstat (limited to 'modules')
-rw-r--r--modules/mail/em-mailer-prefs.c30
1 files changed, 18 insertions, 12 deletions
diff --git a/modules/mail/em-mailer-prefs.c b/modules/mail/em-mailer-prefs.c
index 2c4a2ebd06..b03ac60b0c 100644
--- a/modules/mail/em-mailer-prefs.c
+++ b/modules/mail/em-mailer-prefs.c
@@ -544,21 +544,24 @@ emmp_empty_trash_init (EMMailerPrefs *prefs,
GtkComboBox *combo_box)
{
gint days, hist = 0, ii;
- GtkTreeModel *model;
+ GtkListStore *store;
+ GtkTreeIter iter;
days = gconf_client_get_int (
prefs->gconf,
"/apps/evolution/mail/trash/empty_on_exit_days", NULL);
- model = gtk_combo_box_get_model (combo_box);
- gtk_list_store_clear (GTK_LIST_STORE (model));
+ store = GTK_LIST_STORE (gtk_combo_box_get_model (combo_box));
+ gtk_list_store_clear (store);
for (ii = 0; ii < G_N_ELEMENTS (empty_trash_frequency); ii++) {
if (days >= empty_trash_frequency[ii].days)
hist = ii;
- gtk_combo_box_text_append_text (
- GTK_COMBO_BOX_TEXT (combo_box),
- gettext (empty_trash_frequency[ii].label));
+
+ gtk_list_store_append (store, &iter);
+ gtk_list_store_set (store, &iter,
+ 0, gettext (empty_trash_frequency[ii].label),
+ -1);
}
g_signal_connect (
@@ -589,21 +592,24 @@ emmp_empty_junk_init (EMMailerPrefs *prefs,
GtkComboBox *combo_box)
{
gint days, hist = 0, ii;
- GtkTreeModel *model;
+ GtkListStore *store;
+ GtkTreeIter iter;
days = gconf_client_get_int (
prefs->gconf,
"/apps/evolution/mail/junk/empty_on_exit_days", NULL);
- model = gtk_combo_box_get_model (combo_box);
- gtk_list_store_clear (GTK_LIST_STORE (model));
+ store = GTK_LIST_STORE (gtk_combo_box_get_model (combo_box));
+ gtk_list_store_clear (store);
for (ii = 0; ii < G_N_ELEMENTS (empty_trash_frequency); ii++) {
if (days >= empty_trash_frequency[ii].days)
hist = ii;
- gtk_combo_box_text_append_text (
- GTK_COMBO_BOX_TEXT (combo_box),
- gettext (empty_trash_frequency[ii].label));
+
+ gtk_list_store_append (store, &iter);
+ gtk_list_store_set (store, &iter,
+ 0, gettext (empty_trash_frequency[ii].label),
+ -1);
}
g_signal_connect (