ubuntu-disable-trigger.patch is effectively not enabled

Bug #1870945 reported by Gunnar Hjalmarsson
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ibus
New
Unknown
ibus (Ubuntu)
Fix Released
Medium
Gunnar Hjalmarsson

Bug Description

ubuntu-disable-trigger.patch has effectively not been enabled since XDG_CURRENT_DESKTOP was turned into a list of values instead of a single value.

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

I tried to fix this by replacing:

    if os.getenv("XDG_CURRENT_DESKTOP") == "Unity":

with:

    desktop = os.environ.get('XDG_CURRENT_DESKTOP')
    if desktop and 'Unity' in desktop.split(':'):

But then ibus-setup didn't start at all under Unity:

$ ibus-setup
Traceback (most recent call last):
  File "/usr/share/ibus/setup/main.py", line 710, in <module>
    setup = Setup()
  File "/usr/share/ibus/setup/main.py", line 120, in __init__
    self.__init_ui()
  File "/usr/share/ibus/setup/main.py", line 413, in __init_ui
    self.__init_hotkeys()
  File "/usr/share/ibus/setup/main.py", line 130, in __init_hotkeys
    self.__init_hotkey(name, label)
  File "/usr/share/ibus/setup/main.py", line 144, in __init_hotkey
    entry.set_text("; ".join(shortcuts))
AttributeError: 'NoneType' object has no attribute 'set_text'
$

Probably the affected upstream files have changed since the patch was written.

So does anyone have time/interest to maintain this patch? Or should we simply drop it? After all IBus seems to work fine (in focal) without it.

Changed in ibus (Ubuntu):
importance: Medium → Low
Revision history for this message
Sebastien Bacher (seb128) wrote :

The patch was added to fix bug #1278511 , it would be easy enough to test if the issue exists again. The XDG_CURRENT_DESKTOP has been changed to be a list years ago, it's probably fine to remove the patch now if no users complained

Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

On Xenial the patch serves its intended purpose. I built IBus for Xenial with ubuntu-disable-trigger.patch disabled and then installed. That made the UI component show up for setting shortcut for "Next input method". It defaults to <Super>Space, but changing it to e.g. <Alt>Space affects this dconf value:

$ gsettings get org.freedesktop.ibus.general.hotkey triggers
['<Alt>space']

But on Unity that shortcut is not effective. It's overridden by the shortcut set in Text Entry:

$ gsettings get org.gnome.desktop.wm.keybindings switch-input-source
['<Super>space']

So it's indeed a dead-end for users who happen to play with ibus-setup.

OTOH, that UI component is shown on GNOME too, and it's just as much a dead-end there. If we think the issue is important enough, we should figure out a smarter way to hide that UI component IMO. Also on GNOME. And preferably upstream.

Let's drop the patch.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ibus - 1.5.22-4ubuntu1

---------------
ibus (1.5.22-4ubuntu1) groovy; urgency=medium

  * Merge from Debian unstable, remaining changes:
    - d/p/ubuntu-forward-panel-properties.patch (for Unity)
    - d/control: Build-Depend on gnome-pkg-tools (for translations)
    - d/rules: Use dh_translations when built on Ubuntu
  * Dropped patches:
    - d/p/ubuntu-disable-trigger.patch (LP: #1870945)
    - d/p/ubuntu-unicode-keybinding.patch (discussed at
      https://github.com/ibus/ibus/issues/2163)
    - d/p/git-Use-WAYLAND_DISPLAY-on-Wayland-sessions.patch (equivalent
      patch now in Debian)
  * Dropped breaks for older libglib2.0-0 versions
    - No equivalent in Debian; not needed post 20.04
  * Build-Depend on gnome-pkg-tools instead of dh_translations
  * d/rules: Use dh_translations in Ubuntu

 -- Gunnar Hjalmarsson <email address hidden> Thu, 30 Apr 2020 09:43:00 +0200

Changed in ibus (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

While the non-working patch was dropped, I have proposed equivalent (working) code upstream:

https://github.com/ibus/ibus/issues/2222

Awaiting upstream's reaction to that, I re-open this bug for now.

Changed in ibus (Ubuntu):
importance: Low → Medium
status: Fix Released → In Progress
no longer affects: unity
Changed in ibus:
status: Unknown → New
Revision history for this message
Gunnar Hjalmarsson (gunnarhj) wrote :

Rejected upstream, so re-closing. Upstream mentioned the idea to add a warning dialog instead, which sounds good to me.

Changed in ibus (Ubuntu):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.