GNOME Bugzilla – Bug 743591
View popover - list/grid toggle has inconsistent behaviour
Last modified: 2015-02-03 17:39:23 UTC
The view popover stays open after you use any of the controls... except the grid/list toggle. It's inconsistent. It would be better if the toggle behaved the same as the other controls.
Adding to the 3.16 list, since this is an issue with a new feature.
It's gtk+ behaviour, moving to it.
the example for linked toggle radio buttons in gtk+/tests/testpopover behaves as expected.
(In reply to comment #3) > the example for linked toggle radio buttons in gtk+/tests/testpopover behaves > as expected. Allan is proposing that the linked buttons should dismiss the popover as well.
I'll let Allan comment, but I am pretty sure the intention is to have the linked toggles behave as the other controls and not dismiss the popover, rather than the opposite.
(In reply to comment #5) > I'll let Allan comment, but I am pretty sure the intention is to have the > linked toggles behave as the other controls and not dismiss the popover, rather > than the opposite. That's correct.
Oh, hmm. So, do we have some sort of rationale for what kind of controls will close the popover ? The current implementation in GTK+ closes just for straight buttons, and keeps the popover open for check buttons, radio buttons, scales, etc.
Matthias, is there a rationale for the existing behavior of buttons closing it?
"its what menus do" ?
The basic principle is "keep the popover open if it contains controls that are likely to require further adjustment". You could interpret that as: "don't close a popover after a state or range has been adjusted" (eg. radios, check boxes, switches, toggle buttons, sliders), although I'm not 100% that that will work for all cases.
Ok, I misunderstood it. So the popover in gtk+ is dismissing appropriately, like Allan wants. It's nautilus fault, because how nautilus implemented the creating of the menu in the port to gaction/gmenu. I'll figure out how to do it differently, currently we are recreating the menu when the view loads, so probably we will have to avoid that and instead only hide/show items.
So, actually I was wrong. After Cosimo changes after the merge of the gmenu port, we no longer recreate the menu after every view load, which is nice. So the problem was in other place (and is an old problem, not something from the port). See next patch
Created attachment 295940 [details] [review] nautilus-window-slot: Don't grab focus on view change We were grabbing the focus on view mode change, so if the user changed the view mode with keyboard he could continue using it. But it makes the problem that with the new popover menu in the toolbar where you can choose between different views while the menu is open, grabbing the focus to another widget dismiss the menu, which is against the behavior of the GtkMenuPopover. To fix that, don't grab focus on view changes. In the tests I have done, you can still focus the view just using the arrows after the view changes, so I don't think it will be a problem for keyboard users.
Looks good, pushed to master. Attachment 295940 [details] pushed as 982469e - nautilus-window-slot: Don't grab focus on view change