summaryrefslogtreecommitdiff
path: root/src/gpm-prefs-core.c
diff options
context:
space:
mode:
authorSteve Zesch <[email protected]>2011-12-24 16:45:32 -0500
committerSteve Zesch <[email protected]>2011-12-24 16:45:32 -0500
commit3893856a1e22cb62a9d36eca5ab96284859d0d19 (patch)
treec0093246af7d89757feb1543b1f1eafc266c09f6 /src/gpm-prefs-core.c
parentc3d4f773a0ecc3b824bfcd2d2d21470ca8a7b391 (diff)
downloadmate-power-manager-3893856a1e22cb62a9d36eca5ab96284859d0d19.tar.bz2
mate-power-manager-3893856a1e22cb62a9d36eca5ab96284859d0d19.tar.xz
Fixed gtk_widget_hide_all deprecation
Diffstat (limited to 'src/gpm-prefs-core.c')
-rw-r--r--src/gpm-prefs-core.c41
1 files changed, 35 insertions, 6 deletions
diff --git a/src/gpm-prefs-core.c b/src/gpm-prefs-core.c
index 0e3a06f..6b86a78 100644
--- a/src/gpm-prefs-core.c
+++ b/src/gpm-prefs-core.c
@@ -687,13 +687,28 @@ prefs_setup_ac (GpmPrefs *prefs)
if (prefs->priv->has_button_lid == FALSE) {
widget = GTK_WIDGET (gtk_builder_get_object (prefs->priv->builder, "hbox_ac_lid"));
- gtk_widget_hide_all (widget);
+ #if gtk_check_version (2, 24, 0)
+ gtk_widget_hide(widget);
+ #else
+ gtk_widget_hide_all (widget);
+ #endif
}
if (prefs->priv->has_lcd == FALSE) {
widget = GTK_WIDGET (gtk_builder_get_object (prefs->priv->builder, "hbox_ac_brightness"));
- gtk_widget_hide_all (widget);
+
+ #if gtk_check_version (2, 24, 0)
+ gtk_widget_hide(widget);
+ #else
+ gtk_widget_hide_all (widget);
+ #endif
+
widget = GTK_WIDGET (gtk_builder_get_object (prefs->priv->builder, "checkbutton_ac_display_dim"));
- gtk_widget_hide_all (widget);
+
+ #if gtk_check_version (2, 24, 0)
+ gtk_widget_hide(widget);
+ #else
+ gtk_widget_hide_all (widget);
+ #endif
}
}
@@ -766,11 +781,20 @@ prefs_setup_battery (GpmPrefs *prefs)
if (prefs->priv->has_button_lid == FALSE) {
widget = GTK_WIDGET (gtk_builder_get_object (prefs->priv->builder, "hbox_battery_lid"));
- gtk_widget_hide_all (widget);
+
+ #if gtk_check_version(2, 24, 0)
+ gtk_widget_hide(widget);
+ #else
+ gtk_widget_hide_all (widget);
+ #endif
}
if (prefs->priv->has_lcd == FALSE) {
widget = GTK_WIDGET (gtk_builder_get_object (prefs->priv->builder, "checkbutton_battery_display_dim"));
- gtk_widget_hide_all (widget);
+ #if gtk_check_version(2, 24, 0)
+ gtk_widget_hide(widget)
+ #else
+ gtk_widget_hide_all (widget);
+ #endif
}
}
@@ -851,7 +875,12 @@ prefs_setup_general (GpmPrefs *prefs)
if (prefs->priv->has_button_suspend == FALSE) {
widget = GTK_WIDGET (gtk_builder_get_object (prefs->priv->builder, "hbox_general_suspend"));
- gtk_widget_hide_all (widget);
+
+ #if gtk_check_version (2, 24, 0)
+ gtk_widget_hide(widget)
+ #else
+ gtk_widget_hide_all (widget);
+ #endif
}
}