Mercurial > audlegacy
changeset 2443:93686e8815a4 trunk
[svn] - Changed playback_set_random_skin() to skin_set_random_skin()
author | mf0102 |
---|---|
date | Mon, 29 Jan 2007 10:29:19 -0800 |
parents | 44df6c17411b |
children | 290ae313e5b3 |
files | ChangeLog src/audacious/playback.c src/audacious/playback.h src/audacious/widgets/skin.c src/audacious/widgets/skin.h |
diffstat | 5 files changed, 29 insertions(+), 18 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Mon Jan 29 10:11:01 2007 -0800 +++ b/ChangeLog Mon Jan 29 10:29:19 2007 -0800 @@ -1,3 +1,15 @@ +2007-01-29 18:11:01 +0000 William Pitcock <nenolod@sacredspiral.co.uk> + revision [3894] + - split out albumart locating functions into a seperate file and make the public API available in util.h + + trunk/src/audacious/Makefile | 1 + trunk/src/audacious/ui_albumart.c | 195 +++++++++++++++++++++++++++++++++ + trunk/src/audacious/ui_fileinfo.c | 160 --------------------------- + trunk/src/audacious/ui_fileinfopopup.c | 163 --------------------------- + trunk/src/audacious/util.h | 3 + 5 files changed, 200 insertions(+), 322 deletions(-) + + 2007-01-29 17:55:26 +0000 Michael Farber <01mf02@gmail.com> revision [3892] - Cleaned up a bit
--- a/src/audacious/playback.c Mon Jan 29 10:11:01 2007 -0800 +++ b/src/audacious/playback.c Mon Jan 29 10:29:19 2007 -0800 @@ -54,19 +54,6 @@ #include "playback.h" -/* FIXME: yuck!! this shouldn't be here... */ -void -playback_set_random_skin(void) -{ - SkinNode *node; - guint32 randval; - - /* Get a random value to select the skin to use */ - randval = g_random_int_range(0, g_list_length(skinlist)); - node = g_list_nth(skinlist, randval)->data; - bmp_active_skin_load(node->path); -} - gint playback_get_time(void) { @@ -234,7 +221,7 @@ } if (cfg.random_skin_on_play) - playback_set_random_skin(); + skin_set_random_skin(); /* * This is slightly uglier than the original version, but should
--- a/src/audacious/playback.h Mon Jan 29 10:11:01 2007 -0800 +++ b/src/audacious/playback.h Mon Jan 29 10:29:19 2007 -0800 @@ -23,9 +23,8 @@ #include <glib.h> -#include "audacious/playlist.h" +#include "playlist.h" -void playback_set_random_skin(void); gint playback_get_time(void); void playback_initiate(void); void playback_pause(void);
--- a/src/audacious/widgets/skin.c Mon Jan 29 10:11:01 2007 -0800 +++ b/src/audacious/widgets/skin.c Mon Jan 29 10:29:19 2007 -0800 @@ -1848,3 +1848,16 @@ skin_draw_pixmap(skin, drawable, gc, SKIN_TITLEBAR, 27, y_offset, 0, 0, bmp_active_skin->properties.mainwin_width, MAINWIN_TITLEBAR_HEIGHT); } + + +void +skin_set_random_skin(void) +{ + SkinNode *node; + guint32 randval; + + /* Get a random value to select the skin to use */ + randval = g_random_int_range(0, g_list_length(skinlist)); + node = g_list_nth(skinlist, randval)->data; + bmp_active_skin_load(node->path); +}
--- a/src/audacious/widgets/skin.h Mon Jan 29 10:11:01 2007 -0800 +++ b/src/audacious/widgets/skin.h Mon Jan 29 10:29:19 2007 -0800 @@ -210,6 +210,7 @@ Skin *skin_new(void); gboolean skin_load(Skin * skin, const gchar * path); +gboolean skin_reload_forced(void); void skin_reload(Skin * skin); void skin_free(Skin * skin); @@ -240,7 +241,6 @@ void skin_parse_hints(Skin * skin, gchar *path_p); -gboolean -skin_reload_forced(void); +void skin_set_random_skin(void); #endif