Author: ug Date: Wed Mar 10 15:15:51 2010 New Revision: 61228 URL: http://svn.opensuse.org/viewcvs/yast?rev=61228&view=rev Log: location for scripts added to UI Modified: trunk/autoinstallation/package/autoyast2.changes trunk/autoinstallation/src/dialogs/script_dialogs.ycp trunk/autoinstallation/src/modules/AutoinstScripts.ycp Modified: trunk/autoinstallation/package/autoyast2.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/autoinstallation/package/autoyast2.changes?rev=61228&r1=61227&r2=61228&view=diff ============================================================================== --- trunk/autoinstallation/package/autoyast2.changes (original) +++ trunk/autoinstallation/package/autoyast2.changes Wed Mar 10 15:15:51 2010 @@ -1,4 +1,9 @@ ------------------------------------------------------------------- +Wed Mar 10 15:15:29 CET 2010 - ug@suse.de + +- location for scripts added to UI + +------------------------------------------------------------------- Wed Mar 10 13:46:57 CET 2010 - ug@suse.de - docu and cleanup Modified: trunk/autoinstallation/src/dialogs/script_dialogs.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/autoinstallation/src/dialogs/script_dialogs.ycp?rev=61228&r1=61227&r2=61228&view=diff ============================================================================== --- trunk/autoinstallation/src/dialogs/script_dialogs.ycp (original) +++ trunk/autoinstallation/src/dialogs/script_dialogs.ycp Wed Mar 10 15:15:51 2010 @@ -182,7 +182,10 @@ ), `VSpacing(1), `HBox( - `MultiLineEdit(`id(`source), _("S&cript Source"), script["source"]:"") + `TextEntry(`id(`location), `opt(`notify), _("Script Location"), script["location"]:"" ) + ), + `HBox( + `MultiLineEdit(`id(`source), `opt(`notify), _("S&cript Source"), script["source"]:"") ), `VSpacing(1), `HBox( @@ -212,6 +215,14 @@ UI::ChangeWidget (`id(`feedback), `Enabled, false); } + if( size( (string)UI::QueryWidget( `id(`location), `Value ) ) > 0 ) { + UI::ChangeWidget (`id(`source), `Enabled, false ); + } else { + UI::ChangeWidget (`id(`source), `Enabled, true ); + if( size( (string)UI::QueryWidget( `id(`source), `Value ) ) > 0 ) + UI::ChangeWidget(`id(`location), `Enabled, false ); + } + if( !(boolean)UI::QueryWidget( `id(`feedback), `Value ) ) UI::ChangeWidget (`id(`feedback_type), `Enabled, false ); @@ -234,18 +245,19 @@ boolean debug = (boolean)UI::QueryWidget(`id(`debug), `Value); boolean chrooted = (boolean)UI::QueryWidget(`id(`chrooted), `Value); boolean network = (boolean)UI::QueryWidget(`id(`network), `Value); + string location = (string)UI::QueryWidget(`id(`location), `Value); - if (source == "" || scriptName == "") + if ( (source == "" && location == "" ) || scriptName == "") { Popup::Message(_("Provide at least the script -name and the content of the script. +name and the location or content of the script. ")); ret = `again; continue; } else { - AutoinstScripts::AddEditScript( scriptName, source, interpreter, type, chrooted, debug, feedback, network, feedback_type); + AutoinstScripts::AddEditScript( scriptName, source, interpreter, type, chrooted, debug, feedback, network, feedback_type, location); } } else if (ret == `loadsource) @@ -287,6 +299,15 @@ UI::ChangeWidget( `id(`feedback_type), `Enabled, (boolean)UI::QueryWidget( `id(`feedback), `Value ) ); UI::ChangeWidget( `id(`feedback_type), `Value, `id("no_type") ); } + if( size( (string)UI::QueryWidget( `id(`location), `Value ) ) > 0 ) { + UI::ChangeWidget (`id(`source), `Enabled, false ); + } else { + UI::ChangeWidget (`id(`source), `Enabled, true ); + } + if( size( (string)UI::QueryWidget( `id(`source), `Value ) ) > 0 ) + UI::ChangeWidget(`id(`location), `Enabled, false ); + else + UI::ChangeWidget(`id(`location), `Enabled, true ); } until (ret == `save || ret == `cancel || ret == `back); return ret; Modified: trunk/autoinstallation/src/modules/AutoinstScripts.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/autoinstallation/src/modules/AutoinstScripts.ycp?rev=61228&r1=61227&r2=61228&view=diff ============================================================================== --- trunk/autoinstallation/src/modules/AutoinstScripts.ycp (original) +++ trunk/autoinstallation/src/modules/AutoinstScripts.ycp Wed Mar 10 15:15:51 2010 @@ -365,7 +365,8 @@ boolean debug, boolean feedback, boolean network, - string feedback_type + string feedback_type, + string location ) { boolean mod = false; @@ -383,6 +384,7 @@ oldScript=add(oldScript,"feedback",feedback); oldScript=add(oldScript,"network_needed",network); oldScript=add(oldScript,"feedback_type", feedback_type); + oldScript=add(oldScript,"location", location); mod = true; return oldScript; @@ -404,6 +406,7 @@ script=add(script,"feedback",feedback); script=add(script,"network_needed",network); script=add(script,"feedback_type", feedback_type); + script=add(script,"location", location); merged=add(merged,script); } -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org