diff options
author | monsta <[email protected]> | 2016-01-21 13:59:29 +0300 |
---|---|---|
committer | monsta <[email protected]> | 2016-01-21 13:59:29 +0300 |
commit | bf1e6a0ab5cf10d66fb269c208cec57496582eab (patch) | |
tree | 10f792efd0272b9ed988d7e7d4f27138e44bb178 /applets/brightness | |
parent | d52facf76b881eed5c25175316122ee615a63b72 (diff) | |
download | mate-power-manager-bf1e6a0ab5cf10d66fb269c208cec57496582eab.tar.bz2 mate-power-manager-bf1e6a0ab5cf10d66fb269c208cec57496582eab.tar.xz |
[GTK+3] brightness applet: fix deprecated usage of Gtk{H,V}{Box,Scale}
Diffstat (limited to 'applets/brightness')
-rw-r--r-- | applets/brightness/brightness-applet.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/applets/brightness/brightness-applet.c b/applets/brightness/brightness-applet.c index d411273..e2ba076 100644 --- a/applets/brightness/brightness-applet.c +++ b/applets/brightness/brightness-applet.c @@ -650,10 +650,18 @@ gpm_applet_create_popup (GpmBrightnessApplet *applet) /* slider */ if (MATE_PANEL_APPLET_VERTICAL(orientation)) { +#if GTK_CHECK_VERSION (3, 0, 0) + applet->slider = gtk_scale_new_with_range (GTK_ORIENTATION_HORIZONTAL, 0, 100, 1); +#else applet->slider = gtk_hscale_new_with_range (0, 100, 1); +#endif gtk_widget_set_size_request (applet->slider, 100, -1); } else { +#if GTK_CHECK_VERSION (3, 0, 0) + applet->slider = gtk_scale_new_with_range (GTK_ORIENTATION_VERTICAL, 0, 100, 1); +#else applet->slider = gtk_vscale_new_with_range (0, 100, 1); +#endif gtk_widget_set_size_request (applet->slider, -1, 100); } gtk_range_set_inverted (GTK_RANGE(applet->slider), TRUE); @@ -675,9 +683,17 @@ gpm_applet_create_popup (GpmBrightnessApplet *applet) /* box */ if (MATE_PANEL_APPLET_VERTICAL(orientation)) { +#if GTK_CHECK_VERSION (3, 0, 0) + box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 1); +#else box = gtk_hbox_new (FALSE, 1); +#endif } else { +#if GTK_CHECK_VERSION (3, 0, 0) + box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 1); +#else box = gtk_vbox_new (FALSE, 1); +#endif } gtk_box_pack_start (GTK_BOX(box), applet->btn_plus, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX(box), applet->slider, TRUE, TRUE, 0); |