aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Moiseev <m0sia@m0sia.ru>2014-01-09 01:13:21 -0800
committerDmitry Moiseev <m0sia@m0sia.ru>2014-01-09 01:13:21 -0800
commit8d990d4626d0bd313e38d1ccfa679847df134674 (patch)
tree8b4ce4d5ec19887cc5644ee88f7ed8970e3df2da
parent7a0b14cd97a3df31d7b3e6d26e52e19c181c3162 (diff)
downloadpyParrotZikTCP-8d990d4626d0bd313e38d1ccfa679847df134674.tar.xz
pyParrotZikTCP-8d990d4626d0bd313e38d1ccfa679847df134674.zip
Support for new SysIndicator class
Diffstat (limited to '')
-rwxr-xr-xParrotZikTray20
1 files changed, 16 insertions, 4 deletions
diff --git a/ParrotZikTray b/ParrotZikTray
index 3856e1d..d9bdbc1 100755
--- a/ParrotZikTray
+++ b/ParrotZikTray
@@ -18,6 +18,15 @@ class ParrotZikIndicator(SysIndicator):
self.info_item = MenuItem("Parrot Zik Not connected..",None,sensitive = False)
self.menu.append(self.info_item)
+ self.battery_level = MenuItem("Battery Level:",None,sensitive = False)
+ self.menu.append(self.battery_level)
+
+ self.battery_state = MenuItem("Battery State:",None,sensitive = False)
+ self.menu.append(self.battery_state)
+
+ self.firmware_version = MenuItem("Firmware Version:",None,sensitive = False)
+ self.menu.append(self.firmware_version)
+
self.check = MenuItem("Noise Cancellation",self.toggleANC,sensitive = False, checkitem = True)
self.menu.append(self.check)
@@ -30,6 +39,9 @@ class ParrotZikIndicator(SysIndicator):
self.check4 = MenuItem("Concert Hall Mode",self.toggleParrotConcertHall,sensitive = False, checkitem = True)
self.menu.append(self.check4)
+ self.quit = MenuItem("Quit",sys.exit,sensitive = True, checkitem = True)
+ self.menu.append(self.quit)
+
SysIndicator.__init__(self,icon = "zik-audio-headset",menu = self.menu)
self.connected=False
@@ -138,10 +150,10 @@ class ParrotZikIndicator(SysIndicator):
self.setIcon("zik-battery-low")
self.batteryState="In Use"
- self.info_item.set_label("Connected to: "+self.name+
- "\nFirmware version: "+self.version+
- "\nState: "+self.batteryState+
- "\nBattery Level: "+str(self.batteryLevel))
+ self.info_item.set_label("Connected to: "+self.name)
+ self.firmware_version.set_label("Firmware version: "+self.version)
+ self.battery_state.set_label("State: "+self.batteryState)
+ self.battery_level.set_label("Battery Level: "+str(self.batteryLevel))
else:
self.setIcon("zik-audio-headset")
self.info_item.set_label("Parrot Zik Not connected..")