diff options
author | Marek Siarkowicz <mareksiarkowicz@gmail.com> | 2015-06-13 00:37:49 +0200 |
---|---|---|
committer | Marek Siarkowicz <mareksiarkowicz@gmail.com> | 2015-06-13 00:37:49 +0200 |
commit | 7856465e1ab0ab69101996b12e93450c6bea160b (patch) | |
tree | 0a0478b3696be337fc080163f1cac085f1af3295 /ParrotZikTray | |
parent | d53188baa1c4175d2f9456ac722d35facb47f818 (diff) | |
download | pyParrotZikTCP-7856465e1ab0ab69101996b12e93450c6bea160b.tar.xz pyParrotZikTCP-7856465e1ab0ab69101996b12e93450c6bea160b.zip |
Add flight mode.
Diffstat (limited to 'ParrotZikTray')
-rwxr-xr-x | ParrotZikTray | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/ParrotZikTray b/ParrotZikTray index 6de9e1c..9a96b9b 100755 --- a/ParrotZikTray +++ b/ParrotZikTray @@ -268,7 +268,7 @@ class ParrotZikVersion2Interface(ParrotZikBaseInterface): self.concert_hall_mode_submenu.append(self.silent_mode) self.indicator.menu.append(self.concert_hall_mode) - self.flight_mode = MenuItem("Flight Mode", None, + self.flight_mode = MenuItem("Flight Mode", self.toggle_flight_mode, sensitive=True, checkitem=True, visible=False) self.indicator.menu.append(self.flight_mode) @@ -278,13 +278,18 @@ class ParrotZikVersion2Interface(ParrotZikBaseInterface): self.flight_mode.show() super(ParrotZikVersion2Interface, self).activate(parrot) self.noise_cancelation_enabled.set_active(self.parrot.noise_cancel) - # self.flight_mode.set_active(self.parrot.flight_mode) + self.flight_mode.set_active(self.parrot.flight_mode) def toggleANC(self, widget): if self.connected: self.parrot.noise_cancel = self.noise_cancelation.get_active() self.noise_cancelation.set_active(self.parrot.noise_cancel) + def toggle_flight_mode(self, widget): + if self.connected: + self.parrot.flight_mode = self.flight_mode.get_active() + self.flight_mode.set_active(self.parrot.flight_mode) + def toggledummy(self, widget): print(widget.get_name()) |