From ab25b8ab69e013cfaf0869b7218ef209b0be209c Mon Sep 17 00:00:00 2001 From: Maxim Ermilov Date: Thu, 26 Aug 2010 23:33:09 +0400 Subject: [PATCH] change parent class of StScrollBar from StBin to StWidget 1. It doesn't have child 2. It work like StWidget without child https://bugzilla.gnome.org/show_bug.cgi?id=624893 --- src/st/st-scroll-bar.c | 3 ++- src/st/st-scroll-bar.h | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/st/st-scroll-bar.c b/src/st/st-scroll-bar.c index 7bf7803c5..bfa5bdace 100644 --- a/src/st/st-scroll-bar.c +++ b/src/st/st-scroll-bar.c @@ -44,7 +44,7 @@ #include "st-private.h" #include "st-button.h" -G_DEFINE_TYPE (StScrollBar, st_scroll_bar, ST_TYPE_BIN) +G_DEFINE_TYPE (StScrollBar, st_scroll_bar, ST_TYPE_WIDGET) #define ST_SCROLL_BAR_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), ST_TYPE_SCROLL_BAR, StScrollBarPrivate)) @@ -463,6 +463,7 @@ st_scroll_bar_allocate (ClutterActor *actor, { StScrollBar *bar = ST_SCROLL_BAR (actor); StScrollBarPrivate *priv = bar->priv; + priv->needs_allocation = FALSE; /* Chain up */ diff --git a/src/st/st-scroll-bar.h b/src/st/st-scroll-bar.h index 07bf94d16..2505dd347 100644 --- a/src/st/st-scroll-bar.h +++ b/src/st/st-scroll-bar.h @@ -32,7 +32,7 @@ #define __ST_SCROLL_BAR_H__ #include -#include +#include G_BEGIN_DECLS @@ -56,14 +56,14 @@ typedef struct _StScrollBarClass StScrollBarClass; struct _StScrollBar { /*< private >*/ - StBin parent_instance; + StWidget parent_instance; StScrollBarPrivate *priv; }; struct _StScrollBarClass { - StBinClass parent_class; + StWidgetClass parent_class; /* signals */ void (*scroll_start) (StScrollBar *bar);