[evolution/wip/gsettings] Adapt to GtkComboBox class reorg.
- From: Rodrigo Moya <rodrigo src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/wip/gsettings] Adapt to GtkComboBox class reorg.
- Date: Wed, 29 Jun 2011 17:02:49 +0000 (UTC)
commit cadcc080eeb998a52b2163604e07fa5a71089391
Author: Matthew Barnes <mbarnes redhat com>
Date: Thu Jan 13 23:22:29 2011 -0500
Adapt to GtkComboBox class reorg.
addressbook/gui/contact-editor/contact-editor.ui | 4 ++-
.../gui/contact-editor/e-contact-editor-fullname.c | 5 ---
addressbook/gui/contact-editor/e-contact-editor.c | 27 +++++++++++++++----
addressbook/gui/contact-editor/fullname.ui | 8 ++++-
calendar/gui/dialogs/event-page.c | 2 +-
calendar/gui/dialogs/event-page.ui | 4 ++-
calendar/gui/dialogs/memo-page.c | 2 +-
calendar/gui/dialogs/memo-page.ui | 4 ++-
calendar/gui/dialogs/task-page.c | 2 +-
calendar/gui/dialogs/task-page.ui | 3 +-
mail/e-mail-tag-editor.c | 9 +++---
mail/mail-dialogs.ui | 4 ++-
modules/addressbook/addressbook-config.c | 1 -
modules/addressbook/ldap-config.ui | 4 ++-
modules/mail/em-mailer-prefs.c | 9 +++++-
15 files changed, 59 insertions(+), 29 deletions(-)
---
diff --git a/addressbook/gui/contact-editor/contact-editor.ui b/addressbook/gui/contact-editor/contact-editor.ui
index 668fa63..428b17a 100644
--- a/addressbook/gui/contact-editor/contact-editor.ui
+++ b/addressbook/gui/contact-editor/contact-editor.ui
@@ -255,8 +255,10 @@
</packing>
</child>
<child>
- <object class="GtkComboBoxEntry" id="combo-file-as">
+ <object class="GtkComboBox" id="combo-file-as">
<property name="visible">True</property>
+ <property name="has-entry">True</property>
+ <property name="entry-text-column">0</property>
<property name="model">model1</property>
</object>
<packing>
diff --git a/addressbook/gui/contact-editor/e-contact-editor-fullname.c b/addressbook/gui/contact-editor/e-contact-editor-fullname.c
index ce9092c..15eddbd 100644
--- a/addressbook/gui/contact-editor/e-contact-editor-fullname.c
+++ b/addressbook/gui/contact-editor/e-contact-editor-fullname.c
@@ -227,11 +227,6 @@ e_contact_editor_fullname_init (EContactEditorFullname *e_contact_editor_fullnam
gtk_window_set_icon_name (
GTK_WINDOW (e_contact_editor_fullname), "contact-new");
-
- widget = e_builder_get_widget (builder, "comboentry-title");
- gtk_combo_box_set_entry_text_column (GTK_COMBO_BOX_ENTRY (widget), 0);
- widget = e_builder_get_widget (builder, "comboentry-suffix");
- gtk_combo_box_set_entry_text_column (GTK_COMBO_BOX_ENTRY (widget), 0);
}
GtkWidget*
diff --git a/addressbook/gui/contact-editor/e-contact-editor.c b/addressbook/gui/contact-editor/e-contact-editor.c
index 44a272f..2ef0fd0 100644
--- a/addressbook/gui/contact-editor/e-contact-editor.c
+++ b/addressbook/gui/contact-editor/e-contact-editor.c
@@ -537,8 +537,13 @@ file_as_set_style (EContactEditor *editor, gint style)
company = gtk_entry_get_text (GTK_ENTRY (company_w));
if (style == -1) {
- string = gtk_combo_box_text_get_active_text (GTK_COMBO_BOX_TEXT (combo_file_as));
- strings = g_list_append (strings, string);
+ GtkWidget *entry;
+
+ entry = gtk_bin_get_child (GTK_BIN (combo_file_as));
+ if (entry) {
+ string = g_strdup (gtk_entry_get_text (GTK_ENTRY (entry)));
+ strings = g_list_append (strings, string);
+ }
}
for (i = 0; i < 6; i++) {
@@ -554,11 +559,16 @@ file_as_set_style (EContactEditor *editor, gint style)
if (combo_file_as) {
GList *l;
+ GtkListStore *list_store;
+ GtkTreeIter iter;
- gtk_list_store_clear (GTK_LIST_STORE (gtk_combo_box_get_model (combo_file_as)));
+ list_store = GTK_LIST_STORE (gtk_combo_box_get_model (combo_file_as));
+
+ gtk_list_store_clear (list_store);
for (l = strings; l; l = l->next) {
- gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo_file_as), l->data);
+ gtk_list_store_append (list_store, &iter);
+ gtk_list_store_set (list_store, &iter, 0, l->data, -1);
}
}
@@ -592,7 +602,12 @@ name_entry_changed (GtkWidget *widget, EContactEditor *editor)
static void
file_as_combo_changed (GtkWidget *widget, EContactEditor *editor)
{
- gchar *string = gtk_combo_box_text_get_active_text (GTK_COMBO_BOX_TEXT (widget));
+ GtkWidget *entry;
+ gchar *string = NULL;
+
+ entry = gtk_bin_get_child (GTK_BIN (widget));
+ if (entry)
+ string = g_strdup (gtk_entry_get_text (GTK_ENTRY (entry)));
if (string && *string) {
gchar *title;
@@ -2550,7 +2565,7 @@ init_simple (EContactEditor *editor)
widget = e_builder_get_widget (editor->builder, "entry-fullname");
g_signal_connect (widget, "changed", G_CALLBACK (name_entry_changed), editor);
widget = e_builder_get_widget (editor->builder, "combo-file-as");
- gtk_combo_box_set_entry_text_column (GTK_COMBO_BOX_ENTRY (widget), 0);
+ gtk_combo_box_set_entry_text_column (GTK_COMBO_BOX (widget), 0);
g_signal_connect (widget, "changed", G_CALLBACK (file_as_combo_changed), editor);
widget = e_builder_get_widget (editor->builder, "entry-company");
g_signal_connect (widget, "changed", G_CALLBACK (company_entry_changed), editor);
diff --git a/addressbook/gui/contact-editor/fullname.ui b/addressbook/gui/contact-editor/fullname.ui
index 47cfde5..227bec9 100644
--- a/addressbook/gui/contact-editor/fullname.ui
+++ b/addressbook/gui/contact-editor/fullname.ui
@@ -312,8 +312,10 @@
</packing>
</child>
<child>
- <object class="GtkComboBoxEntry" id="comboentry-title">
+ <object class="GtkComboBox" id="comboentry-title">
<property name="visible">True</property>
+ <property name="has-entry">True</property>
+ <property name="entry-text-column">0</property>
<property name="add_tearoffs">False</property>
<property name="has_frame">True</property>
<property name="focus_on_click">True</property>
@@ -329,8 +331,10 @@
</packing>
</child>
<child>
- <object class="GtkComboBoxEntry" id="comboentry-suffix">
+ <object class="GtkComboBox" id="comboentry-suffix">
<property name="visible">True</property>
+ <property name="has-entry">True</property>
+ <property name="entry-text-column">0</property>
<property name="add_tearoffs">False</property>
<property name="has_frame">True</property>
<property name="focus_on_click">True</property>
diff --git a/calendar/gui/dialogs/event-page.c b/calendar/gui/dialogs/event-page.c
index 1798d09..7595f50 100644
--- a/calendar/gui/dialogs/event-page.c
+++ b/calendar/gui/dialogs/event-page.c
@@ -2247,7 +2247,7 @@ get_widgets (EventPage *epage)
priv->organizer = GW ("organizer");
gtk_list_store_clear (GTK_LIST_STORE (gtk_combo_box_get_model (GTK_COMBO_BOX (priv->organizer))));
- gtk_combo_box_set_entry_text_column (GTK_COMBO_BOX_ENTRY (priv->organizer), 0);
+ gtk_combo_box_set_entry_text_column (GTK_COMBO_BOX (priv->organizer), 0);
priv->summary = GW ("summary");
priv->summary_label = GW ("summary-label");
diff --git a/calendar/gui/dialogs/event-page.ui b/calendar/gui/dialogs/event-page.ui
index 0f5841e..0d3d73f 100644
--- a/calendar/gui/dialogs/event-page.ui
+++ b/calendar/gui/dialogs/event-page.ui
@@ -741,10 +741,12 @@
<property name="homogeneous">True</property>
<property name="spacing">0</property>
<child>
- <object class="GtkComboBoxEntry" id="organizer">
+ <object class="GtkComboBox" id="organizer">
<property name="visible">True</property>
<property name="add_tearoffs">False</property>
<property name="has_frame">True</property>
+ <property name="has-entry">True</property>
+ <property name="entry-text-column">0</property>
<property name="focus_on_click">True</property>
<property name="model">model2</property>
</object>
diff --git a/calendar/gui/dialogs/memo-page.c b/calendar/gui/dialogs/memo-page.c
index 60d6098..996a4de 100644
--- a/calendar/gui/dialogs/memo-page.c
+++ b/calendar/gui/dialogs/memo-page.c
@@ -826,7 +826,7 @@ get_widgets (MemoPage *mpage)
priv->org_label = GW ("org-label");
priv->org_combo = GW ("org-combo");
gtk_list_store_clear (GTK_LIST_STORE (gtk_combo_box_get_model (GTK_COMBO_BOX (priv->org_combo))));
- gtk_combo_box_set_entry_text_column (GTK_COMBO_BOX_ENTRY (priv->org_combo), 0);
+ gtk_combo_box_set_entry_text_column (GTK_COMBO_BOX (priv->org_combo), 0);
priv->to_button = GW ("to-button");
priv->to_hbox = GW ("to-hbox");
diff --git a/calendar/gui/dialogs/memo-page.ui b/calendar/gui/dialogs/memo-page.ui
index 6e9be05..f0dd0bb 100644
--- a/calendar/gui/dialogs/memo-page.ui
+++ b/calendar/gui/dialogs/memo-page.ui
@@ -422,10 +422,12 @@
</packing>
</child>
<child>
- <object class="GtkComboBoxEntry" id="org-combo">
+ <object class="GtkComboBox" id="org-combo">
<property name="visible">False</property>
<property name="add_tearoffs">False</property>
<property name="has_frame">True</property>
+ <property name="has-entry">True</property>
+ <property name="entry-text-column">0</property>
<property name="focus_on_click">True</property>
<property name="model">model1</property>
</object>
diff --git a/calendar/gui/dialogs/task-page.c b/calendar/gui/dialogs/task-page.c
index 8fe16d0..7956b1b 100644
--- a/calendar/gui/dialogs/task-page.c
+++ b/calendar/gui/dialogs/task-page.c
@@ -1418,7 +1418,7 @@ get_widgets (TaskPage *tpage)
priv->organizer = e_builder_get_widget (priv->builder, "organizer");
gtk_list_store_clear (GTK_LIST_STORE (gtk_combo_box_get_model (GTK_COMBO_BOX (priv->organizer))));
- gtk_combo_box_set_entry_text_column (GTK_COMBO_BOX_ENTRY (priv->organizer), 0);
+ gtk_combo_box_set_entry_text_column (GTK_COMBO_BOX (priv->organizer), 0);
priv->invite = e_builder_get_widget (priv->builder, "invite");
priv->add = e_builder_get_widget (priv->builder, "add-attendee");
diff --git a/calendar/gui/dialogs/task-page.ui b/calendar/gui/dialogs/task-page.ui
index 5d685a3..664caad 100644
--- a/calendar/gui/dialogs/task-page.ui
+++ b/calendar/gui/dialogs/task-page.ui
@@ -408,9 +408,10 @@
<property name="spacing">6</property>
<property name="homogeneous">True</property>
<child>
- <object class="GtkComboBoxEntry" id="organizer">
+ <object class="GtkComboBox" id="organizer">
<property name="visible">True</property>
<property name="model">model1</property>
+ <property name="has-entry">TRUE</property>
</object>
<packing>
<property name="position">0</property>
diff --git a/mail/e-mail-tag-editor.c b/mail/e-mail-tag-editor.c
index a116b3f..0b1e20c 100644
--- a/mail/e-mail-tag-editor.c
+++ b/mail/e-mail-tag-editor.c
@@ -158,10 +158,12 @@ mail_tag_editor_get_tag_list (EMailTagEditor *editor)
{
CamelTag *tag_list = NULL;
time_t date;
- gchar *text;
+ gchar *text = NULL;
+ GtkWidget *entry;
- text = gtk_combo_box_text_get_active_text (
- GTK_COMBO_BOX_TEXT (editor->priv->combo_entry));
+ entry = gtk_bin_get_child (GTK_BIN (editor->priv->combo_entry));
+ if (entry)
+ text = g_strdup (gtk_entry_get_text (GTK_ENTRY (entry)));
camel_tag_set (&tag_list, "follow-up", text);
g_free (text);
@@ -332,7 +334,6 @@ mail_tag_editor_init (EMailTagEditor *editor)
renderer, "text", 1, NULL);
widget = e_builder_get_widget (builder, "combo");
- gtk_combo_box_set_entry_text_column (GTK_COMBO_BOX_ENTRY (widget), 0);
editor->priv->combo_entry = GTK_COMBO_BOX (widget);
gtk_combo_box_set_active (GTK_COMBO_BOX (widget), DEFAULT_FLAG);
diff --git a/mail/mail-dialogs.ui b/mail/mail-dialogs.ui
index 82e9928..3520a0d 100644
--- a/mail/mail-dialogs.ui
+++ b/mail/mail-dialogs.ui
@@ -331,8 +331,10 @@ Please select a follow up action from the "Flag" menu.</property>
</packing>
</child>
<child>
- <object class="GtkComboBoxEntry" id="combo">
+ <object class="GtkComboBox" id="combo">
<property name="visible">True</property>
+ <property name="has-entry">True</property>
+ <property name="entry-text-column">0</property>
<property name="model">combo_model</property>
</object>
<packing>
diff --git a/modules/addressbook/addressbook-config.c b/modules/addressbook/addressbook-config.c
index 9c5a26a..805cfe4 100644
--- a/modules/addressbook/addressbook-config.c
+++ b/modules/addressbook/addressbook-config.c
@@ -747,7 +747,6 @@ eabc_general_host (EConfig *ec, EConfigItem *item, GtkWidget *parent, GtkWidget
g_signal_connect (sdialog->host, "changed", G_CALLBACK (host_changed_cb), sdialog);
sdialog->port_comboentry = e_builder_get_widget (builder, "port-comboentry");
- gtk_combo_box_set_entry_text_column (GTK_COMBO_BOX_ENTRY (sdialog->port_comboentry), 0);
gtk_widget_set_has_tooltip (sdialog->port_comboentry, TRUE);
gtk_widget_set_tooltip_text (sdialog->port_comboentry, _("This is the port on the LDAP server that Evolution will try to connect to. A list of standard ports has been provided. Ask your system administrator what port you should specify."));
sprintf(port, "%u", lud && lud->lud_port? lud->lud_port : LDAP_PORT);
diff --git a/modules/addressbook/ldap-config.ui b/modules/addressbook/ldap-config.ui
index c26cb1e..4d045f5 100644
--- a/modules/addressbook/ldap-config.ui
+++ b/modules/addressbook/ldap-config.ui
@@ -308,9 +308,11 @@
</packing>
</child>
<child>
- <object class="GtkComboBoxEntry" id="port-comboentry">
+ <object class="GtkComboBox" id="port-comboentry">
<property name="visible">True</property>
<property name="model">model2</property>
+ <property name="has-entry">True</property>
+ <property name="entry-text-column">0</property>
</object>
<packing>
<property name="left_attach">1</property>
diff --git a/modules/mail/em-mailer-prefs.c b/modules/mail/em-mailer-prefs.c
index 8bec111..870e5ec 100644
--- a/modules/mail/em-mailer-prefs.c
+++ b/modules/mail/em-mailer-prefs.c
@@ -670,9 +670,12 @@ junk_plugin_changed (GtkWidget *combo, EMMailerPrefs *prefs)
{
gchar *def_plugin;
const GList *plugins = mail_session_get_junk_plugins (prefs->session);
+ GtkTreeIter iter;
+
+ g_return_if_fail (gtk_combo_box_get_active_iter (GTK_COMBO_BOX (combo), &iter));
- def_plugin = gtk_combo_box_text_get_active_text (
- GTK_COMBO_BOX_TEXT (combo));
+ def_plugin = NULL;
+ gtk_tree_model_get (gtk_combo_box_get_model (GTK_COMBO_BOX (combo)), &iter, 0, &def_plugin, -1);
gconf_client_set_string (prefs->gconf, "/apps/evolution/mail/junk/default_plugin", def_plugin, NULL);
while (plugins) {
@@ -705,6 +708,8 @@ junk_plugin_changed (GtkWidget *combo, EMMailerPrefs *prefs)
}
plugins = plugins->next;
}
+
+ g_free (def_plugin);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]