Instead of trying to restart ibus by passing True to bus.exit()
we now exit ibus and then let verify_ibus_daemon() start it again.
Also added additional checks to verify that we're not running
multiple ibus-daemons at the start of km-config and before
restarting.
This change adds a 1s sleep after restarting ibus before checking
that it actually runs. Hopefully this will solve the problem. Since
this bug is hard to reproduce, we also log a critical error for the
other code path this could happen.
Fixes#6237.
When we try to restart ibus and that fails and ibus isn't running
afterwards we directly try to start ibus-daemon.
On Ubuntu 21.10 Impish there are two `ibus-daemon` processes
running for the current user. One of them has the `--xim` flag
and is the one we care about. This change improves the detection
that ibus is running after installing a keyboard.
This change fixes the installation of shared packages, so that they
show up in the list of the installed keyboards. It implements the
fix for both ibus and gnome.
Fixes#5311.
When installing in the shared area the user has to run
`km-package-install` with sudo so that he has sufficient permissions.
In that case we have to do extra work to restart ibus for the
logged-in user instead of root.
Fixes#5309.
This change modifies DownloadKmpWindow and InstallKmpWindow so that
they are modal dialogs. This will cause them to show up in front of
the km-config window and will prevent accidentally open multiple
download windows.
This change also fixes an unused method in ibus_util that was using
a variable that got renamed previously.