After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 789117 - Ctrl+A keyboard shortcut doesn’t work on the search bar
Ctrl+A keyboard shortcut doesn’t work on the search bar
Status: RESOLVED OBSOLETE
Product: gnome-music
Classification: Applications
Component: general
3.26.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-music-maint
gnome-music-maint
Depends on:
Blocks:
 
 
Reported: 2017-10-17 20:01 UTC by Dimitrios Christidis
Modified: 2018-01-10 15:10 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
window: Allow Ctrl+A to work on the search bar (1.39 KB, patch)
2017-10-17 20:02 UTC, Dimitrios Christidis
none Details | Review
window: Allow Ctrl+A to work on the search bar (1.42 KB, patch)
2017-10-18 08:01 UTC, Dimitrios Christidis
none Details | Review

Description Dimitrios Christidis 2017-10-17 20:01:12 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.
Comment 1 Dimitrios Christidis 2017-10-17 20:02:12 UTC
Created attachment 361768 [details] [review]
window: Allow Ctrl+A to work on the search bar
Comment 2 Marinus Schraal 2017-10-18 07:42:29 UTC
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()):
Comment 3 Dimitrios Christidis 2017-10-18 08:01:49 UTC
Created attachment 361784 [details] [review]
window: Allow Ctrl+A to work on the search bar

Reworked the patch based on your feedback.
Comment 4 Marinus Schraal 2017-10-19 10:45:11 UTC
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.
Comment 5 Dimitrios Christidis 2017-10-19 18:21:35 UTC
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?
Comment 6 GNOME Infrastructure Team 2018-01-10 15:10:53 UTC
-- 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.