GNOME Bugzilla – Bug 695567
Add selection menu
Last modified: 2013-03-12 17:37:49 UTC
The patch is against the gjs-experiments branch since you applied the ui file stuff there and I need a ui file for the menu items
Created attachment 238523 [details] [review] Add selecttion menu Add the selection menu with "Select All" and "Select None".
Created attachment 238620 [details] [review] patch Rebased to apply to master
Review of attachment 238620 [details] [review]: ::: src/main.js @@ +77,3 @@ + + this.add_accelerator("Escape", "win.exit-selection-mode", null); + this.add_accelerator("<Primary>a", "win.select-all", null); The second accelerator is implied by the menu. ::: src/window.js @@ +313,3 @@ + _exitSelectionMode: function() { + this._worldView.set_selection_mode(false); Use GObject property setting, not setter functions (ie worldView.selection_mode = false;)
(In reply to comment #3) > + this.add_accelerator("<Primary>a", "win.select-all", null); > > The second accelerator is implied by the menu. > Unfortunately it is not, that only works for menus associated with the window, but the menu here is in a widget and the widget is not even displayed in some cases (ctrl+A should switch you to selection mode even if you are not) On the other hand I also need to keep it in the menu definition otherwise the shortcut is not shown
Ah, bad gtk+! Looks good then.
amended the setter and pushed.