Closed epico closed 5 years ago
This code is too complicated. I thought that there is some simple api for that. Could you bump up the version required in configure.ac to 1.5.20, and just call hangul_ic_reset in ibus_hangul_engine_reset()?
Please add issue URL on git comment.
@choehwanjin I think the patch follows your suggestion to get the version in runtime. Normally it would be better to check IBUS_CHECK_VERSION() than checking in configure in build time. I also think it's better to support the previous ibus version too in the latest ibus-hangul likes #68 .
@choehwanjin I think the patch follows your suggestion to get the version in runtime. Normally it would be better to check IBUS_CHECK_VERSION() than checking in configure in build time. I also think it's better to support the previous ibus version too in the latest ibus-hangul likes #68 .
IIUC, with IBUS_CHECK_VERSION() on compile time, ibus-hangul built on libibus 1.5.19 will become broken after ibus gets upgraded to 1.5.20.
@fujiwarat I thought there is a simple API to check version, but there isn't. And the code is more complicated than I thought. So I changed my mind.
Both IBUS_CHECK_VERSION() and configure are executed on compile time and I think IBUS_CHECK_VERSION() with ibus-hangul 1.5.2 will work with ibus 1.5.19 and 1.5.20 but ibus-hangul have to be rebuilt if ibus 1.5.19 is upgraded to ibus 1.5.20. I think configure.ac with ibus-hangul 1.5.2 will work with ibus 1.5.20 but users have to upgrade ibus 1.5.y to 1.5.20 or later.
Probably it depends on what's are the new features between ibus-hangul 1.5.1 and 1.5.2? OK, it's up to the ibus-hangul maintainers.
Okay, we respect the upstream decision.
@fujiwarat OK, I understand. I will follow your suggestion. @epico Please update your patch.
After discussion with Takao Fujiwara, I switch to use IBUS_CHECK_VERSION in C code now.
Please review this patch again, thanks!
Thank you.
Please review it again, thanks!
It builds and works in 1.5.19. have not check how it works in 1.5.20.
It builds and works in 1.5.19. have not check how it works in 1.5.20.
I tested this patch w/ ibus 1.5.21. The one problem is ibus-daemon does not update the "version" GSettings in GNOME session. I see --panel disable
option in ibus-daemon and maybe this is why.
After I set the "version" as "1.5.21" manually, GTK preedit reset and commit worked as expected.
The one problem is ibus-daemon does not update the "version" GSettings in GNOME session. I see
--panel disable
option in ibus-daemon and maybe this is why.
Logging-out and logging-in a new GNOME session (instead of ibus restart
) updates the settings. I'm not sure why but I'm OK with this.
This PR looks good. Thanks to all who did this work.
Thanks for the review!
I tested this patch w/ ibus 1.5.21.
If you upgrade ibus, you need to restart ibus-daemon and ibus-hangul is also restarted.
I think GSettings does not require to restart the desktop session. You might have to run glib-compile-schemas
after you update ibus gschema file.
@fujiwarat
I also meet the version problem in gnome session, the version value is empty.
Could you fix this issue?
@changwoo @epico Right. I forgot the original usage of the GSettings "version". It has been used to check the previous IBus version if any migration is needed.
While I can move the current "version" to "prev-version" and set the static "version", Probably I think it's better to add a new API const gchar *ibus_get_version()
than the GSettings values?
Sorry for confusing the usage.
Probably I think it's better to add a new API
const gchar *ibus_get_version()
than the GSettings values?
If the new version info API is added in 1.5.22 or later and used by ibus-hangul, ibus-hangul doesn't have to check >= 1.5.20 in run-time. :) It's good to add such API for the future other uses though.
@fujiwarat Maybe static "version" value is okay.
However if the string is static, using GSettings might be strange since the value is read-write?
If you'd check the version in ibus 1.5.20, how about running ibus version
command?
I guess it may make code more complicated,
and it depends on the output format of ibus version
.
It needs to use g_spawn_async_with_pipes function.
BTW, which version of ibus starts to support ibus version
command?
BTW, which version of ibus starts to support ibus version command?
It has been since 1.5.1.
Probably you could check the filename in /usr/lib/libibus-1.0.so.5..* .
The filename may not reliable.
@fujiwarat, Could you set the version in ibus daemon? or set the version in gnome-shell is better?
Do you mean --version
?
# ibus-daemon --version
ibus-daemon - Version 1.5.20
Okay, I create another pull request to check the output of ibus version
command.
URL: https://github.com/libhangul/ibus-hangul/pull/87
Please review it again, thanks!
Pull request #87 is merged, close this pull request.
ibus-hangul uses ibus_engine_update_preedit_text_with_mode() to commit the preedit text by ibus-daemon and now focus-out and mouse click are handled by ibus-daemon and ibus clients.
BUG=https://github.com/ibus/ibus/issues/1980