aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Siarkowicz <mareksiarkowicz@gmail.com>2015-06-15 11:33:33 +0200
committerMarek Siarkowicz <mareksiarkowicz@gmail.com>2015-06-15 12:01:43 +0200
commit947a9f7d10bc3c54939cfa72dab27b2e64034318 (patch)
tree052108b258f5179c457b762e2134bf9fff1dccfe
parent55255db75378f39807371bb7e434cc943fd66f27 (diff)
downloadpyParrotZikTCP-947a9f7d10bc3c54939cfa72dab27b2e64034318.tar.xz
pyParrotZikTCP-947a9f7d10bc3c54939cfa72dab27b2e64034318.zip
Create packet.
-rw-r--r--parrot_zik/__init__.py0
-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-xparrot_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
-rw-r--r--setup.py7
9 files changed, 21 insertions, 24 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
diff --git a/setup.py b/setup.py
index 7156620..19c391b 100644
--- a/setup.py
+++ b/setup.py
@@ -19,7 +19,7 @@ setup(
windows=[
{
- 'script': 'parrot_zik_tray',
+ 'script': 'parrot_zik/parrot_zik_tray',
'icon_resources': [(1, "./share/icons/zik/Headphone.ico")],
}
],
@@ -43,7 +43,6 @@ setup(
'BeautifulSoup', 'bluetooth'
],
- py_modules=['parrot_zik', 'message', 'resource_manager'],
-
- scripts=["parrot_zik_tray"]
+ packages=['parrot_zik'],
+ scripts=["parrot_zik/parrot_zik_tray"]
)