[Sugar-devel] Fwd: SL bug#630

Aleksey Lim alsroot at member.fsf.org
Mon Sep 20 10:26:30 EDT 2010


On Mon, Sep 20, 2010 at 07:46:13PM +0530, Mukul Gupta wrote:
> Copying sugar-devel on this memo
> 
> Regards,
> 
> Mukul Gupta
> 
> ---------- Forwarded message ----------
> From: Mukul Gupta <mukul at seeta.in>
> Date: Mon, Sep 20, 2010 at 7:38 PM
> Subject: SL bug#630
> To: alsroot at member.fsf.org
> Cc: Manusheel Gupta <manu at seeta.in>, David Farning <dfarning at gmail.com>
> 
> 
> Aleksey,
> 
> This mail is with reference to the Sugarlabs bug #630 regarding Full Memory
> in Journal. There were some of my queries and some clarifications that I
> wanted to be sorted out. It would be great if you could look into some of
> these.
> 
> These are some of my findings after reproducing the error by assigning a
> dummy value to free_space.
> 
> 1. The Modal Dialog appears at startup and asks us to go to the Journal. The
> dialog appears again whenever I perform any action in the Journal including
> when I erase some data,mark as favorites or exit an activity.However I am
> able to open up different entities present in the Journal. Even transfer to
> favorites view takes place.
> 
> Problem: The Dialog appears repetitively.
> Resolution:
> When the function ModalAlert() is being called ie at check_available_space.
> I intend to display the Modal Dialog only once. Hence, I require to store a
> temporary variable that will count the the Modal Dialog appears. For this I
> made the following changes to the code.
> 
> http://paste.ubuntu.com/497021/
> 
> I suspect that when i variable that I have used here is always initialised
> to be 1 and thus it doesn't give the desired output. Please suggest a method
> so that I can declare a static/extern type of variable.

In my mind, scheme could be simpler:

* if min free space check was triggered, setting flag to True and do not show
  alert anymore
* after the first not triggering for this check, reset flag

> 2. In the Modal Dialog I was trying to get a provision for a Continue button
> which would exit the modal dialog and would lead me to the current
> view/favorites view. However, I was stuck up with its coding. Please check.
> 
> http://paste.ubuntu.com/496530/

If I got it right, the problem that code which creates ModalAlert()
switch to journal in any case, so you need to tweak this part not
ModalAlert class itself.

> 3. Next thing, what I wanted to implement was to give a small
> alert/notification instead of the modal dialog indicating the % free memory
> or a warning.
> 
> I am also attaching the screenshots.The image 1 is the output when I make
> the changes listed in 1 while 2 is the output for Point No. 2.
> 
> Waiting for your valuable inputs,
> 
> Regards,
> 
> Mukul Gupta
> Research Engineer, SEETA

-- 
Aleksey


More information about the Sugar-devel mailing list