Author: locilka Date: Thu Jan 31 11:21:59 2008 New Revision: 44038 URL: http://svn.opensuse.org/viewcvs/yast?rev=44038&view=rev Log: - Added docu. for *_finish scripts (needed for FATE #302980). - Welcome dialog can newly show the license according to the just selected language and also show other lozalizations if needed. - 2.16.13 Added: trunk/installation/doc/inst_finish/ trunk/installation/doc/inst_finish/inst_finish_scripts.txt Modified: trunk/installation/VERSION trunk/installation/package/yast2-installation.changes trunk/installation/src/clients/inst_complex_welcome.ycp trunk/installation/yast2-installation.spec.in Modified: trunk/installation/VERSION URL: http://svn.opensuse.org/viewcvs/yast/trunk/installation/VERSION?rev=44038&r1=44037&r2=44038&view=diff ============================================================================== --- trunk/installation/VERSION (original) +++ trunk/installation/VERSION Thu Jan 31 11:21:59 2008 @@ -1 +1 @@ -2.16.12 +2.16.13 Added: trunk/installation/doc/inst_finish/inst_finish_scripts.txt URL: http://svn.opensuse.org/viewcvs/yast/trunk/installation/doc/inst_finish/inst_finish_scripts.txt?rev=44038&view=auto ============================================================================== --- trunk/installation/doc/inst_finish/inst_finish_scripts.txt (added) +++ trunk/installation/doc/inst_finish/inst_finish_scripts.txt Thu Jan 31 11:21:59 2008 @@ -0,0 +1,72 @@ +Inst-Finish Scripts +=================== + +About +----- +They are called by the inst_finish.ycp installation client at the end of the +first stage installation. + +Part of these clients are called with SCR connected to inst-sys, the others +are called after SCR gets switched to the installed system (chrooted). + +Script inst_finish.ycp contains several stages, every has + * label - visible in the writing progress + * steps - list of additional inst_finish scripts that are called + ("bingo" -> "bingo_finish.ycp") + +Important script is "switch_scr", after that call, SCR is connected to the +just installed system. + +Finish Scripts +-------------- +Every single finish script is a non-interactive script (write-only). It's +basically called twice: + + * At first "Info" returns in which modes "Write" should be called + * Then "Write" should be called to do the job + +Simple Example +-------------- + +{ + textdomain "$job"; + + any ret = nil; + string func = ""; + map param = $[]; + + if(size(WFM::Args()) > 0 && is(WFM::Args(0), string)) { + func = (string)WFM::Args(0); + if(size(WFM::Args()) > 1 && is(WFM::Args(1), map)) + param = (map)WFM::Args(1); + } + + // nice to have + y2milestone ("starting job_finish"); + y2debug("func=%1", func); + y2debug("param=%1", param); + + if (func == "Info") { + return (any)$[ + "steps" : 1, + "title" : _("Doing the job..."), + + // list contains only those steps when the client should be called + // it can be even empty or dynamically considering the current status + // "when" : (is_it_needed ? [`installation, `update]:[]) + "when" : [ `installation, `update, `autoinst ], + ]; + } else if (func == "Write") { + // Write will be called in case we run it in + // `installation, `update or `autoinst (defined in "Info") + ... do the job ... + } else { + y2error ("unknown function: %1", func); + } + + // nice to have + y2debug("ret=%1", ret); + y2milestone("job_finish finished"); + + return ret; +} \ No newline at end of file Modified: trunk/installation/package/yast2-installation.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/installation/package/yast2-installation.changes?rev=44038&r1=44037&r2=44038&view=diff ============================================================================== --- trunk/installation/package/yast2-installation.changes (original) +++ trunk/installation/package/yast2-installation.changes Thu Jan 31 11:21:59 2008 @@ -1,7 +1,16 @@ ------------------------------------------------------------------- +Thu Jan 31 11:14:46 CET 2008 - locilka@suse.cz + +- Added docu. for *_finish scripts (needed for FATE #302980). +- Welcome dialog can newly show the license according to the just + selected language and also show other lozalizations if needed. +- 2.16.13 + +------------------------------------------------------------------- Wed Jan 30 15:22:29 CET 2008 - aschnell@suse.de - Use icewm instead of fvwm during installation (bnc #357240) +- 2.16.12 ------------------------------------------------------------------- Wed Jan 30 14:15:50 CET 2008 - fehr@suse.de Modified: trunk/installation/src/clients/inst_complex_welcome.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/installation/src/clients/inst_complex_welcome.ycp?rev=44038&r1=44037&r2=44038&view=diff ============================================================================== --- trunk/installation/src/clients/inst_complex_welcome.ycp (original) +++ trunk/installation/src/clients/inst_complex_welcome.ycp Thu Jan 31 11:21:59 2008 @@ -40,8 +40,9 @@ import "Wizard"; import "Icon"; import "InstData"; + import "ProductLicense"; - string language = Language::language; + string language = Language::language; /** * check if selected language has support on media (F301238) @@ -69,30 +70,6 @@ } } - -/* - define void update_adapt_term () { - - string kb = Keyboard::GetKeyboardForLanguage (language, "english-us"); - string tz = Timezone::GetTimezoneForLanguage (language, "US/Mountain"); - - string kbd_name = Keyboard::Selection ()[kb]:""; - string tmz_name = Timezone::GetTimezoneCountry (tz); - - UI::ReplaceWidget (`id(`rpadapt), `VBox ( - `Left (`CheckBox (`id (`adapt_kbd), - // check box label (%1 is keyboard layout name) - sformat(_("Adapt &Keyboard Layout to %1"),kbd_name))), - `Left (`CheckBox (`id (`adapt_tmz), - // check box label (%1 is country name) - sformat (_("Adapt &Time Zone to %1"), tmz_name))) - )); - - UI::ChangeWidget(`id(`adapt_kbd),`Enabled, kb != Keyboard::current_kbd); - UI::ChangeWidget(`id(`adapt_tmz),`Enabled, tz != Timezone::timezone); - } -*/ - // ------------------------------------- main part of the client ----------- map argmap = GetInstArgs::argmap(); @@ -106,17 +83,6 @@ string preselected = Language::preselected; - if (preselected != "en_US" && set_default) - { - if (ProductFeatures::GetBooleanFeature ("globals", "skip_language_dialog")) - { - y2milestone("Skipping language dialog, Language changed to %1",preselected); - check_languages_support (preselected); - Language::selection_skipped = true; - return `auto; - } - } - list<string>languages = splitstring (Language::languages, ","); // filter the primary language from the list of secondary ones: @@ -130,7 +96,7 @@ // set up selection list with default item - boolean use_ascii = Language::GetTextMode (); + boolean text_mode = Language::GetTextMode (); /* ---------------------------------------------------------------------- * Build dialog @@ -149,7 +115,7 @@ string key = lang_info [1]:lang_code; return $[ key : [ - lang_info[use_ascii ? 1 : 0]:"", + lang_info[text_mode ? 1 : 0]:"", lang_code, lang_info[2]:key ] @@ -228,14 +194,43 @@ `HSquash ( `VBox ( `Left (`Label (`opt(`boldFont), _("License Agreement"))), - `Left (`Label (_("License agreement is missing here. -It will be added soon."))), - `Left (`CheckBox (`id (`license_agreement), `opt (`notify), _("I Do &Agree to the License Terms."), InstData::product_license_accepted)) + `HSquash(`MinSize ( + 60, + (text_mode ? 9:13), + `Left (`ReplacePoint (`id (`base_license_rp), `Empty())) + )), + `VSpacing (text_mode ? 0.1 : 0.5), + `HBox ( + `Left (`CheckBox ( + // TRANSLATORS: check-box + `id (`license_agreement), `opt (`notify), _("I Do &Agree to the License Terms."), InstData::product_license_accepted + )), + `VStretch (), + // TRANSLATORS: button label + `Right (`PushButton (`id (`show_fulscreen_license), _("Show In Full-Screen..."))) + ) ) ), `VWeight (3, `VStretch()) ); + term FullScreenLicenseDialog () { + return `VBox ( + `Left (`HBox ( + Icon::Simple ("yast-license"), + // TRANSLATORS: dialog caption + `Heading (_("License Agreement")) + )), + `VSpacing (text_mode ? 0.1 : 0.5), + `HSpacing (60), + `MinHeight ( + (text_mode ? 20 : 25), + `ReplacePoint (`id (`full_screen_license_rp), `Empty()) + ), + `PushButton (`id (`close), Label::OKButton()) + ); + } + string help_text = ""; // help text (language dependent packages) - at the end of help string packages_help = _("<p> @@ -412,6 +407,13 @@ return false; } + ProductLicense::ShowLicenseInInstallation (`base_license_rp); + + // bugzilla #206706 + if (Mode::autoinst()) { + return `auto; + } + while (true) { ret = UI::UserInput(); y2milestone ("UserInput() returned %1", ret); @@ -450,6 +452,10 @@ } if (ret == `next) break; + } else if (ret == `show_fulscreen_license) { + UI::OpenDialog (FullScreenLicenseDialog()); + ProductLicense::ShowFullScreenLicenseInInstallation (`full_screen_license_rp); + UI::CloseDialog(); } } Modified: trunk/installation/yast2-installation.spec.in URL: http://svn.opensuse.org/viewcvs/yast/trunk/installation/yast2-installation.spec.in?rev=44038&r1=44037&r2=44038&view=diff ============================================================================== --- trunk/installation/yast2-installation.spec.in (original) +++ trunk/installation/yast2-installation.spec.in Thu Jan 31 11:21:59 2008 @@ -16,7 +16,8 @@ # Newly created RPM Requires: yast2-country-data >= 2.16.3 # New System-selection data and API DefaultDesktop module -Requires: yast2-packager >= 2.16.17 +# New API in ProductLicense +Requires: yast2-packager >= 2.16.18 # Only in inst-sys # Requires: yast2-runlevel -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org