Author: jsuchome Date: Tue Apr 10 16:20:11 2012 New Revision: 67884 URL: http://svn.opensuse.org/viewcvs/yast?rev=67884&view=rev Log: - added Retry button, do not show two Cancel buttons (bnc#680117) - reduce agent logging - 2.22.3 Modified: trunk/fingerprint-reader/VERSION trunk/fingerprint-reader/agent-fprint/src/FPrintAgent.cc trunk/fingerprint-reader/package/yast2-fingerprint-reader.changes trunk/fingerprint-reader/src/users_plugin_fingerprint_reader.ycp Modified: trunk/fingerprint-reader/VERSION URL: http://svn.opensuse.org/viewcvs/yast/trunk/fingerprint-reader/VERSION?rev=67884&r1=67883&r2=67884&view=diff ============================================================================== --- trunk/fingerprint-reader/VERSION (original) +++ trunk/fingerprint-reader/VERSION Tue Apr 10 16:20:11 2012 @@ -1 +1 @@ -2.22.2 +2.22.3 Modified: trunk/fingerprint-reader/agent-fprint/src/FPrintAgent.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/fingerprint-reader/agent-fprint/src/FPrintAgent.cc?rev=67884&r1=67883&r2=67884&view=diff ============================================================================== --- trunk/fingerprint-reader/agent-fprint/src/FPrintAgent.cc (original) +++ trunk/fingerprint-reader/agent-fprint/src/FPrintAgent.cc Tue Apr 10 16:20:11 2012 @@ -145,7 +145,7 @@ r = fp_enroll_finger (dev, &enrolled_print); - y2internal ("retval: %d", r); + y2debug ("retval: %d", r); if (r < 0) { y2error ("Enroll failed with error %d", r); @@ -216,7 +216,7 @@ */ YCPValue FPrintAgent::Read(const YCPPath &path, const YCPValue& arg, const YCPValue& opt) { - y2internal ("Path in Read(): %s", path->toString().c_str()); + y2debug ("Path in Read(): %s", path->toString().c_str()); YCPValue ret = YCPVoid(); if (path->length() == 0) { Modified: trunk/fingerprint-reader/package/yast2-fingerprint-reader.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/fingerprint-reader/package/yast2-fingerprint-reader.changes?rev=67884&r1=67883&r2=67884&view=diff ============================================================================== --- trunk/fingerprint-reader/package/yast2-fingerprint-reader.changes (original) +++ trunk/fingerprint-reader/package/yast2-fingerprint-reader.changes Tue Apr 10 16:20:11 2012 @@ -1,4 +1,11 @@ ------------------------------------------------------------------- +Tue Apr 10 16:15:27 CEST 2012 - jsuchome@suse.cz + +- added Retry button, do not show two Cancel buttons (bnc#680117) +- reduce agent logging +- 2.22.3 + +------------------------------------------------------------------- Thu Mar 29 14:40:12 CEST 2012 - jsuchome@suse.cz - merged proofread texts Modified: trunk/fingerprint-reader/src/users_plugin_fingerprint_reader.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/fingerprint-reader/src/users_plugin_fingerprint_reader.ycp?rev=67884&r1=67883&r2=67884&view=diff ============================================================================== --- trunk/fingerprint-reader/src/users_plugin_fingerprint_reader.ycp (original) +++ trunk/fingerprint-reader/src/users_plugin_fingerprint_reader.ycp Tue Apr 10 16:20:11 2012 @@ -89,7 +89,9 @@ `Label (`id (`label), _("Initializing fingerprint reader...")) ), `ReplacePoint (`id (`rpstatus), `VSpacing ()), - `PushButton (`id (`cancel), Label::CancelButton ()), + `ReplacePoint (`id (`rpbutton), + `PushButton (`id (`cancel), Label::CancelButton ()) + ), `ReplacePoint (`id (`rpswipes), `VSpacing ()), `VSpacing (0.5) ), @@ -104,8 +106,8 @@ Label::CancelButton(), Label::OKButton()); Wizard::HideAbortButton (); + Wizard::HideBackButton (); Wizard::DisableNextButton (); - Wizard::DisableBackButton (); boolean exit = false; any ui = nil; @@ -143,6 +145,12 @@ UI::ReplaceWidget (`id (`rpstatus), `Label (message)); } + // retry acquiring fingerprint + boolean retry = true; + while (retry) + { + retry = false; + if (SCR::Execute (.fprint.enroll, fingerprint_dir) != true) { ui = `cancel; @@ -271,8 +279,8 @@ UI::ReplaceWidget (`id (`rp), `Label (_("Fingerprint acquired successfully."))); UI::ReplaceWidget (`id (`rpstatus), `Label ("")); // new id was already saved - Wizard::DisableBackButton (); Wizard::EnableNextButton (); + UI::ChangeWidget (`id (`cancel), `Enabled, false); } else { @@ -299,10 +307,25 @@ { status_message (error, details); } - Wizard::EnableBackButton (); + if (ui == `cancel) + { + UI::ChangeWidget (`id (`cancel), `Enabled, false); + } + else + { + // button label + UI::ReplaceWidget (`id (`rpbutton), `PushButton (`id (`retry), _("Retry"))); + Wizard::RestoreBackButton (); + } } - UI::ChangeWidget (`id (`cancel), `Enabled, false); - ret = UI::UserInput (); + if (ui != `cancel) + { + ret = UI::UserInput (); + } + else + { + ret = `cancel; + } if (ret == `next) { // modified data to add to user @@ -316,6 +339,13 @@ else if (data["what"]:"" == "add_user") Users::AddUser (tmp_data); } + else if (ret == `retry) + { + UI::ReplaceWidget (`id (`rpbutton), `PushButton (`id (`cancel), Label::CancelButton ())); + Wizard::HideBackButton (); + retry = true; + } + } Wizard::CloseDialog (); } y2milestone("users plugin finished with %1", ret); -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org