Mercurial > audlegacy
diff src/audacious/widgets/widget.c @ 2507:e07c141dd326 trunk
[svn] - made new functions: widget_move_relative and widget_resize_relative
- cleaned up playlist resizing code (removed lots of constants with help
of the new widget functions)
| author | mf0102 |
|---|---|
| date | Mon, 12 Feb 2007 08:59:08 -0800 |
| parents | 3149d4b1a9a9 |
| children | ddd127429fc6 |
line wrap: on
line diff
--- a/src/audacious/widgets/widget.c Mon Feb 12 08:13:53 2007 -0800 +++ b/src/audacious/widgets/widget.c Mon Feb 12 08:59:08 2007 -0800 @@ -107,6 +107,12 @@ } void +widget_resize_relative(Widget * widget, gint width, gint height) +{ + widget_resize(widget, widget->width + width, widget->height + height); +} + +void widget_move(Widget * widget, gint x, gint y) { widget_lock(widget); @@ -115,10 +121,15 @@ } void +widget_move_relative(Widget * widget, gint x, gint y) +{ + widget_move(widget, widget->x + x, widget->y + y); +} + +void widget_draw(Widget * widget) { - if (widget->visible == FALSE) - return; + g_return_if_fail(widget->visible == TRUE); widget_lock(widget); WIDGET(widget)->redraw = TRUE; @@ -131,7 +142,7 @@ widget_lock(widget); if (WIDGET(widget)->draw != NULL) { - WIDGET(widget)->draw(widget); + WIDGET(widget)->draw(widget); gdk_flush(); } widget_unlock(widget);
