changeset 2167:d44adaddae8b

applied a patch from Igor Stirbu, middleclick on SI toggles play/pause
author Cristi Magherusan <majeru@atheme-project.org>
date Fri, 16 Nov 2007 03:35:28 +0200
parents 9fa5a7884514
children 3c9527d25346
files src/statusicon/si.c src/statusicon/si_audacious.h src/statusicon/si_ui.c
diffstat 3 files changed, 16 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/statusicon/si.c	Wed Nov 14 20:21:20 2007 +0900
+++ b/src/statusicon/si.c	Fri Nov 16 03:35:28 2007 +0200
@@ -180,3 +180,12 @@
       break;
   }
 }
+
+void
+si_audacious_toggle_playback ( void )
+{
+  if ( audacious_drct_get_playing() )
+    audacious_drct_pause();
+  else
+    audacious_drct_play();
+}
--- a/src/statusicon/si_audacious.h	Wed Nov 14 20:21:20 2007 +0900
+++ b/src/statusicon/si_audacious.h	Fri Nov 16 03:35:28 2007 +0200
@@ -37,6 +37,7 @@
 void si_audacious_playback_skip ( gint );
 void si_audacious_playback_ctrl ( gpointer );
 void si_audacious_quit ( void );
+void si_audacious_toggle_playback ( void );
 
 
 #endif /* !_I_SI_AUDACIOUS_H */
--- a/src/statusicon/si_ui.c	Wed Nov 14 20:21:20 2007 +0900
+++ b/src/statusicon/si_ui.c	Fri Nov 16 03:35:28 2007 +0200
@@ -78,6 +78,12 @@
       break;
     }
 
+    case 2:
+    {
+      si_audacious_toggle_playback();
+      break;
+    }
+
     case 3:
     {
       switch ( si_cfg.rclick_menu )