[Merge] ~gunnarhj/ubuntu/+source/gnome-settings-daemon:ibus-live-session into ~ubuntu-desktop/ubuntu/+source/gnome-settings-daemon:ubuntu/master
The proposal to merge ~gunnarhj/ubuntu/+source/gnome-settings-daemon:ibus-live-session into ~ubuntu-desktop/ubuntu/+source/gnome-settings-daemon:ubuntu/master has been updated. Status: Work in progress => Rejected For more details, see: https://code.launchpad.net/~gunnarhj/ubuntu/+source/gnome-settings-daemon/+git/gnome-settings-daemon/+merge/368409 -- Your team Ubuntu Desktop is requested to review the proposed merge of ~gunnarhj/ubuntu/+source/gnome-settings-daemon:ibus-live-session into ~ubuntu-desktop/ubuntu/+source/gnome-settings-daemon:ubuntu/master. -- ubuntu-desktop mailing list ubuntu-desktop@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-desktop
[Merge] ~gunnarhj/ubuntu/+source/gnome-settings-daemon:ibus-live-session into ~ubuntu-desktop/ubuntu/+source/gnome-settings-daemon:ubuntu/master
The proposal to merge ~gunnarhj/ubuntu/+source/gnome-settings-daemon:ibus-live-session into ~ubuntu-desktop/ubuntu/+source/gnome-settings-daemon:ubuntu/master has been updated. Status: Needs review => Work in progress For more details, see: https://code.launchpad.net/~gunnarhj/ubuntu/+source/gnome-settings-daemon/+git/gnome-settings-daemon/+merge/368409 -- Your team Ubuntu Desktop is requested to review the proposed merge of ~gunnarhj/ubuntu/+source/gnome-settings-daemon:ibus-live-session into ~ubuntu-desktop/ubuntu/+source/gnome-settings-daemon:ubuntu/master. -- ubuntu-desktop mailing list ubuntu-desktop@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-desktop
Re: [Merge] ~gunnarhj/ubuntu/+source/gnome-settings-daemon:ibus-live-session into ~ubuntu-desktop/ubuntu/+source/gnome-settings-daemon:ubuntu/master
Hi Laney, I have tested (by faking Japanese first logins) the idea to call add_ibus_sources_from_locale() from maybe_convert_old_settings(). This is where I put it: if (g_variant_n_children (sources) < 1) { convert_libgnomekbd_layouts (settings); add_ibus_sources_from_locale (settings); } convert_libgnomekbd_layouts() seems to not have changed anything, but Mozc was added. However, it resulted in a session with only Mozc available in sources. The reason is that the get_sources_from_xkb_config() call in maybe_create_initial_settings() did not happen since sources wasn't empty at that spot in the flow. I don't know if it would be acceptable to not have a XKB layout available, but I have my doubts. In any case I feel that such a change would be too intrusive considering that I want to SRU to bionic whatever solution we choose. Furthermore, to address the bug happening when you "Try Ubuntu" from the Ubiquity welcome screen, I suspect that the call would need to be moved beyond the condition, like this: if (g_variant_n_children (sources) < 1) { convert_libgnomekbd_layouts (settings); } add_ibus_sources_from_locale (settings); But that would also result in real installs with only an IBus input method in sources. My conclusion is that any call of add_ibus_sources_from_locale() from maybe_convert_old_settings() would be premature. So I'm back to my proposal in this MP. It lets g-s-d do its things with respect to XKB layouts first, and then it adds an IBus method if applicable. Even if there are a few lines, the regression risk ought to be minimal. -- https://code.launchpad.net/~gunnarhj/ubuntu/+source/gnome-settings-daemon/+git/gnome-settings-daemon/+merge/368409 Your team Ubuntu Desktop is requested to review the proposed merge of ~gunnarhj/ubuntu/+source/gnome-settings-daemon:ibus-live-session into ~ubuntu-desktop/ubuntu/+source/gnome-settings-daemon:ubuntu/master. -- ubuntu-desktop mailing list ubuntu-desktop@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-desktop
Re: [Merge] ~gunnarhj/ubuntu/+source/gnome-settings-daemon:ibus-live-session into ~ubuntu-desktop/ubuntu/+source/gnome-settings-daemon:ubuntu/master
An attempt to summarize: 1. get_sources_from_xkb_config() needs to be called if no XKB layouts were added previously. 2. add_ibus_sources_from_locale() needs to be run once regardless. To meet both those conditions, you cannot call add_ibus_sources_from_locale() from maybe_convert_old_settings(). -- https://code.launchpad.net/~gunnarhj/ubuntu/+source/gnome-settings-daemon/+git/gnome-settings-daemon/+merge/368409 Your team Ubuntu Desktop is requested to review the proposed merge of ~gunnarhj/ubuntu/+source/gnome-settings-daemon:ibus-live-session into ~ubuntu-desktop/ubuntu/+source/gnome-settings-daemon:ubuntu/master. -- ubuntu-desktop mailing list ubuntu-desktop@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-desktop
[Merge] ~gunnarhj/ubuntu/+source/gnome-settings-daemon:ibus-live-session into ~ubuntu-desktop/ubuntu/+source/gnome-settings-daemon:ubuntu/master
The proposal to merge ~gunnarhj/ubuntu/+source/gnome-settings-daemon:ibus-live-session into ~ubuntu-desktop/ubuntu/+source/gnome-settings-daemon:ubuntu/master has been updated. Status: Needs review => Work in progress For more details, see: https://code.launchpad.net/~gunnarhj/ubuntu/+source/gnome-settings-daemon/+git/gnome-settings-daemon/+merge/368409 -- Your team Ubuntu Desktop is requested to review the proposed merge of ~gunnarhj/ubuntu/+source/gnome-settings-daemon:ibus-live-session into ~ubuntu-desktop/ubuntu/+source/gnome-settings-daemon:ubuntu/master. -- ubuntu-desktop mailing list ubuntu-desktop@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-desktop
Re: [Merge] ~gunnarhj/ubuntu/+source/gnome-settings-daemon:ibus-live-session into ~ubuntu-desktop/ubuntu/+source/gnome-settings-daemon:ubuntu/master
Ok, you are of course right. I picked the second of those ideas and made an attempt in a new MP. -- https://code.launchpad.net/~gunnarhj/ubuntu/+source/gnome-settings-daemon/+git/gnome-settings-daemon/+merge/368409 Your team Ubuntu Desktop is requested to review the proposed merge of ~gunnarhj/ubuntu/+source/gnome-settings-daemon:ibus-live-session into ~ubuntu-desktop/ubuntu/+source/gnome-settings-daemon:ubuntu/master. -- ubuntu-desktop mailing list ubuntu-desktop@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-desktop
Re: [Merge] ~gunnarhj/ubuntu/+source/gnome-settings-daemon:ibus-live-session into ~ubuntu-desktop/ubuntu/+source/gnome-settings-daemon:ubuntu/master
Yeah, I agree; basically that's what I mentioned at the end of my previous comment. But moving it out from the if() wouldn't make a difference wrt the problem with installs without any XKB layout. -- https://code.launchpad.net/~gunnarhj/ubuntu/+source/gnome-settings-daemon/+git/gnome-settings-daemon/+merge/368409 Your team Ubuntu Desktop is requested to review the proposed merge of ~gunnarhj/ubuntu/+source/gnome-settings-daemon:ibus-live-session into ~ubuntu-desktop/ubuntu/+source/gnome-settings-daemon:ubuntu/master. -- ubuntu-desktop mailing list ubuntu-desktop@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-desktop
Re: [Merge] ~gunnarhj/ubuntu/+source/gnome-settings-daemon:ibus-live-session into ~ubuntu-desktop/ubuntu/+source/gnome-settings-daemon:ubuntu/master
Talked with Laney on #ubuntu-desktop. Will try a different approach and get back. -- https://code.launchpad.net/~gunnarhj/ubuntu/+source/gnome-settings-daemon/+git/gnome-settings-daemon/+merge/368409 Your team Ubuntu Desktop is requested to review the proposed merge of ~gunnarhj/ubuntu/+source/gnome-settings-daemon:ibus-live-session into ~ubuntu-desktop/ubuntu/+source/gnome-settings-daemon:ubuntu/master. -- ubuntu-desktop mailing list ubuntu-desktop@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-desktop
[Merge] ~gunnarhj/ubuntu/+source/gnome-settings-daemon:ibus-live-session into ~ubuntu-desktop/ubuntu/+source/gnome-settings-daemon:ubuntu/master
Gunnar Hjalmarsson has proposed merging ~gunnarhj/ubuntu/+source/gnome-settings-daemon:ibus-live-session into ~ubuntu-desktop/ubuntu/+source/gnome-settings-daemon:ubuntu/master. Requested reviews: Ubuntu Desktop (ubuntu-desktop) Related bugs: Bug #1786344 in gnome-settings-daemon (Ubuntu): "Default IBus input method ignored in live session" https://bugs.launchpad.net/ubuntu/+source/gnome-settings-daemon/+bug/1786344 For more details, see: https://code.launchpad.net/~gunnarhj/ubuntu/+source/gnome-settings-daemon/+git/gnome-settings-daemon/+merge/368409 This MP is based on the assumption (untested) that the bug happens because there already is at least one input source in dconf when g-s-d is run. If the assumption is wrong, this MP is basically a no-op. -- Your team Ubuntu Desktop is requested to review the proposed merge of ~gunnarhj/ubuntu/+source/gnome-settings-daemon:ibus-live-session into ~ubuntu-desktop/ubuntu/+source/gnome-settings-daemon:ubuntu/master. diff --git a/debian/changelog b/debian/changelog index 6a493d0..697ea23 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +gnome-settings-daemon (3.32.0-1ubuntu2) UNRELEASED; urgency=medium + + * debian/patches/ubuntu_ibus_configs.patch: +- Run add_ibus_sources_from_locale() even if dconf already contains + one or more sources. This will hopefully make an IBus method be + included when applicable also in "live sessions" (LP: #1786344). + + -- Gunnar Hjalmarsson Wed, 05 Jun 2019 21:41:00 +0200 + gnome-settings-daemon (3.32.0-1ubuntu1) disco; urgency=medium * Merge with Debian. Remaining changes: diff --git a/debian/patches/ubuntu_ibus_configs.patch b/debian/patches/ubuntu_ibus_configs.patch index f69330f..afdf270 100644 --- a/debian/patches/ubuntu_ibus_configs.patch +++ b/debian/patches/ubuntu_ibus_configs.patch @@ -6,14 +6,14 @@ the locale, upstream removed it because they use an intial setup but we don't Bug: https://bugs.launchpad.net/bugs/1719938 Forwarded: not-needed --- - plugins/keyboard/gsd-keyboard-manager.c | 56 - - 1 file changed, 55 insertions(+), 1 deletion(-) + plugins/keyboard/gsd-keyboard-manager.c | 70 + 1 file changed, 70 insertions(+) diff --git a/plugins/keyboard/gsd-keyboard-manager.c b/plugins/keyboard/gsd-keyboard-manager.c -index fadde34..3b35c69 100644 +index fadde34..930d788 100644 --- a/plugins/keyboard/gsd-keyboard-manager.c +++ b/plugins/keyboard/gsd-keyboard-manager.c -@@ -168,6 +168,58 @@ check_xkb_extension (GsdKeyboardManager *manager) +@@ -168,6 +168,73 @@ check_xkb_extension (GsdKeyboardManager *manager) return have_xkb; } @@ -69,18 +69,31 @@ index fadde34..3b35c69 100644 +g_settings_set_value (settings, KEY_INPUT_SOURCES, g_variant_builder_end ()); +} + ++static gboolean ++is_initial_done (void) { ++g_autofree gchar *initial_file = NULL; ++g_autofree gchar *contents = NULL; ++ ++initial_file = g_build_filename (g_get_user_config_dir (), "gnome-initial-setup-done", NULL); ++ ++if (g_file_test (initial_file, G_FILE_TEST_EXISTS) && ++g_file_get_contents (initial_file, , NULL, NULL)) ++if (g_strcmp0 (g_strchomp (contents), "yes") == 0) ++return TRUE; ++ ++return FALSE; ++} ++ static void xkb_init (GsdKeyboardManager *manager) { -@@ -762,8 +814,10 @@ maybe_create_initial_settings (GsdKeyboardManager *manager) - - /* if we still don't have anything do some educated guesses */ - sources = g_settings_get_value (settings, KEY_INPUT_SOURCES); --if (g_variant_n_children (sources) < 1) -+if (g_variant_n_children (sources) < 1) { +@@ -766,6 +833,9 @@ maybe_create_initial_settings (GsdKeyboardManager *manager) get_sources_from_xkb_config (manager); -+add_ibus_sources_from_locale (settings); -+} g_variant_unref (sources); ++if (! is_initial_done ()) ++add_ibus_sources_from_locale (settings); ++ options = g_settings_get_strv (settings, KEY_KEYBOARD_OPTIONS); + if (g_strv_length (options) < 1) + get_options_from_xkb_config (manager); -- ubuntu-desktop mailing list ubuntu-desktop@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-desktop
Re: [Merge] ~gunnarhj/ubuntu/+source/gnome-settings-daemon:ibus-live-session into ~ubuntu-desktop/ubuntu/+source/gnome-settings-daemon:ubuntu/master
Thanks for trying that. I think you should probably not put it in any if() in that function. In English that says something along the lines of "the first time we try to convert the settings, also add the IBus sources". I'd put the call right above "if (!g_file_set_contents (stamp_file_path, "", 0, )) {" I think. -- https://code.launchpad.net/~gunnarhj/ubuntu/+source/gnome-settings-daemon/+git/gnome-settings-daemon/+merge/368409 Your team Ubuntu Desktop is requested to review the proposed merge of ~gunnarhj/ubuntu/+source/gnome-settings-daemon:ibus-live-session into ~ubuntu-desktop/ubuntu/+source/gnome-settings-daemon:ubuntu/master. -- ubuntu-desktop mailing list ubuntu-desktop@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-desktop
Re: [Merge] ~gunnarhj/ubuntu/+source/gnome-settings-daemon:ibus-live-session into ~ubuntu-desktop/ubuntu/+source/gnome-settings-daemon:ubuntu/master
Come on, you can think of ways around this! A couple of ideas, but there are probably more: - Make maybe_convert_old_settings() return a boolean to indicate if it ran or exited due to the stamp file. If it ran, then call add_ibus_sources_from_locale() later on. - Make it return the number of items in KEY_INPUT_SOURCES *before* it calls add_ibus_sources_from_locale(), and then use that later on instead of reading it fresh. -- https://code.launchpad.net/~gunnarhj/ubuntu/+source/gnome-settings-daemon/+git/gnome-settings-daemon/+merge/368409 Your team Ubuntu Desktop is requested to review the proposed merge of ~gunnarhj/ubuntu/+source/gnome-settings-daemon:ibus-live-session into ~ubuntu-desktop/ubuntu/+source/gnome-settings-daemon:ubuntu/master. -- ubuntu-desktop mailing list ubuntu-desktop@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-desktop
[Merge] ~gunnarhj/ubuntu/+source/gnome-settings-daemon:ibus-live-session into ~ubuntu-desktop/ubuntu/+source/gnome-settings-daemon:ubuntu/master
Gunnar Hjalmarsson has proposed merging ~gunnarhj/ubuntu/+source/gnome-settings-daemon:ibus-live-session into ~ubuntu-desktop/ubuntu/+source/gnome-settings-daemon:ubuntu/master. Requested reviews: Ubuntu Desktop (ubuntu-desktop) Related bugs: Bug #1786344 in gnome-settings-daemon (Ubuntu): "Default IBus input method ignored in live session" https://bugs.launchpad.net/ubuntu/+source/gnome-settings-daemon/+bug/1786344 For more details, see: https://code.launchpad.net/~gunnarhj/ubuntu/+source/gnome-settings-daemon/+git/gnome-settings-daemon/+merge/368409 This MP is based on the assumption (untested) that the bug happens because there already is at least one input source in dconf when g-s-d is run. If the assumption is wrong, this MP is basically a no-op. -- Your team Ubuntu Desktop is requested to review the proposed merge of ~gunnarhj/ubuntu/+source/gnome-settings-daemon:ibus-live-session into ~ubuntu-desktop/ubuntu/+source/gnome-settings-daemon:ubuntu/master. diff --git a/debian/changelog b/debian/changelog index 6a493d0..697ea23 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +gnome-settings-daemon (3.32.0-1ubuntu2) UNRELEASED; urgency=medium + + * debian/patches/ubuntu_ibus_configs.patch: +- Run add_ibus_sources_from_locale() even if dconf already contains + one or more sources. This will hopefully make an IBus method be + included when applicable also in "live sessions" (LP: #1786344). + + -- Gunnar Hjalmarsson Wed, 05 Jun 2019 21:41:00 +0200 + gnome-settings-daemon (3.32.0-1ubuntu1) disco; urgency=medium * Merge with Debian. Remaining changes: diff --git a/debian/patches/ubuntu_ibus_configs.patch b/debian/patches/ubuntu_ibus_configs.patch index f69330f..afdf270 100644 --- a/debian/patches/ubuntu_ibus_configs.patch +++ b/debian/patches/ubuntu_ibus_configs.patch @@ -6,14 +6,14 @@ the locale, upstream removed it because they use an intial setup but we don't Bug: https://bugs.launchpad.net/bugs/1719938 Forwarded: not-needed --- - plugins/keyboard/gsd-keyboard-manager.c | 56 - - 1 file changed, 55 insertions(+), 1 deletion(-) + plugins/keyboard/gsd-keyboard-manager.c | 70 + 1 file changed, 70 insertions(+) diff --git a/plugins/keyboard/gsd-keyboard-manager.c b/plugins/keyboard/gsd-keyboard-manager.c -index fadde34..3b35c69 100644 +index fadde34..930d788 100644 --- a/plugins/keyboard/gsd-keyboard-manager.c +++ b/plugins/keyboard/gsd-keyboard-manager.c -@@ -168,6 +168,58 @@ check_xkb_extension (GsdKeyboardManager *manager) +@@ -168,6 +168,73 @@ check_xkb_extension (GsdKeyboardManager *manager) return have_xkb; } @@ -69,18 +69,31 @@ index fadde34..3b35c69 100644 +g_settings_set_value (settings, KEY_INPUT_SOURCES, g_variant_builder_end ()); +} + ++static gboolean ++is_initial_done (void) { ++g_autofree gchar *initial_file = NULL; ++g_autofree gchar *contents = NULL; ++ ++initial_file = g_build_filename (g_get_user_config_dir (), "gnome-initial-setup-done", NULL); ++ ++if (g_file_test (initial_file, G_FILE_TEST_EXISTS) && ++g_file_get_contents (initial_file, , NULL, NULL)) ++if (g_strcmp0 (g_strchomp (contents), "yes") == 0) ++return TRUE; ++ ++return FALSE; ++} ++ static void xkb_init (GsdKeyboardManager *manager) { -@@ -762,8 +814,10 @@ maybe_create_initial_settings (GsdKeyboardManager *manager) - - /* if we still don't have anything do some educated guesses */ - sources = g_settings_get_value (settings, KEY_INPUT_SOURCES); --if (g_variant_n_children (sources) < 1) -+if (g_variant_n_children (sources) < 1) { +@@ -766,6 +833,9 @@ maybe_create_initial_settings (GsdKeyboardManager *manager) get_sources_from_xkb_config (manager); -+add_ibus_sources_from_locale (settings); -+} g_variant_unref (sources); ++if (! is_initial_done ()) ++add_ibus_sources_from_locale (settings); ++ options = g_settings_get_strv (settings, KEY_KEYBOARD_OPTIONS); + if (g_strv_length (options) < 1) + get_options_from_xkb_config (manager); -- ubuntu-desktop mailing list ubuntu-desktop@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-desktop