changeset 1022:e3beb4b76591 trunk

[svn] - statusicon: works again with auddrct
author giacomo
date Fri, 11 May 2007 18:14:07 -0700
parents da9d6ad2b5b5
children 51d0636e6dd0
files ChangeLog src/statusicon/si.c src/statusicon/si_common.h
diffstat 3 files changed, 32 insertions(+), 24 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Fri May 11 17:16:13 2007 -0700
+++ b/ChangeLog	Fri May 11 18:14:07 2007 -0700
@@ -1,3 +1,11 @@
+2007-05-12 00:16:13 +0000  William Pitcock <nenolod@sacredspiral.co.uk>
+  revision [2206]
+  - fix pulse_audio output sink. reported by Chainsaw.
+  
+  trunk/src/pulse_audio/pulse_audio.c |   12 ++++++------
+  1 file changed, 6 insertions(+), 6 deletions(-)
+
+
 2007-05-12 00:01:10 +0000  Giacomo Lozito <james@develia.org>
   revision [2204]
   - amidi-plug works again (uses auddrct.h in place of the deprecated beepctrl.h)
--- a/src/statusicon/si.c	Fri May 11 17:16:13 2007 -0700
+++ b/src/statusicon/si.c	Fri May 11 18:14:07 2007 -0700
@@ -23,7 +23,8 @@
 #include "si_audacious.h"
 #include "si_cfg.h"
 #include "si_common.h"
-#include <audacious/beepctrl.h>
+#include <audacious/auddrct.h>
+#include <audacious/playlist.h>
 
 
 static gboolean plugin_active = FALSE;
@@ -89,31 +90,31 @@
 {
   /* use the window visibility status to toggle show/hide
      (if at least one is visible, hide) */
-  if (( xmms_remote_is_main_win( si_gp.xmms_session ) == TRUE ) ||
-      ( xmms_remote_is_eq_win( si_gp.xmms_session ) == TRUE ) ||
-      ( xmms_remote_is_pl_win( si_gp.xmms_session ) == TRUE ))
+  if (( audacious_drct_main_win_is_visible() == TRUE ) ||
+      ( audacious_drct_eq_win_is_visible() == TRUE ) ||
+      ( audacious_drct_pl_win_is_visible() == TRUE ))
   {
     /* remember the visibility status of the player windows */
-    si_cfg.mw_visib_prevstatus = xmms_remote_is_main_win( si_gp.xmms_session );
-    si_cfg.ew_visib_prevstatus = xmms_remote_is_eq_win( si_gp.xmms_session );
-    si_cfg.pw_visib_prevstatus = xmms_remote_is_pl_win( si_gp.xmms_session );
+    si_cfg.mw_visib_prevstatus = audacious_drct_main_win_is_visible();
+    si_cfg.ew_visib_prevstatus = audacious_drct_eq_win_is_visible();
+    si_cfg.pw_visib_prevstatus = audacious_drct_pl_win_is_visible();
     /* now hide all of them */
     if ( si_cfg.mw_visib_prevstatus == TRUE )
-      xmms_remote_main_win_toggle( si_gp.xmms_session , FALSE );
+      audacious_drct_main_win_toggle( FALSE );
     if ( si_cfg.ew_visib_prevstatus == TRUE )
-      xmms_remote_eq_win_toggle( si_gp.xmms_session , FALSE );
+      audacious_drct_eq_win_toggle( FALSE );
     if ( si_cfg.pw_visib_prevstatus == TRUE )
-      xmms_remote_pl_win_toggle( si_gp.xmms_session , FALSE );
+      audacious_drct_pl_win_toggle( FALSE );
   }
   else
   {
     /* show the windows that were visible before */
     if ( si_cfg.mw_visib_prevstatus == TRUE )
-      xmms_remote_main_win_toggle( si_gp.xmms_session , TRUE );
+      audacious_drct_main_win_toggle( TRUE );
     if ( si_cfg.ew_visib_prevstatus == TRUE )
-      xmms_remote_eq_win_toggle( si_gp.xmms_session , TRUE );
+      audacious_drct_eq_win_toggle( TRUE );
     if ( si_cfg.pw_visib_prevstatus == TRUE )
-      xmms_remote_pl_win_toggle( si_gp.xmms_session , TRUE );
+      audacious_drct_pl_win_toggle( TRUE );
   }
 }
 
@@ -121,15 +122,14 @@
 si_audacious_volume_change ( gint value )
 {
   gint vl, vr;
-  xmms_remote_get_volume( si_gp.xmms_session , &vl , &vr );
-  xmms_remote_set_volume( si_gp.xmms_session ,
-    CLAMP(vl + value, 0, 100) , CLAMP(vr + value, 0, 100) );
+  audacious_drct_get_volume( &vl , &vr );
+  audacious_drct_set_volume( CLAMP(vl + value, 0, 100) , CLAMP(vr + value, 0, 100) );
 }
 
 void
 si_audacious_quit ( void )
 {
-  xmms_remote_quit( si_gp.xmms_session );
+  audacious_drct_quit();
 }
 
 void
@@ -159,27 +159,27 @@
   switch ( ctrl_code )
   {
     case SI_AUDACIOUS_PLAYBACK_CTRL_PREV:
-      xmms_remote_playlist_prev( si_gp.xmms_session );
+      audacious_drct_pl_prev();
       break;
 
     case SI_AUDACIOUS_PLAYBACK_CTRL_PLAY:
-      xmms_remote_play( si_gp.xmms_session );
+      audacious_drct_play();
       break;
 
     case SI_AUDACIOUS_PLAYBACK_CTRL_PAUSE:
-      xmms_remote_pause( si_gp.xmms_session );
+      audacious_drct_pause();
       break;
 
     case SI_AUDACIOUS_PLAYBACK_CTRL_STOP:
-      xmms_remote_stop( si_gp.xmms_session );
+      audacious_drct_stop();
       break;
 
     case SI_AUDACIOUS_PLAYBACK_CTRL_NEXT:
-      xmms_remote_playlist_next( si_gp.xmms_session );
+      audacious_drct_pl_next();
       break;
 
     case SI_AUDACIOUS_PLAYBACK_CTRL_EJECT:
-      xmms_remote_eject( si_gp.xmms_session );
+      mainwin_eject_pushed();
       break;
   }
 }
--- a/src/statusicon/si_common.h	Fri May 11 17:16:13 2007 -0700
+++ b/src/statusicon/si_common.h	Fri May 11 18:14:07 2007 -0700
@@ -30,6 +30,6 @@
 
 #include "../../config.h"
 
-#define SI_VERSION_PLUGIN "0.4+"
+#define SI_VERSION_PLUGIN "0.5"
 
 #endif /* !_I_ED_COMMON_H */