GNOME Bugzilla – Bug 738480
Support GtkStack and GtkStackSwitcher
Last modified: 2016-08-10 09:09:49 UTC
These widgets are in GTK+ since 3.12, time that glade starts supporting them.
Created attachment 288418 [details] [review] Support GtkStack and GtkStackSwitcher
pushed a stack branch now
I've added editors for GtkStack and GtkStackSwitcher now. One thing that could be improved is to use a custom control for the visible-child-name property that offers only the names of the existing children. Maybe a combobox.
> I've added editors for GtkStack and GtkStackSwitcher now. > > One thing that could be improved is to use a custom control for the > visible-child-name property that offers only the names of the existing > children. Maybe a combobox. Yes a combo box would be great! BTW it could also be used as a way to switch between pages, (same as GtkNotebook "edit page" virtual property) which is needed to switch to an empty page since placeholders are not shown in the treeview. A few notes about the branch GtkStack: o child widget is not removed from the project when removing a page o removing last page, leave the widget without a way to add a new page (perhaps GtkStack needs an Append Page action) o title packing property needs a default value so switcher has something to show. GtkStackSwitcher: o stack property should have custom-layout="True" to avoid showing it twice
I think all of your comments should be fixed now. I ended up adding a virtual int property for the edited page, that was easier than making a custom combo for visible-child-name.
Taking an initial look at this: Stack: o 'Remove page' packing action should be disabled when there is only one page, as it allows a situation of a stack with no pages This is expecially undesirable because there is no direct 'append/prepend' page action, so it's unclear how to add a page to a pageless stack Alternatively we could just allow the stack to have 0 pages, and add a direct action on the stack object allowing one to append/prepend a page. Stack Switcher: o Weird things happen when double-clicking on one of the stack switcher pages. I get a popover with a search window listing a bunch of glade widgets, if I select a toplevel, it actually adds it to the project. Selecting a widget leaves an empty popover hovering there o The icon is a little sharp for this one and sort of stands out from the rest of the icons in the palette, would be nice to have an icon which uses the grays we normally use.
Today I did a full review. > Stack: > > o 'Remove page' packing action should be disabled when there is only one > page, > as it allows a situation of a stack with no pages > > This is expecially undesirable because there is no direct 'append/prepend' > page action, so it's unclear how to add a page to a pageless stack > > Alternatively we could just allow the stack to have 0 pages, and add > a direct action on the stack object allowing one to append/prepend a page. The above will really be nice to have, but I'm not blocking the merge based on this. > > Stack Switcher: > > o Weird things happen when double-clicking on one of the stack switcher > pages. > > I get a popover with a search window listing a bunch of glade widgets, > if I select a toplevel, it actually adds it to the project. > > Selecting a widget leaves an empty popover hovering there The above is my mistake, I wasn't aware of the feature Juan added, we should probably make it behave in a less intrusive/unexpected way. > o The icon is a little sharp for this one and sort of stands out from > the rest of the icons in the palette, would be nice to have an icon > which uses the grays we normally use. The above, again, would be really nice to have, but I really appreciate that you have been including icons in all your patches, we've went though stints where many widgets were added without icons. For what it's worth, the colors being used is not so very much of an issue, however the way the black on white behaves in the rounded corner is really yuck (the lack of antialiasing at this small size really stands out, compared to the rest of Glade's icons). Again, I wont block the merge on this. Finally, I've looked through all the added code, and it looks more or less sane except for one thing, which is the updating of child positions in the plugin when a position changes. However, this is not a problem that is particular to your branch, GtkBox adaptor and GtkNotebook both have 'issues' in this regard, so I also will not block the merge based on this. We rather need a real unilateral fix for handling the child positions, and it probably needs to be done in a custom editor for each of these classes, hopefully with some level of code sharing. All of that said, I'm mergeing the branch as is, I would really like a cleaner icon, and it would be nice to do something cleaner for the 0 page situation, but the base functionality as far as I can see is as good as it needs to be.
Comment on attachment 288418 [details] [review] Support GtkStack and GtkStackSwitcher Marking patch obsolete, code went onto the branch, and the branch is merged now.
I'm using Glade 3.18.3 and such widget is not available on the editor.
Created attachment 297286 [details] Load gnome-taquin/data/taquin.ui using glade (In reply to Tristan Van Berkom from comment #8) > Comment on attachment 288418 [details] [review] [review] > Support GtkStack and GtkStackSwitcher > > Marking patch obsolete, code went onto the branch, and the branch is merged > now. I couldn't get this to work, I tried to see gnome-taquin's data/taquin.ui using glade. [sahilsareen@localhost data]$ glade --version glade 3.18.3 Attaching a screenshot of what I saw on the glade screen.
which glade release is GtkStack supposed to be in?
In Glade 3.19.0 as per NEWS file below: https://github.com/GNOME/glade/blob/74b21b316c8d5c8176a479f275437d3a1da7fc21/NEWS Search for "738480" ( this bug no. ) in the page.