Hi Peng and Yusuke. I'm Tsuyoshi Horo. I'd like you to do a code review ...
13 years, 9 months ago
(2011-08-17 08:38:03 UTC)
#1
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.
I think you could use ibus_serializable_{get,set}_qattachment(). They are similar with this CL. BTW, currently ibus_serializable_{get,set}_qattachment ...
13 years, 8 months ago
(2011-08-17 15:04:34 UTC)
#2
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.
Thank you for teaching me the method. I tried to use the method, but it ...
13 years, 8 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.
Issue 4898056: Add extended data fields to IBusLookupTable.
(Closed)
Created 13 years, 9 months ago by horo1
Modified 13 years, 8 months ago
Reviewers: shawn.p.huang_gmail.com, Yusuke Sato, Peng
Base URL: git://github.com/ibus/ibus.git@master
Comments: 0