From 82d7dbbbd638ca8c826be18b3871bc673e70fc25 Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser Date: Wed, 14 Nov 2012 04:19:00 +0100 Subject: [PATCH] * Allow to decrease or increase the volume via the command-line. --- src/TomahawkApp.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/TomahawkApp.cpp b/src/TomahawkApp.cpp index 62301c2a3..0ffce2afb 100644 --- a/src/TomahawkApp.cpp +++ b/src/TomahawkApp.cpp @@ -430,12 +430,14 @@ TomahawkApp::printHelp() echo( " --noupnp Disable UPnP\n" ); echo( " --nosip Disable SIP\n" ); echo( "\nPlayback Controls:\n" ); - echo( " --playpause Toggle playing/paused state\n" ); echo( " --play Start/resume playback\n" ); echo( " --pause Pause playback\n" ); + echo( " --playpause Toggle playing/paused state\n" ); echo( " --stop Stop playback\n" ); - echo( " --next Advances to the next track (if available)\n" ); echo( " --prev Returns to the previous track (if available)\n" ); + echo( " --next Advances to the next track (if available)\n" ); + echo( " --voldown Decrease the volume\n" ); + echo( " --volup Increase the volume\n" ); echo( "\nurl is a tomahawk:// command or alternatively a url that Tomahawk can recognize.\n" ); echo( "For more documentation, see http://wiki.tomahawk-player.org/mediawiki/index.php/Tomahawk://_Links\n" ); } @@ -779,6 +781,10 @@ TomahawkApp::instanceStarted( KDSingleApplicationGuard::Instance instance ) AudioEngine::instance()->pause(); else if ( arguments.contains( "--stop" ) ) AudioEngine::instance()->stop(); + else if ( arguments.contains( "--voldown" ) ) + AudioEngine::instance()->lowerVolume(); + else if ( arguments.contains( "--volup" ) ) + AudioEngine::instance()->raiseVolume(); else activate(); }