changeset 1023:51d0636e6dd0 trunk

[svn] - evdev-plug: works again with auddrct
author giacomo
date Fri, 11 May 2007 18:35:51 -0700
parents e3beb4b76591
children 7cd2050c6f82
files ChangeLog src/evdev-plug/ed.c src/evdev-plug/ed_common.h
diffstat 3 files changed, 38 insertions(+), 33 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Fri May 11 18:14:07 2007 -0700
+++ b/ChangeLog	Fri May 11 18:35:51 2007 -0700
@@ -1,3 +1,11 @@
+2007-05-12 01:14:07 +0000  Giacomo Lozito <james@develia.org>
+  revision [2208]
+  - statusicon: works again with auddrct
+  trunk/src/statusicon/si.c        |   46 +++++++++++++++++++--------------------
+  trunk/src/statusicon/si_common.h |    2 -
+  2 files changed, 24 insertions(+), 24 deletions(-)
+
+
 2007-05-12 00:16:13 +0000  William Pitcock <nenolod@sacredspiral.co.uk>
   revision [2206]
   - fix pulse_audio output sink. reported by Chainsaw.
--- a/src/evdev-plug/ed.c	Fri May 11 18:14:07 2007 -0700
+++ b/src/evdev-plug/ed.c	Fri May 11 18:35:51 2007 -0700
@@ -25,7 +25,7 @@
 #include "ed_ui.h"
 #include "ed_common.h"
 #include <audacious/i18n.h>
-#include <audacious/beepctrl.h>
+#include <audacious/auddrct.h>
 
 
 GList *ed_device_listening_list = NULL;
@@ -144,84 +144,84 @@
 void
 ed_action_pb_play ( gpointer param )
 {
-  xmms_remote_play( ed_gp.xmms_session );
+  audacious_drct_play();
 }
 
 void
 ed_action_pb_stop ( gpointer param )
 {
-  xmms_remote_stop( ed_gp.xmms_session );
+  audacious_drct_stop();
 }
 
 void
 ed_action_pb_pause ( gpointer param )
 {
-  if (xmms_remote_is_playing( ed_gp.xmms_session ) || xmms_remote_is_paused( ed_gp.xmms_session ))
-    xmms_remote_pause( ed_gp.xmms_session );
+  if (audacious_drct_get_playing() || audacious_drct_get_paused())
+    audacious_drct_pause();
   else
-    xmms_remote_play( ed_gp.xmms_session );
+    audacious_drct_play();
 }
 
 void
 ed_action_pb_prev ( gpointer param )
 {
-  xmms_remote_playlist_prev( ed_gp.xmms_session );
+  audacious_drct_pl_prev();
 }
 
 void
 ed_action_pb_next ( gpointer param )
 {
-  xmms_remote_playlist_next( ed_gp.xmms_session );
+  audacious_drct_pl_next();
 }
 
 void
 ed_action_pb_eject ( gpointer param )
 {
-  xmms_remote_eject( ed_gp.xmms_session );
+  audacious_drct_eject();
 }
 
 void
 ed_action_pl_repeat ( gpointer param )
 {
-  xmms_remote_toggle_repeat( ed_gp.xmms_session );
+  audacious_drct_pl_repeat_toggle();
 }
 
 void
 ed_action_pl_shuffle ( gpointer param )
 {
-  xmms_remote_toggle_shuffle( ed_gp.xmms_session );
+  audacious_drct_pl_shuffle_toggle();
 }
 
 void
 ed_action_vol_up5 ( gpointer param )
 {
   gint vl, vr;
-  xmms_remote_get_volume( ed_gp.xmms_session , &vl , &vr );
-  xmms_remote_set_volume( ed_gp.xmms_session , CLAMP(vl + 5, 0, 100) , CLAMP(vr + 5, 0, 100) );
+  audacious_drct_get_volume( &vl , &vr );
+  audacious_drct_set_volume( CLAMP(vl + 5, 0, 100) , CLAMP(vr + 5, 0, 100) );
 }
 
 void
 ed_action_vol_down5 ( gpointer param )
 {
   gint vl, vr;
-  xmms_remote_get_volume( ed_gp.xmms_session , &vl , &vr );
-  xmms_remote_set_volume( ed_gp.xmms_session , CLAMP(vl - 5, 0, 100) , CLAMP(vr - 5, 0, 100) );
+  audacious_drct_get_volume( &vl , &vr );
+  audacious_drct_set_volume( CLAMP(vl - 5, 0, 100) , CLAMP(vr - 5, 0, 100) );
 }
 
 void
 ed_action_vol_up10 ( gpointer param )
 {
   gint vl, vr;
-  xmms_remote_get_volume( ed_gp.xmms_session , &vl , &vr );
-  xmms_remote_set_volume( ed_gp.xmms_session , CLAMP(vl + 10, 0, 100) , CLAMP(vr + 10, 0, 100) );
+  audacious_drct_get_volume( &vl , &vr );
+  audacious_drct_set_volume( CLAMP(vl + 10, 0, 100) , CLAMP(vr + 10, 0, 100) );
 }
 
 void
 ed_action_vol_down10 ( gpointer param )
 {
   gint vl, vr;
-  xmms_remote_get_volume( ed_gp.xmms_session , &vl , &vr );
-  xmms_remote_set_volume( ed_gp.xmms_session , CLAMP(vl - 10, 0, 100) , CLAMP(vr - 10, 0, 100) );
+  audacious_drct_get_volume( &vl , &vr );
+  audacious_drct_set_volume( CLAMP(vl - 10, 0, 100) , CLAMP(vr - 10, 0, 100) );
 }
 
 void
@@ -232,26 +232,26 @@
 
   if ( vl == -1 ) /* no previous memory of volume before mute action */
   {
-    xmms_remote_get_volume( ed_gp.xmms_session , &vl , &vr ); /* memorize volume before mute */
-    xmms_remote_set_volume( ed_gp.xmms_session , 0 , 0 ); /* mute */
+    audacious_drct_get_volume( &vl , &vr ); /* memorize volume before mute */
+    audacious_drct_set_volume( 0 , 0 ); /* mute */
   }
   else /* memorized volume values exist */
   {
     gint vl_now = 0;
     gint vr_now = 0;
 
-    xmms_remote_get_volume( ed_gp.xmms_session , &vl_now , &vr_now );
+    audacious_drct_get_volume( &vl_now , &vr_now );
     if (( vl_now == 0 ) && ( vr_now == 0 ))
     {
       /* the volume is still muted, restore the old values */
-      xmms_remote_set_volume( ed_gp.xmms_session , vl , vr );
+      audacious_drct_set_volume( vl , vr );
       vl = -1; vr = -1; /* reset these for next use */
     }
     else
     {
       /* the volume has been raised with other commands, act as if there wasn't a previous memory */
-      xmms_remote_get_volume( ed_gp.xmms_session , &vl , &vr ); /* memorize volume before mute */
-      xmms_remote_set_volume( ed_gp.xmms_session , 0 , 0 ); /* mute */
+      audacious_drct_get_volume( &vl , &vr ); /* memorize volume before mute */
+      audacious_drct_set_volume( 0 , 0 ); /* mute */
     }
   }
 }
@@ -259,26 +259,23 @@
 void
 ed_action_win_main ( gpointer param )
 {
-  xmms_remote_main_win_toggle( ed_gp.xmms_session ,
-    !xmms_remote_is_main_win ( ed_gp.xmms_session ) );
+  audacious_drct_main_win_toggle( !audacious_drct_main_win_is_visible() );
 }
 
 void
 ed_action_win_playlist ( gpointer param )
 {
-  xmms_remote_pl_win_toggle( ed_gp.xmms_session ,
-    !xmms_remote_is_pl_win ( ed_gp.xmms_session ) );
+  audacious_drct_pl_win_toggle( !audacious_drct_pl_win_is_visible () );
 }
 
 void
 ed_action_win_equalizer ( gpointer param )
 {
-  xmms_remote_eq_win_toggle( ed_gp.xmms_session ,
-    !xmms_remote_is_eq_win ( ed_gp.xmms_session ) );
+  audacious_drct_eq_win_toggle( !audacious_drct_eq_win_is_visible () );
 }
 
 void
 ed_action_win_jtf ( gpointer param )
 {
-  xmms_remote_show_jtf_box( ed_gp.xmms_session );
+  audacious_drct_jtf_show();
 }
--- a/src/evdev-plug/ed_common.h	Fri May 11 18:14:07 2007 -0700
+++ b/src/evdev-plug/ed_common.h	Fri May 11 18:35:51 2007 -0700
@@ -30,7 +30,7 @@
 
 #include "../../config.h"
 
-#define ED_VERSION_PLUGIN "0.1beta"
+#define ED_VERSION_PLUGIN "0.1"
 #define ED_VERSION_CONFIG "0"
 
 #define PLAYER_LOCALRC_FILE "evdev-plug.conf"