diff --git a/cmake/ConkyBuildOptions.cmake b/cmake/ConkyBuildOptions.cmake index 69b56269..a208772b 100644 --- a/cmake/ConkyBuildOptions.cmake +++ b/cmake/ConkyBuildOptions.cmake @@ -119,11 +119,6 @@ if(BUILD_LUA) endif(BUILD_LUA) option(BUILD_AUDACIOUS "Build audacious (music player) support" false) -if(BUILD_AUDACIOUS) - option(BUILD_AUDACIOUS_LEGACY "Use legacy audacious (music player) support" false) -else(BUILD_AUDACIOUS) - set(BUILD_AUDACIOUS_LEGACY false) -endif(BUILD_AUDACIOUS) option(BUILD_BMPX "Build BMPx (music player) support" false) diff --git a/cmake/ConkyPlatformChecks.cmake b/cmake/ConkyPlatformChecks.cmake index 6460d3eb..8562c0bc 100644 --- a/cmake/ConkyPlatformChecks.cmake +++ b/cmake/ConkyPlatformChecks.cmake @@ -234,15 +234,14 @@ endif(BUILD_LUA) if(BUILD_AUDACIOUS) set(WANT_GLIB true) - if(NOT BUILD_AUDACIOUS_LEGACY) - pkg_check_modules(AUDACIOUS REQUIRED audacious>=1.4.0 audclient>=1.4.0 dbus-glib-1 gobject-2.0) - set(conky_libs ${conky_libs} ${AUDACIOUS_LIBRARIES}) - set(conky_includes ${conky_includes} ${AUDACIOUS_INCLUDE_DIRS}) - else(NOT BUILD_AUDACIOUS_LEGACY) + pkg_check_modules(NEW_AUDACIOUS audacious>=1.4.0) + if(NEW_AUDACIOUS_FOUND) + pkg_check_modules(AUDACIOUS REQUIRED audclient>=1.4.0) + else(NEW_AUDACIOUS_FOUND) pkg_check_modules(AUDACIOUS REQUIRED audacious<1.4.0) - set(conky_libs ${conky_libs} ${AUDACIOUS_LIBRARIES}) - set(conky_includes ${conky_includes} ${AUDACIOUS_INCLUDE_DIRS}) - endif(NOT BUILD_AUDACIOUS_LEGACY) + endif(NEW_AUDACIOUS_FOUND) + set(conky_libs ${conky_libs} ${AUDACIOUS_LIBRARIES}) + set(conky_includes ${conky_includes} ${AUDACIOUS_INCLUDE_DIRS}) endif(BUILD_AUDACIOUS) if(BUILD_BMPX) diff --git a/cmake/config.h.in b/cmake/config.h.in index e7f8d28f..51f375d5 100644 --- a/cmake/config.h.in +++ b/cmake/config.h.in @@ -49,7 +49,7 @@ #cmakedefine BUILD_AUDACIOUS 1 -#cmakedefine BUILD_AUDACIOUS_LEGACY 1 +#cmakedefine NEW_AUDACIOUS_FOUND 1 #cmakedefine BUILD_MPD 1 diff --git a/src/audacious.cc b/src/audacious.cc index 9dfb3154..b6a89005 100644 --- a/src/audacious.cc +++ b/src/audacious.cc @@ -29,11 +29,11 @@ #include #include -#ifndef BUILD_AUDACIOUS_LEGACY +#ifdef NEW_AUDACIOUS_FOUND #include #include #include -#else /* BUILD_AUDACIOUS_LEGACY */ +#else /* NEW_AUDACIOUS_FOUND */ #include #define audacious_remote_is_running(x) \ xmms_remote_is_running(x) @@ -55,7 +55,7 @@ xmms_remote_get_playlist_file(x, y) #define audacious_remote_get_playlist_length(x) \ xmms_remote_get_playlist_length(x) -#endif /* BUILD_AUDACIOUS_LEGACY */ +#endif /* NEW_AUDACIOUS_FOUND */ /* access to this item array is synchronized */ static audacious_t audacious_items; @@ -125,7 +125,7 @@ void audacious_thread_func(thread_handle &handle) gint rate, freq, chans, vol; gchar *psong, *pfilename; -#ifndef BUILD_AUDACIOUS_LEGACY +#ifdef NEW_AUDACIOUS_FOUND DBusGProxy *session = NULL; DBusGConnection *connection = NULL; #else @@ -136,7 +136,7 @@ void audacious_thread_func(thread_handle &handle) psong = NULL; pfilename = NULL; -#ifndef BUILD_AUDACIOUS_LEGACY +#ifdef NEW_AUDACIOUS_FOUND g_type_init(); connection = dbus_g_bus_get(DBUS_BUS_SESSION, NULL); if (!connection) { @@ -147,7 +147,7 @@ void audacious_thread_func(thread_handle &handle) if (!session) { CRIT_ERR(NULL, NULL, "unable to create dbus proxy"); } -#endif /* BUILD_AUDACIOUS_LEGACY */ +#endif /* NEW_AUDACIOUS_FOUND */ /* Loop until the main thread resets the runnable signal. */ while (1) { @@ -242,7 +242,7 @@ void audacious_thread_func(thread_handle &handle) } if (handle.test(0)) { -#ifndef BUILD_AUDACIOUS_LEGACY +#ifdef NEW_AUDACIOUS_FOUND /* release reference to dbus proxy */ g_object_unref(session); #endif