summaryrefslogtreecommitdiffstats
path: root/src/widgets/sp-widget.cpp
diff options
context:
space:
mode:
authorAlex Valavanis <valavanisalex@gmail.com>2012-01-06 00:44:17 +0000
committerAlex Valavanis <valavanisalex@gmail.com>2012-01-06 00:44:17 +0000
commita6eeea52037e555b85631f3006c0d0da1b93fcb0 (patch)
tree3f29d61198b992deaa9678a7d2458b16b8b1ff8c /src/widgets/sp-widget.cpp
parentadd toolbutton menu action type. now the add extremum node buttons are somewh... (diff)
downloadinkscape-a6eeea52037e555b85631f3006c0d0da1b93fcb0.tar.gz
inkscape-a6eeea52037e555b85631f3006c0d0da1b93fcb0.zip
More GSEAL stuff
(bzr r10850)
Diffstat (limited to 'src/widgets/sp-widget.cpp')
-rw-r--r--src/widgets/sp-widget.cpp24
1 files changed, 16 insertions, 8 deletions
diff --git a/src/widgets/sp-widget.cpp b/src/widgets/sp-widget.cpp
index ef8a6c03c..97af9c7fa 100644
--- a/src/widgets/sp-widget.cpp
+++ b/src/widgets/sp-widget.cpp
@@ -181,12 +181,14 @@ sp_widget_hide (GtkWidget *widget)
static gint
sp_widget_expose (GtkWidget *widget, GdkEventExpose *event)
{
- GtkBin *bin;
+ GtkBin *bin;
+ GtkWidget *child;
bin = GTK_BIN (widget);
+ child = gtk_bin_get_child (bin);
- if ( bin->child ) {
- gtk_container_propagate_expose (GTK_CONTAINER(widget), bin->child, event);
+ if (child) {
+ gtk_container_propagate_expose (GTK_CONTAINER(widget), child, event);
}
/*
if ((bin->child) && (!gtk_widget_get_has_window (bin->child))) {
@@ -202,17 +204,23 @@ sp_widget_expose (GtkWidget *widget, GdkEventExpose *event)
static void
sp_widget_size_request (GtkWidget *widget, GtkRequisition *requisition)
{
- if (((GtkBin *) widget)->child)
- gtk_widget_size_request (((GtkBin *) widget)->child, requisition);
+ GtkBin *bin = GTK_BIN (widget);
+ GtkWidget *child = gtk_bin_get_child (bin);
+
+ if (child)
+ gtk_widget_size_request (child, requisition);
}
static void
sp_widget_size_allocate (GtkWidget *widget, GtkAllocation *allocation)
{
- widget->allocation = *allocation;
+ GtkBin *bin = GTK_BIN (widget);
+ GtkWidget *child = gtk_bin_get_child (bin);
+
+ gtk_widget_set_allocation (widget, allocation);
- if (((GtkBin *) widget)->child)
- gtk_widget_size_allocate (((GtkBin *) widget)->child, allocation);
+ if (child)
+ gtk_widget_size_allocate (child, allocation);
}
/* Methods */