diff options
author | Marek Siarkowicz <mareksiarkowicz@gmail.com> | 2015-06-15 18:58:56 +0200 |
---|---|---|
committer | Marek Siarkowicz <mareksiarkowicz@gmail.com> | 2015-06-15 18:58:56 +0200 |
commit | 48a0498d56e54e01b9eed06af00b5ba127fe9134 (patch) | |
tree | 26c661415a7e85f6f947c287646dd04c7b392b47 /parrot_zik/interface | |
parent | 6049e5e3a9f77f4b784eeaf90ace6905feb1afd7 (diff) | |
download | pyParrotZikTCP-48a0498d56e54e01b9eed06af00b5ba127fe9134.tar.xz pyParrotZikTCP-48a0498d56e54e01b9eed06af00b5ba127fe9134.zip |
First get data from api then show.
Diffstat (limited to '')
-rw-r--r-- | parrot_zik/interface/base.py | 1 | ||||
-rw-r--r-- | parrot_zik/interface/version1.py | 8 | ||||
-rw-r--r-- | parrot_zik/interface/version2.py | 8 |
3 files changed, 10 insertions, 7 deletions
diff --git a/parrot_zik/interface/base.py b/parrot_zik/interface/base.py index b93c6c0..90caa02 100644 --- a/parrot_zik/interface/base.py +++ b/parrot_zik/interface/base.py @@ -41,7 +41,6 @@ class ParrotZikBaseInterface(object): self.firmware_version.show() self.settings.show() self.indicator.active_interface = self - self.indicator.menu.reposition() @property def parrot_class(self): diff --git a/parrot_zik/interface/version1.py b/parrot_zik/interface/version1.py index 6ddd1b5..d0a1b2b 100644 --- a/parrot_zik/interface/version1.py +++ b/parrot_zik/interface/version1.py @@ -22,14 +22,16 @@ class ParrotZikVersion1Interface(ParrotZikBaseInterface): self.indicator.menu.append(self.concert_hall_mode) def activate(self, manager): - self.noise_cancelation.show() - self.lou_reed_mode.show() - self.concert_hall_mode.show() super(ParrotZikVersion1Interface, self).activate(manager) self.noise_cancelation.set_active(self.parrot.cancel_noise) self.lou_reed_mode.set_active(self.parrot.lou_reed_mode) self.concert_hall_mode.set_active(self.parrot.concert_hall) + self.noise_cancelation.show() + self.lou_reed_mode.show() + self.concert_hall_mode.show() + self.indicator.menu.reposition() + def deactivate(self): self.noise_cancelation.hide() self.lou_reed_mode.hide() diff --git a/parrot_zik/interface/version2.py b/parrot_zik/interface/version2.py index 08af737..b378a88 100644 --- a/parrot_zik/interface/version2.py +++ b/parrot_zik/interface/version2.py @@ -107,9 +107,6 @@ class ParrotZikVersion2Interface(ParrotZikBaseInterface): self.indicator.menu.append(self.flight_mode) def activate(self, manager): - self.noise_cancelation.show() - self.flight_mode.show() - self.room_sound_effect.show() super(ParrotZikVersion2Interface, self).activate(manager) self._read_noise_cancelation() self.flight_mode.set_active(self.parrot.flight_mode) @@ -130,6 +127,11 @@ class ParrotZikVersion2Interface(ParrotZikBaseInterface): self.angle_150.set_sensitive(sound_effect) self.angle_180.set_sensitive(sound_effect) + self.noise_cancelation.show() + self.flight_mode.show() + self.room_sound_effect.show() + self.indicator.menu.reposition() + def deactivate(self): self.noise_cancelation.hide() self.flight_mode.hide() |