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 709745 - GtkSearchBar example problems
GtkSearchBar example problems
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: Other
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2013-10-09 15:27 UTC by Xavier Claessens
Modified: 2013-10-10 18:49 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add example app for GtkSearchBar (2.43 KB, patch)
2013-10-09 15:59 UTC, Xavier Claessens
none Details | Review
GtkSearchBar: replace incomplete example with a real one (1.56 KB, patch)
2013-10-09 15:59 UTC, Xavier Claessens
none Details | Review

Description Xavier Claessens 2013-10-09 15:27:37 UTC
In the doc, Example 27. Creating a search bar, has some issues:

1) gtk_container_add (GTK_CONTAINER (searchbar), box); --> searchbar does not exist, it is "bar".

2) gtk_widget_show() is missing on bar, entry, box and menu_button. It is particularly important to note that gtk_widget_show() is required on the GtkSearchBar itself, since it could be confusing because it hides/shows itself.

We are also missing an example app that demonstrate how it works, so I suggest writing one and including the .c file in the doc. I like full examples that actually build in the doc :-)

Patch coming...
Comment 1 Xavier Claessens 2013-10-09 15:59:10 UTC
Created attachment 256828 [details] [review]
Add example app for GtkSearchBar
Comment 2 Xavier Claessens 2013-10-09 15:59:13 UTC
Created attachment 256830 [details] [review]
GtkSearchBar: replace incomplete example with a real one
Comment 3 Xavier Claessens 2013-10-09 16:00:30 UTC
Running that example app, I've seen a bug: the window can be shrinked smaller than the minimal size of the searchbar and then the search entry is not displayed anymore.
Comment 4 Xavier Claessens 2013-10-09 16:16:22 UTC
(In reply to comment #3)
> Running that example app, I've seen a bug: the window can be shrinked smaller
> than the minimal size of the searchbar and then the search entry is not
> displayed anymore.

Reported separately in bug #709751
Comment 5 Xavier Claessens 2013-10-10 18:49:07 UTC
Patches reviewed by Matthias and merged.