Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(29)

Side by Side Diff: ibus/component.py

Issue 1702015: Support engine specific hotkey. (Closed) Base URL: ssh://git@chromiumos-git/ibus.git
Patch Set: Created 10 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « bus/ibusimpl.c ('k') | ibus/enginedesc.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # vim:set et sts=4 sw=4: 1 # vim:set et sts=4 sw=4:
2 # 2 #
3 # ibus - The Input Bus 3 # ibus - The Input Bus
4 # 4 #
5 # Copyright (c) 2007-2010 Peng Huang <shawn.p.huang@gmail.com> 5 # Copyright (c) 2007-2010 Peng Huang <shawn.p.huang@gmail.com>
6 # Copyright (c) 2007-2010 Red Hat, Inc. 6 # Copyright (c) 2007-2010 Red Hat, Inc.
7 # 7 #
8 # This library is free software; you can redistribute it and/or 8 # This library is free software; you can redistribute it and/or
9 # modify it under the terms of the GNU Lesser General Public 9 # modify it under the terms of the GNU Lesser General Public
10 # License as published by the Free Software Foundation; either 10 # License as published by the Free Software Foundation; either
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 author = property(get_author) 83 author = property(get_author)
84 homepage = property(get_homepage) 84 homepage = property(get_homepage)
85 _exec = property(get_exec) 85 _exec = property(get_exec)
86 textdomain = property(get_textdomain) 86 textdomain = property(get_textdomain)
87 observed_paths = property(get_observed_paths) 87 observed_paths = property(get_observed_paths)
88 engines = property(get_engines) 88 engines = property(get_engines)
89 89
90 def add_observed_path(self, path): 90 def add_observed_path(self, path):
91 self.__observed_paths.append(ObservedPath(path)) 91 self.__observed_paths.append(ObservedPath(path))
92 92
93 def add_engine(self, name="", longname="", description="", language="", lice nse="", author="", icon="", layout=""): 93 def add_engine(self, name="", longname="", description="", language="", lice nse="", author="", icon="", layout="", hotkeys=""):
94 engine = EngineDesc(name, longname, description, language, license, auth or, icon, layout) 94 engine = EngineDesc(name, longname, description, language, license, auth or, icon, layout, hotkeys)
95 self.__engines.append(engine) 95 self.__engines.append(engine)
96 96
97 def serialize(self, struct): 97 def serialize(self, struct):
98 super(Component, self).serialize(struct) 98 super(Component, self).serialize(struct)
99 struct.append (dbus.String(self.__name)) 99 struct.append (dbus.String(self.__name))
100 struct.append (dbus.String(self.__description)) 100 struct.append (dbus.String(self.__description))
101 struct.append (dbus.String(self.__version)) 101 struct.append (dbus.String(self.__version))
102 struct.append (dbus.String(self.__license)) 102 struct.append (dbus.String(self.__license))
103 struct.append (dbus.String(self.__author)) 103 struct.append (dbus.String(self.__author))
104 struct.append (dbus.String(self.__homepage)) 104 struct.append (dbus.String(self.__homepage))
(...skipping 17 matching lines...) Expand all
122 self.__observed_paths = map(deserialize_object, struct.pop(0)) 122 self.__observed_paths = map(deserialize_object, struct.pop(0))
123 self.__engines = map(deserialize_object, struct.pop(0)) 123 self.__engines = map(deserialize_object, struct.pop(0))
124 124
125 def test(): 125 def test():
126 text = Component("Hello", "", "", "", "", "", "", "") 126 text = Component("Hello", "", "", "", "", "", "", "")
127 value = serialize_object(text) 127 value = serialize_object(text)
128 text= deserialize_object(value) 128 text= deserialize_object(value)
129 129
130 if __name__ == "__main__": 130 if __name__ == "__main__":
131 test() 131 test()
OLDNEW
« no previous file with comments | « bus/ibusimpl.c ('k') | ibus/enginedesc.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698