diff options
Diffstat (limited to 'gtk')
-rw-r--r-- | gtk/gtkcustompaperunixdialog.c | 2 | ||||
-rw-r--r-- | gtk/gtkentrycompletion.c | 3 | ||||
-rw-r--r-- | gtk/gtkmountoperation.c | 2 | ||||
-rw-r--r-- | gtk/gtkplacessidebar.c | 2 | ||||
-rw-r--r-- | gtk/gtkshortcutswindow.c | 5 | ||||
-rw-r--r-- | gtk/gtkstacksidebar.c | 2 | ||||
-rw-r--r-- | gtk/inspector/controllers.c | 2 | ||||
-rw-r--r-- | gtk/inspector/prop-editor.c | 7 |
8 files changed, 13 insertions, 12 deletions
diff --git a/gtk/gtkcustompaperunixdialog.c b/gtk/gtkcustompaperunixdialog.c index d6a87cdf6f..e664c595cd 100644 --- a/gtk/gtkcustompaperunixdialog.c +++ b/gtk/gtkcustompaperunixdialog.c @@ -1045,7 +1045,7 @@ populate_dialog (GtkCustomPaperUnixDialog *dialog) gtk_tree_view_append_column (GTK_TREE_VIEW (treeview), column); - gtk_container_add (GTK_CONTAINER (scrolled), treeview); + gtk_scrolled_window_set_child (GTK_SCROLLED_WINDOW (scrolled), treeview); gtk_widget_show (treeview); toolbar = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); diff --git a/gtk/gtkentrycompletion.c b/gtk/gtkentrycompletion.c index 5ab7fb828a..2aa691fe65 100644 --- a/gtk/gtkentrycompletion.c +++ b/gtk/gtkentrycompletion.c @@ -605,7 +605,8 @@ gtk_entry_completion_constructed (GObject *object) priv->vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); gtk_frame_set_child (GTK_FRAME (popup_frame), priv->vbox); - gtk_container_add (GTK_CONTAINER (priv->scrolled_window), priv->tree_view); + gtk_scrolled_window_set_child (GTK_SCROLLED_WINDOW (priv->scrolled_window), + priv->tree_view); gtk_widget_set_hexpand (priv->scrolled_window, TRUE); gtk_widget_set_vexpand (priv->scrolled_window, TRUE); gtk_container_add (GTK_CONTAINER (priv->vbox), priv->scrolled_window); diff --git a/gtk/gtkmountoperation.c b/gtk/gtkmountoperation.c index d1eb782079..e58bae6ac6 100644 --- a/gtk/gtkmountoperation.c +++ b/gtk/gtkmountoperation.c @@ -1591,7 +1591,7 @@ create_show_processes_dialog (GtkMountOperation *op, GTK_POLICY_AUTOMATIC); gtk_scrolled_window_set_has_frame (GTK_SCROLLED_WINDOW (scrolled_window), TRUE); - gtk_container_add (GTK_CONTAINER (scrolled_window), tree_view); + gtk_scrolled_window_set_child (GTK_SCROLLED_WINDOW (scrolled_window), tree_view); gtk_container_add (GTK_CONTAINER (vbox), scrolled_window); controller = gtk_shortcut_controller_new (); diff --git a/gtk/gtkplacessidebar.c b/gtk/gtkplacessidebar.c index 6ba5cd3a5c..178c3bde66 100644 --- a/gtk/gtkplacessidebar.c +++ b/gtk/gtkplacessidebar.c @@ -3810,7 +3810,7 @@ gtk_places_sidebar_init (GtkPlacesSidebar *sidebar) sidebar->row_placeholder = NULL; sidebar->dragging_over = FALSE; - gtk_container_add (GTK_CONTAINER (sidebar->swin), sidebar->list_box); + gtk_scrolled_window_set_child (GTK_SCROLLED_WINDOW (sidebar->swin), sidebar->list_box); sidebar->hostname = g_strdup (_("Computer")); sidebar->hostnamed_cancellable = g_cancellable_new (); diff --git a/gtk/gtkshortcutswindow.c b/gtk/gtkshortcutswindow.c index 168dce4dc1..375086e159 100644 --- a/gtk/gtkshortcutswindow.c +++ b/gtk/gtkshortcutswindow.c @@ -972,14 +972,13 @@ gtk_shortcuts_window_init (GtkShortcutsWindow *self) self, G_CONNECT_SWAPPED); - scroller = g_object_new (GTK_TYPE_SCROLLED_WINDOW, - NULL); + scroller = gtk_scrolled_window_new (NULL, NULL); box = g_object_new (GTK_TYPE_BOX, "halign", GTK_ALIGN_CENTER, "orientation", GTK_ORIENTATION_VERTICAL, NULL); gtk_widget_add_css_class (GTK_WIDGET (box), "shortcuts-search-results"); - gtk_container_add (GTK_CONTAINER (scroller), GTK_WIDGET (box)); + gtk_scrolled_window_set_child (GTK_SCROLLED_WINDOW (scroller), GTK_WIDGET (box)); gtk_stack_add_named (priv->stack, scroller, "internal-search"); priv->search_shortcuts = g_object_new (GTK_TYPE_BOX, diff --git a/gtk/gtkstacksidebar.c b/gtk/gtkstacksidebar.c index 84953d7845..8dfed9c749 100644 --- a/gtk/gtkstacksidebar.c +++ b/gtk/gtkstacksidebar.c @@ -166,7 +166,7 @@ gtk_stack_sidebar_init (GtkStackSidebar *self) self->list = GTK_LIST_BOX (gtk_list_box_new ()); - gtk_container_add (GTK_CONTAINER (sw), GTK_WIDGET (self->list)); + gtk_scrolled_window_set_child (GTK_SCROLLED_WINDOW (sw), GTK_WIDGET (self->list)); gtk_list_box_set_header_func (self->list, update_header, self, NULL); diff --git a/gtk/inspector/controllers.c b/gtk/inspector/controllers.c index 280fbe9154..95b9ff3efa 100644 --- a/gtk/inspector/controllers.c +++ b/gtk/inspector/controllers.c @@ -80,7 +80,7 @@ gtk_inspector_controllers_init (GtkInspectorControllers *sl) "margin-top", 60, "margin-bottom", 30, NULL); - gtk_container_add (GTK_CONTAINER (sw), box); + gtk_scrolled_window_set_child (GTK_SCROLLED_WINDOW (sw), box); gtk_widget_set_hexpand (box, TRUE); gtk_widget_set_vexpand (box, TRUE); diff --git a/gtk/inspector/prop-editor.c b/gtk/inspector/prop-editor.c index 04c8d20dee..94d4577c6d 100644 --- a/gtk/inspector/prop-editor.c +++ b/gtk/inspector/prop-editor.c @@ -41,6 +41,7 @@ #include "gtkspinbutton.h" #include "gtksettingsprivate.h" #include "gtktogglebutton.h" +#include "gtkviewport.h" #include "gtkwidgetprivate.h" #include "gtkcssnodeprivate.h" #include "gtklistbox.h" @@ -574,7 +575,7 @@ flags_changed (GObject *object, GParamSpec *pspec, gpointer data) popover = gtk_menu_button_get_popover (GTK_MENU_BUTTON (data)); sw = gtk_popover_get_child (GTK_POPOVER (popover)); - viewport = gtk_bin_get_child (GTK_BIN (sw)); + viewport = gtk_scrolled_window_get_child (GTK_SCROLLED_WINDOW (sw)); box = gtk_viewport_get_child (GTK_VIEWPORT (viewport)); children = gtk_container_get_children (GTK_CONTAINER (box)); @@ -957,7 +958,7 @@ property_editor (GObject *object, NULL); box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); gtk_widget_show (box); - gtk_container_add (GTK_CONTAINER (sw), box); + gtk_scrolled_window_set_child (GTK_SCROLLED_WINDOW (sw), box); fclass = G_FLAGS_CLASS (g_type_class_ref (spec->value_type)); @@ -1034,7 +1035,7 @@ property_editor (GObject *object, gtk_list_box_bind_model (GTK_LIST_BOX (box), model, create_row, editor, NULL); g_object_unref (model); - gtk_container_add (GTK_CONTAINER (sw), box); + gtk_scrolled_window_set_child (GTK_SCROLLED_WINDOW (sw), box); } else if (type == G_TYPE_PARAM_OBJECT) { |