[alsa-devel] [PATCH - hwmixvolume 5/9] hwmixvolume: replace deprecated Gtk.HScale with Gtk.Scale

Emmanuel Gil Peyrot linkmauve at jabberfr.org
Wed Aug 8 17:56:33 CEST 2018


Signed-off-by: Emmanuel Gil Peyrot <linkmauve at linkmauve.fr>

diff --git a/hwmixvolume/hwmixvolume b/hwmixvolume/hwmixvolume
index e82f32d..af0c1e0 100755
--- a/hwmixvolume/hwmixvolume
+++ b/hwmixvolume/hwmixvolume
@@ -69,7 +69,7 @@ class Stream:
                     step_incr=1,
                     page_incr=(info.max-info.min+1)/8)
             adj.connect('value-changed', self.update_ctl_from_scale, i)
-            scale = Gtk.HScale(adj)
+            scale = Gtk.Scale(orientation=Gtk.Orientation.HORIZONTAL, adjustment=adj)
             scale.set_draw_value(False)
             self.parent.scales_vbox.add(scale)
             self.scales.append(scale)
@@ -207,7 +207,7 @@ class MixerWindow(Gtk.Window):
         label.set_single_line_mode(True)
         line_height = label.size_request().height
         label.destroy()
-        scale = Gtk.HScale()
+        scale = Gtk.Scale(orientation=Gtk.Orientation.HORIZONTAL)
         scale.set_draw_value(False)
         line_height += scale.size_request().height
         scale.destroy()
-- 
2.18.0



More information about the Alsa-devel mailing list