diff options
Diffstat (limited to 'src/gpm-prefs-core.c')
-rw-r--r-- | src/gpm-prefs-core.c | 28 |
1 files changed, 16 insertions, 12 deletions
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 } /** |