[Merge] ~gunnarhj/ubuntu/+source/gnome-settings-daemon:ibus-live-session2 into ~ubuntu-desktop/ubuntu/+source/gnome-settings-daemon:ubuntu/master

2019-06-21 Thread Iain Lane
The proposal to merge 
~gunnarhj/ubuntu/+source/gnome-settings-daemon:ibus-live-session2 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/368657
-- 
Your team Ubuntu Desktop is subscribed to branch 
~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-session2 into ~ubuntu-desktop/ubuntu/+source/gnome-settings-daemon:ubuntu/master

2019-06-18 Thread Gunnar Hjalmarsson
Gunnar Hjalmarsson has proposed merging 
~gunnarhj/ubuntu/+source/gnome-settings-daemon:ibus-live-session2 into 
~ubuntu-desktop/ubuntu/+source/gnome-settings-daemon:ubuntu/master.

Requested reviews:
  Iain Lane (laney)
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/368657

An attempt with calling add_ibus_sources_from_locale() unconditionally during 
the first run of the maybe_convert_old_settings() function.

While this results in a slightly more complex patch, I suppose it's better 
conceptually, since we don't introduce a dependency of a stamp file belonging 
to some other package.

There is also an extra bonus (at least I think it is a bonus): When doing e.g. 
a Chinese or Japanese install, and unlike before, the IBus IM is active 
instantly at first login. That is, instead of:

[('xkb', 'cn'), ('ibus', 'libpinyin')]

in sources, libpinyin is now the first source:

[('ibus', 'libpinyin'), ('xkb', 'cn')]
-- 
Your team Ubuntu Desktop is subscribed to branch 
~ubuntu-desktop/ubuntu/+source/gnome-settings-daemon:ubuntu/master.
diff --git a/debian/changelog b/debian/changelog
index 6a493d0..7da503e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,13 @@
+gnome-settings-daemon (3.32.0-1ubuntu2) eoan; urgency=medium
+
+  * debian/patches/ubuntu_ibus_configs.patch:
+- Call add_ibus_sources_from_locale() unconditionally during the
+  first run of the maybe_convert_old_settings() function. This will
+  hopefully make an IBus method be included when applicable also in
+  "live sessions" (LP: #1786344).
+
+ -- Gunnar Hjalmarsson   Tue, 11 Jun 2019 15:55: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..3d6a19d 100644
--- a/debian/patches/ubuntu_ibus_configs.patch
+++ b/debian/patches/ubuntu_ibus_configs.patch
@@ -6,11 +6,11 @@ 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 | 78 +---
+ 1 file changed, 69 insertions(+), 9 deletions(-)
 
 diff --git a/plugins/keyboard/gsd-keyboard-manager.c b/plugins/keyboard/gsd-keyboard-manager.c
-index fadde34..3b35c69 100644
+index fadde34..eb76921 100644
 --- a/plugins/keyboard/gsd-keyboard-manager.c
 +++ b/plugins/keyboard/gsd-keyboard-manager.c
 @@ -168,6 +168,58 @@ check_xkb_extension (GsdKeyboardManager *manager)
@@ -72,15 +72,76 @@ index fadde34..3b35c69 100644
  static void
  xkb_init (GsdKeyboardManager *manager)
  {
-@@ -762,8 +814,10 @@ maybe_create_initial_settings (GsdKeyboardManager *manager)
+@@ -707,7 +759,7 @@ convert_libgnomekbd_layouts (GSettings *settings)
+ g_object_unref (libgnomekbd_settings);
+ }
+ 
+-static void
++static gint
+ maybe_convert_old_settings (GSettings *settings)
+ {
+ GVariant *sources;
+@@ -715,6 +767,11 @@ maybe_convert_old_settings (GSettings *settings)
+ gchar *stamp_dir_path = NULL;
+ gchar *stamp_file_path = NULL;
+ GError *error = NULL;
++gint count_sources;
++
++sources = g_settings_get_value (settings, KEY_INPUT_SOURCES);
++count_sources = g_variant_n_children (sources);
++g_variant_unref (sources);
+ 
+ stamp_dir_path = g_build_filename (g_get_user_data_dir (), PACKAGE_NAME, NULL);
+ if (g_mkdir_with_parents (stamp_dir_path, 0755)) {
+@@ -726,12 +783,15 @@ maybe_convert_old_settings (GSettings *settings)
+ if (g_file_test (stamp_file_path, G_FILE_TEST_EXISTS))
+ goto out;
+ 
+-sources = g_settings_get_value (settings, KEY_INPUT_SOURCES);
+-if (g_variant_n_children (sources) < 1) {
++if (count_sources < 1)
+ convert_libgnomekbd_layouts (settings);
+-}
++
++sources = g_settings_get_value (settings, KEY_INPUT_SOURCES);
++count_sources = g_variant_n_children (sources);
+ g_variant_unref (sources);
+ 
++add_ibus_sources_from_locale (settings);
++
+ options = g_settings_get_strv (settings, KEY_KEYBOARD_OPTIONS);
+ if (g_strv_length (options) < 1)
+ convert_libgnomekbd_options (settings);
+@@ -744,13 +804,15 @@ maybe_convert_old_settings (GSettings *settings)
+ out:
+ g_free (stamp_file_path);
+ g_free (stamp_dir_path);
++
++return count_sources;
+ }
+ 
+ static void
+ maybe_create_initial_settings (GsdKeyboardManager 

[Merge] ~gunnarhj/ubuntu/+source/gnome-settings-daemon:ibus-live-session2 into ~ubuntu-desktop/ubuntu/+source/gnome-settings-daemon:ubuntu/master

2019-06-18 Thread Gunnar Hjalmarsson
The proposal to merge 
~gunnarhj/ubuntu/+source/gnome-settings-daemon:ibus-live-session2 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/368657
-- 
Your team Ubuntu Desktop is subscribed to branch 
~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-session2 into ~ubuntu-desktop/ubuntu/+source/gnome-settings-daemon:ubuntu/master

2019-06-18 Thread Gunnar Hjalmarsson
Well, I couldn't let this go, and submitted yet another MP:

https://code.launchpad.net/~gunnarhj/ubuntu/+source/gnome-settings-daemon/+git/gnome-settings-daemon/+merge/368678

Letting maybe_convert_old_settings() return a boolean, which tells us whether 
it's the first run, seems to be a more straightforward way, and results in a 
simpler patch.

So I put this one on hold too. Please review the latest MP instead at first 
hand.
-- 
https://code.launchpad.net/~gunnarhj/ubuntu/+source/gnome-settings-daemon/+git/gnome-settings-daemon/+merge/368657
Your team Ubuntu Desktop is subscribed to branch 
~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