Subject: bug#42144: cannot configure ibus-libpinyin input method

From: Ricardo Wurmus <[email-masked]>
Date: Tue, 30 Jun 2020 23:21:35 +0200

In Gnome clicking on the icon to configure the libpinyin input method
fails.  It tries to execute ibus-libpinyin’s
libexec/ibus-setup-libpinyin.

Running it manually reveals this error:

--8<---------------cut here---------------start------------->8---
main2.py:66: DeprecationWarning: bind_textdomain_codeset() is deprecated
  gettext.bind_textdomain_codeset(DOMAINNAME, 'UTF-8')
Traceback (most recent call last):
  File "main2.py", line 535, in <module>
    main()
  File "main2.py", line 531, in main
    PreferencesDialog(name).run()
  File "main2.py", line 75, in __init__
    self.__builder.add_from_file("ibus-libpinyin-preferences.ui")
gi.repository.GLib.Error: gtk-builder-error-quark: ibus-libpinyin-preferences.ui:1770:1 Invalid object type 'DictionaryTreeView' (6)
--8<---------------cut here---------------end--------------->8---

ibus-libpinyin-preferences.ui references DictionaryTreeView which is a
custom widget defined in share/ibus-libpinyin/setup/dicttreeview.py.

strace confirms that dicttreeview.py is read earlier, but for some
reason DictionaryTreeView is still considered an invalid object type.

-- 
Ricardo