All of lore.kernel.org
 help / color / mirror / Atom feed
From: Emmanuel Gil Peyrot <linkmauve@jabberfr.org>
To: patch@alsa-project.org
Cc: Emmanuel Gil Peyrot <linkmauve@jabberfr.org>,
	Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>,
	alsa-devel@alsa-project.org
Subject: [PATCH - hwmixvolume 6/9] hwmixvolume: fix deprecation warnings given by G_ENABLE_DIAGNOSTIC=1
Date: Wed,  8 Aug 2018 17:56:34 +0200	[thread overview]
Message-ID: <20180808155637.5592-7-linkmauve@jabberfr.org> (raw)
In-Reply-To: <20180808155637.5592-1-linkmauve@jabberfr.org>

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

diff --git a/hwmixvolume/hwmixvolume b/hwmixvolume/hwmixvolume
index af0c1e0..ec2d05d 100755
--- a/hwmixvolume/hwmixvolume
+++ b/hwmixvolume/hwmixvolume
@@ -60,7 +60,7 @@ class Stream:
         value = alsahcontrol.Value(self.element)
         value.read()
         values = value.get_tuple(TYPE_INTEGER, info.count)
-        self.label = Gtk.Label(self.get_label(info))
+        self.label = Gtk.Label.new(self.get_label(info))
         self.label.set_single_line_mode(True)
         self.parent.scales_vbox.add(self.label)
         for i in range(info.count):
@@ -201,15 +201,15 @@ class MixerWindow(Gtk.Window):
 
         self.scales_vbox = Gtk.Grid()
         self.scales_vbox.set_orientation(Gtk.Orientation.VERTICAL)
-        scrollwin.add_with_viewport(self.scales_vbox)
+        scrollwin.add(self.scales_vbox)
 
         label = Gtk.Label()
         label.set_single_line_mode(True)
-        line_height = label.size_request().height
+        line_height = max(label.get_size_request().height, 0)
         label.destroy()
         scale = Gtk.Scale(orientation=Gtk.Orientation.HORIZONTAL)
         scale.set_draw_value(False)
-        line_height += scale.size_request().height
+        line_height += max(scale.get_size_request().height, 0)
         scale.destroy()
         # always have space for at least four sliders
         scrollwin.set_size_request(width=-1, height=line_height*4+4)
@@ -267,7 +267,7 @@ class MixerWindow(Gtk.Window):
             else:
                 msg = "This card does not have stream controls."
             if not has_msg:
-                self.msg_label = Gtk.Label(msg)
+                self.msg_label = Gtk.Label.new(msg)
                 self.msg_label.set_vexpand(True)
                 self.scales_vbox.add(self.msg_label)
                 self.scales_vbox.show_all()
-- 
2.18.0

  parent reply	other threads:[~2018-08-08 15:56 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20180808155637.5592-1-linkmauve@jabberfr.org>
2018-08-08 15:56 ` [PATCH - hwmixvolume 1/9] hwmixvolume: replace PyGTK with gobject-introspection Emmanuel Gil Peyrot
2018-08-10 14:56   ` Takashi Iwai
2018-08-10 15:29     ` Emmanuel Gil Peyrot
2018-08-11  4:33     ` Takashi Sakamoto
2018-08-14  4:24     ` Takashi Sakamoto
2018-08-08 15:56 ` [PATCH - hwmixvolume 2/9] hwmixvolume: switch to GTK+ 3.0 Emmanuel Gil Peyrot
2018-08-08 15:56 ` [PATCH - hwmixvolume 3/9] hwmixvolume: use four spaces instead of one tab for indent Emmanuel Gil Peyrot
2018-08-08 15:56 ` [PATCH - hwmixvolume 4/9] hwmixvolume: use a with context to open files Emmanuel Gil Peyrot
2018-08-14  3:59   ` Takashi Sakamoto
2018-08-15 15:36     ` Takashi Sakamoto
2018-08-08 15:56 ` [PATCH - hwmixvolume 5/9] hwmixvolume: replace deprecated Gtk.HScale with Gtk.Scale Emmanuel Gil Peyrot
2018-08-08 15:56 ` Emmanuel Gil Peyrot [this message]
2018-08-08 15:56 ` [PATCH - hwmixvolume 7/9] hwmixvolume: switch the shebang to python, as it is now compatible with both 2 and 3 Emmanuel Gil Peyrot
2018-08-08 15:56 ` [PATCH - hwmixvolume 8/9] hwmixvolume: add my copyright Emmanuel Gil Peyrot
2018-08-08 15:56 ` [PATCH - hwmixvolume 9/9] hwmixvolume: mention the new dependencies in the README Emmanuel Gil Peyrot
2018-08-14  3:43   ` Takashi Sakamoto

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180808155637.5592-7-linkmauve@jabberfr.org \
    --to=linkmauve@jabberfr.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=linkmauve@linkmauve.fr \
    --cc=patch@alsa-project.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.