[gtk/wip/baedert/for-master: 31/58] searchbar: Use proper getter in _get_property()



commit 9efd14c858722b1c491bcbaf1fdcc95d27e01566
Author: Timm Bäder <mail baedert org>
Date:   Tue Jan 28 13:51:56 2020 +0100

    searchbar: Use proper getter in _get_property()
    
    Instead of retuning a seemingly random boolean, just use
    gtk_search_bar_get_search_mode().

 gtk/gtksearchbar.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
---
diff --git a/gtk/gtksearchbar.c b/gtk/gtksearchbar.c
index 18ed0d66e3..484e97342c 100644
--- a/gtk/gtksearchbar.c
+++ b/gtk/gtksearchbar.c
@@ -222,12 +222,11 @@ gtk_search_bar_get_property (GObject    *object,
                              GParamSpec *pspec)
 {
   GtkSearchBar *bar = GTK_SEARCH_BAR (object);
-  GtkSearchBarPrivate *priv = gtk_search_bar_get_instance_private (bar);
 
   switch (prop_id)
     {
     case PROP_SEARCH_MODE_ENABLED:
-      g_value_set_boolean (value, priv->reveal_child);
+      g_value_set_boolean (value, gtk_search_bar_get_search_mode (bar));
       break;
     case PROP_SHOW_CLOSE_BUTTON:
       g_value_set_boolean (value, gtk_search_bar_get_show_close_button (bar));


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