#4890 HIGH Update.: Need a button for exiting fullscreen mode

Zarro Boogs per Child bugtracker at laptop.org
Tue Nov 20 08:07:35 EST 2007


#4890: Need a button for exiting fullscreen mode
--------------------------+-------------------------------------------------
  Reporter:  Eben         |       Owner:  rwh     
      Type:  enhancement  |      Status:  new     
  Priority:  high         |   Milestone:  Update.1
 Component:  sugar        |     Version:          
Resolution:               |    Keywords:  review- 
  Verified:  0            |  
--------------------------+-------------------------------------------------
Changes (by marco):

  * keywords:  review? => review-


Comment:

 {{{
 +        self.set_keep_above(True)
 }}}

 What is this for?

 +        self._icon = Icon(icon_name='view-return',
 icon_size=gtk.ICON_SIZE_LARGE_TOOLBAR)

 80 cols :)

 {{{
 +        w, h = gtk.icon_size_lookup(gtk.ICON_SIZE_LARGE_TOOLBAR)
 +        x = gtk.gdk.screen_width() - w
 +        logging.debug('moving to %d, 0', x)
 +        self.move(x, 0)
 }}}

 Better use the widget size request here, which will get right borders and
 paddings.

 {{{
 +        self.set_transient_for(parent)

 and

 +    def _button_press_event_cb(self, widget, event):
 +        self._parent.unfullscreen()
 }}}

 Let's do these directly in the Window code and avoid passing in the
 parent.

 {{{
 +    def fullscreen(self):
 +        gtk.Window.fullscreen(self)
 +
 +        self._is_fullscreen = True
 +        self._unfullscreen_button.show()
 +
 +    def unfullscreen(self):
 +        gtk.Window.unfullscreen(self)
 +
 +        self._is_fullscreen = False
 +        self._unfullscreen_button.hide()
 }}}

 These needs to be done in __window_state_event_cb. Fullscreen/unfullscreen
 is partially controlled by the window manager.

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



More information about the Bugs mailing list