summaryrefslogtreecommitdiff
path: root/src/profile-editor.c
diff options
context:
space:
mode:
authorLaszlo Boros <[email protected]>2013-08-02 14:22:42 +0200
committerStefano Karapetsas <[email protected]>2013-08-11 16:53:33 +0200
commit9537fb9c0567157ca181c106c9c79756cee541bd (patch)
tree2aaa7562a71c5405bac3b170f568c3bd5929bb19 /src/profile-editor.c
parentff67cbbd09a93cd247a0228896a354181f564691 (diff)
downloadmate-terminal-9537fb9c0567157ca181c106c9c79756cee541bd.tar.bz2
mate-terminal-9537fb9c0567157ca181c106c9c79756cee541bd.tar.xz
GTK3 support
Diffstat (limited to 'src/profile-editor.c')
-rw-r--r--src/profile-editor.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/profile-editor.c b/src/profile-editor.c
index 4cf2af6..f3eb4e1 100644
--- a/src/profile-editor.c
+++ b/src/profile-editor.c
@@ -522,6 +522,31 @@ reset_compat_defaults_cb (GtkWidget *button,
static void
init_color_scheme_menu (GtkWidget *combo_box)
{
+ #if GTK_CHECK_VERSION(3, 0, 0)
+
+ GtkCellRenderer *renderer;
+ GtkTreeIter iter;
+ GtkListStore *store;
+ int i;
+
+ store = gtk_list_store_new (1, G_TYPE_STRING);
+ for (i = 0; i < G_N_ELEMENTS (color_schemes); ++i)
+ gtk_list_store_insert_with_values (store, &iter, -1,
+ 0, _(color_schemes[i].name),
+ -1);
+ gtk_list_store_insert_with_values (store, &iter, -1,
+ 0, _("Custom"),
+ -1);
+
+ gtk_combo_box_set_model (GTK_COMBO_BOX (combo_box), GTK_TREE_MODEL (store));
+ g_object_unref (store);
+
+ renderer = gtk_cell_renderer_text_new ();
+ gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (combo_box), renderer, TRUE);
+ gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (combo_box), renderer, "text", 0, NULL);
+
+ #else
+
int i;
i = G_N_ELEMENTS (color_schemes);
@@ -530,6 +555,8 @@ init_color_scheme_menu (GtkWidget *combo_box)
gtk_combo_box_prepend_text (GTK_COMBO_BOX (combo_box),
_(color_schemes[--i].name));
}
+
+ #endif
}
static char*