GNOME Bugzilla – Bug 652486
Gtk+ H/V Subclass Deprecations
Last modified: 2021-05-17 15:44:13 UTC
https://mail.gnome.org/archives/desktop-devel-list/2011-June/msg00078.html GtkHBox GtkVBox GtkHScale GtkVScale GtkHScrollbar GtkVScrollbar GtkHSeparator GtkVSeparator GtkHButtonBox GtkVButtonBox GtkHPaned GtkVPaned
Bug confirmed (important to keep in mind in the gtk+ 3 accerciser's version).
Created attachment 196034 [details] [review] Changing *HBox/*VBox to *Box There goes a simple patch that solves it. ;)
Created attachment 196184 [details] Raw output of grep for deprecations in accerciser's source code Hi Aline! Thanks a lot for this patch, but, I think that there are more code to move apart from these ui files. So, I attached a file with the output of the following command: grep -ri 'hbox\|vbox\|hscale\|vscale\|hscrollbar\|vscrollbar\|hseparator\|vseparator\|hbuttonbox\|vbuttonbox\|hpaned\|vpaned' src/ plugins/ plugindata/ This file contains all related gtk-deprecations, don't be afraid about the size, if you do something like: grep 'gtk.*' gtk-deprecations you'll see which .py files are creating these widgets. And, if you do something like: grep 'class=' gtk-deprecations you'll see which .ui files define these widgets. So, I hope this help you and thanks again for your help ;) Best regads!!
By the way/for what it's worth: When I did this work in Orca, I stumbled across the following [1]: > If you want your code to be future-proof, the recommendation is > to switch to GtkGrid, since GtkBox is going to be deprecated in > favor of the more flexible grid widget eventually. For more > information about migrating to GtkGrid, see Migrating from other > containers to GtkGrid GtkGrid also allows you to do the same thing as GtkTable which, I believe, is also slated for deprecation though not officially announced as such. Therefore, what I wound up doing in Orca is getting rid of GtkHBox, GtkVBox, GtkBox, and GtkTable and starting using GtkGrid. Orca is just teeming with future-prooficity now! ;-) What you and Javi decide to do is, of course, up to you. I just wanted you to be aware of what is coming down the pike as the one thing suckier than "yet another deprecation" IMHO is "yet another deprecation that you could have avoided had only you been properly informed." [1] http://developer.gnome.org/gtk3/unstable/GtkHBox.html
Thanks, Javi and Joanie!
Created attachment 197295 [details] [review] Deprecating HPaned, VPaned, and ButtonBoxes I deprecated VPaned, HPaned and ButtonBoxes. The remaining deprecations involve boxes. I'll follow Joanie's advice and change them to GtkGrids, but only if you're ok with it, Javi. Please let me know. =) PS.: Some variables are still called vpaned and hpaned, thoug they're gtk.Paned, because of legibility (their orientations either correspond to vertical or to horizontal). Though it's a partial patch, maybe it's useful enough to be incorporated the way it is. It's up to you, Javi. ;) Regards,
Hi! Regarding the GtkGrid, my opinion is to do the switch for to be more 'future-prooficity' too, as Joanie has suggested. Regarding the patch, since we're in hard-code freeze we'll wait for to do the full switch during the 3.4 cycle. At this moment, only bugfixing is allowed, and I think that this deprecation work isn't a bugfix. :( So, Aline, do the full switch, it will be necessary soon or later and you're going on the right way. :] I'm assigninng this bug to you .. if you're not ok with this, just shout! :P Thanks thanks thanks ... and Best Regards!!
Created attachment 200562 [details] [review] Deprecates GtkHPaned, GtkVPaned, GtkHButton, GtkVBox, GtkHBox and a couple of GtkBoxes Hey Javi! I'm having problems with conciliating college time and accerciser time, as you can see. =/ Also, considering that it's not being as trivial as I thought to migrate GtkBoxes to GtkGrids (they lose alignment and behave weird sometimes), I'm spending a lot of time to finish this... Help is appreciated with continuing the task, and if this is a top priority, perhaps it would be better to assign it to someone else... =/ Anyway, this GtkBox => GtkGrid is the only deprecation that is missing (I don't actually know how we'll deal with GtkTables yet). I solved the issue for main_window.py and I'm currently trying to extend this to message.py and other files. I'm sending the patch because it can be useful, specially if someone is interested in helping us extending this last migration to other files. Best,
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/accerciser/-/issues/36.