# HG changeset patch # User Matti Hamalainen # Date 1188801452 -10800 # Node ID 8581eb9d574a006ca64a2ba78574f9b74371475f # Parent b83dfdc605d5d444bbe7ae91e1e83a506f4a5254 Fix fileinfo dialog to work with new subtune system. diff -r b83dfdc605d5 -r 8581eb9d574a src/sid/xmms-sid.c --- a/src/sid/xmms-sid.c Mon Sep 03 09:06:54 2007 +0300 +++ b/src/sid/xmms-sid.c Mon Sep 03 09:37:32 2007 +0300 @@ -276,7 +276,8 @@ return result; } -static gboolean xs_get_trackinfo(const gchar *pcFilename, gchar **pcResult, gint *pTrack) + +gboolean xs_get_trackinfo(const gchar *pcFilename, gchar **pcResult, gint *pTrack) { gchar *tmpSep; diff -r b83dfdc605d5 -r 8581eb9d574a src/sid/xmms-sid.h --- a/src/sid/xmms-sid.h Mon Sep 03 09:06:54 2007 +0300 +++ b/src/sid/xmms-sid.h Mon Sep 03 09:37:32 2007 +0300 @@ -63,7 +63,7 @@ /* Configuration section identifier */ -#define XS_PACKAGE_STRING "Audacious-SID v0.8.0beta18" +#define XS_PACKAGE_STRING "Audacious-SID" #define XS_CONFIG_IDENT "sid" /* Default audio rendering frequency in Hz @@ -171,6 +171,7 @@ void xs_about(void); void xs_error(const char *, ...); +gboolean xs_get_trackinfo(const gchar *, gchar **, gint *); /* Debugging diff -r b83dfdc605d5 -r 8581eb9d574a src/sid/xs_fileinfo.c --- a/src/sid/xs_fileinfo.c Mon Sep 03 09:06:54 2007 +0300 +++ b/src/sid/xs_fileinfo.c Mon Sep 03 09:37:32 2007 +0300 @@ -145,7 +145,10 @@ tmpNode = NULL; if (tmpNode) { - subName = tmpNode->pName; + if (tmpNode->pName) + subName = tmpNode->pName; + else + subName = tmpNode->pTitle; subAuthor = tmpNode->pAuthor; subInfo = tmpNode->pInfo; } else { @@ -181,18 +184,27 @@ /* Current implementation leaves old fileinfo window untouched if * no information can be found for the new file. Hmm... */ +#ifdef AUDACIOUS_PLUGIN + xs_get_trackinfo(pcFilename, &tmpFilename, &n); +#else + tmpFilename = pcFilename; +#endif /* Get new tune information */ XS_MUTEX_LOCK(xs_fileinfowin); XS_MUTEX_LOCK(xs_status); - if ((tmpInfo = xs_status.sidPlayer->plrGetSIDInfo(pcFilename)) == NULL) { + if ((tmpInfo = xs_status.sidPlayer->plrGetSIDInfo(tmpFilename)) == NULL) { XS_MUTEX_UNLOCK(xs_fileinfowin); XS_MUTEX_UNLOCK(xs_status); return; } XS_MUTEX_UNLOCK(xs_status); - xs_fileinfostil = xs_stil_get(pcFilename); + xs_fileinfostil = xs_stil_get(tmpFilename); + +#ifdef AUDACIOUS_PLUGIN + g_free(tmpFilename); +#endif /* Check if there already is an open fileinfo window */ if (xs_fileinfowin) @@ -257,7 +269,7 @@ gtk_widget_show(tmpOptionMenu); /* Set the subtune information */ - xs_fileinfo_subtune(NULL, tmpMenu); + xs_fileinfo_subtune(tmpOptionMenu, tmpMenu); /* Free temporary tuneinfo */ xs_tuneinfo_free(tmpInfo);