[gtk/text: 14/14] gtk-demo: Make the delayed search demo work



commit 037fa2f7ca5e957322990e813a3a8c64da813b2d
Author: Matthias Clasen <mclasen redhat com>
Date:   Sat Feb 16 23:59:39 2019 -0500

    gtk-demo: Make the delayed search demo work
    
    Make this demo work with the new search entry.

 demos/gtk-demo/search_entry2.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/demos/gtk-demo/search_entry2.c b/demos/gtk-demo/search_entry2.c
index 1b0aa15395..ea4bb62151 100644
--- a/demos/gtk-demo/search_entry2.c
+++ b/demos/gtk-demo/search_entry2.c
@@ -13,7 +13,7 @@ search_changed_cb (GtkSearchEntry *entry,
                    GtkLabel       *result_label)
 {
   const char *text;
-  text = gtk_entry_get_text (GTK_ENTRY (entry));
+  text = gtk_editable_get_text (GTK_EDITABLE (entry));
   g_message ("search changed: %s", text);
   gtk_label_set_text (result_label, text ? text : "");
 }
@@ -22,7 +22,7 @@ static void
 changed_cb (GtkEditable *editable)
 {
   const char *text;
-  text = gtk_entry_get_text (GTK_ENTRY (editable));
+  text = gtk_editable_get_text (GTK_EDITABLE (editable));
   g_message ("changed: %s", text);
 }
 
@@ -85,7 +85,7 @@ do_search_entry2 (GtkWidget *do_widget)
       gtk_widget_set_halign (container, GTK_ALIGN_CENTER);
       gtk_container_add (GTK_CONTAINER (container), entry);
       searchbar = gtk_search_bar_new ();
-      gtk_search_bar_connect_entry (GTK_SEARCH_BAR (searchbar), GTK_ENTRY (entry));
+      gtk_search_bar_connect_entry (GTK_SEARCH_BAR (searchbar), GTK_EDITABLE (entry));
       gtk_search_bar_set_show_close_button (GTK_SEARCH_BAR (searchbar), FALSE);
       gtk_container_add (GTK_CONTAINER (searchbar), container);
       gtk_container_add (GTK_CONTAINER (vbox), searchbar);


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