diff options
author | Matthias Clasen <mclasen@redhat.com> | 2020-05-02 00:51:20 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2020-05-04 22:53:07 -0400 |
commit | 67759d4c3ee28bbff9a4ec17f2044822ba732282 (patch) | |
tree | 96f80ce99c575bb0ad3c0560cf117e89dd1059b5 /examples/application10 | |
parent | 54b613392bb630108340259c84baac4d518fb444 (diff) | |
download | gtk+-67759d4c3ee28bbff9a4ec17f2044822ba732282.tar.gz |
Use gtk_scrolled_window_set_child throughout
Replace all uses of gtk_container_add on popovers
by gtk_scrolled_window_set_child.
Diffstat (limited to 'examples/application10')
-rw-r--r-- | examples/application10/exampleappwin.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/application10/exampleappwin.c b/examples/application10/exampleappwin.c index 31f527b128..16a8658f36 100644 --- a/examples/application10/exampleappwin.c +++ b/examples/application10/exampleappwin.c @@ -37,7 +37,7 @@ search_text_changed (GtkEntry *entry, return; tab = gtk_stack_get_visible_child (GTK_STACK (win->stack)); - view = gtk_bin_get_child (GTK_BIN (tab)); + view = gtk_scrolled_window_get_child (GTK_SCROLLED_WINDOW (tab)); buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (view)); /* Very simple-minded search implementation */ @@ -77,7 +77,7 @@ update_words (ExampleAppWindow *win) if (tab == NULL) return; - view = gtk_bin_get_child (GTK_BIN (tab)); + view = gtk_scrolled_window_get_child (GTK_SCROLLED_WINDOW (tab)); buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (view)); strings = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL); @@ -130,7 +130,7 @@ update_lines (ExampleAppWindow *win) if (tab == NULL) return; - view = gtk_bin_get_child (GTK_BIN (tab)); + view = gtk_scrolled_window_get_child (GTK_SCROLLED_WINDOW (tab)); buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (view)); count = gtk_text_buffer_get_line_count (buffer); @@ -266,7 +266,7 @@ example_app_window_open (ExampleAppWindow *win, view = gtk_text_view_new (); gtk_text_view_set_editable (GTK_TEXT_VIEW (view), FALSE); gtk_text_view_set_cursor_visible (GTK_TEXT_VIEW (view), FALSE); - gtk_container_add (GTK_CONTAINER (scrolled), view); + gtk_scrolled_window_set_child (GTK_SCROLLED_WINDOW (scrolled), view); gtk_stack_add_titled (GTK_STACK (win->stack), scrolled, basename, basename); buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (view)); |