GNOME Bugzilla – Bug 733594
universal-cp: Avoid deprecated GTK+ widget/property use
Last modified: 2019-02-22 05:57:36 UTC
This should silence the deprecation warnings for universal-cp for some time. The UI conversion is not pixel perfect but it's pretty close.
Created attachment 281465 [details] [review] universal-cp: Remove deprecated GTK+ widget/property use Don't use Box, VBox, Hbox or Table: use Grid instead. Don't use HPaned or VPaned, use Paned instead. Don't use properties in Misc, but those in Widget. Stop using stock items. Remove size groups: Grid should be able to offer everything we need.
Actually, there is one case of size group usage that I didn't replicate yet: in and out argument entries can be different width (and I think they used to be the same). I can fix that...
Ah, nice. I started that but it looked horrible so I gave up.
Created attachment 281861 [details] [review] universal-cp: Remove deprecated GTK+ widget/property use Don't use Box, VBox, Hbox or Table: use Grid instead. Don't use HPaned or VPaned, use Paned instead. Don't use properties in Misc, but those in Widget. Stop using stock items.
Created attachment 281862 [details] [review] universal-cp: Workaround for Label alignment issues It seems Labels in a size group won't correctly align to start with GTK+ 3.13. Work around this by adding an extra container around each label, and adding the containers in the size group instead.
It's possible that I've missed something and the workaround patch isn't needed -- or that it's a bug that will be fixed. I'll follow up on that when I know more... so the patches can either go in or they can wait until I get that cleared up. With GTK master there's still one warning about Misc:xalign usage but I believe that's from GTK itself (GtkMenuItem).
According to bug 733981, that label alignment issue is in fact a GTK+ problem -- using GtkMisc or the workaround I used is required. I think these patches are ready to merge.
Do we need to bump the required GTK version in configure? Otherwise go ahead, please :)
I've not actually compiled it on 3.0, but it should work: Code does not use newer functions/properties and Glade reports no version mismatches with 3.0. I noticed one more VBox left in there: I'll remove that and then push.
The following fixes have been pushed: 4679e71 universal-cp: Workaround for Label alignment issues 80798bd universal-cp: Remove deprecated GTK+ widget/property use
Created attachment 282167 [details] [review] universal-cp: Workaround for Label alignment issues It seems Labels in a size group won't correctly align to start with GTK+ 3.13. Work around this by adding an extra container around each label, and adding the containers in the size group instead.
Created attachment 282168 [details] [review] universal-cp: Remove deprecated GTK+ widget/property use Don't use Box, VBox, Hbox or Table: use Grid instead. Don't use HPaned or VPaned, use Paned instead. Don't use properties in Misc, but those in Widget. Stop using stock items.