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 769772 - Improve the search bar
Improve the search bar
Status: RESOLVED OBSOLETE
Product: gnome-music
Classification: Applications
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gnome-music-maint
gnome-music-maint
Depends on:
Blocks: 772128
 
 
Reported: 2016-08-11 22:53 UTC by Georges Basile Stavracas Neto
Modified: 2018-01-10 14:54 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
searchbar: use the proper arrow icon (1.54 KB, patch)
2016-08-11 22:53 UTC, Georges Basile Stavracas Neto
committed Details | Review
searchbar: don't use arbitrary width request (1.27 KB, patch)
2016-08-11 22:54 UTC, Georges Basile Stavracas Neto
needs-work Details | Review
searchbar: turn into a GtkSearchBar subclass (3.33 KB, patch)
2016-08-11 22:54 UTC, Georges Basile Stavracas Neto
committed Details | Review
window: don't show search bar's bottom border (1.02 KB, patch)
2016-08-11 23:04 UTC, Georges Basile Stavracas Neto
committed Details | Review

Description Georges Basile Stavracas Neto 2016-08-11 22:53:53 UTC
The search bar looks quite broken with the latest
GNOME stack. The following patches improve the
situation.
Comment 1 Georges Basile Stavracas Neto 2016-08-11 22:53:59 UTC
Created attachment 333150 [details] [review]
searchbar: use the proper arrow icon

GtkArrow is a deprecated class and shouldn't be used
anymore. Instead, the GNOME-ish way is to use the
'pan-down-symbolic' icon.

This patch, then, replaces the deprecated GtkArrow and
uses a GtkImage with pan-down-symbolic icon instead.
Comment 2 Georges Basile Stavracas Neto 2016-08-11 22:54:10 UTC
Created attachment 333151 [details] [review]
searchbar: don't use arbitrary width request

Setting the width-request to an arbitrary value in
pixel-unit is a bad idea, since it doesn't reflect
the font the user uses.

Instead, use the width-chars property which properly
calculates the width based on the font size.
Comment 3 Georges Basile Stavracas Neto 2016-08-11 22:54:21 UTC
Created attachment 333152 [details] [review]
searchbar: turn into a GtkSearchBar subclass

Gtk already ships a widget that is ideal to use
on search. GNOME Music, however, uses a toolbar
and add the search widgets as toolbar items, which
causes various flaws on the UI - the major one
being not looking like a searchbar anymore.

This patch makes the searchbar a GtkSearchBar subclass
and adapts the code to treat it as such.
Comment 4 Georges Basile Stavracas Neto 2016-08-11 23:04:03 UTC
Created attachment 333153 [details] [review]
window: don't show search bar's bottom border

A hackish solution to a hackish problem.
Comment 5 Marinus Schraal 2016-08-12 14:00:46 UTC
Review of attachment 333153 [details] [review]:

ok, can be joined with the searchbar class patch
Comment 6 Marinus Schraal 2016-08-12 14:00:54 UTC
Review of attachment 333152 [details] [review]:

makes sense. minor formatting nitpick, other than that good to go.

::: gnomemusic/window.py
@@ +393,3 @@
         # Make sure we skip unprintable chars and don't grab space press
         # (this is used for play/pause)
+        if not self.toolbar.searchbar.get_search_mode() and not event.keyval == Gdk.KEY_space:

multiple conditions within parenthesis, with binary operator on newline (pep8)
 
if (not foo
        and not bar)
Comment 7 Marinus Schraal 2016-08-12 14:03:03 UTC
Review of attachment 333151 [details] [review]:

This is one I am not 100% sold on, with the tags this results in a size changing entry field. I'm all for the width-char property, but the size shouldn't change on changing tags.
Comment 8 Marinus Schraal 2016-08-12 14:04:54 UTC
Review of attachment 333150 [details] [review]:

nobrainer, good
Comment 9 Marinus Schraal 2016-08-12 14:06:40 UTC
I'd say if we can solve the resizing of the entry fueld, then just rebase to 1 patch and good to go.
Comment 10 Marinus Schraal 2016-08-16 14:23:05 UTC
Thanks for the patches.

Just leaves the sizing issue open. Probably needs fixing in gdtaggedentry I guess.
Comment 11 GNOME Infrastructure Team 2018-01-10 14:54:27 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/71.