aboutsummaryrefslogtreecommitdiffstats
path: root/modules/mail
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2010-11-18 20:35:36 +0800
committerRodrigo Moya <rodrigo@gnome-db.org>2011-06-30 00:41:01 +0800
commit12a91dbb21f2a052d26460c9aad30835fd17456b (patch)
tree5dede0765bb0f74f363614a05210e533655e0c39 /modules/mail
parent9e833a704ce57e4f571d0da91e795e6ae7cc2469 (diff)
downloadgsoc2013-evolution-12a91dbb21f2a052d26460c9aad30835fd17456b.tar.gz
gsoc2013-evolution-12a91dbb21f2a052d26460c9aad30835fd17456b.tar.zst
gsoc2013-evolution-12a91dbb21f2a052d26460c9aad30835fd17456b.zip
Bug #633779 - GtkComboBoxText issues
Diffstat (limited to 'modules/mail')
-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 (