changeset 237:02c17a5c99e3 trunk

[svn] - Implement widget_draw_quick(widget_t *) for doing an immediate draw operation on a widget. - Use widget_draw_quick() to force a playlist update on unshade.
author nenolod
date Sat, 26 Nov 2005 18:28:19 -0800
parents be1be6f2aeeb
children 580529c7e0c5
files audacious/playlistwin.c audacious/widget.c audacious/widget.h
diffstat 3 files changed, 17 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/audacious/playlistwin.c	Sat Nov 26 17:44:16 2005 -0800
+++ b/audacious/playlistwin.c	Sat Nov 26 18:28:19 2005 -0800
@@ -427,8 +427,8 @@
 {
     g_return_if_fail(playlistwin_list != NULL);
 
-    widget_draw(WIDGET(playlistwin_list));
-    widget_draw(WIDGET(playlistwin_slider));
+    widget_draw_quick(WIDGET(playlistwin_list));
+    widget_draw_quick(WIDGET(playlistwin_slider));
     playlistwin_update_info();
     playlistwin_update_sinfo();
     /*     mainwin_update_jtf(); */
@@ -532,7 +532,12 @@
                       playlistwin_get_height());
 
     playlistwin_set_mask();
+
     draw_playlist_window(TRUE);
+
+    /* force a playlist redraw */
+    widget_draw(WIDGET(playlistwin_list));
+    widget_draw(WIDGET(playlistwin_slider));
 }
 
 static void
--- a/audacious/widget.c	Sat Nov 26 17:44:16 2005 -0800
+++ b/audacious/widget.c	Sat Nov 26 18:28:19 2005 -0800
@@ -123,6 +123,15 @@
 }
 
 void
+widget_draw_quick(Widget * widget)
+{
+    widget_lock(widget);
+    if (WIDGET(widget)->draw != NULL)
+	WIDGET(widget)->draw(widget);
+    widget_unlock(widget);
+}
+
+void
 widget_list_add(GList ** list, Widget * widget)
 {
     (*list) = g_list_append(*list, widget);
--- a/audacious/widget.h	Sat Nov 26 17:44:16 2005 -0800
+++ b/audacious/widget.h	Sat Nov 26 18:28:19 2005 -0800
@@ -79,6 +79,7 @@
 void widget_resize(Widget * widget, gint width, gint height);
 void widget_move(Widget * widget, gint x, gint y);
 void widget_draw(Widget * widget);
+void widget_draw_quick(Widget * widget);
 
 void handle_press_cb(GList * wlist, GtkWidget * widget,
                      GdkEventButton * event);