Skip to content

Commit

Permalink
Use annotation field for better looking.
Browse files Browse the repository at this point in the history
This cl depends on https://codereview.chromium.org/11411063

BUG=140186
TEST=Manually done on lumpy with sample IME.

Review URL: https://chromiumcodereview.appspot.com/11299104

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@169414 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
nona@chromium.org committed Nov 26, 2012
1 parent 5dd849d commit a2dcb1a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -273,9 +273,9 @@ bool InputMethodEngineIBus::SetCandidates(
for (std::vector<Candidate>::const_iterator ix = candidates.begin();
ix != candidates.end(); ++ix) {
ibus::IBusLookupTable::Entry entry;
// TODO(nona): support annotation(crbug.com/140186).
entry.value = ix->value + " " + ix->annotation;
entry.value = ix->value;
entry.label = ix->label;
entry.annotation = ix->annotation;

// Store a mapping from the user defined ID to the candidate index.
candidate_indexes_[ix->id] = candidate_ids_.size();
Expand Down
5 changes: 4 additions & 1 deletion chromeos/dbus/ibus/ibus_lookup_table.cc
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@ void AppendIBusLookupTable(const IBusLookupTable& table,
bool have_labels = false;
for (size_t i = 0; i < candidates.size(); ++i) {
// Write candidate string as IBusText.
AppendStringAsIBusText(candidates[i].value, &text_writer);
ibus::IBusText text;
text.set_text(candidates[i].value);
text.set_annotation(candidates[i].annotation);
AppendIBusText(text, &text_writer);
if (!candidates[i].label.empty())
have_labels = true;
}
Expand Down

0 comments on commit a2dcb1a

Please sign in to comment.