Add missing ComboBox cell renderers in Glade rather than manually

This also fixes the duplicated renderers when there was already one
in Glade, and a second one got added manually.
This commit is contained in:
Colomban Wendling 2012-01-08 22:55:28 +01:00
parent 3cb3826aad
commit aa96bc2cbf
2 changed files with 18 additions and 10 deletions

View File

@ -4256,6 +4256,12 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="model">liststore8</property>
<child>
<object class="GtkCellRendererText" id="cellrenderertext5"/>
<attributes>
<attribute name="text">0</attribute>
</attributes>
</child>
</object>
<packing>
<property name="left_attach">1</property>
@ -4352,6 +4358,12 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="model">liststore6</property>
<child>
<object class="GtkCellRendererText" id="cellrenderertext6"/>
<attributes>
<attribute name="text">0</attribute>
</attributes>
</child>
</object>
</child>
</object>
@ -4412,6 +4424,12 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="model">liststore7</property>
<child>
<object class="GtkCellRendererText" id="cellrenderertext7"/>
<attributes>
<attribute name="text">0</attribute>
</attributes>
</child>
</object>
</child>
</object>

View File

@ -2256,16 +2256,6 @@ void ui_init_builder(void)
toplevel = ui_get_top_parent(widget);
if (toplevel)
ui_hookup_widget(toplevel, widget, name);
/* Glade doesn't seem to add cell renderers for the combo boxes,
* so they are added here. */
if (GTK_IS_COMBO_BOX(widget))
{
renderer = gtk_cell_renderer_text_new();
gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(widget), renderer, TRUE);
gtk_cell_layout_set_attributes(GTK_CELL_LAYOUT(widget),
renderer, "text", 0, NULL);
}
}
g_slist_free(all_objects);
}