changeset 2425:ced4a5392948

made status plugin use the main mouse wheel setting when changing the volume (Bugzilla #184)
author Cristi Magherusan <majeru@atheme.org>
date Mon, 25 Feb 2008 13:57:28 +0200
parents e780330f6189
children 39be83376f18
files src/statusicon/si_cfg.c src/statusicon/si_cfg.h src/statusicon/si_ui.c
diffstat 3 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/statusicon/si_cfg.c	Sun Feb 24 14:42:48 2008 +0200
+++ b/src/statusicon/si_cfg.c	Mon Feb 25 13:57:28 2008 +0200
@@ -48,6 +48,9 @@
   if ( !aud_cfg_db_get_bool( cfgfile , "statusicon" ,
        "ew_visib_prevstatus" , &(si_cfg.ew_visib_prevstatus) ) )
     si_cfg.ew_visib_prevstatus = FALSE;
+  if ( !aud_cfg_db_get_int( cfgfile , "audacious" ,
+       "mouse_wheel_change" , &(si_cfg.volume_delta) ) )
+    si_cfg.volume_delta = 5;
 
   aud_cfg_db_close( cfgfile );
   return;
--- a/src/statusicon/si_cfg.h	Sun Feb 24 14:42:48 2008 +0200
+++ b/src/statusicon/si_cfg.h	Mon Feb 25 13:57:28 2008 +0200
@@ -39,6 +39,7 @@
   gboolean mw_visib_prevstatus;
   gboolean pw_visib_prevstatus;
   gboolean ew_visib_prevstatus;
+  gint volume_delta;
 }
 si_cfg_t;
 
--- a/src/statusicon/si_ui.c	Sun Feb 24 14:42:48 2008 +0200
+++ b/src/statusicon/si_ui.c	Mon Feb 25 13:57:28 2008 +0200
@@ -127,7 +127,7 @@
       switch ( si_cfg.scroll_action )
       {
         case SI_CFG_SCROLL_ACTION_VOLUME:
-          si_audacious_volume_change( 5 );
+          si_audacious_volume_change( si_cfg.volume_delta );
           break;
         case SI_CFG_SCROLL_ACTION_SKIP:
           si_audacious_playback_skip( -1 );
@@ -141,7 +141,7 @@
       switch ( si_cfg.scroll_action )
       {
         case SI_CFG_SCROLL_ACTION_VOLUME:
-          si_audacious_volume_change( -5 );
+          si_audacious_volume_change( -si_cfg.volume_delta );
           break;
         case SI_CFG_SCROLL_ACTION_SKIP:
           si_audacious_playback_skip( 1 );