Skip to content

Commit

Permalink
Added empty implementation of set_on_exit to dummy, gtk and cocoa
Browse files Browse the repository at this point in the history
Signed-off-by: obulat <[email protected]>
  • Loading branch information
obulat committed May 24, 2018
1 parent 7b960a7 commit 660e304
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/cocoa/toga_cocoa/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,3 +167,6 @@ def main_loop(self):

def exit(self):
self.native.terminate(None)

def set_on_exit(self):
self.interface.factory.not_implemented('App.set_on_exit()')
1 change: 1 addition & 0 deletions src/core/toga/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ def __init__(self, name, app_id,
self._on_exit = None

self._impl = self.factory.App(interface=self)
self.on_exit = on_exit

@property
def app_id(self):
Expand Down
4 changes: 4 additions & 0 deletions src/dummy/toga_dummy/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,7 @@ def main_loop(self):
@not_required_on('mobile', 'web')
def exit(self):
self._action('exit')

@not_required_on('mobile', 'web')
def set_on_exit(self, value):
self._set_value('on_exit', value)
3 changes: 3 additions & 0 deletions src/gtk/toga_gtk/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,3 +153,6 @@ def main_loop(self):

def exit(self):
self.native.quit()

def set_on_exit(self):
self.interface.factory.not_implemented('App.set_on_exit()')

0 comments on commit 660e304

Please sign in to comment.