profile-editor: render text in color scheme combobox

As we use gtk3 only code we can remove that in UI file,
finaly fix for https://github.com/mate-desktop/mate-terminal/issues/103
master-1.22
raveit65 2016-06-11 16:16:34 +02:00
parent f770de3b81
commit bf2b46a27d
2 changed files with 4 additions and 11 deletions

View File

@ -519,7 +519,7 @@ reset_compat_defaults_cb (GtkWidget *button,
*/ */
static void static void
init_color_scheme_menu (GtkWidget *combo_box) init_color_scheme_menu (GtkWidget *widget)
{ {
GtkCellRenderer *renderer; GtkCellRenderer *renderer;
GtkTreeIter iter; GtkTreeIter iter;
@ -535,13 +535,12 @@ init_color_scheme_menu (GtkWidget *combo_box)
0, _("Custom"), 0, _("Custom"),
-1); -1);
gtk_combo_box_set_model (GTK_COMBO_BOX (combo_box), GTK_TREE_MODEL (store)); gtk_combo_box_set_model (GTK_COMBO_BOX (widget), GTK_TREE_MODEL (store));
g_object_unref (store); g_object_unref (store);
renderer = gtk_cell_renderer_text_new (); renderer = gtk_cell_renderer_text_new ();
/*FIXME, avoid double loading of color schemes names from UI file */ gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (widget), renderer, TRUE);
/* gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (combo_box), renderer, TRUE); gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (widget), renderer, "text", 0, NULL);
gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (combo_box), renderer, "text", 0, NULL);*/
} }
static char* static char*

View File

@ -1398,12 +1398,6 @@
<property name="add_tearoffs">False</property> <property name="add_tearoffs">False</property>
<property name="focus_on_click">True</property> <property name="focus_on_click">True</property>
<property name="model">model4</property> <property name="model">model4</property>
<child>
<object class="GtkCellRendererText" id="renderer4"/>
<attributes>
<attribute name="text">0</attribute>
</attributes>
</child>
</object> </object>
<packing> <packing>
<property name="padding">0</property> <property name="padding">0</property>