Author: lslezak Date: Thu Dec 18 09:40:44 2008 New Revision: 54254 URL: http://svn.opensuse.org/viewcvs/yast?rev=54254&view=rev Log: - install additional packages automatically when 'Automatic Configuration' was selected in the first stage Modified: trunk/tv/package/yast2-tv.changes trunk/tv/src/Tv.ycp trunk/tv/src/tv_proposal.ycp Modified: trunk/tv/package/yast2-tv.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/tv/package/yast2-tv.changes?rev=54254&r1=54253&r2=54254&view=diff ============================================================================== --- trunk/tv/package/yast2-tv.changes (original) +++ trunk/tv/package/yast2-tv.changes Thu Dec 18 09:40:44 2008 @@ -1,4 +1,10 @@ ------------------------------------------------------------------- +Thu Dec 18 09:38:14 CET 2008 - lslezak@suse.cz + +- install additional packages automatically when + 'Automatic Configuration' was selected in the first stage + +------------------------------------------------------------------- Mon Dec 15 15:57:10 CET 2008 - lslezak@suse.cz - reload the driver to activate the changed module options Modified: trunk/tv/src/Tv.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/tv/src/Tv.ycp?rev=54254&r1=54253&r2=54254&view=diff ============================================================================== --- trunk/tv/src/Tv.ycp (original) +++ trunk/tv/src/Tv.ycp Thu Dec 18 09:40:44 2008 @@ -279,6 +279,8 @@ // driver blacklist list<string> blacklisted_modules = nil; + // confirm installation of extra packages + boolean confirm_packages = true; // ------------------- function prototypes for include files: @@ -291,6 +293,24 @@ // ------------------- function definitions: + /** + * Set confirmation flag - when set to false the extra recommended packages are installed automatically + * @param ask new confirmation flag + */ + global void SetConfirmPackages(boolean ask) + { + y2milestone("Confirm additional package installation: %1", ask); + confirm_packages = ask; + } + + /** + * Get the current value of the confirmation flag + * @return boolean true if confirmation is enabled + */ + global boolean ConfirmPackages() + { + return confirm_packages; + } /** * Dialog which asks for installing proposed application @@ -299,26 +319,31 @@ */ define void InstallApplication (list apps, string text) ``{ - UI::OpenDialog (`opt(`decorated), `VBox( - `HSpacing(50), - `RichText (`id(`rt), text), - `CheckBox (`id(`ch), `opt(`notify), - // checkbox label - _("Do Not Show This Message &Again")), - `HBox( - `PushButton (`id(`ok),`opt(`key_F10), Label::YesButton()), - `PushButton (`id(`cancel),`opt(`key_F9), Label::NoButton()) - )) - ); - any ret = nil; - do { - ret = UI::UserInput(); - if (ret == `ch) ret = nil; + any ret = `ok; + + if (ConfirmPackages()) + { + UI::OpenDialog (`opt(`decorated), `VBox( + `HSpacing(50), + `RichText (`id(`rt), text), + `CheckBox (`id(`ch), `opt(`notify), + // checkbox label + _("Do Not Show This Message &Again")), + `HBox( + `PushButton (`id(`ok),`opt(`key_F10), Label::YesButton()), + `PushButton (`id(`cancel),`opt(`key_F9), Label::NoButton()) + )) + ); + do { + ret = UI::UserInput(); + if (ret == `ch) ret = nil; + } + while (ret == nil); + + not_ask = (boolean) UI::QueryWidget(`id(`ch), `Value); + UI::CloseDialog(); } - while (ret == nil); - not_ask = (boolean) UI::QueryWidget(`id(`ch), `Value); - UI::CloseDialog(); if (ret == `ok) { list<string> to_install = []; @@ -327,7 +352,17 @@ if (Package::Available (app)) to_install = add (to_install, app); }); - Package::InstallAll (to_install); + + if (ConfirmPackages()) + { + // display a confirmation dialog + Package::InstallAll(to_install); + } + else + { + // do not ask the user, install the packages immediately + Package::DoInstall(to_install); + } } } Modified: trunk/tv/src/tv_proposal.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/tv/src/tv_proposal.ycp?rev=54254&r1=54253&r2=54254&view=diff ============================================================================== --- trunk/tv/src/tv_proposal.ycp (original) +++ trunk/tv/src/tv_proposal.ycp Thu Dec 18 09:40:44 2008 @@ -106,6 +106,9 @@ if (Tv::IsDirty ()) { + // do not confirm package installation in the automatic mode + Tv::SetConfirmPackages(!GetInstArgs::automatic_configuration()); + block<boolean> abort = ``{ return false; }; success = Tv::Write ( abort ); } -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org