# HG changeset patch # User Matti Hamalainen # Date 1188770400 0 # Node ID ddae043e8e47d76337a3f1d9990574a4a4eea585 # Parent 89bdb8fdc2a72efc8a502afb5e0744e98ce12888 Remove Audacious related stuff. diff -r 89bdb8fdc2a7 -r ddae043e8e47 src/xs_title.c --- a/src/xs_title.c Sun Sep 02 21:31:02 2007 +0000 +++ b/src/xs_title.c Sun Sep 02 22:00:00 2007 +0000 @@ -24,6 +24,7 @@ #include "xs_support.h" #include "xs_config.h" + static void xs_path_split(gchar *path, gchar **tmpFilename, gchar **tmpFilePath, gchar **tmpFileExt) { gchar *tmpStr; @@ -48,69 +49,14 @@ } -#if defined(HAVE_XMMSEXTRA) || defined(AUDACIOUS_PLUGIN) -/* Tuple support - */ -static t_xs_tuple * xs_get_titletuple(gchar *tmpFilename, gchar *tmpFilePath, - gchar *tmpFileExt, t_xs_tuneinfo *p, gint subTune) -{ - t_xs_tuple *pResult; - -#ifdef AUDACIOUS_PLUGIN - pResult = tuple_new(); - tuple_associate_string(pResult, "title", p->sidName); - tuple_associate_string(pResult, "artist", p->sidComposer); - tuple_associate_string(pResult, "file-name", tmpFilename); - tuple_associate_string(pResult, "file-ext", tmpFileExt); - tuple_associate_string(pResult, "file-path", tmpFilePath); - tuple_associate_int(pResult, "track-number", subTune); - tuple_associate_string(pResult, "genre", "SID-tune"); - tuple_associate_string(pResult, "comment", p->sidCopyright); -#else - pResult = (TitleInput *) g_malloc0(sizeof(TitleInput)); - pResult->__size = XMMS_TITLEINPUT_SIZE; - pResult->__version = XMMS_TITLEINPUT_VERSION; - - /* Create the input fields */ - pResult->file_name = tmpFilename; - pResult->file_ext = tmpFileExt; - pResult->file_path = tmpFilePath; - - pResult->track_name = g_strdup(p->sidName); - pResult->track_number = subTune; - pResult->album_name = NULL; - pResult->performer = g_strdup(p->sidComposer); - pResult->date = g_strdup((p->sidModel == XS_SIDMODEL_6581) ? "SID6581" : "SID8580"); - - pResult->year = 0; - pResult->genre = g_strdup("SID-tune"); - pResult->comment = g_strdup(p->sidCopyright); -#endif - return pResult; -} - -#ifdef AUDACIOUS_PLUGIN -t_xs_tuple * xs_make_titletuple(t_xs_tuneinfo *p, gint subTune) -{ - gchar *tmpFilename, *tmpFilePath, *tmpFileExt; - - xs_path_split(p->sidFilename, &tmpFilename, &tmpFilePath, &tmpFileExt); - - return xs_get_titletuple(tmpFilename, tmpFilePath, tmpFileExt, p, subTune); -} -#endif -#endif - - -/* - * Create a title string based on given information and settings. +/* Create a title string based on given information and settings. */ #define VPUTCH(MCH) \ if (iIndex < XS_BUF_SIZE) tmpBuf[iIndex++] = MCH; #define VPUTSTR(MSTR) { \ if (MSTR) { \ - if ((iIndex + strlen(MSTR) + 1) < XS_BUF_SIZE) { \ + if ((iIndex + strlen(MSTR) + 1) < XS_BUF_SIZE) {\ strcpy(&tmpBuf[iIndex], MSTR); \ iIndex += strlen(MSTR); \ } else \ @@ -138,18 +84,29 @@ /* Check if the titles are overridden or not */ -#if defined(AUDACIOUS_PLUGIN) +#ifdef HAVE_XMMSEXTRA if (!xs_cfg.titleOverride) { - t_xs_tuple *pTuple = xs_get_titletuple( - tmpFilename, tmpFilePath, tmpFileExt, p, subTune); - pcResult = tuple_formatter_make_title_string(pTuple, get_gentitle_format()); - tuple_free(pTuple); - } else -#elif defined(HAVE_XMMSEXTRA) - if (!xs_cfg.titleOverride) { - t_xs_tuple *pTuple = xs_get_titletuple( - tmpFilename, tmpFilePath, tmpFileExt, p, subTune); + TitleInput *pTuple; + + pTuple = (TitleInput *) g_malloc0(sizeof(TitleInput)); + pTuple->__size = XMMS_TITLEINPUT_SIZE; + pTuple->__version = XMMS_TITLEINPUT_VERSION; + /* Create the input fields */ + pTuple->file_name = tmpFilename; + pTuple->file_ext = tmpFileExt; + pTuple->file_path = tmpFilePath; + + pTuple->track_name = g_strdup(p->sidName); + pTuple->track_number = subTune; + pTuple->album_name = NULL; + pTuple->performer = g_strdup(p->sidComposer); + pTuple->date = g_strdup((p->sidModel == XS_SIDMODEL_6581) ? "SID6581" : "SID8580"); + + pTuple->year = 0; + pTuple->genre = g_strdup("SID-tune"); + pTuple->comment = g_strdup(p->sidCopyright); + pcResult = xmms_get_titlestring(xmms_get_gentitle_format(), pTuple); g_free(pTuple->track_name); diff -r 89bdb8fdc2a7 -r ddae043e8e47 src/xs_title.h --- a/src/xs_title.h Sun Sep 02 21:31:02 2007 +0000 +++ b/src/xs_title.h Sun Sep 02 22:00:00 2007 +0000 @@ -8,9 +8,6 @@ #endif gchar *xs_make_titlestring(t_xs_tuneinfo *, gint); -#ifdef AUDACIOUS_PLUGIN -t_xs_tuple *xs_make_titletuple(t_xs_tuneinfo *p, gint subTune); -#endif #ifdef __cplusplus }