Mercurial > audlegacy-plugins
changeset 1005:2346d918470d trunk
[svn] Fixed rootvis' config to only declare stuff once; modified alarm.c to use dbus and made appropriate changes to the build system.
author | magma |
---|---|
date | Wed, 09 May 2007 14:38:09 -0700 |
parents | be2d04b2bd28 |
children | 25c46293cbf2 |
files | ChangeLog configure.ac mk/rules.mk.in src/alarm/alarm.c src/rootvis/config.h |
diffstat | 5 files changed, 45 insertions(+), 20 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Sun May 06 22:53:19 2007 -0700 +++ b/ChangeLog Wed May 09 14:38:09 2007 -0700 @@ -1,3 +1,14 @@ +2007-05-07 05:53:19 +0000 Yoshiki Yazawa <yaz@cc.rim.or.jp> + revision [2172] + - move bmp_title_input_free() into file_open() to avoid memory leak. + - make vorbis.c check each tuple member has value. + + trunk/src/filewriter/filewriter.c | 6 +++++- + trunk/src/filewriter/mp3.c | 3 --- + trunk/src/filewriter/vorbis.c | 18 ++++++++++++------ + 3 files changed, 17 insertions(+), 10 deletions(-) + + 2007-05-06 17:59:18 +0000 William Pitcock <nenolod@sacredspiral.co.uk> revision [2170] - fix itunes7 hack
--- a/configure.ac Sun May 06 22:53:19 2007 -0700 +++ b/configure.ac Wed May 09 14:38:09 2007 -0700 @@ -107,7 +107,7 @@ [AC_MSG_ERROR([Cannot find Audacious, have you installed audacious yet?])] ) -dnl Check for GTK/GLib/GThread/Pango +dnl Check for GTK/GLib/GThread/Pango/DBus PKG_CHECK_MODULES(GLIB, [glib-2.0 >= 2.6.0 gthread-2.0], [ADD_PC_REQUIRES([glib-2.0 >= 2.6.0])], @@ -124,6 +124,12 @@ [AC_MSG_ERROR([Cannot find pango >= 1.8.0])] ) +PKG_CHECK_MODULES(DBUS, [dbus-1 >= 0.60 dbus-glib-1 >= 0.60], + [ADD_PC_REQUIRES([dbus-1 >= 0.60 dbus-glib-1 >= 0.60]) + AC_DEFINE(USE_DBUS, 1, [Define if D-Bus support enabled])], + [AC_MSG_ERROR([Cannot find dbus-glib >= 0.60])] +]) + dnl IPv6 support dnl ======================== AC_ARG_ENABLE(ipv6, @@ -1015,8 +1021,8 @@ AM_CONDITIONAL(HAVE_CDROM, test "${ac_cv_header_linux_cdrom_h}" = "yes" || test "${ac_cv_header_sys_cdio_h}" = "yes") AM_CONDITIONAL(HAVE_LINUX_JOYSTICK,test "${ac_cv_header_linux_joystick_h}" = "yes") -CFLAGS="$CFLAGS $AUDACIOUS_CFLAGS" -CXXFLAGS="$CXXFLAGS $AUDACIOUS_CFLAGS" +CFLAGS="$CFLAGS $AUDACIOUS_CFLAGS $DBUS_CFLAGS" +CXXFLAGS="$CXXFLAGS $AUDACIOUS_CFLAGS $DBUS_CFLAGS" AC_MSG_CHECKING(if __ELF__ is defined) AC_EGREP_CPP(yes,
--- a/mk/rules.mk.in Sun May 06 22:53:19 2007 -0700 +++ b/mk/rules.mk.in Wed May 09 14:38:09 2007 -0700 @@ -98,6 +98,8 @@ CXXFLAGS += @CXXFLAGS@ CYGPATH_W ?= @CYGPATH_W@ DATADIRNAME ?= @DATADIRNAME@ +DBUS_CFLAGS ?= @DBUS_CFLAGS@ +DBUS_LIBS ?= @DBUS_LIBS@ DCT64 ?= @DCT64@ DEFS ?= @DEFS@ DEPDIR ?= @DEPDIR@
--- a/src/alarm/alarm.c Sun May 06 22:53:19 2007 -0700 +++ b/src/alarm/alarm.c Wed May 09 14:38:09 2007 -0700 @@ -39,7 +39,8 @@ #include <string.h> #include <stdio.h> #include <audacious/plugin.h> -#include <audacious/beepctrl.h> +// #include <audacious/beepctrl.h> +#include <audacious/audctrl.h> #include <audacious/configdb.h> #include <gdk/gdk.h> #include <gtk/gtk.h> @@ -646,7 +647,7 @@ DEBUG("on_current_button_clicked\n"); - vol = xmms_remote_get_main_volume(alarm_plugin.xmms_session); + vol = audacious_remote_get_main_volume(alarm_plugin.dbus_proxy); adj = gtk_range_get_adjustment(alarm_conf.volume); gtk_adjustment_set_value(adj, (gfloat)vol); @@ -716,19 +717,19 @@ else inc = 1; - xmms_remote_set_main_volume(alarm_plugin.xmms_session, (gint)vols->start); + audacious_remote_set_main_volume(alarm_plugin.dbus_proxy, (gint)vols->start); //for(i=0;i<(vols->end - vols->start);i++) for(i=0;i<adiff;i++) { //threadsleep((gfloat)fading / (vols->end - vols->start)); threadsleep((gfloat)fading / (gfloat)adiff); - xmms_remote_set_main_volume(alarm_plugin.xmms_session, - (gint)(xmms_remote_get_main_volume(alarm_plugin.xmms_session) + inc)); + audacious_remote_set_main_volume(alarm_plugin.dbus_proxy, + (gint)(audacious_remote_get_main_volume(alarm_plugin.dbus_proxy) + inc)); } /* Setting the volume to the end volume sort of defeats the point if having * the code in there to allow other apps to control volume too :) */ - //xmms_remote_set_main_volume(alarm_plugin.xmms_session, (gint)vols->end); + //audacious_remote_set_main_volume(alarm_plugin.dbus_proxy, (gint)vols->end); /* and */ pthread_mutex_unlock(&fader_lock); @@ -756,7 +757,7 @@ if (dialog_visible(alarm_dialog)) gtk_widget_destroy(alarm_dialog); - currvol = xmms_remote_get_main_volume(alarm_plugin.xmms_session), + currvol = audacious_remote_get_main_volume(alarm_plugin.dbus_proxy), /* fade back to zero */ fade_vols.start = currvol; @@ -766,13 +767,13 @@ f_tid = alarm_thread_create(alarm_fade, &fade_vols, 0); pthread_join(f_tid, NULL); - xmms_remote_stop(alarm_plugin.xmms_session); + audacious_remote_stop(alarm_plugin.dbus_proxy); /* might as well set the volume to something higher than zero so we * dont confuse the poor people who just woke up and cant work out why * theres no music playing when they press the little play button :) */ - xmms_remote_set_main_volume(alarm_plugin.xmms_session, currvol); + audacious_remote_set_main_volume(alarm_plugin.dbus_proxy, currvol); DEBUG("alarm_stop done\n"); return(NULL); @@ -868,8 +869,8 @@ /* If I just add the url and it turns out to be a playlist then xmms * will sort that out.. It should also work for radio streams, I guess */ - xmms_remote_playlist_clear(alarm_plugin.xmms_session); - xmms_remote_playlist_add_url_string(alarm_plugin.xmms_session, playlist); + audacious_remote_playlist_clear(alarm_plugin.dbus_proxy); + audacious_remote_playlist_add_url_string(alarm_plugin.dbus_proxy, playlist); } else { @@ -878,8 +879,8 @@ * properly, or just use this semi-hack to let xmms do the playlist * parsing? */ - xmms_remote_playlist_clear(alarm_plugin.xmms_session); - xmms_remote_playlist(alarm_plugin.xmms_session, + audacious_remote_playlist_clear(alarm_plugin.dbus_proxy); + audacious_remote_playlist(alarm_plugin.dbus_proxy, &playlist, 1, TRUE); } } @@ -889,11 +890,11 @@ fader fade_vols; DEBUG("Fading is true\n"); - xmms_remote_set_main_volume(alarm_plugin.xmms_session, quietvol); + audacious_remote_set_main_volume(alarm_plugin.dbus_proxy, quietvol); /* start playing */ play_start = time(NULL); - xmms_remote_play(alarm_plugin.xmms_session); + audacious_remote_play(alarm_plugin.dbus_proxy); /* fade volume */ fade_vols.start = quietvol; @@ -907,11 +908,11 @@ /* no fading */ /* set volume */ - xmms_remote_set_main_volume(alarm_plugin.xmms_session, volume); + audacious_remote_set_main_volume(alarm_plugin.dbus_proxy, volume); /* start playing */ play_start = time(NULL); - xmms_remote_play(alarm_plugin.xmms_session); + audacious_remote_play(alarm_plugin.dbus_proxy); } if(alarm_conf.reminder_on == TRUE)