GNOME Bugzilla – Bug 789117
Ctrl+A keyboard shortcut doesn’t work on the search bar
Last modified: 2018-01-10 15:10:53 UTC
When I wish to replace the current search terms, it is faster and more convenient to press Ctrl+A and start typing right away than having to use the Backspace key. This works on many applications but not on GNOME Music. The current behaviour was introduced as a fix to bug #727522. My suggestion is the have the accelerator select the contents of the entry only when the search bar is visible and the selection mode is not active.
Created attachment 361768 [details] [review] window: Allow Ctrl+A to work on the search bar
Review of attachment 361768 [details] [review]: lgtm, minor code cleanup suggestion. ::: gnomemusic/window.py @@ +348,3 @@ + searchbar = self.toolbar.searchbar + if searchbar.get_search_mode(): + searchbar.show_bar(True, False) maybe make it: if (not self.toolbar._selectionMode and self.toolbar.searchbar.get_search_mode()):
Created attachment 361784 [details] [review] window: Allow Ctrl+A to work on the search bar Reworked the patch based on your feedback.
Ok, patch looks good, but while testing it didn't feel quite right just yet. It is utterly confusing that ctrl+a doesn't work in selection mode if that is what you are used to. I think whenever the searchbar is active and focused (as it should always be) it should get the ctrl+a. We could do this by adapting the logic (removing the selection not active conditional), however this doesn't feel quite right to me. I think we should maybe revisit the solution in the bug you mentioned and see if we can achieve the same thing (select all in the views) in some cleaner way. It feels like we're fixing a bad fix with another fix.
I have to agree with you. On an application like Nautilus, this is not an issue because the focus is allowed to leave the GdTaggedEntry object. Can this behaviour be applied here?
-- 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/gnome-music/issues/123.