[yast-commit] r40557 - in /trunk/add-on: package/yast2-add-on.changes src/add-on-workflow.ycp
Author: locilka Date: Wed Aug 29 13:09:42 2007 New Revision: 40557 URL: http://svn.opensuse.org/viewcvs/yast?rev=40557&view=rev Log: - Disabling [ Next ] button in Media Selection dialog unless some media type is selected (#305850). Modified: trunk/add-on/package/yast2-add-on.changes trunk/add-on/src/add-on-workflow.ycp Modified: trunk/add-on/package/yast2-add-on.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/add-on/package/yast2-add-on.changes?rev=40557&r1=40556&r2=40557&view=diff ============================================================================== --- trunk/add-on/package/yast2-add-on.changes (original) +++ trunk/add-on/package/yast2-add-on.changes Wed Aug 29 13:09:42 2007 @@ -9,6 +9,8 @@ - Not skipping to the "Add-On Product Media" dialog in case of going_back in the installation workflow even if there is not Add-On in use yet (#305809). +- Disabling [ Next ] button in Media Selection dialog unless some + media type is selected (#305850). - 2.15.14 ------------------------------------------------------------------- Modified: trunk/add-on/src/add-on-workflow.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/add-on/src/add-on-workflow.ycp?rev=40557&r1=40556&r2=40557&view=diff ============================================================================== --- trunk/add-on/src/add-on-workflow.ycp (original) +++ trunk/add-on/src/add-on-workflow.ycp Wed Aug 29 13:09:42 2007 @@ -91,25 +91,25 @@ `RadioButtonGroup (`id (`type), `VBox ( `VStretch (), // radio button - `Left (`RadioButton(`id(`slp), _("&Scan Using SLP..."))), + `Left (`RadioButton(`id(`slp), `opt(`notify), _("&Scan Using SLP..."))), // radio button - `Left (`RadioButton(`id(`ftp), _("&FTP..."))), + `Left (`RadioButton(`id(`ftp), `opt(`notify), _("&FTP..."))), // radio button - `Left (`RadioButton(`id(`http), _("&HTTP..."))), + `Left (`RadioButton(`id(`http), `opt(`notify), _("&HTTP..."))), // radio button - `Left (`RadioButton(`id(`https), _("HTT&PS..."))), + `Left (`RadioButton(`id(`https), `opt(`notify), _("HTT&PS..."))), // radio button - `Left (`RadioButton(`id(`samba), _("&SMB/CIFS"))), + `Left (`RadioButton(`id(`samba), `opt(`notify), _("&SMB/CIFS"))), // radio button - `Left (`RadioButton(`id(`nfs), _("&NFS..."))), + `Left (`RadioButton(`id(`nfs), `opt(`notify), _("&NFS..."))), // radio button - `Left (`RadioButton(`id(`cd), _("&CD..."))), + `Left (`RadioButton(`id(`cd), `opt(`notify), _("&CD..."))), // radio button - `Left (`RadioButton(`id(`dvd), _("&DVD..."))), + `Left (`RadioButton(`id(`dvd), `opt(`notify), _("&DVD..."))), // radio button - `Left (`RadioButton(`id(`local_dir), _("&Local Directory..."))), + `Left (`RadioButton(`id(`local_dir), `opt(`notify), _("&Local Directory..."))), // radio button - `Left (`RadioButton (`id (`specify_url),_("Specify &URL..."))), + `Left (`RadioButton (`id (`specify_url), `opt(`notify), _("Specify &URL..."))), `VStretch () ))), `HStretch () ); @@ -120,13 +120,13 @@ `RadioButtonGroup (`id (`type), `VBox ( `VStretch (), // radio button - `Left (`RadioButton(`id(`cd), _("&CD..."))), + `Left (`RadioButton(`id(`cd), `opt(`notify), _("&CD..."))), // radio button - `Left (`RadioButton(`id(`dvd), _("&DVD..."))), + `Left (`RadioButton(`id(`dvd), `opt(`notify), _("&DVD..."))), // radio button - `Left (`RadioButton(`id(`local_dir), _("&Local Directory..."))), + `Left (`RadioButton(`id(`local_dir), `opt(`notify), _("&Local Directory..."))), // radio button - `Left (`RadioButton (`id (`specify_url),_("Specify &URL..."))), + `Left (`RadioButton (`id (`specify_url), `opt(`notify), _("Specify &URL..."))), `VStretch () ))), `HStretch () ); @@ -168,6 +168,10 @@ Wizard::DisableBackButton(); Wizard::RestoreAbortButton(); Wizard::SetAbortButton (`cancel, Label::CancelButton()); + + // disable the button unless some option is selected + // bugzilla #305850 + Wizard::DisableNextButton(); } /** @@ -201,10 +205,15 @@ y2milestone ("Running media select dialog"); CreateMediaSelectDialog(); + // all supported types + // bugzilla #305850 + list rb_rets = [`slp, `ftp, `http, `https, `samba, `nfs, `cd, `dvd, `local_dir, `specify_url]; + symbol ret = nil; string url = ""; while (ret == nil) { ret = (symbol) UI::UserInput (); + if (ret == `back) { // bugzilla #216910 // `back means - return to the previous dialog @@ -215,9 +224,7 @@ } else { break; } - } - else if (ret == `abort || ret == `cancel) - { + } else if (ret == `abort || ret == `cancel) { ret = `abort; // Just return back (abort adding new Add-On) in installation @@ -232,14 +239,24 @@ ret = nil; continue; - } - else if (ret != `next) + // one radio button selected + } else if (ret != nil && contains (rb_rets, ret)) { + // bugzilla #305850 + Wizard::EnableNextButton(); + ret = nil; + // next loop continue; - + } else if (ret == `next) { + y2milestone ("Media type selected..."); + } else { + y2error ("Unknown ret: %1", ret); + continue; + } createResult = nil; symbol input = (symbol)UI::QueryWidget (`id (`type), `CurrentButton); y2milestone ("Current: %1", input); + if ( input == `slp ) { string required_package = "yast2-slp"; -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
locilka@svn.opensuse.org