[yast-commit] r59849 - in /trunk/irda: VERSION package/yast2-irda.changes src/Irda.ycp src/ui.ycp testsuite/tests/Write.out
Author: jsuchome Date: Mon Nov 30 10:04:27 2009 New Revision: 59849 URL: http://svn.opensuse.org/viewcvs/yast?rev=59849&view=rev Log: - save baud rate (bnc#558525) - 2.19.1 Modified: trunk/irda/VERSION trunk/irda/package/yast2-irda.changes trunk/irda/src/Irda.ycp trunk/irda/src/ui.ycp trunk/irda/testsuite/tests/Write.out Modified: trunk/irda/VERSION URL: http://svn.opensuse.org/viewcvs/yast/trunk/irda/VERSION?rev=59849&r1=59848&r2=59849&view=diff ============================================================================== --- trunk/irda/VERSION (original) +++ trunk/irda/VERSION Mon Nov 30 10:04:27 2009 @@ -1 +1 @@ -2.19.0 +2.19.1 Modified: trunk/irda/package/yast2-irda.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/irda/package/yast2-irda.changes?rev=59849&r1=59848&r2=59849&view=diff ============================================================================== --- trunk/irda/package/yast2-irda.changes (original) +++ trunk/irda/package/yast2-irda.changes Mon Nov 30 10:04:27 2009 @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Fri Nov 27 08:28:57 CET 2009 - jsuchome@suse.cz + +- save baud rate (bnc#558525) +- 2.19.1 + +------------------------------------------------------------------- Thu Nov 26 16:20:52 CET 2009 - jsuchome@suse.cz - check for `ok dialog return value (bnc#558525) Modified: trunk/irda/src/Irda.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/irda/src/Irda.ycp?rev=59849&r1=59848&r2=59849&view=diff ============================================================================== --- trunk/irda/src/Irda.ycp (original) +++ trunk/irda/src/Irda.ycp Mon Nov 30 10:04:27 2009 @@ -107,8 +107,12 @@ if (port != "") { SCR::Write (.sysconfig.irda.IRDA_PORT, port); - SCR::Write (.sysconfig.irda, nil); } + if (max_baud_rate != nil) + { + SCR::Write (.sysconfig.irda.IRDA_MAX_BAUD_RATE, max_baud_rate); + } + SCR::Write (.sysconfig.irda, nil); Progress::NextStage (); Modified: trunk/irda/src/ui.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/irda/src/ui.ycp?rev=59849&r1=59848&r2=59849&view=diff ============================================================================== --- trunk/irda/src/ui.ycp (original) +++ trunk/irda/src/ui.ycp Mon Nov 30 10:04:27 2009 @@ -25,9 +25,9 @@ * @param port the serial port use for IrDA * (to see if it was changed and service needs to be restarted) */ -define boolean TestPopup (string port) { +define boolean TestPopup (string port, string baud_rate) { - boolean modified = port != Irda::port; + boolean modified = port != Irda::port || baud_rate != Irda::max_baud_rate; // if service was originaly started boolean orig_start = false; @@ -44,15 +44,16 @@ { // 1. save new configuration SCR::Write (.sysconfig.irda.IRDA_PORT, port); + SCR::Write (.sysconfig.irda.IRDA_MAX_BAUD_RATE, baud_rate); SCR::Write (.sysconfig.irda, nil); } // 2. start/restart the service // when module cannot be loaded, Runlevel returns 0 -> use target.bash if (!orig_start) - out = (map) SCR::Execute (.target.bash_output, "rcirda start"); + out = Service::RunInitScriptOutput ("irda", "start"); else if (modified) - out = (map) SCR::Execute (.target.bash_output, "rcirda restart"); + out = Service::RunInitScriptOutput ("irda", "restart"); return out["stderr"]:""; } @@ -66,6 +67,7 @@ if (modified) { SCR::Write (.sysconfig.irda.IRDA_PORT, Irda::port); + SCR::Write (.sysconfig.irda.IRDA_MAX_BAUD_RATE, Irda::max_baud_rate); SCR::Write (.sysconfig.irda, nil); } @@ -308,7 +310,7 @@ } if (ret == `test) { - TestPopup (port); + TestPopup (port, baud_rate); } } while (!contains ([`back, `abort, `cancel, `next, `ok], ret)); Modified: trunk/irda/testsuite/tests/Write.out URL: http://svn.opensuse.org/viewcvs/yast/trunk/irda/testsuite/tests/Write.out?rev=59849&r1=59848&r2=59849&view=diff ============================================================================== --- trunk/irda/testsuite/tests/Write.out (original) +++ trunk/irda/testsuite/tests/Write.out Mon Nov 30 10:04:27 2009 @@ -1,6 +1,8 @@ Dump ==== nothing modified: ===================== Return true Dump ==== stop irda: ============================ +Write .sysconfig.irda.IRDA_MAX_BAUD_RATE "0" true +Write .sysconfig.irda nil true Read .init.scripts.exists "irda" true Execute .target.bash_output "/etc/init.d/irda stop" $["TERM":"raw"] $["exit":0] Read .init.scripts.exists "irda" true @@ -12,6 +14,7 @@ Return true Dump ==== start irda, create link: ============== Write .sysconfig.irda.IRDA_PORT "new_port" true +Write .sysconfig.irda.IRDA_MAX_BAUD_RATE "0" true Write .sysconfig.irda nil true Read .init.scripts.exists "irda" true Execute .target.bash_output "/etc/init.d/irda stop" $["TERM":"raw"] $["exit":0] -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
jsuchome@svn.opensuse.org