Author: lslezak Date: Thu May 24 10:27:53 2007 New Revision: 38122 URL: http://svn.opensuse.org/viewcvs/yast?rev=38122&view=rev Log: - added minimal commandline mode support to 'joystick' (#269895) - 2.15.7 Modified: trunk/sound/VERSION trunk/sound/package/yast2-sound.changes trunk/sound/sound/src/joystick.ycp Modified: trunk/sound/VERSION URL: http://svn.opensuse.org/viewcvs/yast/trunk/sound/VERSION?rev=38122&r1=38121&r2=38122&view=diff ============================================================================== --- trunk/sound/VERSION (original) +++ trunk/sound/VERSION Thu May 24 10:27:53 2007 @@ -1 +1 @@ -2.15.6 +2.15.7 Modified: trunk/sound/package/yast2-sound.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/sound/package/yast2-sound.changes?rev=38122&r1=38121&r2=38122&view=diff ============================================================================== --- trunk/sound/package/yast2-sound.changes (original) +++ trunk/sound/package/yast2-sound.changes Thu May 24 10:27:53 2007 @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Thu May 24 10:26:39 CEST 2007 - lslezak@suse.cz + +- added minimal commandline mode support to 'joystick' (#269895) +- 2.15.7 + +------------------------------------------------------------------- Fri Apr 27 12:26:42 CEST 2007 - lslezak@suse.cz - translate "iSpeaker" and "Front" channel names (#252595) Modified: trunk/sound/sound/src/joystick.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/sound/sound/src/joystick.ycp?rev=38122&r1=38121&r2=38122&view=diff ============================================================================== --- trunk/sound/sound/src/joystick.ycp (original) +++ trunk/sound/sound/src/joystick.ycp Thu May 24 10:27:53 2007 @@ -28,6 +28,7 @@ import "Sequencer"; import "Sound"; import "Wizard"; + import "CommandLine"; include "sound/joy_dialog.ycp"; include "sound/write_routines.ycp"; @@ -199,57 +200,68 @@ /********************** MAIN ************************/ + symbol StartGUI() + { + // sequence of dialogs + map sequence = $[ + "ws_start" : "detect", + + "detect" : $[ + `next : "save", + `abort : `abort, + `config : "joystick" + ], + + "joystick" : $[ + `abort : `abort, + `next : "detect" + ], + + "save" : $[ + `next : `ws_finish + ] + ]; + + // aliases for dialogs + map aliases = $[ + "detect" : ``(joystick_configuration()), + "joystick" : [ ``(joy_dialog(selected_card, label)), true ], + "save" : ``(saveconfig()) + ]; + + // create wizard dialog + Wizard::CreateDialog(); + Wizard::SetDesktopIcon("joystick"); - // sequence of dialogs - map sequence = $[ - "ws_start" : "detect", - - "detect" : $[ - `next : "save", - `abort : `abort, - `config : "joystick" - ], - - "joystick" : $[ - `abort : `abort, - `next : "detect" - ], - - "save" : $[ - `next : `ws_finish - ] - ]; + // read sound card configuration + boolean progress_orig = Progress::set(false); - // aliases for dialogs - map aliases = $[ - "detect" : ``(joystick_configuration()), - "joystick" : [ ``(joy_dialog(selected_card, label)), true ], - "save" : ``(saveconfig()) - ]; + if (!Sound::Read(false)) + return `abort; - // create wizard dialog - Wizard::CreateDialog(); - Wizard::SetDesktopIcon("joystick"); + Sound::StoreSettings (); - // read sound card configuration - boolean progress_orig = Progress::set(false); + Progress::set(progress_orig); - if (!Sound::Read(false)) - return `abort; + // read joystick configuration + Joystick::Read(abort_block); - Sound::StoreSettings (); + y2debug("Read joystick configuration: %1", Joystick::joystick); - Progress::set(progress_orig); + // start wizard sequencer + Sequencer::Run (aliases, sequence); + + // close dialog + Wizard::CloseDialog(); + } - // read joystick configuration - Joystick::Read(abort_block); - y2debug("Read joystick configuration: %1", Joystick::joystick); - // start wizard sequencer - Sequencer::Run (aliases, sequence); + map cmdline_description = $[ + "id" : "joystick", + "guihandler" : StartGUI, + ]; - // close dialog - Wizard::CloseDialog(); + return CommandLine::Run(cmdline_description); }//EOF -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org