Mailinglist Archive: yast-commit (883 mails)

< Previous Next >
[yast-commit] r57872 - in /trunk/autoinstallation: doc/CreateProfileDetails.xml package/autoyast2.changes src/dialogs/ask.ycp src/schema/general.rnc
  • From: ug@xxxxxxxxxxxxxxxx
  • Date: Mon, 06 Jul 2009 13:39:15 -0000
  • Message-id: <E1MNoPc-0006il-0O@xxxxxxxxxxxxxxxx>
Author: ug
Date: Mon Jul 6 15:39:15 2009
New Revision: 57872

URL: http://svn.opensuse.org/viewcvs/yast?rev=57872&view=rev
Log:
timeout for ask-dialogs invented

Modified:
trunk/autoinstallation/doc/CreateProfileDetails.xml
trunk/autoinstallation/package/autoyast2.changes
trunk/autoinstallation/src/dialogs/ask.ycp
trunk/autoinstallation/src/schema/general.rnc

Modified: trunk/autoinstallation/doc/CreateProfileDetails.xml
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/autoinstallation/doc/CreateProfileDetails.xml?rev=57872&r1=57871&r2=57872&view=diff
==============================================================================
--- trunk/autoinstallation/doc/CreateProfileDetails.xml (original)
+++ trunk/autoinstallation/doc/CreateProfileDetails.xml Mon Jul 6 15:39:15 2009
@@ -3403,6 +3403,12 @@
<para><screen>&lt;back_label&gt;change
values&lt;/back_label&gt;</screen></para></entry>
<entry>optional</entry>
</row>
+ <row>
+ <entry>timeout (available in openSUSE 11.2 (not SLES11)</entry>
+ <entry>You can specify an integer here that is used as timeout
in seconds. If the user does not answer the question before the timeout, the
default value is taken as answer.
+ <para><screen>&lt;timeout
config:type="integer"&gt;30&lt;/timeout&gt;</screen></para></entry>
+ <entry>optional. A missing value is interpreted as 0 which
means that there is no timeout</entry>
+ </row>
</tbody>
</tgroup>


Modified: trunk/autoinstallation/package/autoyast2.changes
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/autoinstallation/package/autoyast2.changes?rev=57872&r1=57871&r2=57872&view=diff
==============================================================================
--- trunk/autoinstallation/package/autoyast2.changes (original)
+++ trunk/autoinstallation/package/autoyast2.changes Mon Jul 6 15:39:15 2009
@@ -1,4 +1,9 @@
-------------------------------------------------------------------
+Mon Jul 6 15:17:26 CEST 2009 - ug@xxxxxxx
+
+- timout for <ask> dialogs invented
+
+-------------------------------------------------------------------
Thu Jul 2 12:39:47 CEST 2009 - ug@xxxxxxx

- fixed order of groups in UI

Modified: trunk/autoinstallation/src/dialogs/ask.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/autoinstallation/src/dialogs/ask.ycp?rev=57872&r1=57871&r2=57872&view=diff
==============================================================================
--- trunk/autoinstallation/src/dialogs/ask.ycp (original)
+++ trunk/autoinstallation/src/dialogs/ask.ycp Mon Jul 6 15:39:15 2009
@@ -73,6 +73,7 @@
term help_term = `Empty();
term title_term = `Empty();
integer element_cnt = 0;
+ integer timeout = 0;
history = add( history, dialog_nr );
foreach( map ask, (list<map>)dialogs[dialog_nr]:[], ``{
string pathStr = ask["path"]:"";
@@ -86,15 +87,16 @@
title = ask["title"]:"";
back_label = ask["back_label"]:back_label;
ok_label = ask["ok_label"]:ok_label;
+ timeout = ask["timeout"]:0;
mod = true;

term dlg = `Dummy();
if( type == "boolean" ) {
boolean on=(ask["default"]:nil=="true")?(true):(false);
if( frametitle != "" ) {
- dlg = `Left( `Frame ( frametitle,
`CheckBox(`id(entry_id), question,on ) ) );
+ dlg = `Left( `Frame ( frametitle,
`CheckBox(`id(entry_id), `opt(`notify), question,on ) ) );
} else {
- dlg = `Left( `CheckBox(`id(entry_id), question,on ) );
+ dlg = `Left( `CheckBox(`id(entry_id), `opt(`notify),
question,on ) );
}
} else if( type == "symbol" ) {
list<any> dummy = [];
@@ -103,9 +105,9 @@
dummy = add( dummy, `item(`id(e["value"]:`none),
e["label"]:"",on) );
});
if( frametitle != "" ) {
- dlg = `Left( `Frame ( frametitle, `ComboBox(
`id(entry_id), question, dummy ) ) );
+ dlg = `Left( `Frame ( frametitle, `ComboBox(
`id(entry_id), `opt(`notify), question, dummy ) ) );
} else {
- dlg = `Left( `ComboBox( `id(entry_id), question, dummy
) );
+ dlg = `Left( `ComboBox( `id(entry_id), `opt(`notify),
question, dummy ) );
}
} else if( type == "static_text" ) {
if( frametitle != "" ) {
@@ -117,13 +119,13 @@
if( ask["password"]:false == true ) {
if( frametitle != "" ) {
dlg = `Left( `Frame ( frametitle, `VBox(
- `Password(`id(entry_id), question),
- `Password(`id(`pass2), "")
+ `Password(`id(entry_id), `opt(`notify),
question, ask["default"]:"" ),
+ `Password(`id(`pass2), `opt(`notify), "",
ask["default"]:"" )
) ) );
} else {
dlg = `Left( `VBox(
- `Password(`id(entry_id), question),
- `Password(`id(`pass2), "")
+ `Password(`id(entry_id), `opt(`notify),
question, ask["default"]:"" ),
+ `Password(`id(`pass2), `opt(`notify), "",
ask["default"]:"" )
) );
}
} else {
@@ -134,15 +136,15 @@
dummy = add( dummy, `item(`id(e["value"]:""),
e["label"]:"",on) );
});
if( frametitle != "" ) {
- dlg = `Left( `Frame ( frametitle, `ComboBox(
`id(entry_id), question, dummy ) ) );
+ dlg = `Left( `Frame ( frametitle, `ComboBox(
`id(entry_id), `opt(`notify), question, dummy ) ) );
} else {
- dlg = `Left( `ComboBox( `id(entry_id),
question, dummy ) );
+ dlg = `Left( `ComboBox( `id(entry_id),
`opt(`notify), question, dummy ) );
}
} else {
if( frametitle != "" ) {
- dlg = `Left( `Frame ( frametitle,
`TextEntry(`id(entry_id), question, ask["default"]:"" ) ) );
+ dlg = `Left( `Frame ( frametitle,
`TextEntry(`id(entry_id), `opt(`notify), question, ask["default"]:"" ) ) );
} else {
- dlg = `Left( `TextEntry(`id(entry_id),
question, ask["default"]:"" ) );
+ dlg = `Left( `TextEntry(`id(entry_id),
`opt(`notify), question, ask["default"]:"" ) );
}
}
}
@@ -183,8 +185,12 @@
if( size(history) < 2 )
UI::ChangeWidget(`id(`back) , `Enabled, false);
while (true) {
- any ret = UI::UserInput();
- if( ret == `ok ) {
+ any ret = nil;
+ if( timeout == 0 )
+ ret = UI::UserInput();
+ else
+ ret = UI::TimeoutUserInput( timeout * 1000 );
+ if( ret == `ok || ret == `timeout ) {
integer runAgain = 0;
integer element_cnt = 0;
dialogs[dialog_nr] = maplist( map ask,
(list<map>)dialogs[dialog_nr]:[], ``{

Modified: trunk/autoinstallation/src/schema/general.rnc
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/autoinstallation/src/schema/general.rnc?rev=57872&r1=57871&r2=57872&view=diff
==============================================================================
--- trunk/autoinstallation/src/schema/general.rnc (original)
+++ trunk/autoinstallation/src/schema/general.rnc Mon Jul 6 15:39:15 2009
@@ -43,7 +43,7 @@
}?
}
ask-list = element ask-list { LIST, ask* }
-ask = element ask { ask_question? & ask_default? & ask_help? & ask_title? &
ask_type? & ask_password? & ask_path? & ask_pathlist? & ask_stage? &
ask_selection? & ask_file? & ask_dialog? & ask_element? & ask_frametitle? &
ask_script? }
+ask = element ask { ask_question? & ask_default? & ask_help? & ask_title? &
ask_type? & ask_password? & ask_path? & ask_pathlist? & ask_stage? &
ask_selection? & ask_file? & ask_dialog? & ask_element? & ask_frametitle? &
ask_script? & ask_timeout? }
ask_question = element question { text }
ask_default = element default { text }
ask_help = element help { text }
@@ -60,6 +60,7 @@
ask_dialog = element dialog { text }
ask_element = element element { text }
ask_frametitle = element frametitle { text }
+ask_timeout = element timeout { INTEGER }
ask_pathlist = element pathlist {
LIST,
ask_path*

--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages