aboutsummaryrefslogtreecommitdiff
path: root/ParrotZikTray
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xParrotZikTray9
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())