diff options
author | Huang Peng <shawn.p.huang@gmail.com> | 2008-05-29 21:09:39 +0800 |
---|---|---|
committer | Huang Peng <shawn.p.huang@gmail.com> | 2008-05-29 21:09:39 +0800 |
commit | af1638a9d44f234f0d39ec2b1140c670b968c3d1 (patch) | |
tree | 8a1de573c79c8f360549374f79c07ee92acb376b /panel | |
parent | 9d1864aea72f05e39703bb414d318265494135c7 (diff) | |
download | ibus-af1638a9d44f234f0d39ec2b1140c670b968c3d1.tar.gz ibus-af1638a9d44f234f0d39ec2b1140c670b968c3d1.tar.xz ibus-af1638a9d44f234f0d39ec2b1140c670b968c3d1.zip |
ibus almost works.
Diffstat (limited to 'panel')
-rw-r--r-- | panel/candidatepanel.py | 12 | ||||
-rw-r--r-- | panel/panel.py | 3 |
2 files changed, 13 insertions, 2 deletions
diff --git a/panel/candidatepanel.py b/panel/candidatepanel.py index c66c455..097f8a1 100644 --- a/panel/candidatepanel.py +++ b/panel/candidatepanel.py @@ -52,6 +52,9 @@ class CandidateArea (gtk.HBox): self._labels.append ((label1, label2)) + self._labels[0][0].show () + self._labels[0][1].show () + def set_candidates (self, candidates, focus_candidate = 0): assert len (candidates) <= len (self._labels) i = 0 @@ -69,10 +72,17 @@ class CandidateArea (gtk.HBox): i += 1 - for label1, label2 in self._labels[len(candidates):]: + for label1, label2 in self._labels[max (1, len(candidates)):]: label1.hide () label2.hide () + if len (candidates) == 0: + self._labels[0][0].set_text ("") + self._labels[0][1].set_text ("") + else: + self._labels[0][0].set_text ("1.") + + class CandidatePanel (gtk.VBox): __gproperties__ = { 'orientation' : (gtk.Orientation, # type diff --git a/panel/panel.py b/panel/panel.py index b0b4251..aba2ec4 100644 --- a/panel/panel.py +++ b/panel/panel.py @@ -80,7 +80,8 @@ class PanelProxy (interface.IPanel): self._panel.hide_aux_string () def UpdateLookupTable (self, lookup_table): - self._panel.update_lookup_table () + lookup_table = ibus.lookup_table_from_dbus_value (lookup_table) + self._panel.update_lookup_table (lookup_table) def ShowCandidateWindow (self): self._panel.show_candidate_window () |