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 754243 - Hide GtkSearchBar when not searching
Hide GtkSearchBar when not searching
Status: RESOLVED DUPLICATE of bug 724096
Product: gtk+
Classification: Platform
Component: .General
3.17.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2015-08-28 14:31 UTC by Timm Bäder
Modified: 2016-02-15 14:48 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
GtkSearchBar: Hide the entire bar, not just the revealer (1.54 KB, patch)
2015-08-28 14:31 UTC, Timm Bäder
none Details | Review
Don't show the GtkSearchBar in GtkAppChooserDialog (1002 bytes, patch)
2015-08-28 14:32 UTC, Timm Bäder
needs-work Details | Review

Description Timm Bäder 2015-08-28 14:31:50 UTC
Created attachment 310191 [details] [review]
GtkSearchBar: Hide the entire bar, not just the revealer

It's the old "GtkSearchBar leaves a 1px high widget behind" problem. I vaguely remember there being an argument about not actually hiding the entire GtkSearchBar, but I don't remember the exact rationale, so here's a patch.

Apps still need fixing to not show their search bars at all, I'll attach another patch to do that in GtkAppChooserDialog.
Comment 1 Timm Bäder 2015-08-28 14:32:33 UTC
Created attachment 310192 [details] [review]
Don't show the GtkSearchBar in GtkAppChooserDialog
Comment 2 Matthias Clasen 2015-08-28 18:37:22 UTC
the underlying issue is discussed in bug 740640
Comment 3 Matthias Clasen 2015-09-01 04:50:27 UTC
Review of attachment 310192 [details] [review]:

As discussed on irc, I don't think this is right. It is vulerable to show_all. Conceptually, the search bar is visible - it is just in a mode that makes it hide itself. If you want to go this way, there needs to be an intermediate container which is protected from show_all, whose visiblity you can bind to search-mode-enabled.
Comment 4 Timm Bäder 2015-09-03 14:12:03 UTC
(In reply to Matthias Clasen from comment #3)
> Review of attachment 310192 [details] [review] [review]:
> 
> As discussed on irc, I don't think this is right. It is vulerable to
> show_all. Conceptually, the search bar is visible - it is just in a mode
> that makes it hide itself. If you want to go this way, there needs to be an
> intermediate container which is protected from show_all, whose visiblity you
> can bind to search-mode-enabled.

Did you review the wrong bug here? For this instance, we could just add a now-show-all=true.

I'm aware of course that this is just a workaround for the underlying problem you linked.
Comment 5 Matthias Clasen 2015-09-03 14:35:23 UTC
it is not a workaround if it doesn't work :-/
Comment 6 Timm Bäder 2015-09-03 14:37:38 UTC
What doesn't work? If you make sure to never actually show() the GtkSearchBar yourself, it should work fine?
Comment 7 Matthias Clasen 2015-09-03 14:40:06 UTC
(In reply to Timm Bäder from comment #6)
> What doesn't work? If you make sure to never actually show() the
> GtkSearchBar yourself, it should work fine?

Thats what I mean by "it doesn't work"... if you need to touch all the applications, nothing is won.
Comment 8 Timm Bäder 2015-09-03 14:54:50 UTC
The win is just that it now manages the visibility itself. Applications should already not be showing their search bars themselves (otherwise they would get the 1px strip of course). So if an app is currently showing it initially, they will still get the 1px strip they are used to anyway, it doesn't change that.

All apps that get it right already won't benefit either, they should already manage the visiblity themselves. But new users of GtkSearchBar have to jump a hurdle less when using it, and things like GtkAppChooserDialog can be fixed by simply not initally showing the GtkSearchBar.
Comment 9 Matthias Clasen 2016-01-23 06:34:54 UTC

*** This bug has been marked as a duplicate of bug 724096 ***