From 8d990d4626d0bd313e38d1ccfa679847df134674 Mon Sep 17 00:00:00 2001 From: Dmitry Moiseev Date: Thu, 9 Jan 2014 01:13:21 -0800 Subject: Support for new SysIndicator class --- ParrotZikTray | 20 ++++++++++++++++---- 1 file 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..") -- cgit v1.2.1