[hamster-applet] Let ugly bits live with the guilty
- From: Patryk Zawadzki <pzawadzki src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [hamster-applet] Let ugly bits live with the guilty
- Date: Fri, 22 Jan 2010 23:24:54 +0000 (UTC)
commit bcaef38446380bbf38c87ab0c38233530c88c1f5
Author: Patryk Zawadzki <patrys pld-linux org>
Date: Sat Jan 23 00:24:04 2010 +0100
Let ugly bits live with the guilty
src/hamster-applet.py | 3 ---
src/hamster/KeyBinder.py | 4 ++--
src/hamster/keybinder/__init__.py | 13 ++++++++++++-
3 files changed, 14 insertions(+), 6 deletions(-)
---
diff --git a/src/hamster-applet.py b/src/hamster-applet.py
index 53fc33d..0f0079a 100755
--- a/src/hamster-applet.py
+++ b/src/hamster-applet.py
@@ -91,9 +91,6 @@ if __name__ == "__main__":
format = log_format)
try:
- sys.path.append(os.path.join(os.path.dirname(__file__), "hamster", "keybinder", ".libs")) # TODO - deal with this
-
- # Now the path is set, import our applet
from hamster import defs
from hamster.configuration import runtime, dialogs
diff --git a/src/hamster/KeyBinder.py b/src/hamster/KeyBinder.py
index 5abd4a0..e416730 100644
--- a/src/hamster/KeyBinder.py
+++ b/src/hamster/KeyBinder.py
@@ -20,8 +20,8 @@
import gtk, gconf
-import keybinder
-from configuration import runtime, conf
+from . import keybinder
+from .configuration import runtime, conf
class Keybinder(object):
def __init__(self):
diff --git a/src/hamster/keybinder/__init__.py b/src/hamster/keybinder/__init__.py
index c2622e4..55e20d1 100644
--- a/src/hamster/keybinder/__init__.py
+++ b/src/hamster/keybinder/__init__.py
@@ -1 +1,12 @@
-from _keybinder import *
+try:
+ from ._keybinder import *
+except ImportError:
+ # running uninstalled?
+ import os
+ import sys
+ sys.path.append(os.path.join(os.path.dirname(__file__), '.libs'))
+ print sys.path
+ try:
+ from _keybinder import *
+ finally:
+ sys.path.pop()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]