# HG changeset patch # User nenolod # Date 1160000820 25200 # Node ID 641ee4092aea3c5c555df1d902e9231c5d3dffa7 # Parent 9ed09a2c878e5237053b2ccd0c9142d9e2ffb370 [svn] - allow the menurow to be set invisible - add mimetype to np.sh - revert js's change diff -r 9ed09a2c878e -r 641ee4092aea ChangeLog --- a/ChangeLog Wed Oct 04 12:47:37 2006 -0700 +++ b/ChangeLog Wed Oct 04 15:27:00 2006 -0700 @@ -1,3 +1,13 @@ +2006-10-04 19:47:37 +0000 Jonathan Schleifer + revision [2523] + The default values for old skins were wrong. But since changing from + the new skin to an old doesn't work anyway, we can set these to 0 so + that the old skins at least work when Audacious is restarted. + + trunk/audacious/widgets/skin.c | 14 ++++++++++---- + 1 file changed, 10 insertions(+), 4 deletions(-) + + 2006-10-04 11:17:35 +0000 William Pitcock revision [2521] - 1.2 skin, EARLY VERSION OF IT. I am *sure* nhjm449 will tweak it a lot. diff -r 9ed09a2c878e -r 641ee4092aea audacious/mainwin.c --- a/audacious/mainwin.c Wed Oct 04 12:47:37 2006 -0700 +++ b/audacious/mainwin.c Wed Oct 04 15:27:00 2006 -0700 @@ -830,6 +830,7 @@ widget_hide(WIDGET(mainwin_othertext)); } + /* positioning and size attributes */ if (bmp_active_skin->properties.mainwin_vis_x && bmp_active_skin->properties.mainwin_vis_y) widget_move(WIDGET(mainwin_vis), bmp_active_skin->properties.mainwin_vis_x, bmp_active_skin->properties.mainwin_vis_y); @@ -873,6 +874,12 @@ if (bmp_active_skin->properties.mainwin_playstatus_x && bmp_active_skin->properties.mainwin_playstatus_y) widget_move(WIDGET(mainwin_playstatus), bmp_active_skin->properties.mainwin_playstatus_x, bmp_active_skin->properties.mainwin_playstatus_y); + + /* visibility attributes */ + if (bmp_active_skin->properties.mainwin_menurow_visible) + widget_show(WIDGET(mainwin_menurow)); + else + widget_hide(WIDGET(mainwin_menurow)); } void diff -r 9ed09a2c878e -r 641ee4092aea audacious/widgets/skin.c --- a/audacious/widgets/skin.c Wed Oct 04 12:47:37 2006 -0700 +++ b/audacious/widgets/skin.c Wed Oct 04 15:27:00 2006 -0700 @@ -530,16 +530,12 @@ path_p = path_p ? path_p : skin->path; - /* - * Changing from the new skin to an old skin doesn't work yet, so we can - * as well set these defaults to 0 so that old skins at least work when - * Audacious is restarted. The values commented out are the wrong values - * which were here before. - */ - skin->properties.mainwin_othertext = 0; /* 0 */ - skin->properties.mainwin_vis_x = 0; /* 24 */ - skin->properties.mainwin_vis_y = 0; /* 43 */ - skin->properties.mainwin_vis_width = 0; /* 76 */ + skin->properties.mainwin_othertext = FALSE; + skin->properties.mainwin_vis_x = 24; + skin->properties.mainwin_vis_y = 43; + skin->properties.mainwin_vis_width = 76; + + skin->properties.mainwin_menurow_visible = TRUE; filename = find_file_recursively(path_p, "skin.hints"); @@ -718,6 +714,14 @@ g_free(tmp); } + tmp = read_ini_string(filename, "skin", "mainwinMenurowVisible"); + + if (tmp != NULL) + { + skin->properties.mainwin_menurow_visible = atoi(tmp); + g_free(tmp); + } + g_free(filename); } diff -r 9ed09a2c878e -r 641ee4092aea audacious/widgets/skin.h --- a/audacious/widgets/skin.h Wed Oct 04 12:47:37 2006 -0700 +++ b/audacious/widgets/skin.h Wed Oct 04 15:27:00 2006 -0700 @@ -99,6 +99,8 @@ gint mainwin_playstatus_x; gint mainwin_playstatus_y; + + gboolean mainwin_menurow_visible; } SkinProperties; #define SKIN_PIXMAP(x) ((SkinPixmap *)(x)) diff -r 9ed09a2c878e -r 641ee4092aea audtool/examples/np.sh --- a/audtool/examples/np.sh Wed Oct 04 12:47:37 2006 -0700 +++ b/audtool/examples/np.sh Wed Oct 04 15:27:00 2006 -0700 @@ -2,5 +2,6 @@ SONGTITLE=$(audtool current-song) SONGELAPSED=$(audtool current-song-output-length) SONGLEN=$(audtool current-song-length) +MIME=$(file -ib "`audtool current-song-filename`") -echo "np: $SONGTITLE ($SONGELAPSED/$SONGLEN)" +echo "np: $SONGTITLE [$MIME] ($SONGELAPSED/$SONGLEN)"