summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/gtk+/glade-gtk-scrolled-window.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/plugins/gtk+/glade-gtk-scrolled-window.c b/plugins/gtk+/glade-gtk-scrolled-window.c
index d0ea47be..ca3c6cab 100644
--- a/plugins/gtk+/glade-gtk-scrolled-window.c
+++ b/plugins/gtk+/glade-gtk-scrolled-window.c
@@ -66,10 +66,15 @@ glade_gtk_scrolled_window_add_child_verify (GladeWidgetAdaptor *adaptor,
GtkWidget *child,
gboolean user_feedback)
{
- GladeWidget *gcontainer = glade_widget_get_from_gobject (container);
- GladeWidget *gchild = glade_widget_get_from_gobject (child);
+ if (user_feedback)
+ {
+ GladeWidget *gcontainer = glade_widget_get_from_gobject (container);
+ GladeWidget *gchild = glade_widget_get_from_gobject (child);
- return !glade_util_check_and_warn_scrollable (gcontainer,
- glade_widget_get_adaptor (gchild),
- glade_app_get_window ());
+ return !glade_util_check_and_warn_scrollable (gcontainer,
+ glade_widget_get_adaptor (gchild),
+ glade_app_get_window ());
+ }
+ else
+ return GTK_IS_SCROLLED_WINDOW (container) && GTK_IS_SCROLLABLE (child);
}