[evolution/gtk-builder] GtkComboBoxEntry in .ui files and its text-column property settings



commit 18b000e43a76935480512759e0d818411e678cfc
Author: Milan Crha <mcrha redhat com>
Date:   Mon Nov 9 15:33:10 2009 +0100

    GtkComboBoxEntry in .ui files and its text-column property settings

 addressbook/gui/contact-editor/contact-editor.ui   |   17 -----------------
 .../gui/contact-editor/e-contact-editor-fullname.c |    5 +++++
 addressbook/gui/contact-editor/e-contact-editor.c  |    1 +
 addressbook/gui/contact-editor/fullname.ui         |   12 ------------
 calendar/gui/dialogs/event-page.c                  |    1 +
 calendar/gui/dialogs/event-page.ui                 |   14 --------------
 calendar/gui/dialogs/memo-page.c                   |    1 +
 calendar/gui/dialogs/memo-page.ui                  |   17 ++---------------
 calendar/gui/dialogs/task-page.c                   |    1 +
 calendar/gui/dialogs/task-page.ui                  |   14 --------------
 mail/e-mail-tag-editor.c                           |    1 +
 mail/mail-dialogs.ui                               |    2 --
 modules/addressbook/addressbook-config.c           |    1 +
 modules/addressbook/ldap-config.ui                 |    6 ------
 14 files changed, 13 insertions(+), 80 deletions(-)
---
diff --git a/addressbook/gui/contact-editor/contact-editor.ui b/addressbook/gui/contact-editor/contact-editor.ui
index f2a9bc1..7b45a5d 100644
--- a/addressbook/gui/contact-editor/contact-editor.ui
+++ b/addressbook/gui/contact-editor/contact-editor.ui
@@ -5,17 +5,6 @@
     <columns>
       <column type="gchararray"/>
     </columns>
-    <data>
-      <row>
-        <col id="0">a</col>
-      </row>
-      <row>
-        <col id="0">b</col>
-      </row>
-      <row>
-        <col id="0">c</col>
-      </row>
-    </data>
   </object>
   <object class="GtkListStore" id="model2">
     <columns>
@@ -392,12 +381,6 @@
                             <property name="has_frame">True</property>
                             <property name="focus_on_click">True</property>
                             <property name="model">model1</property>
-                            <child>
-                              <object class="GtkCellRendererText" id="renderer1"/>
-                              <attributes>
-                                <attribute name="text">0</attribute>
-                              </attributes>
-                            </child>
                           </object>
                           <packing>
                             <property name="left_attach">1</property>
diff --git a/addressbook/gui/contact-editor/e-contact-editor-fullname.c b/addressbook/gui/contact-editor/e-contact-editor-fullname.c
index abea916..79d665e 100644
--- a/addressbook/gui/contact-editor/e-contact-editor-fullname.c
+++ b/addressbook/gui/contact-editor/e-contact-editor-fullname.c
@@ -135,6 +135,11 @@ 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_entry_set_text_column (GTK_COMBO_BOX_ENTRY (widget), 0);
+	widget = e_builder_get_widget (builder, "comboentry-suffix");
+	gtk_combo_box_entry_set_text_column (GTK_COMBO_BOX_ENTRY (widget), 0);
 }
 
 static void
diff --git a/addressbook/gui/contact-editor/e-contact-editor.c b/addressbook/gui/contact-editor/e-contact-editor.c
index be86df1..493d92e 100644
--- a/addressbook/gui/contact-editor/e-contact-editor.c
+++ b/addressbook/gui/contact-editor/e-contact-editor.c
@@ -2440,6 +2440,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_entry_set_text_column (GTK_COMBO_BOX_ENTRY (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 55eafc0..8ae3e33 100644
--- a/addressbook/gui/contact-editor/fullname.ui
+++ b/addressbook/gui/contact-editor/fullname.ui
@@ -322,12 +322,6 @@
                 <property name="has_frame">True</property>
                 <property name="focus_on_click">True</property>
                 <property name="model">model1</property>
-                <child>
-                  <object class="GtkCellRendererText" id="renderer1"/>
-                  <attributes>
-                    <attribute name="text">0</attribute>
-                  </attributes>
-                </child>
               </object>
               <packing>
                 <property name="left_attach">1</property>
@@ -345,12 +339,6 @@
                 <property name="has_frame">True</property>
                 <property name="focus_on_click">True</property>
                 <property name="model">model2</property>
-                <child>
-                  <object class="GtkCellRendererText" id="renderer2"/>
-                  <attributes>
-                    <attribute name="text">0</attribute>
-                  </attributes>
-                </child>
               </object>
               <packing>
                 <property name="left_attach">1</property>
diff --git a/calendar/gui/dialogs/event-page.c b/calendar/gui/dialogs/event-page.c
index 9add825..4af9bec 100644
--- a/calendar/gui/dialogs/event-page.c
+++ b/calendar/gui/dialogs/event-page.c
@@ -2157,6 +2157,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_entry_set_text_column (GTK_COMBO_BOX_ENTRY (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 656959b..9f5e08f 100644
--- a/calendar/gui/dialogs/event-page.ui
+++ b/calendar/gui/dialogs/event-page.ui
@@ -34,14 +34,6 @@
     <columns>
       <column type="gchararray"/>
     </columns>
-    <data>
-      <row>
-        <col id="0" translatable="yes">a</col>
-      </row>
-      <row>
-        <col id="0" translatable="yes">b</col>
-      </row>
-    </data>
   </object>
   <object class="GtkListStore" id="model3">
     <columns>
@@ -758,12 +750,6 @@
                         <property name="has_frame">True</property>
                         <property name="focus_on_click">True</property>
                         <property name="model">model2</property>
-                        <child>
-                          <object class="GtkCellRendererText" id="renderer2"/>
-                          <attributes>
-                            <attribute name="text">0</attribute>
-                          </attributes>
-                        </child>
                       </object>
                       <packing>
                         <property name="padding">0</property>
diff --git a/calendar/gui/dialogs/memo-page.c b/calendar/gui/dialogs/memo-page.c
index 69c5363..98b6545 100644
--- a/calendar/gui/dialogs/memo-page.c
+++ b/calendar/gui/dialogs/memo-page.c
@@ -795,6 +795,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_entry_set_text_column (GTK_COMBO_BOX_ENTRY (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 b92fce1..dc0d8df 100644
--- a/calendar/gui/dialogs/memo-page.ui
+++ b/calendar/gui/dialogs/memo-page.ui
@@ -5,14 +5,6 @@
     <columns>
       <column type="gchararray"/>
     </columns>
-    <data>
-      <row>
-        <col id="0" translatable="yes">a</col>
-      </row>
-      <row>
-        <col id="0" translatable="yes">b</col>
-      </row>
-    </data>
   </object>
   <object class="GtkWindow" id="memo-toplevel">
     <property name="title">window1</property>
@@ -268,6 +260,7 @@
                 <child>
                   <object class="GtkLabel" id="org-label">
                     <property name="label" translatable="yes">Or_ganizer:</property>
+                    <property name="visible">False</property>
                     <property name="use_underline">True</property>
                     <property name="use_markup">False</property>
                     <property name="justify">GTK_JUSTIFY_LEFT</property>
@@ -432,17 +425,11 @@
                 </child>
                 <child>
                   <object class="GtkComboBoxEntry" id="org-combo">
-                    <property name="visible">True</property>
+                    <property name="visible">False</property>
                     <property name="add_tearoffs">False</property>
                     <property name="has_frame">True</property>
                     <property name="focus_on_click">True</property>
                     <property name="model">model1</property>
-                    <child>
-                      <object class="GtkCellRendererText" id="renderer1"/>
-                      <attributes>
-                        <attribute name="text">0</attribute>
-                      </attributes>
-                    </child>
                   </object>
                   <packing>
                     <property name="left_attach">1</property>
diff --git a/calendar/gui/dialogs/task-page.c b/calendar/gui/dialogs/task-page.c
index cb74234..afc2368 100644
--- a/calendar/gui/dialogs/task-page.c
+++ b/calendar/gui/dialogs/task-page.c
@@ -1350,6 +1350,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_entry_set_text_column (GTK_COMBO_BOX_ENTRY (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 24015f9..a491a96 100644
--- a/calendar/gui/dialogs/task-page.ui
+++ b/calendar/gui/dialogs/task-page.ui
@@ -5,14 +5,6 @@
     <columns>
       <column type="gchararray"/>
     </columns>
-    <data>
-      <row>
-        <col id="0" translatable="yes">a</col>
-      </row>
-      <row>
-        <col id="0" translatable="yes">b</col>
-      </row>
-    </data>
   </object>
   <object class="GtkWindow" id="task-toplevel">
     <property name="title">window1</property>
@@ -574,12 +566,6 @@
                         <property name="has_frame">True</property>
                         <property name="focus_on_click">True</property>
                         <property name="model">model1</property>
-                        <child>
-                          <object class="GtkCellRendererText" id="renderer1"/>
-                          <attributes>
-                            <attribute name="text">0</attribute>
-                          </attributes>
-                        </child>
                       </object>
                       <packing>
                         <property name="padding">0</property>
diff --git a/mail/e-mail-tag-editor.c b/mail/e-mail-tag-editor.c
index f2b1a5e..aed7341 100644
--- a/mail/e-mail-tag-editor.c
+++ b/mail/e-mail-tag-editor.c
@@ -329,6 +329,7 @@ mail_tag_editor_init (EMailTagEditor *editor)
 		renderer, "text", 1, NULL);
 
 	widget = e_builder_get_widget (builder, "combo");
+	gtk_combo_box_entry_set_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 b487759..2d123d6 100644
--- a/mail/mail-dialogs.ui
+++ b/mail/mail-dialogs.ui
@@ -636,8 +636,6 @@ elect a follow up action from the "Flag" menu.</property>
           <object class="GtkComboBoxEntry" id="combo">
             <property name="visible">True</property>
             <property name="model">combo_model</property>
-            <property name="active">2</property>
-            <property name="text_column">0</property>
           </object>
           <packing>
             <property name="left_attach">1</property>
diff --git a/modules/addressbook/addressbook-config.c b/modules/addressbook/addressbook-config.c
index 97d519a..10ab0a3 100644
--- a/modules/addressbook/addressbook-config.c
+++ b/modules/addressbook/addressbook-config.c
@@ -731,6 +731,7 @@ 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_entry_set_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 d55981c..770fec5 100644
--- a/modules/addressbook/ldap-config.ui
+++ b/modules/addressbook/ldap-config.ui
@@ -314,12 +314,6 @@
       <object class="GtkComboBoxEntry" id="port-comboentry">
         <property name="visible">True</property>
         <property name="model">model2</property>
-        <child>
-          <object class="GtkCellRendererText" id="renderer2"/>
-          <attributes>
-            <attribute name="text">0</attribute>
-          </attributes>
-        </child>
       </object>
       <packing>
         <property name="left_attach">1</property>



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]