Skip to content

Commit

Permalink
ui/gtk3: Warn deprecated IBus XKB engines /w dialog
Browse files Browse the repository at this point in the history
simple.xml is updated by IBus release and some XKB engines
could be deprecated with xkeyboard-config updates.
Now a warning dialog is launched when the deprecated engines are
changed to xkb:us::eng engine.

BUG=#2274
  • Loading branch information
fujiwarat committed Nov 20, 2020
1 parent b72efea commit 5322c44
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 10 deletions.
28 changes: 18 additions & 10 deletions po/ibus10.pot
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
#
msgid ""
msgstr ""
"Project-Id-Version: ibus 1.5.22\n"
"Project-Id-Version: ibus 1.5.23\n"
"Report-Msgid-Bugs-To: https://github.com/ibus/ibus/issues\n"
"POT-Creation-Date: 2020-09-03 21:21+0900\n"
"PO-Revision-Date: 2020-09-03 21:21+0900\n"
"POT-Creation-Date: 2020-11-21 07:09+0900\n"
"PO-Revision-Date: 2020-11-21 07:09+0900\n"
"Last-Translator: Takao Fujiwara <takao.fujiwara1@gmail.com>\n"
"Language-Team: Source\n"
"Language: \n"
Expand Down Expand Up @@ -402,7 +402,7 @@ msgstr ""
msgid "More…"
msgstr ""

#: setup/engineabout.py:37 setup/setup.ui:1368 ui/gtk3/panel.vala:1162
#: setup/engineabout.py:37 setup/setup.ui:1368 ui/gtk3/panel.vala:1176
msgid "About"
msgstr ""

Expand Down Expand Up @@ -3172,7 +3172,7 @@ msgid "Alias: %s"
msgstr ""

#: ui/gtk3/emojier.vala:2140 ui/gtk3/ibus-extension-gtk3.desktop.in:3
#: ui/gtk3/ibus-ui-emojier.desktop.in:3 ui/gtk3/panel.vala:1147
#: ui/gtk3/ibus-ui-emojier.desktop.in:3 ui/gtk3/panel.vala:1161
msgid "Emoji Choice"
msgstr ""

Expand Down Expand Up @@ -3233,23 +3233,31 @@ msgstr ""
msgid "IBus Panel"
msgstr ""

#: ui/gtk3/panel.vala:1119
#: ui/gtk3/panel.vala:970
#, c-format
msgid ""
"Your input method %s does not exist in IBus input methods so \"US\" layout "
"was configured instead of your input method. Please run `ibus-setup` "
"command, open \"Input Method\" tab, and configure your input methods again."
msgstr ""

#: ui/gtk3/panel.vala:1133
msgid "IBus is an intelligent input bus for Linux/Unix."
msgstr ""

#: ui/gtk3/panel.vala:1123
#: ui/gtk3/panel.vala:1137
msgid "translator-credits"
msgstr ""

#: ui/gtk3/panel.vala:1142
#: ui/gtk3/panel.vala:1156
msgid "Preferences"
msgstr ""

#: ui/gtk3/panel.vala:1168
#: ui/gtk3/panel.vala:1182
msgid "Restart"
msgstr ""

#: ui/gtk3/panel.vala:1172
#: ui/gtk3/panel.vala:1186
msgid "Quit"
msgstr ""

Expand Down
15 changes: 15 additions & 0 deletions ui/gtk3/panel.vala
Original file line number Diff line number Diff line change
Expand Up @@ -970,6 +970,21 @@ class Panel : IBus.PanelService {
names = {"xkb:us::eng"};
m_settings_general.set_strv("preload-engines", names);
engines = m_bus.get_engines_by_names(names);
var message = _("Your input method %s does not exist in IBus " +
"input methods so \"US\" layout was configured instead " +
"of your input method. Please run `ibus-setup` command, " +
"open \"Input Method\" tab, and configure your input " +
"methods again.").printf(names[0]);
var dialog = new Gtk.MessageDialog(
null,
Gtk.DialogFlags.DESTROY_WITH_PARENT,
Gtk.MessageType.WARNING,
Gtk.ButtonsType.CLOSE,
message);
dialog.response.connect((id) => {
dialog.destroy();
});
dialog.show();
}

if (m_engines.length == 0) {
Expand Down

0 comments on commit 5322c44

Please sign in to comment.