summaryrefslogtreecommitdiff
path: root/src/gpm-prefs-core.c
diff options
context:
space:
mode:
authorStefano Karapetsas <[email protected]>2012-03-20 17:40:58 +0100
committerStefano Karapetsas <[email protected]>2012-03-20 17:40:58 +0100
commitd86ae86e6cd5a87547434b416b79fc677d9b3ae9 (patch)
tree94a345506bc0ef25c52443ec33af516012e7d136 /src/gpm-prefs-core.c
parent352827e8a19139a4bb9ff5cfde3fa86841260d65 (diff)
downloadmate-power-manager-d86ae86e6cd5a87547434b416b79fc677d9b3ae9.tar.bz2
mate-power-manager-d86ae86e6cd5a87547434b416b79fc677d9b3ae9.tar.xz
fix gpm-prefs, need to fix gpm-statistics
Diffstat (limited to 'src/gpm-prefs-core.c')
-rw-r--r--src/gpm-prefs-core.c28
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
}
/**