[gtk+] GtkSearchBar: Don't show a close button by default



commit dbee6e1b56bf5cb11633f2f0fc038f60d26ec1ae
Author: Bastien Nocera <hadess hadess net>
Date:   Fri Jul 5 16:05:56 2013 +0200

    GtkSearchBar: Don't show a close button by default
    
    And mention in which cases we should show one in the documentation.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=703656

 gtk/gtksearchbar.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtksearchbar.c b/gtk/gtksearchbar.c
index 67a5eaa..330fdb2 100644
--- a/gtk/gtksearchbar.c
+++ b/gtk/gtksearchbar.c
@@ -398,7 +398,7 @@ gtk_search_bar_class_init (GtkSearchBarClass *klass)
   widget_props[PROP_SHOW_CLOSE_BUTTON] = g_param_spec_boolean ("show-close-button",
                                                                P_("Show Close Button"),
                                                                P_("Whether to show the close button in the 
toolbar"),
-                                                               TRUE,
+                                                               FALSE,
                                                                G_PARAM_READWRITE | G_PARAM_CONSTRUCT);
 
   g_object_class_install_properties (object_class, LAST_PROPERTY, widget_props);
@@ -540,7 +540,10 @@ gtk_search_bar_get_show_close_button (GtkSearchBar *bar)
  * @bar: a #GtkSearchBar
  * @visible: whether the close button will be shown or not
  *
- * Shows or hides the close button.
+ * Shows or hides the close button. Applications that
+ * already have a "search" toggle button should not show a close
+ * button in their search bar, as it duplicates the role of the
+ * toggle button.
  *
  * Since: 3.10
  */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]