summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHuang Peng <shawn.p.huang@gmail.com>2008-08-16 17:52:07 +0800
committerHuang Peng <shawn.p.huang@gmail.com>2008-08-16 17:52:07 +0800
commit889e2190c68a4e2a4a8dce9f654d36d9ec06f138 (patch)
tree66b2746c901b11c8962e35c8c04d8073756cb794
parent16d674dd9f2561328ab7e1a5a42d32c12d11ec5f (diff)
downloadibus-889e2190c68a4e2a4a8dce9f654d36d9ec06f138.tar.gz
ibus-889e2190c68a4e2a4a8dce9f654d36d9ec06f138.tar.xz
ibus-889e2190c68a4e2a4a8dce9f654d36d9ec06f138.zip
Fix bug when do not install ibus in /usr
-rw-r--r--daemon/ibus-daemon.in5
-rw-r--r--daemon/register.py7
-rw-r--r--gconf/ibus-gconf24
3 files changed, 6 insertions, 30 deletions
diff --git a/daemon/ibus-daemon.in b/daemon/ibus-daemon.in
index f4a8f24..a572c8b 100644
--- a/daemon/ibus-daemon.in
+++ b/daemon/ibus-daemon.in
@@ -19,6 +19,7 @@
# Free Software Foundation, Inc., 59 Temple Place, Suite 330,
# Boston, MA 02111-1307 USA
-export IBUS_PREFIX=@prefix@
-exec python @prefix@/share/ibus/daemon/ibusdaemon.py $@
+prefix=@prefix@
+export IBUS_DATAROOTDIR=@datarootdir@
+exec python @prefix@/share/@PACKAGE@/daemon/ibusdaemon.py $@
diff --git a/daemon/register.py b/daemon/register.py
index 2e3cfdd..861548d 100644
--- a/daemon/register.py
+++ b/daemon/register.py
@@ -25,6 +25,8 @@ import signal
import glob
import ibus
+IBUS_DATAROOTDIR = os.getenv("IBUS_DATAROOTDIR")
+
class Engine(ibus.Object):
def __init__(self, name, lang = "other", icon = "", author = "", credits = "", _exec = "", pid = 0):
super(Engine, self).__init__()
@@ -122,10 +124,7 @@ class Register(ibus.Object):
break
def __load(self):
- _file = path.abspath(__file__)
- _dir = path.dirname(_file) + "./../engine"
- _dir = path.abspath(_dir)
- _dir = "/usr/share/ibus/engine"
+ _dir = path.join(IBUS_DATAROOTDIR, "ibus/engine")
for _file in glob.glob(_dir + "/*.engine"):
engine = self.__load_engine(_file)
if (engine.lang, engine.name) in self.__engines:
diff --git a/gconf/ibus-gconf b/gconf/ibus-gconf
deleted file mode 100644
index 0e3a03c..0000000
--- a/gconf/ibus-gconf
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/bin/sh
-#
-# ibus - The Input Bus
-#
-# Copyright (c) 2007-2008 Huang Peng <shawn.p.huang@gmail.com>
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this program; if not, write to the
-# Free Software Foundation, Inc., 59 Temple Place, Suite 330,
-# Boston, MA 02111-1307 USA
-
-export IBUS_PREFIX=/usr
-exec python /usr/share/ibus/gconf/main.py $@
-