IBus source show-setting doesn't use setup property from engine desc
Current problems
- Show settings button in input sources list doesn't work, as It doesn't use the
setup
property from engine desc. It doesn't even show an error message when it's unable to show setting.
Goals & use cases
- Goal is to invoke the command set in IBus engine desc's "setup" property when user clicks show settings button.
Requirements
Currently the show setting buttons via events and such, ultimately calls cc_input_source_ibus_get_app_info
function in /panels/region/cc-input-source-ibus.c. The implementation of the function is kinda hardcoded, It just tries to run a desktop file ibus-setup-NAME.desktop
.
Proposal & plan
Refactor the handler of show setting event so check for both ibus-setup-NAME.desktop
and ibus_engine_desc_get_setup
.
- Check if
ibus-setup-NAME.desktop
exists in system, if so, run it. - If
ibus-setup-NAME.desktop
doesn't exist, make a callibus_engine_desc_get_setup
. If it returns a non-null string, try to run this command. - If both fails, show a error msg to user like -> Unable to show setting for NAME input method.