[Sugar-devel] [sugarlabs/sugar-toolkit-gtk3] Save As Popup (#327)
tony_anderson at usa.net
Mon May 1 22:55:47 EDT 2017
Thanks for this testing. You are showing some serious ambiguity in the
core implementation of activity.py
A return of True from can_close should end processing except write_file.
Aside from user 'ctrl' + q or quit, the activity could be closed as a
result of the end of the Sugar session by shutdown or logout or by
shutdown of the system because of lower battery power.
As I recall, activity developers should assume the object changes made
in write_file will be saved.
For the quiz activity, I have had to set a flag in can_close because the
information needed by write_file is not available until the quiz
responses are complete.
This no-ops the write_file calls until after can_close has been called.
On 05/02/2017 09:27 AM, James Cameron wrote:
> Also in 97c7836
> when |save-as| is enabled,
> * there is no busy cursor during close; this is a regression, which
> you can fix by making the cursor busy again when the alert button
> 'Save' is pressed,
> * the |_closing| signal is emitted early, which causes a
> |save_title| in widgets.py to run, but is that necessary?
> * the activity |can_close| is called only once, yet the learner can
> continue to interact with the activity (which I've just tested
> again) and may invalidate |can_close|; this is a regression on the
> meaning of |can_close|, which you can fix by either making the
> alert modal (which would be unfortunate), or calling |can_close|
> again sometime later.
> For your testing, among the activities that implement |can_close| are
> Browse, Chat, Develop, FractionBounce, GetBooks, ImageViewer, Jukebox,
> Maze, Physics, Read, and TurtleBlocks.
> I'm having trouble following the new logic path in |close|; it seem
> convoluted to call |_alert_confirmation| only for that method to find
> out that the title has been changed, then set a flag |_pre_naming|
> which is tested again later in |close|.
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> or mute the thread
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Sugar-devel