summaryrefslogtreecommitdiff
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
parent352827e8a19139a4bb9ff5cfde3fa86841260d65 (diff)
downloadmate-power-manager-d86ae86e6cd5a87547434b416b79fc677d9b3ae9.tar.bz2
mate-power-manager-d86ae86e6cd5a87547434b416b79fc677d9b3ae9.tar.xz
fix gpm-prefs, need to fix gpm-statistics
-rw-r--r--configure.ac2
-rw-r--r--data/gpm-prefs.ui12
-rw-r--r--data/gpm-statistics-deprecated.ui (renamed from data/gpm-statistics-fix.ui)6
-rw-r--r--data/gpm-statistics.ui6
-rw-r--r--po/POTFILES.in2
-rw-r--r--src/gpm-prefs-core.c28
-rw-r--r--src/gpm-statistics.c33
7 files changed, 50 insertions, 39 deletions
diff --git a/configure.ac b/configure.ac
index 09a55aa..748a509 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,6 +1,6 @@
AC_PREREQ(2.63)
-AC_INIT([mate-power-manager], [1.2.0], [http://www.mate-desktop.org/])
+AC_INIT([mate-power-manager], [1.2.1], [http://www.mate-desktop.org/])
AC_CONFIG_SRCDIR(src)
AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION)
AM_INIT_AUTOMAKE([foreign])
diff --git a/data/gpm-prefs.ui b/data/gpm-prefs.ui
index 0efc33b..87a0f42 100644
--- a/data/gpm-prefs.ui
+++ b/data/gpm-prefs.ui
@@ -118,7 +118,7 @@
</packing>
</child>
<child>
- <object class="GtkComboBox" id="combobox_ac_computer">
+ <object class="GtkComboBoxText" id="combobox_ac_computer">
<property name="visible">True</property>
</object>
<packing>
@@ -236,7 +236,7 @@
</packing>
</child>
<child>
- <object class="GtkComboBox" id="combobox_ac_display">
+ <object class="GtkComboBoxText" id="combobox_ac_display">
<property name="visible">True</property>
</object>
<packing>
@@ -373,7 +373,7 @@
</packing>
</child>
<child>
- <object class="GtkComboBox" id="combobox_battery_computer">
+ <object class="GtkComboBoxText" id="combobox_battery_computer">
<property name="visible">True</property>
</object>
<packing>
@@ -521,7 +521,7 @@
</packing>
</child>
<child>
- <object class="GtkComboBox" id="combobox_battery_display">
+ <object class="GtkComboBoxText" id="combobox_battery_display">
<property name="visible">True</property>
</object>
<packing>
@@ -642,7 +642,7 @@
</packing>
</child>
<child>
- <object class="GtkComboBox" id="combobox_ups_computer">
+ <object class="GtkComboBoxText" id="combobox_ups_computer">
<property name="visible">True</property>
</object>
<packing>
@@ -775,7 +775,7 @@
</packing>
</child>
<child>
- <object class="GtkComboBox" id="combobox_ups_display">
+ <object class="GtkComboBoxText" id="combobox_ups_display">
<property name="visible">True</property>
</object>
<packing>
diff --git a/data/gpm-statistics-fix.ui b/data/gpm-statistics-deprecated.ui
index 80f3b9b..6b40dcd 100644
--- a/data/gpm-statistics-fix.ui
+++ b/data/gpm-statistics-deprecated.ui
@@ -93,7 +93,7 @@
</packing>
</child>
<child>
- <object class="GtkComboBoxText" id="combobox_history_type">
+ <object class="GtkComboBox" id="combobox_history_type">
<property name="visible">True</property>
</object>
<packing>
@@ -120,7 +120,7 @@
</packing>
</child>
<child>
- <object class="GtkComboBoxText" id="combobox_history_time">
+ <object class="GtkComboBox" id="combobox_history_time">
<property name="visible">True</property>
</object>
<packing>
@@ -260,7 +260,7 @@
</packing>
</child>
<child>
- <object class="GtkComboBoxText" id="combobox_stats_type">
+ <object class="GtkComboBox" id="combobox_stats_type">
<property name="visible">True</property>
</object>
<packing>
diff --git a/data/gpm-statistics.ui b/data/gpm-statistics.ui
index 6b40dcd..80f3b9b 100644
--- a/data/gpm-statistics.ui
+++ b/data/gpm-statistics.ui
@@ -93,7 +93,7 @@
</packing>
</child>
<child>
- <object class="GtkComboBox" id="combobox_history_type">
+ <object class="GtkComboBoxText" id="combobox_history_type">
<property name="visible">True</property>
</object>
<packing>
@@ -120,7 +120,7 @@
</packing>
</child>
<child>
- <object class="GtkComboBox" id="combobox_history_time">
+ <object class="GtkComboBoxText" id="combobox_history_time">
<property name="visible">True</property>
</object>
<packing>
@@ -260,7 +260,7 @@
</packing>
</child>
<child>
- <object class="GtkComboBox" id="combobox_stats_type">
+ <object class="GtkComboBoxText" id="combobox_stats_type">
<property name="visible">True</property>
</object>
<packing>
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 1e124a0..e26d395 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -11,7 +11,9 @@ data/mate-power-preferences.desktop.in.in
data/mate-power-statistics.desktop.in.in
[type: gettext/glade]data/gpm-feedback-widget.ui
[type: gettext/glade]data/gpm-statistics.ui
+[type: gettext/glade]data/gpm-statistics-deprecated.ui
[type: gettext/glade]data/gpm-prefs.ui
+[type: gettext/glade]data/gpm-prefs-deprecated.ui
policy/org.mate.power.policy.in2
src/gpm-backlight.c
src/gpm-backlight-helper.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
}
/**
diff --git a/src/gpm-statistics.c b/src/gpm-statistics.c
index d526617..38e2942 100644
--- a/src/gpm-statistics.c
+++ b/src/gpm-statistics.c
@@ -1478,18 +1478,22 @@ gpm_stats_points_checkbox_stats_cb (GtkWidget *widget, gpointer data)
static void
gpm_stats_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
}
/**
@@ -1603,10 +1607,11 @@ main (int argc, char *argv[])
builder = gtk_builder_new ();
#if GTK_CHECK_VERSION (2, 24, 0)
- retval = gtk_builder_add_from_file (builder, GPM_DATA "/gpm-statistics-fix.ui", &error);
- #else
retval = gtk_builder_add_from_file (builder, GPM_DATA "/gpm-statistics.ui", &error);
+ #else
+ retval = gtk_builder_add_from_file (builder, GPM_DATA "/gpm-statistics-deprecated.ui", &error);
#endif
+
if (retval == 0) {
egg_warning ("failed to load ui: %s", error->message);
g_error_free (error);