summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--configure.ac1
-rw-r--r--icons/Makefile.am1
-rw-r--r--launcher/Makefile.am7
-rw-r--r--launcher/ibus.desktop.in9
-rw-r--r--launcher/ibus.in13
-rw-r--r--panel/handle.py12
-rw-r--r--panel/languagebar.py10
7 files changed, 46 insertions, 7 deletions
diff --git a/configure.ac b/configure.ac
index 1bfaabf..3233afc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -181,6 +181,7 @@ ibus/interface/Makefile
daemon/Makefile
daemon/ibus-daemon
launcher/ibus
+launcher/ibus.desktop
launcher/Makefile
panel/Makefile
panel/ibus-panel
diff --git a/icons/Makefile.am b/icons/Makefile.am
index 23c0f9f..5a6617c 100644
--- a/icons/Makefile.am
+++ b/icons/Makefile.am
@@ -31,6 +31,7 @@ icons_DATA = \
iconsdir = $(pkgdatadir)/icons
sysicons_DATA = \
+ ibus.svg \
ibus-setup.svg \
$(NULL)
diff --git a/launcher/Makefile.am b/launcher/Makefile.am
index eaf3167..807f331 100644
--- a/launcher/Makefile.am
+++ b/launcher/Makefile.am
@@ -21,10 +21,13 @@
bin_SCRIPTS = ibus
-CLEANFILES = \
- $(NULL)
+desktop_DATA = ibus.desktop
+desktopdir = $(datadir)/applications
EXTRA_DIST = \
ibus.in \
+ ibus.desktop.in \
$(NULL)
+CLEANFILES = \
+ $(NULL)
diff --git a/launcher/ibus.desktop.in b/launcher/ibus.desktop.in
new file mode 100644
index 0000000..d3c5e89
--- /dev/null
+++ b/launcher/ibus.desktop.in
@@ -0,0 +1,9 @@
+[Desktop Entry]
+Name=IBus
+Comment=Setup utility for IBus
+Exec=ibus
+Icon=ibus
+Terminal=false
+Type=Application
+StartupNotify=true
+Categories=Settings;
diff --git a/launcher/ibus.in b/launcher/ibus.in
index 4142b88..1257411 100644
--- a/launcher/ibus.in
+++ b/launcher/ibus.in
@@ -18,7 +18,9 @@
# License along with this program; if not, write to the
# Free Software Foundation, Inc., 59 Temple Place, Suite 330,
# Boston, MA 02111-1307 USA
+
import os
+import os.path
import sys
import time
@@ -29,6 +31,17 @@ conf = "@prefix@/libexec/ibus-gconf"
daemon_pid = 0
+logname = os.path.expanduser("~/.ibus-error")
+os.close(0)
+os.close(1)
+os.close(2)
+try:
+ os.unlink(logname)
+except:
+ pass
+fd = os.open(logname, os.O_CREAT | os.O_WRONLY)
+os.dup2(fd, 1)
+os.dup2(fd, 2)
try:
print "start ibus-daemon"
daemon_pid = os.spawnv (os.P_NOWAIT, daemon, [daemon])
diff --git a/panel/handle.py b/panel/handle.py
index ccd1890..327a018 100644
--- a/panel/handle.py
+++ b/panel/handle.py
@@ -37,13 +37,15 @@ class Handle(gtk.EventBox):
self.__move_begined = False
root = gdk.get_default_root_window()
- workarea = root.property_get("_NET_WORKAREA")[2]
def do_button_press_event(self, event):
if event.button == 1:
root = gdk.get_default_root_window()
- desktop = root.property_get("_NET_CURRENT_DESKTOP")[2][0]
- self.__workarea = root.property_get("_NET_WORKAREA")[2][desktop * 4: (desktop + 1) * 4]
+ try:
+ desktop = root.property_get("_NET_CURRENT_DESKTOP")[2][0]
+ self.__workarea = root.property_get("_NET_WORKAREA")[2][desktop * 4: (desktop + 1) * 4]
+ except:
+ self.__workarea = None
self.__move_begined = True
toplevel = self.get_toplevel()
x, y = toplevel.get_position()
@@ -70,6 +72,10 @@ class Handle(gtk.EventBox):
x = int(event.x_root - self.__press_pos[0])
y = int(event.y_root - self.__press_pos[1])
+ if self.__workarea == None:
+ toplevel.move(x, y)
+ return
+
if x < self.__workarea[0] and x > self.__workarea[0] - 16:
x = self.__workarea[0]
if y < self.__workarea[1] and y > self.__workarea[1] - 16:
diff --git a/panel/languagebar.py b/panel/languagebar.py
index ce12834..d3081f1 100644
--- a/panel/languagebar.py
+++ b/panel/languagebar.py
@@ -56,8 +56,13 @@ class LanguageBar(gtk.Toolbar):
self.__toplevel.add(self)
root = gdk.get_default_root_window()
- workarea = root.property_get("_NET_WORKAREA")[2]
- self.__toplevel.move(workarea[2] - 200, workarea[3] - 40)
+ try:
+ workarea = root.property_get("_NET_WORKAREA")[2]
+ right, bottom = workarea[2], workarea[3]
+ except:
+ right, bottom = 640, 480
+
+ self.__toplevel.move(right - 200, bottom - 40)
def __create_ui(self):
# create move handle
@@ -144,6 +149,7 @@ class LanguageBar(gtk.Toolbar):
def focus_in(self):
self.__im_menu.set_sensitive(True)
+ self.__toplevel.window.raise_()
def focus_out(self):
self.__im_menu.set_sensitive(False)