#11437 HIGH 1.75-so: power icon missing from Sugar My Settings

Zarro Boogs per Child bugtracker at laptop.org
Thu Nov 24 05:41:09 EST 2011


#11437: power icon missing from Sugar My Settings
------------------------------+---------------------------------------------
           Reporter:  Quozl   |       Owner:  erikos                           
               Type:  defect  |      Status:  new                              
           Priority:  high    |   Milestone:  1.75-software                    
          Component:  sugar   |     Version:  Development build as of this date
         Resolution:          |    Keywords:                                   
        Next_action:  review  |    Verified:  0                                
Deployment_affected:          |   Blockedby:                                   
           Blocking:          |  
------------------------------+---------------------------------------------
Changes (by erikos):

  * next_action:  code => review


Comment:

 Sent a patch to sugar-devel that checks if powerd is available to
 determine if the power section is displayed or
 not (we have the same check in the control panel section). As far as I
 have seen all of our hardware (1-1.75) is using powerd today.

 {{{
 diff --git a/src/jarabe/controlpanel/gui.py
 b/src/jarabe/controlpanel/gui.py
 index 2f55951..46810aa 100644
 --- a/src/jarabe/controlpanel/gui.py
 +++ b/src/jarabe/controlpanel/gui.py
 @@ -30,6 +30,7 @@ from jarabe.controlpanel.toolbar import MainToolbar
  from jarabe.controlpanel.toolbar import SectionToolbar
  from jarabe import config

 +POWERD_FLAG_DIR = '/etc/powerd/flags'

  _logger = logging.getLogger('ControlPanel')

 @@ -129,7 +130,7 @@ class ControlPanel(gtk.Window):
                                     self.__search_changed_cb)

      def _setup_options(self):
 -        if not os.path.exists('/ofw'):
 +        if not os.access(POWERD_FLAG_DIR, os.W_OK):
              del self._options['power']

          try:
 }}}

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


More information about the Bugs mailing list