diff options
author | Michael Natterer <mitch@imendio.com> | 2008-02-27 11:30:10 +0000 |
---|---|---|
committer | Michael Natterer <mitch@src.gnome.org> | 2008-02-27 11:30:10 +0000 |
commit | 45debfb0ef90e68f258939ddc301e5413a0b4731 (patch) | |
tree | bd06682d76469f4438d1f232aa447fd8f05ddf71 /gtk/gtkviewport.c | |
parent | f14bf846991513c9273c753310d4e428f9bd06c8 (diff) | |
download | gtk+-45debfb0ef90e68f258939ddc301e5413a0b4731.tar.gz |
gtk/gtkmenushell.c gtk/gtktable.c gtk/gtktext.c gtk/gtktipsquery.c
2008-02-27 Michael Natterer <mitch@imendio.com>
* gtk/gtkmenushell.c
* gtk/gtktable.c
* gtk/gtktext.c
* gtk/gtktipsquery.c
* gtk/gtktoolbar.c
* gtk/gtktreeitem.c
* gtk/gtktreeview.c
* gtk/gtkviewport.c
* gtk/gtkwin32embedwidget.c: remove g_return_if_fail() from
private functions and virtual function implementations.
svn path=/trunk/; revision=19668
Diffstat (limited to 'gtk/gtkviewport.c')
-rw-r--r-- | gtk/gtkviewport.c | 32 |
1 files changed, 7 insertions, 25 deletions
diff --git a/gtk/gtkviewport.c b/gtk/gtkviewport.c index 48fac8329a..3bf37039d2 100644 --- a/gtk/gtkviewport.c +++ b/gtk/gtkviewport.c @@ -645,14 +645,9 @@ static void gtk_viewport_paint (GtkWidget *widget, GdkRectangle *area) { - GtkViewport *viewport; - - g_return_if_fail (GTK_IS_VIEWPORT (widget)); - g_return_if_fail (area != NULL); - if (GTK_WIDGET_DRAWABLE (widget)) { - viewport = GTK_VIEWPORT (widget); + GtkViewport *viewport = GTK_VIEWPORT (widget); gtk_paint_shadow (widget->style, widget->window, GTK_STATE_NORMAL, viewport->shadow_type, @@ -691,11 +686,8 @@ static void gtk_viewport_add (GtkContainer *container, GtkWidget *child) { - GtkBin *bin; - - g_return_if_fail (GTK_IS_WIDGET (child)); + GtkBin *bin = GTK_BIN (container); - bin = GTK_BIN (container); g_return_if_fail (bin->child == NULL); gtk_widget_set_parent_window (child, GTK_VIEWPORT (bin)->bin_window); @@ -707,11 +699,9 @@ static void gtk_viewport_size_request (GtkWidget *widget, GtkRequisition *requisition) { - GtkBin *bin; + GtkBin *bin = GTK_BIN (widget); GtkRequisition child_requisition; - bin = GTK_BIN (widget); - requisition->width = GTK_CONTAINER (widget)->border_width; requisition->height = GTK_CONTAINER (widget)->border_width; @@ -796,14 +786,8 @@ static void gtk_viewport_adjustment_value_changed (GtkAdjustment *adjustment, gpointer data) { - GtkViewport *viewport; - GtkBin *bin; - - g_return_if_fail (GTK_IS_ADJUSTMENT (adjustment)); - g_return_if_fail (GTK_IS_VIEWPORT (data)); - - viewport = GTK_VIEWPORT (data); - bin = GTK_BIN (data); + GtkViewport *viewport = GTK_VIEWPORT (data); + GtkBin *bin = GTK_BIN (data); if (bin->child && GTK_WIDGET_VISIBLE (bin->child) && GTK_WIDGET_REALIZED (viewport)) @@ -829,13 +813,11 @@ static void gtk_viewport_style_set (GtkWidget *widget, GtkStyle *previous_style) { - GtkViewport *viewport; - if (GTK_WIDGET_REALIZED (widget) && !GTK_WIDGET_NO_WINDOW (widget)) { - viewport = GTK_VIEWPORT (widget); - + GtkViewport *viewport = GTK_VIEWPORT (widget); + gtk_style_set_background (widget->style, viewport->bin_window, GTK_STATE_NORMAL); gtk_style_set_background (widget->style, widget->window, widget->state); } |