diff options
| author | Huang Peng <shawn.p.huang@gmail.com> | 2008-09-28 10:56:11 +0800 |
|---|---|---|
| committer | Huang Peng <shawn.p.huang@gmail.com> | 2008-09-28 10:56:11 +0800 |
| commit | 0a19866bcc57beb1d15bfe996b7c58fd054abdbc (patch) | |
| tree | c44c3e05c2b5448f8c09466ca6271a1fca768f02 /panel | |
| parent | 7e28ed0209cc811b7443e15304174a730f75f8d5 (diff) | |
| download | ibus-0a19866bcc57beb1d15bfe996b7c58fd054abdbc.tar.gz ibus-0a19866bcc57beb1d15bfe996b7c58fd054abdbc.tar.xz ibus-0a19866bcc57beb1d15bfe996b7c58fd054abdbc.zip | |
Change Panel interface.
Diffstat (limited to 'panel')
| -rw-r--r-- | panel/main.py | 6 | ||||
| -rw-r--r-- | panel/panel.py | 5 |
2 files changed, 4 insertions, 7 deletions
diff --git a/panel/main.py b/panel/main.py index dabe085..07ea3c0 100644 --- a/panel/main.py +++ b/panel/main.py @@ -27,16 +27,12 @@ import gtk import locale import panel -PANEL_PATH = "/org/freedesktop/IBus/Panel" - class PanelApplication: def __init__ (self): self.__bus = ibus.Bus() self.__bus.connect("destroy", self.__bus_destroy_cb) - self.__panel = panel.Panel(self.__bus, PANEL_PATH) - - self.__bus.register_panel(PANEL_PATH, True) + self.__panel = panel.Panel(self.__bus) def run(self): gtk.main() diff --git a/panel/panel.py b/panel/panel.py index 1c4ad59..f745cdc 100644 --- a/panel/panel.py +++ b/panel/panel.py @@ -56,8 +56,8 @@ gtk.about_dialog_set_url_hook(url_hook, None) gtk.about_dialog_set_email_hook(email_hook, None) class Panel(ibus.PanelBase): - def __init__ (self, bus, object_path): - super(Panel, self).__init__(bus, object_path) + def __init__ (self, bus): + super(Panel, self).__init__(bus) self.__bus = bus self.__focus_ic = None self.__setup_pid = 0 @@ -102,6 +102,7 @@ class Panel(ibus.PanelBase): self.__config_load_lookup_table_orientation() self.__config_load_auto_hide() self.__config_load_custom_font() + self.__bus.request_name(ibus.panel.IBUS_PANEL_NAME, 0) def set_cursor_location(self, x, y, w, h): self.__candidate_panel.set_cursor_location(x + w, y + h) |
