diff options
author | Marek Siarkowicz <mareksiarkowicz@gmail.com> | 2015-06-15 13:30:06 +0200 |
---|---|---|
committer | Marek Siarkowicz <mareksiarkowicz@gmail.com> | 2015-06-15 13:30:06 +0200 |
commit | 3b4f022722e43d5821f4d2276018242c88cb1ed3 (patch) | |
tree | 83bded768144b8dbc2da3952c7058a10998ca773 | |
parent | df5aa3102f9d0257224ee9423afdfd42f00592ac (diff) | |
download | pyParrotZikTCP-3b4f022722e43d5821f4d2276018242c88cb1ed3.tar.xz pyParrotZikTCP-3b4f022722e43d5821f4d2276018242c88cb1ed3.zip |
Fix quit wrapping.
-rw-r--r-- | parrot_zik/indicator/base.py | 3 | ||||
-rw-r--r-- | parrot_zik/indicator/linux.py | 3 | ||||
-rw-r--r-- | parrot_zik/indicator/mac.py | 3 | ||||
-rw-r--r-- | parrot_zik/indicator/windows.py | 3 | ||||
-rwxr-xr-x | parrot_zik/parrot_zik_tray | 5 |
5 files changed, 14 insertions, 3 deletions
diff --git a/parrot_zik/indicator/base.py b/parrot_zik/indicator/base.py index 7101790..8204fa9 100644 --- a/parrot_zik/indicator/base.py +++ b/parrot_zik/indicator/base.py @@ -13,6 +13,9 @@ class BaseIndicator(object): def show_about_dialog(self, widget): raise NotImplementedError + def quit(self, _): + raise NotImplementedError + class MenuItemBase(object): def __init__(self, base_item, sensitive, visible): self.base_item = base_item diff --git a/parrot_zik/indicator/linux.py b/parrot_zik/indicator/linux.py index cbec1dd..ff06587 100644 --- a/parrot_zik/indicator/linux.py +++ b/parrot_zik/indicator/linux.py @@ -34,6 +34,9 @@ class LinuxIndicator(BaseIndicator): def main(self): gtk.main() + def quit(self, _): + gtk.main_quit() + def show_about_dialog(self, widget): about_dialog = gtk.AboutDialog() about_dialog.set_destroy_with_parent(True) diff --git a/parrot_zik/indicator/mac.py b/parrot_zik/indicator/mac.py index 8fdd1e6..d28ee26 100644 --- a/parrot_zik/indicator/mac.py +++ b/parrot_zik/indicator/mac.py @@ -27,6 +27,9 @@ class DarwinIndicator(BaseIndicator): def show_about_dialog(self, widget): pass + def quit(self, _): + pass + class NSMenu(object): def __init__(self): diff --git a/parrot_zik/indicator/windows.py b/parrot_zik/indicator/windows.py index 0f81e55..118f620 100644 --- a/parrot_zik/indicator/windows.py +++ b/parrot_zik/indicator/windows.py @@ -33,6 +33,9 @@ class WindowsIndicator(BaseIndicator): def main(self): gtk.main() + def quit(self, _): + gtk.main_quit() + def show_about_dialog(self, widget): about_dialog = gtk.AboutDialog() about_dialog.set_destroy_with_parent(True) diff --git a/parrot_zik/parrot_zik_tray b/parrot_zik/parrot_zik_tray index 914a37e..0e5b951 100755 --- a/parrot_zik/parrot_zik_tray +++ b/parrot_zik/parrot_zik_tray @@ -1,5 +1,4 @@ #!/usr/bin/env python -import gtk from parrot_zik.interface.version1 import ParrotZikVersion1Interface from parrot_zik.interface.version2 import ParrotZikVersion2Interface @@ -26,8 +25,8 @@ class ParrotZikIndicator(SysIndicator): self.version_1_interface = ParrotZikVersion1Interface(self) self.version_2_interface = ParrotZikVersion2Interface(self) - self.quit = MenuItem("Quit", gtk.main_quit, checkitem=True) - self.menu.append(self.quit) + self.quit_item = MenuItem("Quit", self.quit, checkitem=True) + self.menu.append(self.quit_item) SysIndicator.__init__(self, icon="zik-audio-headset", menu=self.menu) |