# HG changeset patch # User Matti Hamalainen # Date 1191168059 -10800 # Node ID c3d2de7c4151345ce8da3f0865be5e8c4cb0fed9 # Parent 134456e63256bb56249115954fecd3a1f0f7b0c0# Parent 8b3f1801b9d67dc645431c5966cb455888b6c354 Merged. diff -r 134456e63256 -r c3d2de7c4151 .hgignore --- a/.hgignore Mon Sep 24 15:19:30 2007 +0300 +++ b/.hgignore Sun Sep 30 19:00:59 2007 +0300 @@ -1,31 +1,39 @@ +syntax: regexp +^aclocal\.m4 +^autom4te\.cache +^audacious\.pc +^audclient\.pc +^buildsys\.mk +^config\.h +^config\.h\.in +^config\.log +^config\.status +^configure +^extra\.mk +^man/audacious\.1 +^man/audtool\.1 +^mk/rules\.mk +^po/Makefile +^po/Makefile\.in +^po/POTFILES +^po/stamp-po +^src/audacious/audacious +^src/audacious/audacious\.desktop +^src/audacious/build_stamp\.c +^src/audacious/dbus-client-bindings\.h +^src/audacious/dbus-server-bindings\.h +^src/audtool/audtool +^cscope\.out +^tags syntax: glob -aclocal.m4 -autom4te.cache -audacious.pc -audclient.pc -buildsys.mk -config.h -config.h.in -config.log -config.status -configure -extra.mk -man/audacious.1 -man/audtool.1 -po/Makefile -po/Makefile.in -po/POTFILES -po/stamp-po -src/audacious/audacious -src/audacious/audacious.desktop -src/audacious/build_stamp.c -src/audacious/dbus-client-bindings.h -src/audacious/dbus-server-bindings.h -src/audtool/audtool +.git .deps +.depend +.depend-done *.a *.dylib *.gmo *.o *.so *~ +*.swp diff -r 134456e63256 -r c3d2de7c4151 AUTHORS --- a/AUTHORS Mon Sep 24 15:19:30 2007 +0300 +++ b/AUTHORS Sun Sep 30 19:00:59 2007 +0300 @@ -4,6 +4,7 @@ -------------------------------------------- George Averill +Kieran Clancy Michael Färber <0102@gmx.at> Giacomo Lozito William Pitcock diff -r 134456e63256 -r c3d2de7c4151 Makefile --- a/Makefile Mon Sep 24 15:19:30 2007 +0300 +++ b/Makefile Sun Sep 30 19:00:59 2007 +0300 @@ -101,7 +101,8 @@ Skins/Refugee/text.png \ Skins/Refugee/titlebar.png \ Skins/Refugee/viscolor.txt \ - Skins/Refugee/volume.png + Skins/Refugee/volume.png \ + applications/audacious.desktop DISTCLEAN = extra.mk @@ -116,6 +117,14 @@ ${INSTALL_FAILED}; \ fi; \ done + for i in audacious.desktop; do \ + ${INSTALL_STATUS}; \ + if ${MKDIR_P} ${DESTDIR}${datadir}/applications && ${INSTALL} -m 644 $$i ${DESTDIR}${datadir}/applications/$$i; then \ + ${INSTALL_OK}; \ + else \ + ${INSTALL_FAILED}; \ + fi \ + done uninstall-extra: for i in audacious.pc audclient.pc; do \ @@ -127,3 +136,12 @@ fi \ fi; \ done + for i in audacious.desktop; do \ + if test -f ${DESTDIR}${datadir}/applications/$$i; then \ + if rm -f ${DESTDIR}${datadir}/applications/$$i; then \ + ${DELETE_OK}; \ + else \ + ${DELETE_FAILED}; \ + fi \ + fi \ + done diff -r 134456e63256 -r c3d2de7c4151 Skins/Refugee/eqmain.png Binary file Skins/Refugee/eqmain.png has changed diff -r 134456e63256 -r c3d2de7c4151 applications/audacious.desktop.in --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/applications/audacious.desktop.in Sun Sep 30 19:00:59 2007 +0300 @@ -0,0 +1,12 @@ +[Desktop Entry] +Name=Audacious +GenericName=Audio Player +Comment=Play music +Comment[hu]=Zene lejátszása +Exec=audacious %U +Icon=audacious +MimeType=application/x-ogg;audio/mp3;audio/mpeg;audio/mpegurl;audio/prs.sid;audio/x-flac;audio/x-it;audio/x-mod;audio/x-mp3;audio/x-mpeg;audio/x-mpegurl;audio/x-ms-wma;audio/x-musepack;audio/x-s3m;audio/x-scpls;audio/x-stm;audio/x-wav;audio/x-xm;application/ogg;audio/x-vorbis+ogg +Categories=Application;GTK;AudioVideo;Player; +Terminal=false +Type=Application +Encoding=UTF-8 diff -r 134456e63256 -r c3d2de7c4151 audacious.desktop --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/audacious.desktop Sun Sep 30 19:00:59 2007 +0300 @@ -0,0 +1,12 @@ +[Desktop Entry] +Name=Audacious +GenericName=Audio Player +Comment=Play music +Comment[hu]=Zene lejátszása +Exec=audacious %U +Icon=audacious +MimeType=application/x-ogg;audio/mp3;audio/mpeg;audio/mpegurl;audio/prs.sid;audio/x-flac;audio/x-it;audio/x-mod;audio/x-mp3;audio/x-mpeg;audio/x-mpegurl;audio/x-ms-wma;audio/x-musepack;audio/x-s3m;audio/x-scpls;audio/x-stm;audio/x-wav;audio/x-xm;application/ogg;audio/x-vorbis+ogg +Categories=Application;GTK;AudioVideo;Player; +Terminal=false +Type=Application +Encoding=UTF-8 diff -r 134456e63256 -r c3d2de7c4151 buildsys.mk.in --- a/buildsys.mk.in Mon Sep 24 15:19:30 2007 +0300 +++ b/buildsys.mk.in Sun Sep 30 19:00:59 2007 +0300 @@ -35,6 +35,9 @@ OBJCFLAGS = @OBJCFLAGS@ LDFLAGS = @LDFLAGS@ LIBS = @LIBS@ +PROG_IMPLIB_NEEDED = @PROG_IMPLIB_NEEDED@ +PROG_IMPLIB_LDFLAGS = @PROG_IMPLIB_LDFLAGS@ +PROG_SUFFIX = @EXEEXT@ LIB_CPPFLAGS = @LIB_CPPFLAGS@ LIB_CFLAGS = @LIB_CFLAGS@ LIB_LDFLAGS = @LIB_LDFLAGS@ @@ -49,7 +52,7 @@ CLEAN_LIB = @CLEAN_LIB@ LN_S = @LN_S@ MKDIR_P = mkdir -p -INSTALL = @INSTALL@ +INSTALL = install SHELL = @SHELL@ prefix = @prefix@ exec_prefix = @exec_prefix@ @@ -72,9 +75,12 @@ .SILENT: .SUFFIXES: .beam .c .cc .cxx .d .erl .m -.PHONY: all subdirs depend install uninstall clean distclean +.PHONY: all subdirs pre-depend depend install install-extra uninstall uninstall-extra clean distclean -all: subdirs depend ${OBJS} ${STATIC_LIB} ${STATIC_LIB_NOINST} ${LIB} ${LIB_NOINST} ${PLUGIN} ${PLUGIN_NOINST} ${PROG} ${PROG_NOINST} +all: + for i in subdirs depend ${STATIC_LIB} ${STATIC_LIB_NOINST} ${LIB} ${LIB_NOINST} ${PLUGIN} ${PLUGIN_NOINST} ${PROG} ${PROG_NOINST}; do \ + ${MAKE} ${MFLAGS} $$i || exit 1; \ + done subdirs: for i in ${SUBDIRS}; do \ @@ -85,20 +91,29 @@ depend: pre-depend ${SRCS} regen=0; \ - for i in ${SRCS}; do [ $$i -nt .deps ] && regen=1; done; \ - if [ $$regen = 1 ]; then \ - rm -f .deps; \ + for i in ${SRCS}; do test $$i -nt .deps && regen=1; done; \ + if test x"$$regen" = x"1"; then \ + list=""; \ + ${DEPEND_STATUS}; \ for i in ${SRCS}; do \ case $${i##*.} in \ c|cc|cxx|m) \ - ${CPP} ${CPPFLAGS} -M $$i >>.deps; \ + list="$$list $$i"; \ + ;; \ esac; \ done; \ + if test x"$$list" != "x"; then \ + if ${CPP} ${CPPFLAGS} -M $$list >.deps; then \ + ${DEPEND_OK}; \ + else \ + ${DEPEND_FAILED}; \ + fi; \ + fi; \ fi pre-depend: -${PROG} ${PROG_NOINST}: ${EXT_DEPS} ${OBJS} ${LIB_DEPS} +${PROG} ${PROG_NOINST}: ${EXT_DEPS} ${OBJS} ${LINK_STATUS} if ${LD} -o $@ ${OBJS} ${LDFLAGS} ${LIBS}; then \ ${LINK_OK}; \ @@ -130,8 +145,6 @@ ${LINK_FAILED}; \ fi -${EXT_DEPS}: subdirs - .c.o: ${COMPILE_STATUS} if ${CC} ${CFLAGS} ${CPPFLAGS} -c -o $@ $<; then \ @@ -198,7 +211,7 @@ for i in ${STATIC_LIB}; do \ ${INSTALL_STATUS}; \ - if ${MKDIR_P} ${DESTDIR}${libdir} && ${INSTALL} -m 755 $$i ${DESTDIR}${libdir}/$$i; then \ + if ${MKDIR_P} ${DESTDIR}${libdir} && ${INSTALL} -m 644 $$i ${DESTDIR}${libdir}/$$i; then \ ${INSTALL_OK}; \ else \ ${INSTALL_FAILED}; \ @@ -225,7 +238,7 @@ for i in ${PROG}; do \ ${INSTALL_STATUS}; \ - if ${MKDIR_P} ${DESTDIR}${bindir} && ${INSTALL} -m 755 -s $$i ${DESTDIR}${bindir}/$$i; then \ + if ${MKDIR_P} ${DESTDIR}${bindir} && ${INSTALL} -m 755 $$i ${DESTDIR}${bindir}/$$i; then \ ${INSTALL_OK}; \ else \ ${INSTALL_FAILED}; \ @@ -260,7 +273,7 @@ done for i in ${LIB}; do \ - if [ -f ${DESTDIR}${libdir}/$$i ]; then \ + if test -f ${DESTDIR}${libdir}/$$i; then \ if ${UNINSTALL_LIB}; then \ ${DELETE_OK}; \ else \ @@ -270,7 +283,7 @@ done for i in ${STATIC_LIB}; do \ - if [ -f ${DESTDIR}${libdir}/$$i ]; then \ + if test -f ${DESTDIR}${libdir}/$$i; then \ if rm -f ${DESTDIR}${libdir}/$$i; then \ ${DELETE_OK}; \ else \ @@ -280,7 +293,7 @@ done for i in ${PLUGIN}; do \ - if [ -f ${DESTDIR}${libdir}/${plugindir}/$$i ]; then \ + if test -f ${DESTDIR}${libdir}/${plugindir}/$$i; then \ if rm -f ${DESTDIR}${libdir}/${plugindir}/$$i; then \ ${DELETE_OK}; \ else \ @@ -291,7 +304,7 @@ -rmdir ${DESTDIR}${libdir}/${plugindir} >/dev/null 2>&1 for i in ${DATA}; do \ - if [ -f ${DESTDIR}${datadir}/${PACKAGE}/$$i ]; then \ + if test -f ${DESTDIR}${datadir}/${PACKAGE}/$$i; then \ if rm -f ${DESTDIR}${datadir}/${PACKAGE}/$$i; then \ ${DELETE_OK}; \ else \ @@ -301,7 +314,7 @@ done for i in ${PROG}; do \ - if [ -f ${DESTDIR}${bindir}/$$i ]; then \ + if test -f ${DESTDIR}${bindir}/$$i; then \ if rm -f ${DESTDIR}${bindir}/$$i; then \ ${DELETE_OK}; \ else \ @@ -311,7 +324,7 @@ done for i in ${INCLUDES}; do \ - if [ -f ${DESTDIR}${includedir}/${includesubdir}/$$i ]; then \ + if test -f ${DESTDIR}${includedir}/${includesubdir}/$$i; then \ if rm -f ${DESTDIR}${includedir}/${includesubdir}/$$i; then \ ${DELETE_OK}; \ else \ @@ -322,7 +335,7 @@ -rmdir ${DESTDIR}${includedir}/${includesubdir} >/dev/null 2>&1 for i in ${MAN}; do \ - if [ -f ${DESTDIR}${mandir}/${mansubdir}/$$i ]; then \ + if test -f ${DESTDIR}${mandir}/${mansubdir}/$$i; then \ if rm -f ${DESTDIR}${mandir}/${mansubdir}/$$i; then \ ${DELETE_OK}; \ else \ @@ -340,8 +353,8 @@ ${DIR_LEAVE}; \ done - for i in ${OBJS} ${CLEAN} ${CLEAN_LIB} .deps *~; do \ - if [ -f $$i -o -d $$i ]; then \ + for i in ${OBJS} ${CLEAN} ${CLEAN_LIB} .deps; do \ + if test -f $$i -o -d $$i; then \ if rm -fr $$i; then \ ${DELETE_OK}; \ else \ @@ -357,8 +370,8 @@ ${DIR_LEAVE}; \ done - for i in ${PROG} ${PROG_NOINST} ${STATIC_LIB} ${STATIC_LIB_NOINST} ${PLUGIN} ${PLUGIN_NOINST} ${DISTCLEAN}; do \ - if [ -f $$i -o -d $$i ]; then \ + for i in ${PROG} ${PROG_NOINST} ${LIB} ${LIB_NOINST} ${STATIC_LIB} ${STATIC_LIB_NOINST} ${PLUGIN} ${PLUGIN_NOINST} ${DISTCLEAN} *~; do \ + if test -f $$i -o -d $$i; then \ if rm -fr $$i; then \ ${DELETE_OK}; \ else \ @@ -369,12 +382,15 @@ DIR_ENTER = printf "\033[0;36mEntering directory \033[1;36m$$i\033[0;36m.\033[0m\n"; cd $$i || exit 1 DIR_LEAVE = printf "\033[0;36mLeaving directory \033[1;36m$$i\033[0;36m.\033[0m\n"; cd .. || exit 1 +DEPEND_STATUS = printf "\033[0;33mGenerating dependencies...\033[0m\r" +DEPEND_OK = printf "\033[0;32mSuccessfully generated dependencies.\033[0m\n" +DEPEND_FAILED = printf "\033[0;31mFailed to generate dependencies!\033[0m\n"; exit 1 +COMPILE_STATUS = printf "\033[0;33mCompiling \033[1;33m$<\033[0;33m...\033[0m\r" +COMPILE_OK = printf "\033[0;32mSuccessfully compiled \033[1;32m$<\033[0;32m.\033[0m\n" +COMPILE_FAILED = printf "\033[0;31mFailed to compile \033[1;31m$<\033[0;31m!\033[0m\n"; exit 1 LINK_STATUS = printf "\033[0;33mLinking \033[1;33m$@\033[0;33m...\033[0m\r" LINK_OK = printf "\033[0;32mSuccessfully linked \033[1;32m$@\033[0;32m.\033[0m\n" LINK_FAILED = printf "\033[0;31mFailed to link \033[1;31m$@\033[0;31m!\033[0m\n"; exit 1 -COMPILE_STATUS = printf "\033[0;33mCompiling \033[1;33m$<\033[0;33m...\033[0m\r" -COMPILE_OK = printf "\033[0;32mSuccessfully compiled \033[1;32m$<\033[0;32m.\033[0m\n" -COMPILE_FAILED = printf "\033[0;31mFailed to compile \033[1;31m$<\033[0;31m!\033[0m\n"; exit 1 INSTALL_STATUS = printf "\033[0;33mInstalling \033[1;33m$$i\033[0;33m...\033[0m\r" INSTALL_OK = printf "\033[0;32mSuccessfully installed \033[1;32m$$i\033[0;32m.\033[0m\n" INSTALL_FAILED = printf "\033[0;31mFailed to install \033[1;31m$$i\033[0;31m!\033[0m\n"; exit 1 diff -r 134456e63256 -r c3d2de7c4151 configure.ac --- a/configure.ac Mon Sep 24 15:19:30 2007 +0300 +++ b/configure.ac Sun Sep 30 19:00:59 2007 +0300 @@ -1,3 +1,4 @@ + dnl Process this file with autoconf to produce a configure script. AC_INIT([audacious], [1.4.0], [bugs+audacious@atheme.org]) AC_PREREQ([2.59]) @@ -48,7 +49,6 @@ dnl Checks for various programs -AC_PROG_INSTALL AC_PROG_LN_S AC_PROG_MAKE_SET @@ -151,29 +151,18 @@ fi AC_SUBST(PCH) -dnl rpath stuff -dnl ======================== -AC_ARG_ENABLE(rpath, - [ --disable-rpath disable hardcoded rpath (default=enabled)], - enable_rpath=$enableval, enable_rpath=yes) - -if test "x$enable_rpath" = xyes; then - case "$target" in - *-apple-*) - ;; - *) - RPATH_VAL="-Wl,-rpath=\${libdir}" - ;; - esac -fi - -AC_SUBST(RPATH_VAL) - dnl plugin stuff dnl ======================== dnl Ok, first we find out what flags we need to use. -AM_SHARED_LIB +BUILDSYS_PROG_IMPLIB +BUILDSYS_SHARED_LIB +if test x"$PROG_IMPLIB_NEEDED" = x"yes"; then + IMPLIB_LIBS='-L../audacious -laudacious.exe' +else + IMPLIB_LIBS='' +fi +AC_SUBST(IMPLIB_LIBS) dnl XXX SHARED_SUFFIX=$PLUGIN_SUFFIX @@ -181,13 +170,6 @@ AC_DEFINE_UNQUOTED(SHARED_SUFFIX, "${SHARED_SUFFIX}", [Define the shared module suffix extension on your platform.]) -# Use -rpath? -AC_ARG_ENABLE(rpath, - [ --enable-rpath enable use of -rpath on ELF systems (default=yes)], [enable_rpath=$enableval], [enable_rpath=no]) -if test "x$enable_rpath" = "xyes"; then - test x"`$CC -dM -E - +dnl +dnl Permission to use, copy, modify, and/or distribute this software for any +dnl purpose with or without fee is hereby granted, provided that the above +dnl copyright notice and this permission notice is present in all copies. +dnl +dnl THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +dnl AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +dnl IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +dnl ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +dnl LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +dnl CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +dnl SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +dnl INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +dnl CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +dnl ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +dnl POSSIBILITY OF SUCH DAMAGE. +dnl + +AC_DEFUN([BUILDSYS_PROG_IMPLIB], [ + AC_MSG_CHECKING(wether we need an implib) + case "$target" in + *-*-cygwin | *-*-mingw32) + AC_MSG_RESULT(yes) + PROG_IMPLIB_NEEDED='yes' + PROG_IMPLIB_LDFLAGS='-Wl,-export-all-symbols,--out-implib,lib${PROG}.a' + ;; + *) + AC_MSG_RESULT(no) + PROG_IMPLIB_NEEDED='no' + PROG_IMPLIB_LDFLAGS='' + ;; + esac + + AC_SUBST(PROG_IMPLIB_NEEDED) + AC_SUBST(PROG_IMPLIB_LDFLAGS) +]) + +AC_DEFUN([BUILDSYS_SHARED_LIB], [ + AC_MSG_CHECKING(for shared library system) + case "$target" in + intel-apple-*) + AC_MSG_RESULT([Mac OS X (Intel)]) + LIB_CPPFLAGS='-DPIC' + LIB_CFLAGS='-fPIC' + LIB_LDFLAGS='-dynamiclib -fPIC -install_name ${libdir}/${LIB}' + LIB_PREFIX='lib' + LIB_SUFFIX='.dylib' + PLUGIN_CPPFLAGS='' + PLUGIN_CFLAGS='' + PLUGIN_LDFLAGS='-bundle -fno-common -flat_namespace -undefined suppress' + PLUGIN_SUFFIX='.impl' + INSTALL_LIB='${INSTALL} -m 755 $$i ${DESTDIR}${libdir}/$${i%.dylib}.${LIB_MAJOR}.${LIB_MINOR}.dylib && ${LN_S} -f $${i%.dylib}.${LIB_MAJOR}.${LIB_MINOR}.dylib ${DESTDIR}${libdir}/$${i%.dylib}.${LIB_MAJOR}.dylib && ${LN_S} -f $${i%.dylib}.${LIB_MAJOR}.${LIB_MINOR}.dylib ${DESTDIR}${libdir}/$$i' + UNINSTALL_LIB='rm -f ${DESTDIR}${libdir}/$$i ${DESTDIR}${libdir}/$${i%.dylib}.${LIB_MAJOR}.dylib ${DESTDIR}${libdir}/$${i%.dylib}.${LIB_MAJOR}.${LIB_MINOR}.dylib' + CLEAN_LIB='' + ;; + *-apple-*) + AC_MSG_RESULT(Mac OS X) + LIB_CPPFLAGS='-DPIC' + LIB_CFLAGS='' + LIB_LDFLAGS='-dynamiclib -fPIC -install_name ${libdir}/${LIB}' + LIB_PREFIX='lib' + LIB_SUFFIX='.dylib' + PLUGIN_CPPFLAGS='' + PLUGIN_CFLAGS='' + PLUGIN_LDFLAGS='-bundle -fno-common -flat_namespace -undefined suppress' + PLUGIN_SUFFIX='.impl' + INSTALL_LIB='${INSTALL} -m 755 $$i ${DESTDIR}${libdir}/$${i%.dylib}.${LIB_MAJOR}.${LIB_MINOR}.dylib && ${LN_S} -f $${i%.dylib}.${LIB_MAJOR}.${LIB_MINOR}.dylib ${DESTDIR}${libdir}/$${i%.dylib}.${LIB_MAJOR}.dylib && ${LN_S} -f $${i%.dylib}.${LIB_MAJOR}.${LIB_MINOR}.dylib ${DESTDIR}${libdir}/$$i' + UNINSTALL_LIB='rm -f ${DESTDIR}${libdir}/$$i ${DESTDIR}${libdir}/$${i%.dylib}.${LIB_MAJOR}.dylib ${DESTDIR}${libdir}/$${i%.dylib}.${LIB_MAJOR}.${LIB_MINOR}.dylib' + CLEAN_LIB='' + ;; + *-*-solaris* | *-openbsd-* | *-mirbsd-*) + AC_MSG_RESULT(Solaris) + LIB_CPPFLAGS='-DPIC' + LIB_CFLAGS='-fPIC' + LIB_LDFLAGS='-shared -fPIC -Wl,-soname=${LIB}.${LIB_MAJOR}.${LIB_MINOR}' + LIB_PREFIX='lib' + LIB_SUFFIX='.so' + PLUGIN_CPPFLAGS='-DPIC' + PLUGIN_CFLAGS='-fPIC' + PLUGIN_LDFLAGS='-shared -fPIC' + PLUGIN_SUFFIX='.so' + INSTALL_LIB='${INSTALL} -m 755 $$i ${DESTDIR}${libdir}/$$i.${LIB_MAJOR}.${LIB_MINOR} && rm -f ${DESTDIR}${libdir}/$$i && ${LN_S} $$i.${LIB_MAJOR}.${LIB_MINOR} ${DESTDIR}${libdir}/$$i' + UNINSTALL_LIB='rm -f ${DESTDIR}${libdir}/$$i ${DESTDIR}${libdir}/$$i.${LIB_MAJOR}.${LIB_MINOR}' + CLEAN_LIB='' + ;; + *-*-cygwin | *-*-mingw32) + AC_MSG_RESULT(Win32) + LIB_CPPFLAGS='-DPIC' + LIB_CFLAGS='' + LIB_LDFLAGS='-shared -Wl,--out-implib,${LIB}.a' + LIB_PREFIX='lib' + LIB_SUFFIX='.dll' + PLUGIN_CPPFLAGS='' + PLUGIN_CFLAGS='' + PLUGIN_LDFLAGS='-shared' + PLUGIN_SUFFIX='.dll' + INSTALL_LIB='${INSTALL} -m 755 $$i ${DESTDIR}${bindir}/$$i && ${INSTALL} -m 755 $$i.a ${DESTDIR}${libdir}/$$i.a' + UNINSTALL_LIB='rm -f ${DESTDIR}${bindir}/$$i ${DESTDIR}${libdir}/$$i.a' + CLEAN_LIB='${LIB}.a' + ;; + *) + AC_MSG_RESULT(POSIX) + LIB_CPPFLAGS='-DPIC' + LIB_CFLAGS='-fPIC' + LIB_LDFLAGS='-shared -fPIC -Wl,-soname=${LIB}.${LIB_MAJOR}.${LIB_MINOR}.0' + LIB_PREFIX='lib' + LIB_SUFFIX='.so' + PLUGIN_CPPFLAGS='-DPIC' + PLUGIN_CFLAGS='-fPIC' + PLUGIN_LDFLAGS='-shared -fPIC' + PLUGIN_SUFFIX='.so' + INSTALL_LIB='${INSTALL} -m 755 $$i ${DESTDIR}${libdir}/$$i.${LIB_MAJOR}.${LIB_MINOR}.0 && ${LN_S} -f $$i.${LIB_MAJOR}.${LIB_MINOR}.0 ${DESTDIR}${libdir}/$$i.${LIB_MAJOR} && ${LN_S} -f $$i.${LIB_MAJOR}.${LIB_MINOR}.0 ${DESTDIR}${libdir}/$$i' + UNINSTALL_LIB='rm -f ${DESTDIR}${libdir}/$$i ${DESTDIR}${libdir}/$$i.${LIB_MAJOR} ${DESTDIR}${libdir}/$$i.${LIB_MAJOR}.${LIB_MINOR}.0' + CLEAN_LIB='' + ;; + esac + + AC_SUBST(LIB_CPPFLAGS) + AC_SUBST(LIB_CFLAGS) + AC_SUBST(LIB_LDFLAGS) + AC_SUBST(LIB_PREFIX) + AC_SUBST(LIB_SUFFIX) + AC_SUBST(PLUGIN_CPPFLAGS) + AC_SUBST(PLUGIN_CFLAGS) + AC_SUBST(PLUGIN_LDFLAGS) + AC_SUBST(PLUGIN_SUFFIX) + AC_SUBST(INSTALL_LIB) + AC_SUBST(UNINSTALL_LIB) + AC_SUBST(CLEAN_LIB) +]) diff -r 134456e63256 -r c3d2de7c4151 m4/sharedlib.m4 --- a/m4/sharedlib.m4 Mon Sep 24 15:19:30 2007 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,113 +0,0 @@ -dnl -dnl Copyright (c) 2007, Jonathan Schleifer -dnl -dnl Permission to use, copy, modify, and/or distribute this software for any -dnl purpose with or without fee is hereby granted, provided that the above -dnl copyright notice and this permission notice is present in all copies. -dnl -dnl THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -dnl AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -dnl IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -dnl ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE -dnl LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -dnl CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -dnl SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -dnl INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -dnl CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -dnl ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -dnl POSSIBILITY OF SUCH DAMAGE. -dnl - -AC_DEFUN([AM_SHARED_LIB], [ - AC_MSG_CHECKING(for shared library system) - case "$target" in - intel-apple-*) - AC_MSG_RESULT([Mac OS X (Intel)]) - LIB_CPPFLAGS='-DPIC' - LIB_CFLAGS='-fPIC' - LIB_LDFLAGS='-dynamiclib -fPIC -install_name ${libdir}/${LIB}' - LIB_PREFIX='lib' - LIB_SUFFIX='.dylib' - PLUGIN_CPPFLAGS='' - PLUGIN_CFLAGS='' - PLUGIN_LDFLAGS='-bundle -fno-common -flat_namespace -undefined suppress' - PLUGIN_SUFFIX='.impl' - INSTALL_LIB='${INSTALL} -m 755 $$i ${DESTDIR}${libdir}/$${i%.dylib}.${LIB_MAJOR}.${LIB_MINOR}.dylib && ${LN_S} -f $${i%.dylib}.${LIB_MAJOR}.${LIB_MINOR}.dylib ${DESTDIR}${libdir}/$${i%.dylib}.${LIB_MAJOR}.dylib && ${LN_S} -f $${i%.dylib}.${LIB_MAJOR}.${LIB_MINOR}.dylib ${DESTDIR}${libdir}/$$i' - UNINSTALL_LIB='rm -f ${DESTDIR}${libdir}/$$i ${DESTDIR}${libdir}/$${i%.dylib}.${LIB_MAJOR}.dylib ${DESTDIR}${libdir}/$${i%.dylib}.${LIB_MAJOR}.${LIB_MINOR}.dylib' - CLEAN_LIB='' - ;; - *-apple-*) - AC_MSG_RESULT(Mac OS X) - LIB_CPPFLAGS='-DPIC' - LIB_CFLAGS='' - LIB_LDFLAGS='-dynamiclib -fPIC -install_name ${libdir}/${LIB}' - LIB_PREFIX='lib' - LIB_SUFFIX='.dylib' - PLUGIN_CPPFLAGS='' - PLUGIN_CFLAGS='' - PLUGIN_LDFLAGS='-bundle -fno-common -flat_namespace -undefined suppress' - PLUGIN_SUFFIX='.impl' - INSTALL_LIB='${INSTALL} -m 755 $$i ${DESTDIR}${libdir}/$${i%.dylib}.${LIB_MAJOR}.${LIB_MINOR}.dylib && ${LN_S} -f $${i%.dylib}.${LIB_MAJOR}.${LIB_MINOR}.dylib ${DESTDIR}${libdir}/$${i%.dylib}.${LIB_MAJOR}.dylib && ${LN_S} -f $${i%.dylib}.${LIB_MAJOR}.${LIB_MINOR}.dylib ${DESTDIR}${libdir}/$$i' - UNINSTALL_LIB='rm -f ${DESTDIR}${libdir}/$$i ${DESTDIR}${libdir}/$${i%.dylib}.${LIB_MAJOR}.dylib ${DESTDIR}${libdir}/$${i%.dylib}.${LIB_MAJOR}.${LIB_MINOR}.dylib' - CLEAN_LIB='' - ;; - *-sun-* | *-openbsd-* | *-mirbsd-*) - AC_MSG_RESULT(Solaris) - LIB_CPPFLAGS='-DPIC' - LIB_CFLAGS='-fPIC' - LIB_LDFLAGS='-shared -fPIC -Wl,-soname=${LIB}.${LIB_MAJOR}.${LIB_MINOR}' - LIB_PREFIX='lib' - LIB_SUFFIX='.so' - PLUGIN_CPPFLAGS='-DPIC' - PLUGIN_CFLAGS='-fPIC' - PLUGIN_LDFLAGS='-shared -fPIC' - PLUGIN_SUFFIX='.so' - INSTALL_LIB='${INSTALL} -m 755 $$i ${DESTDIR}${libdir}/$$i.${LIB_MAJOR}.${LIB_MINOR} && ${LN_S} -f $$i.${LIB_MAJOR}.${LIB_MINOR} ${DESTDIR}${libdir}/$$i' - UNINSTALL_LIB='rm -f ${DESTDIR}${libdir}/$$i ${DESTDIR}${libdir}/$$i.${LIB_MAJOR}.${LIB_MINOR}' - CLEAN_LIB='' - ;; - *-*-mingw32) - AC_MSG_RESULT(MinGW32) - LIB_CPPFLAGS='-DPIC' - LIB_CFLAGS='' - LIB_LDFLAGS='-shared -Wl,--out-implib,${LIB}.a' - LIB_PREFIX='lib' - LIB_SUFFIX='.dll' - PLUGIN_CPPFLAGS='' - PLUGIN_CFLAGS='' - PLUGIN_LDFLAGS='' - PLUGIN_SUFFIX='.dll' - INSTALL_LIB='${INSTALL} -m 755 $$i ${DESTDIR}${bindir}/$$i && ${INSTALL} -m 755 $$i.a ${DESTDIR}${libdir}/$$i.a' - UNINSTALL_LIB='rm -f ${DESTDIR}${bindir}/$$i ${DESTDIR}${libdir}/$$i.a' - CLEAN_LIB='${LIB}.a' - ;; - *) - AC_MSG_RESULT(POSIX) - LIB_CPPFLAGS='-DPIC' - LIB_CFLAGS='-fPIC' - LIB_LDFLAGS='-shared -fPIC -Wl,-soname=${LIB}.${LIB_MAJOR}.${LIB_MINOR}.0' - LIB_PREFIX='lib' - LIB_SUFFIX='.so' - PLUGIN_CPPFLAGS='-DPIC' - PLUGIN_CFLAGS='-fPIC' - PLUGIN_LDFLAGS='-shared -fPIC' - PLUGIN_SUFFIX='.so' - INSTALL_LIB='${INSTALL} -m 755 $$i ${DESTDIR}${libdir}/$$i.${LIB_MAJOR}.${LIB_MINOR}.0 && ${LN_S} -f $$i.${LIB_MAJOR}.${LIB_MINOR}.0 ${DESTDIR}${libdir}/$$i.${LIB_MAJOR} && ${LN_S} -f $$i.${LIB_MAJOR}.${LIB_MINOR}.0 ${DESTDIR}${libdir}/$$i' - UNINSTALL_LIB='rm -f ${DESTDIR}${libdir}/$$i ${DESTDIR}${libdir}/$$i.${LIB_MAJOR} ${DESTDIR}${libdir}/$$i.${LIB_MAJOR}.${LIB_MINOR}.0' - CLEAN_LIB='' - ;; - esac - - AC_SUBST(LIB_CPPFLAGS) - AC_SUBST(LIB_CFLAGS) - AC_SUBST(LIB_LDFLAGS) - AC_SUBST(LIB_PREFIX) - AC_SUBST(LIB_SUFFIX) - AC_SUBST(PLUGIN_CPPFLAGS) - AC_SUBST(PLUGIN_CFLAGS) - AC_SUBST(PLUGIN_LDFLAGS) - AC_SUBST(PLUGIN_SUFFIX) - AC_SUBST(INSTALL_LIB) - AC_SUBST(UNINSTALL_LIB) - AC_SUBST(CLEAN_LIB) -]) diff -r 134456e63256 -r c3d2de7c4151 po/de.po --- a/po/de.po Mon Sep 24 15:19:30 2007 +0300 +++ b/po/de.po Sun Sep 30 19:00:59 2007 +0300 @@ -1599,7 +1599,7 @@ #: src/audacious/ui_manager.c:214 src/audacious/ui_manager.c:215 msgid "Delete Playlist" -msgstr " Wiedergabeliste löschen" +msgstr "Wiedergabeliste löschen" #: src/audacious/ui_manager.c:217 msgid "Load List" diff -r 134456e63256 -r c3d2de7c4151 src/audacious/Makefile --- a/src/audacious/Makefile Mon Sep 24 15:19:30 2007 +0300 +++ b/src/audacious/Makefile Sun Sep 30 19:00:59 2007 +0300 @@ -2,7 +2,7 @@ SUBDIRS = ${INTL_OBJECTIVE} -PROG = audacious +PROG = audacious${PROG_SUFFIX} SRCS = auddrct.c \ build_stamp.c \ configdb.c \ @@ -153,15 +153,11 @@ ui/playlist.ui \ ui/carbon-menubar.ui -CLEAN = build_stamp.c - -LIB_DEPS += ../libguess/libguess.a +CLEAN = build_stamp.c libaudacious.exe.a +EXT_DEPS = ../libguess/libguess.a include ../../buildsys.mk -LDFLAGS += ${EXPORTDYN} -LIBS += ${LDADD} - ifdef USE_DBUS CPPFLAGS += -I../libaudclient DBUS_BINDINGS = dbus-server-bindings.h dbus-client-bindings.h @@ -184,7 +180,8 @@ -I.. -I../.. \ -I./intl -LIBS += ${LIBINTL} \ +LIBS += ${LDADD} \ + ${LIBINTL} \ ${samplerate_LIBS} \ ../libguess/libguess.a \ ${GTK_LIBS} \ @@ -194,6 +191,8 @@ ${LIBGLADE_LIBS} \ ${REGEX_LIBS} +LDFLAGS += ${EXPORTDYN} ${PROG_IMPLIB_LDFLAGS} + build_stamp.c: if [ -d ../../.hg ]; then \ revh=`hg tip --template 'const char *svn_stamp = "#rev#:#node|short#";\n' 2>/dev/null`; \ @@ -217,4 +216,29 @@ dbus-client-bindings.h: ${DBUS_BINDINGS_SOURCES} ${DBUS_BINDING_TOOL} --mode=glib-client --prefix=audacious_rc objects.xml > $@ -OBJECTIVE_DATA = audacious.desktop:${datadir}/applications +install-extra: + if test x"${PROG_IMPLIB_NEEDED}" = x"yes"; then \ + for i in ${PROG}; do \ + i="lib$$i.a"; \ + ${INSTALL_STATUS}; \ + if ${MKDIR_P} ${DESTDIR}${libdir} && install -m 644 $$i ${DESTDIR}${libdir}/$$i; then \ + ${INSTALL_OK}; \ + else \ + ${INSTALL_FAILED}; \ + fi \ + done \ + fi + +uninstall-extra: + if test x"${PROG_IMPLIB_NEEDED}" = x"yes"; then \ + for i in ${PROG}; do \ + i="lib$$i.a"; \ + if test -f ${DESTDIR}${libdir}/$$i; then \ + if rm -f ${DESTDIR}${libdir}/$$i; then \ + ${DELETE_OK}; \ + else \ + ${DELETE_FAILED}; \ + fi \ + fi \ + done \ + fi diff -r 134456e63256 -r c3d2de7c4151 src/audacious/audacious.desktop.in --- a/src/audacious/audacious.desktop.in Mon Sep 24 15:19:30 2007 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,12 +0,0 @@ -[Desktop Entry] -Name=Audacious -GenericName=Audio Player -Comment=Play music -Comment[hu]=Zene lejátszása -Exec=audacious %U -Icon=audacious -MimeType=application/x-ogg;audio/mp3;audio/mpeg;audio/mpegurl;audio/prs.sid;audio/x-flac;audio/x-it;audio/x-mod;audio/x-mp3;audio/x-mpeg;audio/x-mpegurl;audio/x-ms-wma;audio/x-musepack;audio/x-s3m;audio/x-scpls;audio/x-stm;audio/x-wav;audio/x-xm;application/ogg;audio/x-vorbis+ogg -Categories=Application;GTK;AudioVideo;Player; -Terminal=false -Type=Application -Encoding=UTF-8 diff -r 134456e63256 -r c3d2de7c4151 src/audacious/glade/prefswin.glade --- a/src/audacious/glade/prefswin.glade Mon Sep 24 15:19:30 2007 +0300 +++ b/src/audacious/glade/prefswin.glade Sun Sep 30 19:00:59 2007 +0300 @@ -39,7 +39,6 @@ False False True - True True @@ -133,9 +132,6 @@ - - False - @@ -147,7 +143,6 @@ tab - False False @@ -238,7 +233,6 @@ 1 - False @@ -250,7 +244,6 @@ tab 1 - False False @@ -341,7 +334,6 @@ 2 - False @@ -353,7 +345,6 @@ tab 2 - False False @@ -444,7 +435,6 @@ 3 - False @@ -456,16 +446,12 @@ tab 3 - False False - - False - @@ -474,7 +460,6 @@ tab - False False @@ -608,23 +593,38 @@ 2 8 - + True - 12 - 6 - - - True - 1 - _Player: - True - True - mainwin_font_button - - + True + 0 + Select playlist font: + True + True + + - + 1 + 2 + 1 + 2 + + + + + + True + True + 0 + Select main player window font: + True + True + + + + + 1 + 2 @@ -653,38 +653,23 @@ - + True - True - 0 - Select main player window font: - True - True - - + 12 + 6 + + + True + 1 + _Player: + True + True + mainwin_font_button + + - 1 - 2 - - - - - - True - True - 0 - Select playlist font: - True - True - - - - - 1 - 2 - 1 - 2 + @@ -881,7 +866,6 @@ 1 - False @@ -892,7 +876,6 @@ tab 1 - False False @@ -932,39 +915,33 @@ 3 6 - + + True + True + 5 0 100 1 10 10 + 1 + True + + + + + 1 + 2 + + + 4 + + + + True 0 4 - Changes volume by - - - - - - - - - True - 0 - 4 - percent + lines 2 3 - - - - - - - True - 0 - 4 - Scrolls playlist by - - 1 2 @@ -991,15 +968,13 @@ - + True 0 4 - lines + Scrolls playlist by - 2 - 3 1 2 @@ -1007,21 +982,29 @@ - + True - True - 5 0 100 1 10 10 - 1 - True - - + 0 + 4 + percent - 1 - 2 + 2 + 3 - 4 + + + + + True + 0 + 4 + Changes volume by + + + + @@ -1038,7 +1021,6 @@ 2 - False @@ -1049,7 +1031,6 @@ tab 2 - False False @@ -1237,20 +1218,30 @@ 2 2 - + True 1 - Fallback character encodings: + Auto character encoding detector for: GTK_JUSTIFY_RIGHT - 1 - 2 + + True + + + + + 1 + 2 + + + + True True @@ -1267,25 +1258,15 @@ - - True - - - - - 1 - 2 - - - - - + True 1 - Auto character encoding detector for: + Fallback character encodings: GTK_JUSTIFY_RIGHT + 1 + 2 @@ -1380,25 +1361,22 @@ 12 4 - + True - 1 - Title format: - GTK_JUSTIFY_RIGHT + Show information about titlestring format + GTK_RELIEF_HALF + False + 0 + + + True + gtk-index + + - - - - - - - True - 1 - Custom string: - GTK_JUSTIFY_RIGHT - - + 2 + 3 1 2 @@ -1406,21 +1384,6 @@ - - True - True - - - - - 1 - 2 - 1 - 2 - - - - True TITLE @@ -1438,24 +1401,42 @@ - + True - Show information about titlestring format - GTK_RELIEF_HALF - False - 0 - - - True - gtk-index - - + True + + - 2 - 3 + 1 + 2 1 2 + + + + + + True + 1 + Custom string: + GTK_JUSTIFY_RIGHT + + + 1 + 2 + + + + + + + True + 1 + Title format: + GTK_JUSTIFY_RIGHT + + @@ -1552,7 +1533,6 @@ 3 - False @@ -1563,7 +1543,6 @@ tab 3 - False False @@ -1609,15 +1588,26 @@ 6 6 - + True - True - - + 0 + File preset extension: - 1 - 2 + 1 + 2 + + + + + + + True + 0 + Directory preset file: + + + @@ -1637,26 +1627,15 @@ - + True - 0 - Directory preset file: + True + + - - - - - - - True - 0 - File preset extension: - - - 1 - 2 - + 1 + 2 @@ -1760,7 +1739,6 @@ 4 - False @@ -1771,7 +1749,6 @@ tab 4 - False False @@ -1836,14 +1813,30 @@ 6 6 - + True - 0 - 0 - Proxy hostname: + True + + - + 1 + 2 + 1 + 2 + + + + + + True + True + + + + + 1 + 2 @@ -1861,30 +1854,14 @@ - + True - True - - + 0 + 0 + Proxy hostname: - 1 - 2 - - - - - - True - True - - - - - 1 - 2 - 1 - 2 + @@ -1927,14 +1904,31 @@ 6 6 - + True - 0 - 0 - Proxy username: + True + False + + - + 1 + 2 + 1 + 2 + + + + + + True + True + + + + + 1 + 2 @@ -1952,31 +1946,14 @@ - + True - True - - + 0 + 0 + Proxy username: - 1 - 2 - - - - - - True - True - False - - - - - 1 - 2 - 1 - 2 + @@ -2038,7 +2015,6 @@ 5 - False @@ -2048,7 +2024,6 @@ tab 5 - False False @@ -2062,129 +2037,35 @@ tab 6 - False False - + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + GTK_POLICY_NEVER - + True - 12 + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + GTK_RESIZE_QUEUE + GTK_SHADOW_NONE - - True - 0 - <b>Audio System</b> - True - - - - - False - False - - - - - True - 6 - 12 - - + True - + True - 3 - 2 - 6 - 6 + 12 - + True 0 - Current output plugin: - - - - - - - - - True - - - - - 1 - 2 - - - - - - True - True - 0 0 600000 100 1000 1000 - 1 - - + <b>Audio System</b> + True - - 1 - 2 - 1 - 2 - - - - - - True - 0 - <span size="small">This is the amount of time to prebuffer audio streams by, in milliseconds. -Increase this value if you are experiencing audio skipping. -Please note however, that high values will result in Audacious performing poorly.</span> - True - True - - - 1 - 2 - 2 - 3 - - - - - - - True - 1 - Buffer size: - - - 1 - 2 - - - - - - True - 1 - 0 - gtk-info - - - 2 - 3 - GTK_FILL - @@ -2192,319 +2073,222 @@ False - - - - - False - False - 1 - - - - - True - 12 - - - True - 8 - GTK_BUTTONBOX_START - + True - False - True - True - 0 + 6 + 12 - + True - 0 - 0 - + True - 2 + 3 + 2 + 6 + 6 - + True - gtk-preferences + 1 + 0 + gtk-info - False - False + 2 + 3 + GTK_FILL + + + + + True + 1 + Buffer size: + + + 1 + 2 + - + True - Output Plugin Preferences - True + 0 + <span size="small">This is the amount of time to prebuffer audio streams by, in milliseconds. +Increase this value if you are experiencing audio skipping. +Please note however, that high values will result in Audacious performing poorly.</span> + True + True + + + 1 + 2 + 2 + 3 + + + + + + + True + True + 0 0 600000 100 1000 1000 + 1 + + - False - False - 1 + 1 + 2 + 1 + 2 + + + + + + True + + + + + 1 + 2 + + + + + + True + 0 + Current output plugin: + + + + - - - - - - - - True - False - True - True - 0 - - - True - 0 - 0 - - - True - 2 - - - True - gtk-about - - - False - False - - - - - True - Output Plugin Information - True - - - False - False - 1 - - - + + False + False + - 1 - - - - - - - False - False - 2 - - - - - True - 12 - 12 - - - True - 0 - <b>Format Detection</b> - True - - - - - False - False - 3 - - - - - True - 12 - - - True - True - When checked, Audacious will detect file formats on demand. This can result in a messier playlist, but delivers a major speed benefit. - Detect file formats on demand, instead of immediately. - True - 0 - True - - - - - - - False - False - 4 - - - - - True - 12 - - - True - True - When checked, Audacious will detect file formats based by extension. This is slightly slower than detection on demand, but still provides a minimal level of format detection. - Detect file formats by extension. - True - 0 - True - - - - - - - False - False - 5 - - - - - True - 12 - 12 - - - True - 0 - <b>Playback</b> - True - - - - - False - False - 6 - - - - - True - 12 - - - True - True - When Audacious starts, automatically begin playing from the point where we stopped before. - Continue playback on startup - True - 0 - True - - - - - - - False - False - 7 - - - - - True - 12 - - - True - True - When finished playing a song, don't automatically advance to the next. - Don't advance in the playlist - True - 0 - True - - - - - - - False - False - 8 - - - - - True - 12 - - - True - True - Pause between songs - True - 0 - True - - - - - False - False - 9 - - - - - True - 45 - - - True - - - True - 4 - Pause for - - - False - False - - - - - True - True - 2 0 100 1 10 10 - 1 - - - - False False 1 - + True - 4 - seconds + 12 + + + True + 8 + GTK_BUTTONBOX_START + + + True + False + True + True + 0 + + + True + 0 + 0 + + + True + 2 + + + True + gtk-preferences + + + False + False + + + + + True + Output Plugin Preferences + True + + + False + False + 1 + + + + + + + + + + + True + False + True + True + 0 + + + True + 0 + 0 + + + True + 2 + + + True + gtk-about + + + False + False + + + + + True + Output Plugin Information + True + + + False + False + 1 + + + + + + + + + 1 + + + + False @@ -2512,228 +2296,434 @@ 2 - - - - - False - False - 10 - - - - - True - 12 - 12 - - - True - 0 - <b>Sampling Rate Converter</b> - True - - - - - False - False - 11 - - - - - True - 12 - - - True - True - Enable Sampling Rate Converter - True - 0 - True - True - - - - - - - False - False - 12 - - - - - True - 6 - 12 - - - True + + + True + 12 + 12 + + + True + 0 + <b>Format Detection</b> + True + + + + + False + False + 3 + + - + + True + 12 + + + True + True + When checked, Audacious will detect file formats on demand. This can result in a messier playlist, but delivers a major speed benefit. + Detect file formats on demand, instead of immediately. + True + 0 + True + + + + + + + False + False + 4 + + + + True - 3 - 2 - 6 - 6 + 12 - + + True + True + When checked, Audacious will detect file formats based by extension. This is slightly slower than detection on demand, but still provides a minimal level of format detection. + Detect file formats by extension. + True + 0 + True + + + + + + + False + False + 5 + + + + + True + 12 + 12 + + True 0 - Sampling Rate [Hz]: + <b>Playback</b> + True - - GTK_FILL - - + + + False + False + 6 + + + + + True + 12 - + + True + True + When Audacious starts, automatically begin playing from the point where we stopped before. + Continue playback on startup + True + 0 + True + + + + + + + False + False + 7 + + + + + True + 12 + + True True - 96000 1000 768000 1000 1000 1000 - 1 - - + When finished playing a song, don't automatically advance to the next. + Don't advance in the playlist + True + 0 + True + + - - 1 - 2 - - + + + False + False + 8 + + + + + True + 12 - + True - 1 - 0 - gtk-info - - - 2 - 3 - GTK_FILL - - - - - True - 0 - <span size="small">All streams will be converted to this sampling rate. -This should be the max supported sampling rate of -the sound card or output plugin.</span> - True - True + True + Pause between songs + True + 0 + True - - 1 - 2 - 2 - 3 - GTK_FILL - - + + + False + False + 9 + + + + + True + 45 - + True - 0 - Interpolation Engine: + + + True + 4 + Pause for + + + False + False + + + + + True + True + 2 0 100 1 10 10 + 1 + + + + + False + False + 1 + + + + + True + 4 + seconds + + + False + False + 2 + + - - 1 - 2 - GTK_FILL - - - - - - True - Best Sinc Interpolation -Medium Sinc Interpolation -Fastest Sinc Interpolation -ZOH Interpolation -Linear Interpolation - - - - - 1 - 2 - 1 - 2 - GTK_FILL - GTK_FILL - False False + 10 + + + + + True + 12 + 12 + + + True + 0 + <b>Sampling Rate Converter</b> + True + + + + + False + False + 11 + + + + + True + 12 + + + True + True + Enable Sampling Rate Converter + True + 0 + True + True + + + + + + + False + False + 12 + + + + + True + 6 + 12 + + + True + + + True + 3 + 2 + 6 + 6 + + + True + Best Sinc Interpolation +Medium Sinc Interpolation +Fastest Sinc Interpolation +ZOH Interpolation +Linear Interpolation + + + + + 1 + 2 + 1 + 2 + GTK_FILL + GTK_FILL + + + + + True + 0 + Interpolation Engine: + + + 1 + 2 + GTK_FILL + + + + + + True + 0 + <span size="small">All streams will be converted to this sampling rate. +This should be the max supported sampling rate of +the sound card or output plugin.</span> + True + True + + + 1 + 2 + 2 + 3 + GTK_FILL + + + + + + True + 1 + 0 + gtk-info + + + 2 + 3 + GTK_FILL + + + + + True + True + 96000 1000 768000 1000 1000 1000 + 1 + + + + + 1 + 2 + + + + + + True + 0 + Sampling Rate [Hz]: + + + GTK_FILL + + + + + + False + False + + + + + + + False + False + 13 + + + + + True + 12 + 12 + + + True + 0 + <b>Volume Control</b> + True + + + + + False + False + 14 + + + + + True + 12 + + + True + True + Use software volume control. This may be useful for situations where your audio system does not support controlling the playback volume. + Use software volume control + True + 0 + True + + + + + + + False + False + 15 - - False - False - 13 - - - - - True - 12 - 12 - - - True - 0 - <b>Volume Control</b> - True - - - - - False - False - 14 - - - - - True - 12 - - - True - True - Use software volume control. This may be useful for situations where your audio system does not support controlling the playback volume. - Use software volume control - True - 0 - True - - - - - - - False - False - 15 - 7 - False + True @@ -2743,7 +2733,6 @@ tab 7 - False False @@ -2757,7 +2746,6 @@ tab 8 - False False @@ -2917,7 +2905,7 @@ 4 4 - + True True True @@ -2925,20 +2913,6 @@ 1 2 - 1 - 2 - - - - - - True - 0 - 12 - Include: - - - @@ -2957,7 +2931,19 @@ - + + True + 0 + 12 + Include: + + + + + + + + True True True @@ -2965,6 +2951,8 @@ 1 2 + 1 + 2 @@ -3186,17 +3174,59 @@ 12 6 - + + True + 1 + Blue + GTK_JUSTIFY_RIGHT + + + 2 + 3 + GTK_FILL + + + + + + True + 1 + Green + GTK_JUSTIFY_RIGHT + + + 1 + 2 + GTK_FILL + + + + + + True + 1 + Red + GTK_JUSTIFY_RIGHT + + + GTK_FILL + + + + + True True 0 0 255 0 0 0 - 3 False - + 1 2 + 2 + 3 + GTK_FILL @@ -3216,59 +3246,17 @@ - + True True 0 0 255 0 0 0 + 3 False - + 1 2 - 2 - 3 - GTK_FILL - - - - - True - 1 - Red - GTK_JUSTIFY_RIGHT - - - GTK_FILL - - - - - - True - 1 - Green - GTK_JUSTIFY_RIGHT - - - 1 - 2 - GTK_FILL - - - - - - True - 1 - Blue - GTK_JUSTIFY_RIGHT - - - 2 - 3 - GTK_FILL - diff -r 134456e63256 -r c3d2de7c4151 src/audacious/playlist.c --- a/src/audacious/playlist.c Mon Sep 24 15:19:30 2007 +0300 +++ b/src/audacious/playlist.c Sun Sep 30 19:00:59 2007 +0300 @@ -205,16 +205,15 @@ g_thread_self() != playlist_get_info_thread) return FALSE; - if (entry->decoder == NULL) - { + if (entry->decoder == NULL) { pr = input_check_file(entry->filename, FALSE); if (pr) - entry->decoder = pr->ip; + entry->decoder = pr->ip; } /* renew tuple if file mtime is newer than tuple mtime. */ - if(entry->tuple){ - if(tuple_get_int(entry->tuple, FIELD_MTIME, NULL) == modtime) + if (entry->tuple){ + if (tuple_get_int(entry->tuple, FIELD_MTIME, NULL) == modtime) return TRUE; else { mowgli_object_unref(entry->tuple); @@ -328,6 +327,7 @@ playlists_iter = playlists; playlistwin_update_list(playlist_get_active()); + playlist_manager_update(); } void @@ -342,6 +342,7 @@ playlists_iter = playlists; playlistwin_update_list(playlist_get_active()); + playlist_manager_update(); } void @@ -353,6 +354,7 @@ playlists_iter = playlists; playlistwin_update_list(playlist); + playlist_manager_update(); } /* *********************** playlist code ********************** */ @@ -368,17 +370,18 @@ gboolean playlist_set_current_name(Playlist *playlist, const gchar * title) { - gchar *oldtitle; - oldtitle = playlist->title; + gchar *oldtitle = playlist->title; if (!title) { playlist->title = NULL; - if(oldtitle) g_free(oldtitle); + g_free(oldtitle); + playlist_manager_update(); return FALSE; } playlist->title = str_to_utf8(title); - if(oldtitle) g_free(oldtitle); + g_free(oldtitle); + playlist_manager_update(); return TRUE; } @@ -389,21 +392,21 @@ gchar *old; old = playlist->filename; - if(!filename) { + if (!filename) { playlist->filename = NULL; - if(old) g_free(old); + g_free(old); return FALSE; } playlist->filename = filename_to_utf8(filename); - if(old) g_free(old); + g_free(old); return TRUE; } gchar * playlist_filename_get(Playlist *playlist) { - if(!playlist->filename) return NULL; + if (!playlist->filename) return NULL; return g_filename_from_utf8(playlist->filename, -1, NULL, NULL, NULL); } @@ -430,7 +433,7 @@ { GList *tmp = playlist->queue; - REQUIRE_LOCK( playlist->mutex ); + REQUIRE_LOCK(playlist->mutex); playlist->position = playlist->queue->data; playlist->queue = g_list_remove_link(playlist->queue, playlist->queue); @@ -551,9 +554,8 @@ if (restart_playing) { if (playlist->position) playback_initiate(); - else { + else mainwin_clear_song_info(); - } } playlist_manager_update(); @@ -589,9 +591,8 @@ if (restart_playing) { if (playlist->position) playback_initiate(); - else { + else mainwin_clear_song_info(); - } } playlist_manager_update(); @@ -629,9 +630,8 @@ if (restart_playing) { if (playlist->position) playback_initiate(); - else { + else mainwin_clear_song_info(); - } } playlistwin_update_list(playlist); @@ -668,33 +668,34 @@ InputPlugin * dec) { PlaylistEntry *entry; - gint subtunes_num = 0, i = 0; + Tuple *main_tuple = NULL; + gint nsubtunes = 0, i = 0; + gboolean add_flag = TRUE; g_return_if_fail(playlist != NULL); g_return_if_fail(filename != NULL); - if (tuple != NULL) - { - subtunes_num = tuple_get_int(tuple, FIELD_SUBSONG_NUM, NULL); - if (subtunes_num > 0) - { + if (tuple != NULL) { + nsubtunes = tuple->nsubtunes; + if (nsubtunes > 0) { + main_tuple = tuple; i = 1; - tuple_free(tuple); /* will be replaced by subtune tuples */ } } - for (; i <= subtunes_num; i++) - { + for (; add_flag && i <= nsubtunes; i++) { gchar *filename_entry; - if (subtunes_num > 0) - { - filename_entry = g_strdup_printf("%s?%d", filename, i); - /* we're dealing with subtune, let's ask again tuple information - to plugin, by passing the ?subsong suffix; this way we may get - specific subtune information in the tuple, if available */ + + if (nsubtunes > 0) { + filename_entry = g_strdup_printf("%s?%d", filename, + main_tuple->subtunes ? main_tuple->subtunes[i] : i); + + /* We're dealing with subtune, let's ask again tuple information + * to plugin, by passing the ?subtune suffix; this way we get + * specific subtune information in the tuple, if available. + */ tuple = dec->get_song_tuple(filename_entry); - } - else + } else filename_entry = g_strdup(filename); @@ -703,7 +704,7 @@ tuple ? tuple_get_int(tuple, FIELD_LENGTH, NULL) : -1, dec); g_free(filename_entry); - if(!playlist->tail) + if (!playlist->tail) playlist->tail = g_list_last(playlist->entries); PLAYLIST_LOCK(playlist); @@ -718,14 +719,14 @@ if(!playlist->entries) { // this is the first element playlist->entries = element; playlist->tail = element; + } else { // the rests + if (playlist->tail != NULL) { + playlist->tail->next = element; + playlist->tail = element; + } else + add_flag = FALSE; } - else { // the rests - g_return_if_fail(playlist->tail != NULL); - playlist->tail->next = element; - playlist->tail = element; - } - } - else { + } else { playlist->entries = g_list_insert(playlist->entries, entry, pos); } @@ -733,14 +734,18 @@ if (tuple != NULL) { const gchar *formatter = tuple_get_string(tuple, FIELD_FORMATTER, NULL); - entry->title = tuple_formatter_make_title_string(tuple, formatter ? - formatter : get_gentitle_format()); + entry->title = tuple_formatter_make_title_string(tuple, + formatter ? formatter : get_gentitle_format()); entry->length = tuple_get_int(tuple, FIELD_LENGTH, NULL); entry->tuple = tuple; } } - - if(tuple != NULL && tuple_get_int(tuple, FIELD_MTIME, NULL) == -1) { // kick the scanner thread only if mtime = -1 (uninitialized). + + if (main_tuple) + tuple_free(main_tuple); + + if (tuple != NULL && tuple_get_int(tuple, FIELD_MTIME, NULL) == -1) { + // kick the scanner thread only if mtime = -1 (uninitialized) g_mutex_lock(mutex_scan); playlist_get_info_scan_active = TRUE; g_mutex_unlock(mutex_scan); @@ -771,24 +776,24 @@ if (playlist->loading_playlist == TRUE || cfg.playlist_detect == TRUE) dec = NULL; else if (!str_has_prefix_nocase(filename, "http://") && - !str_has_prefix_nocase(filename, "https://")) - { + !str_has_prefix_nocase(filename, "https://")) { pr = input_check_file(filename, TRUE); - if (pr) - { + if (pr) { dec = pr->ip; tuple = pr->tuple; } - g_free(pr); } - if (cfg.playlist_detect == TRUE || playlist->loading_playlist == TRUE || (playlist->loading_playlist == FALSE && dec != NULL) || (playlist->loading_playlist == FALSE && !is_playlist_name(filename) && str_has_prefix_nocase(filename, "http"))) - { + if (cfg.playlist_detect == TRUE || playlist->loading_playlist == TRUE || + (playlist->loading_playlist == FALSE && dec != NULL) || + (playlist->loading_playlist == FALSE && !is_playlist_name(filename) && + str_has_prefix_nocase(filename, "http"))) { __playlist_ins_with_info_tuple(playlist, filename, pos, tuple, dec); playlist_generate_shuffle_list(playlist); playlistwin_update_list(playlist); + playlist_manager_update(); return TRUE; } @@ -806,7 +811,7 @@ if (!vfs_file_test(filename, G_FILE_TEST_IS_REGULAR)) return FALSE; - if (!(file = vfs_fopen(filename, "rb"))) + if ((file = vfs_fopen(filename, "rb")) == NULL) return FALSE; r = vfs_fread(buf, 1, sizeof(buf), file); @@ -842,8 +847,7 @@ { DeviceInode *devino = g_new0(DeviceInode, 1); - if (devino) - { + if (devino) { devino->dev = device; devino->ino = inode; } @@ -1106,7 +1110,7 @@ playlist->position->length = length; // overwrite tuple::title, mainly for streaming. it may incur side effects. --yaz - if(playlist->position->tuple && tuple_get_int(playlist->position->tuple, FIELD_LENGTH, NULL) == -1){ + if (playlist->position->tuple && tuple_get_int(playlist->position->tuple, FIELD_LENGTH, NULL) == -1){ tuple_disassociate(playlist->position->tuple, FIELD_TITLE, NULL); tuple_associate_string(playlist->position->tuple, FIELD_TITLE, NULL, title); } @@ -1145,7 +1149,7 @@ mainwin_set_song_info(rate, freq, nch); - if ( playlist->position ) + if (playlist->position) hook_call( "playlist set info" , playlist->position ); } @@ -1183,13 +1187,13 @@ { GList *plist_pos_list; gboolean restart_playing = FALSE; + if (!playlist_get_length(playlist)) return; PLAYLIST_LOCK(playlist); - if ((playlist_position_before_jump != NULL) && playlist->queue == NULL) - { + if ((playlist_position_before_jump != NULL) && playlist->queue == NULL) { playlist->position = playlist_position_before_jump; playlist_position_before_jump = NULL; } @@ -1224,13 +1228,16 @@ else playlist->position = playlist->entries->data; } + PLAYLIST_UNLOCK(playlist); + playlist_check_pos_current(playlist); if (restart_playing) playback_initiate(); playlistwin_update_list(playlist); + playlist_manager_update(); } void @@ -1244,8 +1251,7 @@ PLAYLIST_LOCK(playlist); - if ((playlist_position_before_jump != NULL) && playlist->queue == NULL) - { + if ((playlist_position_before_jump != NULL) && playlist->queue == NULL) { playlist->position = playlist_position_before_jump; playlist_position_before_jump = NULL; } @@ -1291,6 +1297,8 @@ playback_initiate(); else playlistwin_update_list(playlist); + + playlist_manager_update(); } void @@ -1301,8 +1309,7 @@ PLAYLIST_LOCK(playlist); - if ((cfg.shuffle) && (playlist_position_before_jump == NULL)) - { + if ((cfg.shuffle) && (playlist_position_before_jump == NULL)) { /* Shuffling and this is our first manual jump. */ playlist_position_before_jump = playlist->position; } @@ -1577,13 +1584,11 @@ title = str_to_utf8(playlist->position->title); } else { - gchar *realfn = NULL; - gchar *basename = NULL; - realfn = g_filename_from_uri(playlist->position->filename, NULL, NULL); - basename = g_path_get_basename(realfn ? realfn : playlist->position->filename); + gchar *realfn = g_filename_from_uri(playlist->position->filename, NULL, NULL); + gchar *basename = g_path_get_basename(realfn ? realfn : playlist->position->filename); title = filename_to_utf8(basename); - g_free(realfn); realfn = NULL; - g_free(basename); basename = NULL; + g_free(realfn); + g_free(basename); } /* @@ -1693,7 +1698,7 @@ filename = g_strchug(g_strdup(filename_p)); - if(cfg.convert_slash) + if (cfg.convert_slash) while ((tmp = strchr(filename, '\\')) != NULL) *tmp = '/'; @@ -1761,7 +1766,7 @@ filename = g_strchug(g_strdup(filename_p)); - if(cfg.convert_slash) + if (cfg.convert_slash) while ((tmp = strchr(filename, '\\')) != NULL) *tmp = '/'; @@ -1844,6 +1849,7 @@ playlist_generate_shuffle_list(playlist); playlistwin_update_list(playlist); + playlist_manager_update(); return new_len - old_len; } @@ -1995,9 +2001,8 @@ if (!playlist) return -1; - if (!(node = g_list_nth(playlist->entries, pos))) { + if (!(node = g_list_nth(playlist->entries, pos))) return -1; - } entry = node->data; @@ -2011,10 +2016,8 @@ if (playlist_entry_get_info(entry)) song_time = entry->length; - } - else { + } else song_time = entry->length; - } return song_time; } @@ -2046,6 +2049,19 @@ tracknumber_a - tracknumber_b : 0); } +static void +playlist_get_entry_title(PlaylistEntry * e, const gchar ** title) +{ + if (e->title) + *title = e->title; + else { + if (strrchr(e->filename, '/')) + *title = strrchr(e->filename, '/') + 1; + else + *title = e->filename; + } +} + static gint playlist_compare_playlist(PlaylistEntry * a, PlaylistEntry * b) @@ -2054,24 +2070,9 @@ g_return_val_if_fail(a != NULL, 0); g_return_val_if_fail(b != NULL, 0); - - if (a->title != NULL) - a_title = a->title; - else { - if (strrchr(a->filename, '/')) - a_title = strrchr(a->filename, '/') + 1; - else - a_title = a->filename; - } - - if (b->title != NULL) - b_title = b->title; - else { - if (strrchr(a->filename, '/')) - b_title = strrchr(b->filename, '/') + 1; - else - b_title = b->filename; - } + + playlist_get_entry_title(a, &a_title); + playlist_get_entry_title(b, &b_title); return strcasecmp(a_title, b_title); } @@ -2085,9 +2086,9 @@ g_return_val_if_fail(a != NULL, 0); g_return_val_if_fail(b != NULL, 0); - if(!a->tuple) + if (a->tuple == NULL) playlist_entry_get_info(a); - if(!b->tuple) + if (b->tuple == NULL) playlist_entry_get_info(b); if (a->tuple != NULL) @@ -2098,23 +2099,8 @@ if (a_title != NULL && b_title != NULL) return strcasecmp(a_title, b_title); - if (a->title != NULL) - a_title = a->title; - else { - if (strrchr(a->filename, '/')) - a_title = strrchr(a->filename, '/') + 1; - else - a_title = a->filename; - } - - if (b->title != NULL) - b_title = b->title; - else { - if (strrchr(a->filename, '/')) - b_title = strrchr(b->filename, '/') + 1; - else - b_title = b->filename; - } + playlist_get_entry_title(a, &a_title); + playlist_get_entry_title(b, &b_title); return strcasecmp(a_title, b_title); } @@ -2817,23 +2803,8 @@ g_return_val_if_fail(a != NULL, 0); g_return_val_if_fail(b != NULL, 0); - if (a->title) - a_title = a->title; - else { - if (strrchr(a->filename, '/')) - a_title = strrchr(a->filename, '/') + 1; - else - a_title = a->filename; - } - - if (b->title) - b_title = b->title; - else { - if (strrchr(a->filename, '/')) - b_title = strrchr(b->filename, '/') + 1; - else - b_title = b->filename; - } + playlist_get_entry_title(a, &a_title); + playlist_get_entry_title(b, &b_title); return strcmp(a_title, b_title); } @@ -3358,6 +3329,7 @@ playlist_recalc_total_time(newpl); playlistwin_update_list(playlist); + playlist_manager_update(); return newpl; } diff -r 134456e63256 -r c3d2de7c4151 src/audacious/playlist_container.c --- a/src/audacious/playlist_container.c Mon Sep 24 15:19:30 2007 +0300 +++ b/src/audacious/playlist_container.c Sun Sep 30 19:00:59 2007 +0300 @@ -40,7 +40,7 @@ registered_plcs = g_list_remove(registered_plcs, plc); } -PlaylistContainer *playlist_container_find(char *ext) +PlaylistContainer *playlist_container_find(gchar *ext) { GList *node; PlaylistContainer *plc; @@ -58,9 +58,9 @@ return NULL; } -void playlist_container_read(char *filename, gint pos) +void playlist_container_read(gchar *filename, gint pos) { - char *ext = strrchr(filename, '.') + 1; /* optimization: skip past the dot -nenolod */ + gchar *ext = strrchr(filename, '.') + 1; /* optimization: skip past the dot -nenolod */ PlaylistContainer *plc = playlist_container_find(ext); if (plc->plc_read == NULL) @@ -69,9 +69,9 @@ plc->plc_read(filename, pos); } -void playlist_container_write(char *filename, gint pos) +void playlist_container_write(gchar *filename, gint pos) { - char *ext = strrchr(filename, '.') + 1; /* optimization: skip past the dot -nenolod */ + gchar *ext = strrchr(filename, '.') + 1; /* optimization: skip past the dot -nenolod */ PlaylistContainer *plc = playlist_container_find(ext); if (plc->plc_write == NULL) @@ -80,9 +80,9 @@ plc->plc_write(filename, pos); } -gboolean is_playlist_name(char *filename) +gboolean is_playlist_name(gchar *filename) { - char *ext = strrchr(filename, '.') + 1; /* optimization: skip past the dot -nenolod */ + gchar *ext = strrchr(filename, '.') + 1; /* optimization: skip past the dot -nenolod */ PlaylistContainer *plc = playlist_container_find(ext); if (plc != NULL) diff -r 134456e63256 -r c3d2de7c4151 src/audacious/playlist_container.h --- a/src/audacious/playlist_container.h Mon Sep 24 15:19:30 2007 +0300 +++ b/src/audacious/playlist_container.h Sun Sep 30 19:00:59 2007 +0300 @@ -25,8 +25,8 @@ G_BEGIN_DECLS struct _PlaylistContainer { - char *name; /* human-readable name */ - char *ext; /* extension */ + gchar *name; /* human-readable name */ + gchar *ext; /* extension */ void (*plc_read)(const gchar *filename, gint pos); /* plc_load */ void (*plc_write)(const gchar *filename, gint pos); /* plc_write */ }; @@ -37,9 +37,9 @@ extern void playlist_container_register(PlaylistContainer *plc); extern void playlist_container_unregister(PlaylistContainer *plc); -extern void playlist_container_read(char *filename, gint pos); -extern void playlist_container_write(char *filename, gint pos); -extern PlaylistContainer *playlist_container_find(char *ext); +extern void playlist_container_read(gchar *filename, gint pos); +extern void playlist_container_write(gchar *filename, gint pos); +extern PlaylistContainer *playlist_container_find(gchar *ext); G_END_DECLS diff -r 134456e63256 -r c3d2de7c4151 src/audacious/plugin.h --- a/src/audacious/plugin.h Mon Sep 24 15:19:30 2007 +0300 +++ b/src/audacious/plugin.h Sun Sep 30 19:00:59 2007 +0300 @@ -284,11 +284,6 @@ /* So that input plugins can get the title formatting information */ G_CONST_RETURN gchar * get_gentitle_format(void); -/* So that output plugins can communicate with effect plugins */ -EffectPlugin *get_current_effect_plugin(void); -gboolean effects_enabled(void); -gboolean plugin_set_errortext(const gchar * text); - G_END_DECLS #include "audacious/mime.h" diff -r 134456e63256 -r c3d2de7c4151 src/audacious/pluginenum.c --- a/src/audacious/pluginenum.c Mon Sep 24 15:19:30 2007 +0300 +++ b/src/audacious/pluginenum.c Sun Sep 30 19:00:59 2007 +0300 @@ -492,7 +492,7 @@ * prefix. We will only see one plugin with the same * basename, so this is usually what the user want. */ - if (!strcmp(g_basename(cfg.outputplugin), g_basename(op->filename))) + if (cfg.outputplugin && !strcmp(g_basename(cfg.outputplugin), g_basename(op->filename))) op_data.current_output_plugin = op; if (op->init) op->init(); diff -r 134456e63256 -r c3d2de7c4151 src/audacious/skin.c --- a/src/audacious/skin.c Mon Sep 24 15:19:30 2007 +0300 +++ b/src/audacious/skin.c Sun Sep 30 19:00:59 2007 +0300 @@ -1473,11 +1473,8 @@ if (!g_file_test(path, G_FILE_TEST_IS_REGULAR | G_FILE_TEST_IS_DIR)) return FALSE; - if (!force) { - if (skin->path) - if (!strcmp(skin->path, path)) - return FALSE; - } + if (!force && skin->path && !strcmp(skin->path, path)) + return FALSE; skin_current_num++; diff -r 134456e63256 -r c3d2de7c4151 src/audacious/tuple.c --- a/src/audacious/tuple.c Mon Sep 24 15:19:30 2007 +0300 +++ b/src/audacious/tuple.c Sun Sep 30 19:00:59 2007 +0300 @@ -112,6 +112,8 @@ mowgli_heap_free(tuple_value_heap, value); } + g_free(tuple->subtunes); + mowgli_heap_free(tuple_heap, tuple); TUPLE_UNLOCK_WRITE(); } diff -r 134456e63256 -r c3d2de7c4151 src/audacious/tuple.h --- a/src/audacious/tuple.h Mon Sep 24 15:19:30 2007 +0300 +++ b/src/audacious/tuple.h Sun Sep 30 19:00:59 2007 +0300 @@ -82,6 +82,8 @@ mowgli_object_t parent; mowgli_dictionary_t *dict; TupleValue *values[FIELD_LAST]; + gint nsubtunes; + gint *subtunes; } Tuple; diff -r 134456e63256 -r c3d2de7c4151 src/audacious/ui_fileopener.c --- a/src/audacious/ui_fileopener.c Mon Sep 24 15:19:30 2007 +0300 +++ b/src/audacious/ui_fileopener.c Sun Sep 30 19:00:59 2007 +0300 @@ -35,7 +35,6 @@ { GSList *cur; gchar *ptr; - guint ctr = 0; Playlist *playlist = playlist_get_active(); for (cur = files; cur; cur = g_slist_next(cur)) { diff -r 134456e63256 -r c3d2de7c4151 src/audacious/ui_main.c --- a/src/audacious/ui_main.c Mon Sep 24 15:19:30 2007 +0300 +++ b/src/audacious/ui_main.c Sun Sep 30 19:00:59 2007 +0300 @@ -134,10 +134,11 @@ static GtkWidget *mainwin_shuffle, *mainwin_repeat; GtkWidget *mainwin_eq, *mainwin_pl; -GtkWidget *mainwin_info, *mainwin_othertext; +GtkWidget *mainwin_info; GtkWidget *mainwin_stime_min, *mainwin_stime_sec; -static GtkWidget *mainwin_rate_text, *mainwin_freq_text; +static GtkWidget *mainwin_rate_text, *mainwin_freq_text, + *mainwin_othertext; GtkWidget *mainwin_playstatus; @@ -2446,7 +2447,6 @@ g_signal_connect(mainwin_info, "right-clicked", mainwin_info_right_clicked_cb, NULL); mainwin_othertext = ui_skinned_textbox_new(SKINNED_WINDOW(mainwin)->fixed, 112, 43, 153, 1, SKIN_TEXT); - ui_skinned_textbox_set_xfont(mainwin_othertext, cfg.mainwin_use_xfont, cfg.mainwin_font); mainwin_rate_text = ui_skinned_textbox_new(SKINNED_WINDOW(mainwin)->fixed, 111, 43, 15, 0, SKIN_TEXT); diff -r 134456e63256 -r c3d2de7c4151 src/audacious/ui_main.h --- a/src/audacious/ui_main.h Mon Sep 24 15:19:30 2007 +0300 +++ b/src/audacious/ui_main.h Sun Sep 30 19:00:59 2007 +0300 @@ -99,7 +99,7 @@ extern GtkWidget *mainwin_jtf; extern GtkWidget *mainwin_eq, *mainwin_pl; -extern GtkWidget *mainwin_info, *mainwin_othertext; +extern GtkWidget *mainwin_info; extern GtkWidget *mainwin_stime_min, *mainwin_stime_sec; diff -r 134456e63256 -r c3d2de7c4151 src/audacious/ui_playlist_manager.c --- a/src/audacious/ui_playlist_manager.c Mon Sep 24 15:19:30 2007 +0300 +++ b/src/audacious/ui_playlist_manager.c Sun Sep 30 19:00:59 2007 +0300 @@ -41,18 +41,24 @@ { PLLIST_COL_NAME = 0, PLLIST_COL_ENTRIESNUM, - PLLIST_COL_PLPOINTER, + PLLIST_PLPOINTER, + PLLIST_TEXT_WEIGHT, PLLIST_NUMCOLS }; -static void +static GtkTreeIter playlist_manager_populate ( GtkListStore * store ) { GList *playlists = NULL; - GtkTreeIter iter; + Playlist *active, *iter_playlist, *next_playlist; + GtkTreeIter iter, insert, next, active_iter; + gboolean valid, have_active_iter; + active = playlist_get_active(); playlists = playlist_get_playlists(); + valid = gtk_tree_model_get_iter_first( GTK_TREE_MODEL(store) , &iter ); + have_active_iter = FALSE; while ( playlists != NULL ) { GList *entries = NULL; @@ -67,14 +73,75 @@ entriesnum++; PLAYLIST_UNLOCK(playlist); - gtk_list_store_append( store , &iter ); - gtk_list_store_set( store, &iter, + /* update the tree model conservatively */ + + if ( !valid ) + { + /* append */ + gtk_list_store_append( store , &insert ); + goto store_set; + } + + gtk_tree_model_get( GTK_TREE_MODEL(store) , &iter , + PLLIST_PLPOINTER , &iter_playlist , -1 ); + + if ( playlist == iter_playlist ) + { + /* already have - just update */ + insert = iter; + valid = gtk_tree_model_iter_next( GTK_TREE_MODEL(store) , &iter ); + goto store_set; + } + + /* handle movement/deletion/insertion of single elements */ + if ( gtk_tree_model_iter_next( GTK_TREE_MODEL(store) , &next ) ) + { + gtk_tree_model_get( GTK_TREE_MODEL(store) , &next , + PLLIST_PLPOINTER , &next_playlist , -1 ); + if ( playlist == next_playlist ) + { + /* remove */ + gtk_list_store_remove( store , &iter ); + iter = next; + valid = gtk_tree_model_iter_next(GTK_TREE_MODEL(store), &iter); + goto next_playlist; + } + } + + /* insert */ + gtk_list_store_insert_before( store , &insert , &iter ); + +store_set: + gtk_list_store_set( store, &insert, PLLIST_COL_NAME , pl_name , PLLIST_COL_ENTRIESNUM , entriesnum , - PLLIST_COL_PLPOINTER , playlist , -1 ); + PLLIST_PLPOINTER , playlist , + PLLIST_TEXT_WEIGHT , playlist == active ? + PANGO_WEIGHT_BOLD : PANGO_WEIGHT_NORMAL , + -1 ); + if ( !have_active_iter && playlist == active ) + { + active_iter = insert; + have_active_iter = TRUE; + } + +next_playlist: playlists = g_list_next(playlists); } - return; + + while (valid) + { + /* remove any other elements */ + next = iter; + valid = gtk_tree_model_iter_next( GTK_TREE_MODEL(store) , &next ); + gtk_list_store_remove( store , &iter ); + iter = next; + } + + if ( !have_active_iter ) + gtk_tree_model_get_iter_first( GTK_TREE_MODEL(store) , &active_iter ); + + return active_iter; } @@ -101,7 +168,9 @@ gtk_list_store_set( store, &iter, PLLIST_COL_NAME , pl_name , PLLIST_COL_ENTRIESNUM , 0 , - PLLIST_COL_PLPOINTER , newpl , -1 ); + PLLIST_PLPOINTER , newpl , + PLLIST_TEXT_WEIGHT , PANGO_WEIGHT_NORMAL , + -1 ); ENABLE_MANAGER_UPDATE(); @@ -115,11 +184,16 @@ GtkTreeSelection *listsel = gtk_tree_view_get_selection( GTK_TREE_VIEW(listview) ); GtkTreeModel *store; GtkTreeIter iter; + Playlist *active; + gboolean was_active; if ( gtk_tree_selection_get_selected( listsel , &store , &iter ) == TRUE ) { Playlist *playlist = NULL; - gtk_tree_model_get( store, &iter, PLLIST_COL_PLPOINTER , &playlist , -1 ); + gtk_tree_model_get( store, &iter, PLLIST_PLPOINTER , &playlist , -1 ); + + active = playlist_get_active(); + was_active = ( playlist == active ); if ( gtk_tree_model_iter_n_children( store , NULL ) < 2 ) { @@ -135,6 +209,20 @@ playlist_remove_playlist( playlist ); ENABLE_MANAGER_UPDATE(); } + + if ( was_active && gtk_tree_model_get_iter_first( store , &iter ) ) + { + /* update bolded playlist */ + active = playlist_get_active(); + do { + gtk_tree_model_get( store , &iter , + PLLIST_PLPOINTER , &playlist , -1 ); + gtk_list_store_set( GTK_LIST_STORE(store) , &iter , + PLLIST_TEXT_WEIGHT , playlist == active ? + PANGO_WEIGHT_BOLD : PANGO_WEIGHT_NORMAL , + -1 ); + } while ( gtk_tree_model_iter_next( store , &iter ) ); + } } return; @@ -142,18 +230,34 @@ static void -playlist_manager_cb_lv_dclick ( GtkTreeView * lv , GtkTreePath * path , +playlist_manager_cb_lv_dclick ( GtkTreeView * listview , GtkTreePath * path , GtkTreeViewColumn * col , gpointer userdata ) { GtkTreeModel *store; GtkTreeIter iter; + Playlist *playlist = NULL, *active; - store = gtk_tree_view_get_model( GTK_TREE_VIEW(lv) ); + store = gtk_tree_view_get_model( GTK_TREE_VIEW(listview) ); if ( gtk_tree_model_get_iter( store , &iter , path ) == TRUE ) { - Playlist *playlist = NULL; - gtk_tree_model_get( store , &iter , PLLIST_COL_PLPOINTER , &playlist , -1 ); + gtk_tree_model_get( store , &iter , PLLIST_PLPOINTER , &playlist , -1 ); + DISABLE_MANAGER_UPDATE(); playlist_select_playlist( playlist ); + ENABLE_MANAGER_UPDATE(); + } + + if ( gtk_tree_model_get_iter_first( store , &iter ) ) + { + /* update bolded playlist */ + active = playlist_get_active(); + do { + gtk_tree_model_get( store , &iter , + PLLIST_PLPOINTER , &playlist , -1 ); + gtk_list_store_set( GTK_LIST_STORE(store) , &iter , + PLLIST_TEXT_WEIGHT , playlist == active ? + PANGO_WEIGHT_BOLD : PANGO_WEIGHT_NORMAL , + -1 ); + } while ( gtk_tree_model_iter_next( store , &iter ) ); } return; @@ -181,17 +285,19 @@ static void playlist_manager_cb_lv_name_edited ( GtkCellRendererText *cell , gchar *path_string , - gchar *new_text , gpointer lv ) + gchar *new_text , gpointer listview ) { /* this is currently used to change playlist names */ - GtkTreeModel *store = gtk_tree_view_get_model( GTK_TREE_VIEW(lv) ); + GtkTreeModel *store = gtk_tree_view_get_model( GTK_TREE_VIEW(listview) ); GtkTreeIter iter; if ( gtk_tree_model_get_iter_from_string( store , &iter , path_string ) == TRUE ) { Playlist *playlist = NULL; - gtk_tree_model_get( GTK_TREE_MODEL(store), &iter, PLLIST_COL_PLPOINTER , &playlist , -1 ); + gtk_tree_model_get( GTK_TREE_MODEL(store), &iter, PLLIST_PLPOINTER , &playlist , -1 ); + DISABLE_MANAGER_UPDATE(); playlist_set_current_name( playlist , new_text ); + ENABLE_MANAGER_UPDATE(); gtk_list_store_set( GTK_LIST_STORE(store), &iter, PLLIST_COL_NAME , new_text , -1 ); } /* set the renderer uneditable again */ @@ -241,6 +347,8 @@ GtkWidget *playman_bbar_hbbox; GtkWidget *playman_bbar_bt_new, *playman_bbar_bt_del, *playman_bbar_bt_close; GdkGeometry playman_win_hints; + GtkTreeIter active_iter; + GtkTreePath *active_path; if ( playman_win != NULL ) { @@ -271,27 +379,37 @@ G_TYPE_STRING -> playlist name G_TYPE_UINT -> number of entries in playlist G_TYPE_POINTER -> playlist pointer (Playlist*) + PANGO_TYPE_WEIGHT -> font weight ---------------------------------------------- */ - pl_store = gtk_list_store_new( PLLIST_NUMCOLS , G_TYPE_STRING , G_TYPE_UINT , G_TYPE_POINTER ); - playlist_manager_populate( pl_store ); + pl_store = gtk_list_store_new( PLLIST_NUMCOLS , + G_TYPE_STRING , G_TYPE_UINT , G_TYPE_POINTER , PANGO_TYPE_WEIGHT ); + active_iter = playlist_manager_populate( pl_store ); playman_pl_lv_frame = gtk_frame_new( NULL ); playman_pl_lv = gtk_tree_view_new_with_model( GTK_TREE_MODEL(pl_store) ); - g_object_unref( pl_store ); + g_object_set_data( G_OBJECT(playman_win) , "lv" , playman_pl_lv ); g_object_set_data( G_OBJECT(playman_pl_lv) , "opt1" , GINT_TO_POINTER(0) ); playman_pl_lv_textrndr_entriesnum = gtk_cell_renderer_text_new(); /* uneditable */ playman_pl_lv_textrndr_name = gtk_cell_renderer_text_new(); /* can become editable */ + g_object_set( G_OBJECT(playman_pl_lv_textrndr_entriesnum) , "weight-set" , TRUE , NULL ); + g_object_set( G_OBJECT(playman_pl_lv_textrndr_name) , "weight-set" , TRUE , NULL ); g_signal_connect( G_OBJECT(playman_pl_lv_textrndr_name) , "edited" , G_CALLBACK(playlist_manager_cb_lv_name_edited) , playman_pl_lv ); g_object_set_data( G_OBJECT(playman_pl_lv) , "rn" , playman_pl_lv_textrndr_name ); playman_pl_lv_col_name = gtk_tree_view_column_new_with_attributes( - _("Playlist") , playman_pl_lv_textrndr_name , "text" , PLLIST_COL_NAME , NULL ); + _("Playlist") , playman_pl_lv_textrndr_name , + "text" , PLLIST_COL_NAME , + "weight", PLLIST_TEXT_WEIGHT , + NULL ); gtk_tree_view_column_set_expand( GTK_TREE_VIEW_COLUMN(playman_pl_lv_col_name) , TRUE ); gtk_tree_view_append_column( GTK_TREE_VIEW(playman_pl_lv), playman_pl_lv_col_name ); playman_pl_lv_col_entriesnum = gtk_tree_view_column_new_with_attributes( - _("Entries") , playman_pl_lv_textrndr_entriesnum , "text" , PLLIST_COL_ENTRIESNUM , NULL ); + _("Entries") , playman_pl_lv_textrndr_entriesnum , + "text" , PLLIST_COL_ENTRIESNUM , + "weight", PLLIST_TEXT_WEIGHT , + NULL ); gtk_tree_view_column_set_expand( GTK_TREE_VIEW_COLUMN(playman_pl_lv_col_entriesnum) , FALSE ); gtk_tree_view_append_column( GTK_TREE_VIEW(playman_pl_lv), playman_pl_lv_col_entriesnum ); playman_pl_lv_sw = gtk_scrolled_window_new( NULL , NULL ); @@ -337,6 +455,17 @@ g_signal_connect_swapped( G_OBJECT(playman_bbar_bt_close) , "clicked" , G_CALLBACK(gtk_widget_destroy) , playman_win ); + /* have active playlist selected and scrolled to */ + active_path = gtk_tree_model_get_path( GTK_TREE_MODEL(pl_store) , + &active_iter ); + gtk_tree_view_set_cursor( GTK_TREE_VIEW(playman_pl_lv) , + active_path , NULL , FALSE ); + gtk_tree_view_scroll_to_cell( GTK_TREE_VIEW(playman_pl_lv) , + active_path , NULL , TRUE , 0.5 , 0.0 ); + gtk_tree_path_free( active_path ); + + g_object_unref( pl_store ); + gtk_widget_show_all( playman_win ); } @@ -356,8 +485,6 @@ if ( GPOINTER_TO_INT(g_object_get_data(G_OBJECT(lv),"opt1")) == 0 ) { GtkListStore *store = (GtkListStore*)gtk_tree_view_get_model( GTK_TREE_VIEW(lv) ); - /* TODO: this re-populates everything... there's definitely room for optimization */ - gtk_list_store_clear( store ); playlist_manager_populate( store ); } return; diff -r 134456e63256 -r c3d2de7c4151 src/audacious/ui_preferences.c --- a/src/audacious/ui_preferences.c Mon Sep 24 15:19:30 2007 +0300 +++ b/src/audacious/ui_preferences.c Sun Sep 30 19:00:59 2007 +0300 @@ -585,7 +585,6 @@ cfg.mainwin_font = g_strdup(gtk_font_button_get_font_name(button)); ui_skinned_textbox_set_xfont(mainwin_info, cfg.mainwin_use_xfont, cfg.mainwin_font); - ui_skinned_textbox_set_xfont(mainwin_othertext, cfg.mainwin_use_xfont, cfg.mainwin_font); } static void @@ -603,7 +602,6 @@ gboolean useit = gtk_toggle_button_get_active(button); cfg.mainwin_use_xfont = useit != FALSE ? FALSE : TRUE; ui_skinned_textbox_set_xfont(mainwin_info, cfg.mainwin_use_xfont, cfg.mainwin_font); - ui_skinned_textbox_set_xfont(mainwin_othertext, cfg.mainwin_use_xfont, cfg.mainwin_font); playlistwin_set_sinfo_font(cfg.playlist_font); if (cfg.playlist_shaded) { diff -r 134456e63256 -r c3d2de7c4151 src/audacious/util.c --- a/src/audacious/util.c Mon Sep 24 15:19:30 2007 +0300 +++ b/src/audacious/util.c Sun Sep 30 19:00:59 2007 +0300 @@ -308,7 +308,7 @@ return NULL; } #else - tmpdir = g_strdup_printf("%s/audacious.%ld", g_get_tmp_dir(), rand()); + tmpdir = g_strdup_printf("%s/audacious.%ld", g_get_tmp_dir(), (long) rand()); make_directory(tmpdir, mode755); #endif diff -r 134456e63256 -r c3d2de7c4151 src/libguess/cjk_impl.c --- a/src/libguess/cjk_impl.c Mon Sep 24 15:19:30 2007 +0300 +++ b/src/libguess/cjk_impl.c Sun Sep 30 19:00:59 2007 +0300 @@ -38,7 +38,6 @@ */ #include "libguess.h" -#define NULL ((void *)0) /* take precedence if scores are same. you can customize the order as: */ /* ORDER_** &highest, &second, ... &lowest */ diff -r 134456e63256 -r c3d2de7c4151 src/libid3tag/Makefile --- a/src/libid3tag/Makefile Mon Sep 24 15:19:30 2007 +0300 +++ b/src/libid3tag/Makefile Sun Sep 30 19:00:59 2007 +0300 @@ -29,4 +29,4 @@ CPPFLAGS += ${LIB_CPPFLAGS} -I.. ${GLIB_CFLAGS} CFLAGS += ${LIB_CFLAGS} -LIBS += ${GLIB_LIBS} +LIBS += ${IMPLIB_LIBS} ${GLIB_LIBS} -lz