[alsa-devel] [PATCH - hwmixvolume v2 3/7] hwmixvolume: switch to GTK+ 3.0 and GLib 2.0

Emmanuel Gil Peyrot linkmauve at jabberfr.org
Wed Sep 19 15:36:27 CEST 2018


On Wed, Sep 19, 2018 at 10:22:48PM +0900, Takashi Sakamoto wrote:
> Hi,

Hi,

> 
> On Sep 18 2018 22:42, Emmanuel Gil Peyrot wrote:
> > From: Emmanuel Gil Peyrot <linkmauve at linkmauve.fr>
[…]
> > @@ -174,45 +174,48 @@ class MixerWindow(Gtk.Window):
> >           self.connect('destroy', lambda w: Gtk.main_quit())
> >           self.set_title("Hardware Mixer Volumes")
> > -        vbox = Gtk.VBox()
> > +        vbox = Gtk.Grid()
> > +        vbox.set_orientation(Gtk.Orientation.VERTICAL)
> 
> As long as I know, g-i of Gtk+3 has both of 'Gtk.VBox' and 'Gtk.HBox'.
> I don't object to this patchset if they satisfy your demand, however
> from my curiosity would I ask you the reason to use 'Gtk.Grid' instead
> of them? This patch includes no lines to add rows/colums and to me no
> requirement to use grid in this point.

The Gtk.VBox documentation[1] says:

“Deprecated since version 3.2: You can use Gtk.Box.new() with
Gtk.Orientation.VERTICAL instead, which is a quick and easy change. But
the recommendation is to switch to Gtk.Grid, since Gtk.Box is going to
go away eventually. See Migrating from other containers to GtkGrid.”

Since no backwards incompatible change can be made in GTK+ 3.x, it is
still present as of 3.24, but it has been removed in 4.0 and it’d be
nice to support this one already when it’ll be released. :)

> Thanks
> 
> Takashi Sakamoto

Thanks,

[1] https://lazka.github.io/pgi-docs/Gtk-3.0/classes/VBox.html

-- 
Emmanuel Gil Peyrot


More information about the Alsa-devel mailing list