diff options
author | Dmitry Moiseev <m0sia@m0sia.ru> | 2013-11-20 15:41:43 +0600 |
---|---|---|
committer | Dmitry Moiseev <m0sia@m0sia.ru> | 2013-11-20 15:41:43 +0600 |
commit | 606e37ec24713cbf97de0e956ad05830802cbb3a (patch) | |
tree | 8127df66ee60f45aeb8731a5e7a0316f13b97915 /ParrotZikTray | |
parent | 2701ac9722a0a07c7bfbb20cba2e79ab56fab784 (diff) | |
download | pyParrotZikTCP-606e37ec24713cbf97de0e956ad05830802cbb3a.tar.xz pyParrotZikTCP-606e37ec24713cbf97de0e956ad05830802cbb3a.zip |
Added support for Lou Reed special mode and Parrot Concert Hall Mode
Diffstat (limited to '')
-rwxr-xr-x | ParrotZikTray | 62 |
1 files changed, 61 insertions, 1 deletions
diff --git a/ParrotZikTray b/ParrotZikTray index 4d6a6b0..b3ea9b2 100755 --- a/ParrotZikTray +++ b/ParrotZikTray @@ -76,6 +76,18 @@ class ParrotZikIndicator: self.check2.show() self.menu.append(self.check2) + self.check3 = gtk.CheckMenuItem("Lou Reed Mode") + self.check3.connect("activate", self.toggleLouReedMode) + self.check3.set_sensitive(False) + self.check3.show() + self.menu.append(self.check3) + + self.check4 = gtk.CheckMenuItem("Concert Hall Mode") + self.check4.connect("activate", self.toggleLouReedMode) + self.check4.set_sensitive(False) + self.check4.show() + self.menu.append(self.check4) + self.about = gtk.MenuItem() self.about.set_label("About") self.about.connect("activate", self.show_about_dialog) @@ -132,17 +144,30 @@ class ParrotZikIndicator: self.version = self.parrot.getVersion() self.check.set_sensitive(True) + self.check2.set_sensitive(True) + self.check3.set_sensitive(True) + self.check4.set_sensitive(True) + if self.parrot.getNoiseCancel() == "true": self.check.set_active(True) else: self.check.set_active(False) - self.check2.set_sensitive(True) if self.parrot.getAutoConnection() == "true": self.check2.set_active(True) else: self.check2.set_active(False) + if self.parrot.getLouReedMode() == "true": + self.check3.set_active(True) + else: + self.check3.set_active(False) + + if self.parrot.getParrotConcertHall() == "true": + self.check4.set_active(True) + else: + self.check4.set_active(False) + self.CheckBattery() return True @@ -160,6 +185,39 @@ class ParrotZikIndicator: else: self.parrot.setAutoConnection("false") + def toggleLouReedMode(self,widget): + if self.connected: + if self.check3.get_active(): + self.parrot.setLouReedMode("true") + else: + self.parrot.setLouReedMode("false") + if self.parrot.getLouReedMode() == "true": + self.check3.set_active(True) + else: + self.check3.set_active(False) + + if self.parrot.getParrotConcertHall() == "true": + self.check4.set_active(True) + else: + self.check4.set_active(False) + + def toggleParrotConcertHall(self,widget): + if self.connected: + if self.check4.get_active(): + self.parrot.setParrotConcertHall("true") + else: + self.parrot.setParrotConcertHall("false") + + if self.parrot.getLouReedMode() == "true": + self.check3.set_active(True) + else: + self.check3.set_active(False) + + if self.parrot.getParrotConcertHall() == "true": + self.check4.set_active(True) + else: + self.check4.set_active(False) + def CheckBattery(self): if self.connected: print "Updating battery" @@ -195,6 +253,8 @@ class ParrotZikIndicator: self.info_item.set_label("Parrot Zik Not connected..") self.check.set_sensitive(False) self.check2.set_sensitive(False) + self.check3.set_sensitive(False) + self.check4.set_sensitive(False) return True def show_about_dialog(self, widget): |