diff options
author | Marek Siarkowicz <mareksiarkowicz@gmail.com> | 2015-06-15 11:33:33 +0200 |
---|---|---|
committer | Marek Siarkowicz <mareksiarkowicz@gmail.com> | 2015-06-15 12:01:43 +0200 |
commit | 947a9f7d10bc3c54939cfa72dab27b2e64034318 (patch) | |
tree | 052108b258f5179c457b762e2134bf9fff1dccfe /parrot_zik | |
parent | 55255db75378f39807371bb7e434cc943fd66f27 (diff) | |
download | pyParrotZikTCP-947a9f7d10bc3c54939cfa72dab27b2e64034318.tar.xz pyParrotZikTCP-947a9f7d10bc3c54939cfa72dab27b2e64034318.zip |
Create packet.
Diffstat (limited to '')
-rw-r--r-- | parrot_zik/__init__.py | 0 | ||||
-rw-r--r-- | parrot_zik/bluetooth_paired_devices.py (renamed from bluetooth_paired_devices.py) | 2 | ||||
-rw-r--r-- | parrot_zik/indicator.py (renamed from indicator.py) | 6 | ||||
-rw-r--r-- | parrot_zik/message.py (renamed from message.py) | 0 | ||||
-rw-r--r-- | parrot_zik/parrot_zik_model.py (renamed from parrot_zik.py) | 4 | ||||
-rwxr-xr-x | parrot_zik/parrot_zik_tray (renamed from parrot_zik_tray) | 24 | ||||
-rw-r--r-- | parrot_zik/resource_manager.py (renamed from resource_manager.py) | 2 | ||||
-rw-r--r-- | parrot_zik/status_app_mac.py (renamed from status_app_mac.py) | 0 |
8 files changed, 18 insertions, 20 deletions
diff --git a/parrot_zik/__init__.py b/parrot_zik/__init__.py new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/parrot_zik/__init__.py diff --git a/bluetooth_paired_devices.py b/parrot_zik/bluetooth_paired_devices.py index fead080..eb1ec09 100644 --- a/bluetooth_paired_devices.py +++ b/parrot_zik/bluetooth_paired_devices.py @@ -2,7 +2,7 @@ import sys import re import os -from resource_manager import GenericResourceManager +from parrot_zik.resource_manager import GenericResourceManager if sys.platform == "darwin": from binplist import binplist diff --git a/indicator.py b/parrot_zik/indicator.py index 05ffec7..2691113 100644 --- a/indicator.py +++ b/parrot_zik/indicator.py @@ -41,7 +41,7 @@ class BaseIndicator(object): class WindowsIndicator(BaseIndicator): def __init__(self, icon, menu): self.icon_directory = ( - os.path.dirname(os.path.realpath(sys.argv[0])) + os.path.dirname(os.path.realpath(sys.argv[0])) + os.path.sep + '..' + os.path.sep + 'share' + os.path.sep + 'icons' + os.path.sep +'zik' + os.path.sep) self.menu_shown = False @@ -77,7 +77,7 @@ class LinuxIndicator(BaseIndicator): + os.path.sep + 'icons' + os.path.sep+'zik' + os.path.sep) if not os.path.isdir(self.icon_directory): - self.icon_directory = (os.path.dirname(sys.argv[0]) + self.icon_directory = (os.path.dirname(sys.argv[0]) + os.path.sep + '..' + os.path.sep + 'share' + os.path.sep + 'icons' + os.path.sep+'zik' + os.path.sep) @@ -108,7 +108,7 @@ class LinuxIndicator(BaseIndicator): class DarwinIndicator(BaseIndicator): def __init__(self, icon, menu): self.icon_directory = ( - os.path.dirname(os.path.realpath(sys.argv[0])) + os.path.sep + os.path.dirname(os.path.realpath(sys.argv[0])) + os.path.sep + '..' + os.path.sep + 'share' + os.path.sep + 'icons' + os.path.sep + 'zik' + os.path.sep) statusicon = StatusApp.sharedApplication() diff --git a/message.py b/parrot_zik/message.py index 214b6f9..214b6f9 100644 --- a/message.py +++ b/parrot_zik/message.py diff --git a/parrot_zik.py b/parrot_zik/parrot_zik_model.py index 52414b5..e15200f 100644 --- a/parrot_zik.py +++ b/parrot_zik/parrot_zik_model.py @@ -1,5 +1,5 @@ -from resource_manager import Version1ResourceManager -from resource_manager import Version2ResourceManager +from parrot_zik.resource_manager import Version1ResourceManager +from parrot_zik.resource_manager import Version2ResourceManager class BatteryStates: diff --git a/parrot_zik_tray b/parrot_zik/parrot_zik_tray index b3deaa2..dcdacd0 100755 --- a/parrot_zik_tray +++ b/parrot_zik/parrot_zik_tray @@ -1,20 +1,18 @@ #!/usr/bin/env python import functools from threading import Lock - import gtk -import bluetooth_paired_devices -from parrot_zik import BatteryStates -from parrot_zik import ParrotZikVersion1 -from parrot_zik import ParrotZikVersion2 -from parrot_zik import NoiseControlTypes -from bluetooth_paired_devices import connect -from parrot_zik import Rooms -from indicator import MenuItem -from indicator import Menu -from indicator import SysIndicator -import resource_manager +from parrot_zik import resource_manager +from parrot_zik import bluetooth_paired_devices +from parrot_zik.parrot_zik_model import BatteryStates +from parrot_zik.parrot_zik_model import ParrotZikVersion1 +from parrot_zik.parrot_zik_model import ParrotZikVersion2 +from parrot_zik.parrot_zik_model import NoiseControlTypes +from parrot_zik.parrot_zik_model import Rooms +from parrot_zik.indicator import MenuItem +from parrot_zik.indicator import Menu +from parrot_zik.indicator import SysIndicator REFRESH_FREQUENCY = 30000 RECONNECT_FREQUENCY = 5000 @@ -72,7 +70,7 @@ class ParrotZikIndicator(SysIndicator): else: self.info("Trying to connect") try: - manager = connect() + manager = bluetooth_paired_devices.connect() except bluetooth_paired_devices.BluetoothIsNotOn: self.info("Bluetooth is turned off") except bluetooth_paired_devices.DeviceNotConnected: diff --git a/resource_manager.py b/parrot_zik/resource_manager.py index daf6ecd..8b63e8c 100644 --- a/resource_manager.py +++ b/parrot_zik/resource_manager.py @@ -4,7 +4,7 @@ import sys from BeautifulSoup import BeautifulSoup -from message import Message +from parrot_zik.message import Message class ResourceManagerBase(object): diff --git a/status_app_mac.py b/parrot_zik/status_app_mac.py index dccffe4..dccffe4 100644 --- a/status_app_mac.py +++ b/parrot_zik/status_app_mac.py |