Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1552)

Issue 4898056: Add extended data fields to IBusLookupTable. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 9 months ago by horo1
Modified:
12 years, 9 months ago
Reviewers:
shawn.p.huang, Yusuke Sato, Peng
CC:
mukai1, nona1, komatsu1
Base URL:
git://github.com/ibus/ibus.git@master
Visibility:
Public.

Description

Add extended data fields to IBusLookupTable. BUG=None TEST=Linux desktop

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+270 lines, -0 lines) Patch
M src/ibuslookuptable.h View 2 chunks +76 lines, -0 lines 0 comments Download
M src/ibuslookuptable.c View 6 chunks +181 lines, -0 lines 0 comments Download
M src/tests/ibus-serializable.c View 1 chunk +13 lines, -0 lines 0 comments Download

Messages

Total messages: 3
horo1
Hi Peng and Yusuke. I'm Tsuyoshi Horo. I'd like you to do a code review ...
12 years, 9 months ago (2011-08-17 08:38:03 UTC) #1
Peng
I think you could use ibus_serializable_{get,set}_qattachment(). They are similar with this CL. BTW, currently ibus_serializable_{get,set}_qattachment ...
12 years, 9 months ago (2011-08-17 15:04:34 UTC) #2
horo1
12 years, 9 months ago (2011-08-18 11:37:24 UTC) #3
Thank you for teaching me the method.
I tried to use the method, but it doesn't work well.

I think the following codes are not wrong.
{
  IBusText *text =  ibus_text_new_from_string ("main text");

  GValue value1 = { 0 };
  g_value_init(&value1, G_TYPE_INT);
  g_value_set_int(&value1, 100);
  ibus_serializable_set_attachment ((IBusSerializable *)text, "key1", &value1);

  GVariant *variant = ibus_serializable_serialize ((IBusSerializable *)text);
  IBusSerializable *object = (IBusSerializable *) ibus_serializable_deserialize
(variant);

  const GValue *newvalue1 = ibus_serializable_get_attachment (object, "key1");
  ...
}

But an error 
"BUS-CRITICAL **: file ibusserializable.c: line 225 (_g_value_deserialize):
should not be reached"
was occured in ibus_serializable_deserialize method.

So I created another CL( http://codereview.appspot.com/4905054/ ) for fix it.
Would you please review it?


On 2011/08/17 15:04:34, Peng wrote:
> I think you could use ibus_serializable_{get,set}_qattachment(). They are
> similar with this CL.
> 
> BTW, currently 
> ibus_serializable_{get,set}_qattachment take GValue for data. Maybe we could
> change them to use GVariant. GVariant is more convenient.
> 
> 
> On 2011/08/17 08:38:03, horo1 wrote:
> > Hi Peng and Yusuke.
> > 
> > I'm Tsuyoshi Horo.
> > I'd like you to do a code review about this ibus's new feature.
> > 
> > We are planning to implement the new feature in Mozc,
> > which shows the meanings of words to disambiguate homonyms.
> > http://code.google.com/p/chromium-os/issues/detail?id=19090
> > 
> > To implement this feature, we need to add extended data fields to
> > IBusLookupTable.
> > 
> >   "ext_data_types" are the array of the extended data type names.
> >   "ext_data" are the array of the extended data.
> > 
> > These fields are flexible, so we will be able to provide many other features
> in
> > other input methods with them.
> > 
> > Thank you.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b