From d86ae86e6cd5a87547434b416b79fc677d9b3ae9 Mon Sep 17 00:00:00 2001 From: Stefano Karapetsas Date: Tue, 20 Mar 2012 17:40:58 +0100 Subject: fix gpm-prefs, need to fix gpm-statistics --- src/gpm-prefs-core.c | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) (limited to 'src/gpm-prefs-core.c') diff --git a/src/gpm-prefs-core.c b/src/gpm-prefs-core.c index 7304d1a..a35b268 100644 --- a/src/gpm-prefs-core.c +++ b/src/gpm-prefs-core.c @@ -298,18 +298,22 @@ gpm_prefs_action_time_changed_cb (GtkWidget *widget, GpmPrefs *prefs) static void gpm_prefs_set_combo_simple_text (GtkWidget *combo_box) { - GtkCellRenderer *cell; - GtkListStore *store; - - store = gtk_list_store_new (1, G_TYPE_STRING); - gtk_combo_box_set_model (GTK_COMBO_BOX (combo_box), GTK_TREE_MODEL (store)); - g_object_unref (store); - - cell = gtk_cell_renderer_text_new (); - gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (combo_box), cell, TRUE); - gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (combo_box), cell, - "text", 0, - NULL); + #if !GTK_CHECK_VERSION (2, 24, 0) + GtkCellRenderer *cell; + GtkListStore *store; + + store = gtk_list_store_new (1, G_TYPE_STRING); + gtk_combo_box_set_model (GTK_COMBO_BOX (combo_box), GTK_TREE_MODEL (store)); + g_object_unref (store); + + cell = gtk_cell_renderer_text_new (); + gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (combo_box), cell, TRUE); + gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (combo_box), cell, + "text", 0, + NULL); + #else + // nothing to do with GTK_COMBO_BOX_TEXT + #endif } /** -- cgit v1.2.1