Ticket #1434: escape_toolkit.patch

File escape_toolkit.patch, 755 bytes (added by erikos, 7 years ago)

add overwritable escape method

  • src/sugar3/graphics/window.py

    diff --git a/src/sugar3/graphics/window.py b/src/sugar3/graphics/window.py
    index d754795..2b7c9fb 100644
    a b class Window(Gtk.Window): 
    259259                self.tray.props.visible = not self.tray.props.visible
    260260                return True
    261261        elif key == 'Escape' and self._is_fullscreen and \
    262             self.props.enable_fullscreen_mode:
    263             self.unfullscreen()
     262                self.props.enable_fullscreen_mode:
     263            self.escape_fullscreen()
    264264            return True
    265265        return False
    266266
     267    def escape_fullscreen(self):
     268        self.unfullscreen()
     269
    267270    def __unfullscreen_button_clicked(self, button):
    268271        self.unfullscreen()
    269272