#7434 BLOC 8.2.0 (: Control panel UI for power management.

Zarro Boogs per Child bugtracker at laptop.org
Mon Jul 7 12:33:26 EDT 2008


#7434: Control panel UI for power management.
---------------------------+------------------------------------------------
   Reporter:  cjb          |       Owner:  erikos              
       Type:  enhancement  |      Status:  new                 
   Priority:  blocker      |   Milestone:  8.2.0 (was Update.2)
  Component:  sugar        |     Version:  Update.1            
 Resolution:               |    Keywords:  review?             
Next_action:  communicate  |    Verified:  0                   
  Blockedby:               |    Blocking:                      
---------------------------+------------------------------------------------

Comment(by erikos):

 profile.py
  - You can set your value as well a boolean after getting from the config
 file (see self.jabber_registered). Then you do not need to convert it in
 the view and the model.
  - maybe use uppercase for the arguents since all the others are uppercase
 as well. set_key(cp, 'Power', 'AutomaticPM', self.automatic_pm)

 controlpanel/model/power.py
  - W: 18: Unused import _
  - The ReadError class is unused.
  - set_extreme_pm, set_automatic_pm: you check if the argument is True.
 This will fail for the command line command. What about using 'if state ==
 'on' or state == 1' instead? Have a look what the set_radio method does in
 network.py (Here you can then use the ReadError class).

 controlpanel/view/power.py
 {{{
 ************* Module controlpanel.view.power
 C: 61: Line too long (97/80)
 C: 78: Line too long (87/80)
 C: 80: Line too long (87/80)
 C: 88: Line too long (118/80)
 C:105: Line too long (83/80)
 C:107: Line too long (83/80)
 W: 18: Unused import gobject
 }}}

 The radio_state variable in automatic_pm_toggled_cb and
 extreme_pm_toggled_cb looks like old code. Maybe name the variable just
 state instead.

 Please make sure to modify the makefiles as well accordingly.
  - controlpanel/view/Makefile.am
  - controlpanel/model/Makefile.am

 General note: we have new strings in this code and string freeze was
 already. If we get this code in we should try to get them translated. (if
 we get the code in add src/controlpanel/view/power.py to po/POTFILES.in
 because of the new strings)

-- 
Ticket URL: <http://dev.laptop.org/ticket/7434#comment:1>
One Laptop Per Child <http://laptop.org/>
OLPC bug tracking system


More information about the Bugs mailing list