Avoid GtkScrolledWindow members in KatzeScrolled

This commit is contained in:
Christian Dywan 2010-02-19 19:02:57 +01:00
parent e94edca766
commit daa04eaeb1

View file

@ -29,8 +29,9 @@
#define gtk_widget_set_window(wdgt, wndw) wdgt->window = wndw #define gtk_widget_set_window(wdgt, wndw) wdgt->window = wndw
#define gtk_widget_get_allocation (wdgt, alloc) *alloc = wdgt->allocation #define gtk_widget_get_allocation (wdgt, alloc) *alloc = wdgt->allocation
#define gtk_widget_is_drawable GTK_WIDGET_DRAWABLE #define gtk_widget_is_drawable GTK_WIDGET_DRAWABLE
#define gtk_widget_get_drawable GTK_WIDGET_VISIBLE
#endif #endif
#if !GTK_CHECK_VERSION (2, 20, 0) #if !GTK_CHECK_VERSION (2, 19, 6)
#define gtk_widget_set_realized(wdgt, real) \ #define gtk_widget_set_realized(wdgt, real) \
if (real) GTK_WIDGET_SET_FLAGS (wdgt, GTK_REALIZED); \ if (real) GTK_WIDGET_SET_FLAGS (wdgt, GTK_REALIZED); \
else GTK_WIDGET_UNSET_FLAGS (wdgt, GTK_REALIZED) else GTK_WIDGET_UNSET_FLAGS (wdgt, GTK_REALIZED)
@ -679,16 +680,20 @@ button_press_event (GtkWidget* widget,
priv->start_time = event->time; priv->start_time = event->time;
} }
if (priv->scrolling_hints && !GTK_SCROLLED_WINDOW (scrolled)->hscrollbar_visible && if (priv->scrolling_hints
adjust_scrollbar (scrolled, priv->horizontal_scrollbar_window, && !gtk_widget_get_visible (gtk_scrolled_window_get_hscrollbar (
GTK_SCROLLED_WINDOW (scrolled)))
&& adjust_scrollbar (scrolled, priv->horizontal_scrollbar_window,
gtk_scrolled_window_get_hadjustment (GTK_SCROLLED_WINDOW (scrolled)), gtk_scrolled_window_get_hadjustment (GTK_SCROLLED_WINDOW (scrolled)),
&priv->horizontal_scrollbar_size, FALSE)) &priv->horizontal_scrollbar_size, FALSE))
{ {
gdk_window_raise (priv->horizontal_scrollbar_window); gdk_window_raise (priv->horizontal_scrollbar_window);
gdk_window_show (priv->horizontal_scrollbar_window); gdk_window_show (priv->horizontal_scrollbar_window);
} }
if (priv->scrolling_hints && !GTK_SCROLLED_WINDOW (scrolled)->vscrollbar_visible && if (priv->scrolling_hints
adjust_scrollbar (scrolled, priv->vertical_scrollbar_window, && !gtk_widget_get_visible (gtk_scrolled_window_get_vscrollbar (
GTK_SCROLLED_WINDOW (scrolled)))
&& adjust_scrollbar (scrolled, priv->vertical_scrollbar_window,
gtk_scrolled_window_get_vadjustment (GTK_SCROLLED_WINDOW (scrolled)), gtk_scrolled_window_get_vadjustment (GTK_SCROLLED_WINDOW (scrolled)),
&priv->vertical_scrollbar_size, TRUE)) &priv->vertical_scrollbar_size, TRUE))
{ {