Incorrect logic for <Merge type="all">

Bug #1833863 reported by Steve Dodd
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Garcon
Fix Released
Unknown
PyXDG
New
Unknown
garcon (Ubuntu)
Triaged
Undecided
Unassigned
pyxdg (Ubuntu)
Won't Fix
Undecided
Unassigned
xubuntu-default-settings (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

XFCE & Xubuntu use <Merge type="all" /> in their menu files, which python-xdg currently (all current versions) does not handle correctly:

https://gitlab.freedesktop.org/xdg/pyxdg/issues/12

I think the fix is as simple as

--- Menu.py.a 2019-06-23 17:44:24.992850139 +0100
+++ Menu.py.b 2019-06-23 17:44:41.052807584 +0100
@@ -997,7 +997,7 @@
                 for menuentry in menu.MenuEntries:
                     if menuentry not in tmp_e:
                         menu.Entries.append(menuentry)
- elif order[1] == "menus" or order[1] == "all":
+ if order[1] == "menus" or order[1] == "all":
                 menu.Submenus.sort()
                 for submenu in menu.Submenus:
                     if submenu.Name not in tmp_s:

But as it can also be trivially worked around by replacing <Merge type="all" /> with <Merge type="menus" /><Merge type="files" />, I wonder if this should be done in XFCE/Xubuntu?

Changed in pyxdg:
status: Unknown → New
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package xubuntu-default-settings - 20.04

---------------
xubuntu-default-settings (20.04) focal; urgency=medium

  * debian/control:
    - Bump Standards-Version to 4.4.0
    - Add Rules-Requires-Root: no
    - Update Vcs- locations
  * debian/control, debian/compat:
    - Bump debhelper to version 12
  * debian/live/*:
    - Move live config files to subdirectory
  * debian/live/whiskermenu-1.rc,
    debian/xubuntu-live-settings.install:
    - Remove lock menu option in live since locking is disabled (LP: #1835668)
  * debian/live/light-locker.desktop,
    debian/xubuntu-live-settings.install:
    - Remove light-locker autostart entry since we no longer ship it
  * debian/source/lintian-overrides:
    - Add override for testsuite-autopkgtest-missing
  * etc/xdg/xdg-xubuntu/xfce4/xfconf/xfce-perchannel-xml/xfwm4.xml:
    - Drop workspace labels, inconsistent with 5+ workspaces (LP: #1829778)
  * etc/xdg/xdg-xubuntu/xfce4/xfconf/xfce-perchannel-xml/xfce4-desktop.xml:
    - Set the Xubuntu wallpaper as default for up to 4 displays
  * etc/xdg/xdg-xubuntu/menus/xfce-applications.menu,
    etc/xdg/xdg-xubuntu/menus/xfce-settings-manager.menu:
    - Workaround menu handling errors in pyxdg (LP: #1833863)

 -- Sean Davis <email address hidden> Sat, 09 Nov 2019 11:42:38 -0500

Changed in xubuntu-default-settings (Ubuntu):
status: New → Fix Released
Sean Davis (bluesabre)
Changed in garcon (Ubuntu):
status: New → Triaged
Changed in garcon:
status: Unknown → New
Changed in garcon:
status: New → Fix Released
Revision history for this message
William Wilson (jawn-smith) wrote :

Marking as Won't Fix for pyxdg as it appears this bug has been solved with fixes in other packages.

Changed in pyxdg (Ubuntu):
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related blueprints

Remote bug watches

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