[Bugs] #1102 UNSP: Make the unfullscreen go away after a timeout

SugarLabs Bugs bugtracker-noreply at sugarlabs.org
Mon Jul 27 13:44:04 EDT 2009


#1102: Make the unfullscreen go away after a timeout
------------------------------------------+---------------------------------
    Reporter:  sayamindu                  |          Owner:  erikos                     
        Type:  enhancement                |         Status:  new                        
    Priority:  Unspecified by Maintainer  |      Milestone:  Unspecified by Release Team
   Component:  sugar-toolkit              |        Version:  Git as of bugdate          
    Severity:  Unspecified                |     Resolution:                             
    Keywords:  r-                         |   Distribution:  Unspecified                
Status_field:  Unconfirmed                |  
------------------------------------------+---------------------------------
Changes (by tomeu):

  * keywords:  => r-


Comment:

 {{{
 UNFULLSCREEN_BUTTON_VISIBILITY_TIMEOUT = 2
 }}}

 Please prepend with _ if it isn't meant to be used out this module.

 {{{
         events = self._event_box.get_events()
                 self._event_box.set_events(events |
 gtk.gdk.POINTER_MOTION_MASK | \
                     gtk.gdk.POINTER_MOTION_HINT_MASK)
 }}}

 Better use add_events()?

 {{{
                 if self._unfullscreen_button_timeout_id:
 }}}

 Better use "is not None" (see PEP 8 for rationale).

 {{{
 gobject.timeout_add_seconds(UNFULLSCREEN_BUTTON_VISIBILITY_TIMEOUT, \
 }}}

 Not setting self._unfullscreen_button_timeout_id anywhere?

 {{{
     def __motion_notify_cb(self, widget, event):
 }}}

 I'm a (small) bit concerned about doing so much stuff at every motion
 event, any idea about how to reduce further the amount of work done at
 every motion event when in fullscreen?

 {{{
     def _unfullscreen_button_timeout_cb(self):
 }}}

 Shouldn't we set self._unfullscreen_button_timeout_id to None here?

 And please remember to set the r? flag so it doesn't get lost so easily.

-- 
Ticket URL: <http://dev.sugarlabs.org/ticket/1102#comment:1>
Sugar Labs <http://sugarlabs.org/>
Sugar Labs bug tracking system


More information about the Bugs mailing list