[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1103872: Bug#1103871: unblock: vala-panel/24.05-3



Hi Paul,

On  Do 24 Apr 2025 16:37:42 CEST, Paul Gevers wrote:

Control: tags -1 moreinfo

Hi Mike,

I'm not really impressed by all your unblock requests. It leaves the impression that you started too late preparing for trixie.

Not commenting on your interpretation.

On 22-04-2025 11:11, Mike Gabriel wrote:
I attempted fixing vala-panel and vala-panel-appmenu in time for the soft
freeze deadline, but something went wrong with the vala-panel upload to
unstable and I failed too notice. (Only realized while on family vacation).


Can't the fix (in both packages) be done with a targeted update instead of a new upstream release?
 157 files changed, 8961 insertions(+), 2286 deletions(-)

It probably can with a considerable amount of effort. Unfortunately, upstream moved many files around between the two upstream releases.

  [ ] attach debdiff against the package in testing
      (package is not yet in testing)


The second statement isn't true for vala-panel.

Indeed, it should auto-migrate in 6 days. Ok.

For vala-panel-appmenu, can you please prepare a debdiff against version 0.7.6+dfsg1-7?

.debdiff for vala-panel-appmenu is attached.

Greets,
Mike



--

mike gabriel aka sunweaver (Debian Developer)
mobile: +49 (1520) 1976 148
landline: +49 (4351) 486 14 27

GnuPG Fingerprint: 9BFB AEE8 6C0A A5FF BF22  0782 9AF4 6B30 2577 1B31
mail: sunweaver@debian.org, http://sunweavers.net

diff -Nru -w vala-panel-appmenu-0.7.6+dfsg1/applets/meson.build vala-panel-appmenu-24.05+dfsg/applets/meson.build
--- vala-panel-appmenu-0.7.6+dfsg1/applets/meson.build	2020-10-28 22:08:48.000000000 +0100
+++ vala-panel-appmenu-24.05+dfsg/applets/meson.build	2024-05-22 13:16:00.000000000 +0200
@@ -1,5 +1,5 @@
 if vala_panel_found
-    vp_applets_libdir = vp.get_pkgconfig_variable('applets_dir')
+    vp_applets_libdir = vp.get_variable(pkgconfig:'applets_dir')
     vp_sources = files('valapanel-plugin-appmenu.vala')
     vpp = shared_module('appmenu', vp_sources, libres,
                     dependencies: [appmenu_dep, vp],
@@ -9,7 +9,7 @@
 endif
 
 if mate_found
-    mate_applet_libdir = join_paths(mp.get_pkgconfig_variable('libdir'),'mate-panel')
+    mate_applet_libdir = join_paths(mp.get_variable(pkgconfig:'libdir'),'mate-panel')
     mp_sources = files('mate-plugin-appmenu.vala')
     mpp = shared_module('appmenu-mate', mp_sources, libres,
                     dependencies: [appmenu_dep, mp],
@@ -19,7 +19,7 @@
 endif
 
 if xfce_found
-    xfce_applet_libdir = join_paths(xp.get_pkgconfig_variable('libdir'),'xfce4','panel','plugins')
+    xfce_applet_libdir = join_paths(xp.get_variable(pkgconfig:'libdir'),'xfce4','panel','plugins')
     xp_sources = files('xfce4-plugin-appmenu.vala')
     xpp = shared_module('appmenu-xfce', xp_sources, libres,
                     dependencies: [appmenu_dep, xc,xp],
@@ -29,7 +29,7 @@
 endif
 
 if budgie_found
-    budgie_applet_libdir = join_paths(bp.get_pkgconfig_variable('libdir'),'budgie-desktop','plugins','budgie-appmenu-plugin')
+    budgie_applet_libdir = join_paths(bp.get_variable(pkgconfig:'libdir'),'budgie-desktop','plugins','budgie-appmenu-plugin')
     bp_sources = files('budgie-plugin-appmenu.vala')
     bpp = shared_module('appmenu-budgie', bp_sources, libres,
                     dependencies: [appmenu_dep, bp],
diff -Nru -w vala-panel-appmenu-0.7.6+dfsg1/applets/valapanel-plugin-appmenu.vala vala-panel-appmenu-24.05+dfsg/applets/valapanel-plugin-appmenu.vala
--- vala-panel-appmenu-0.7.6+dfsg1/applets/valapanel-plugin-appmenu.vala	2020-10-28 22:08:48.000000000 +0100
+++ vala-panel-appmenu-24.05+dfsg/applets/valapanel-plugin-appmenu.vala	2024-05-22 13:16:00.000000000 +0200
@@ -25,13 +25,9 @@
 public class GlobalMenuApplet: Applet
 {
     unowned MenuWidget layout;
-    public GlobalMenuApplet (Toplevel top, GLib.Settings? settings, string number)
-    {
-        base(top,settings,number);
-    }
     public override void constructed()
     {
-        (this.action_group.lookup_action(AppletAction.CONFIGURE) as SimpleAction).set_enabled(true);
+        (this.action_group.lookup_action(APPLET_ACTION_CONFIGURE) as SimpleAction).set_enabled(true);
         var layout = new Appmenu.MenuWidget();
         this.layout = layout;
         this.background_widget = layout;
@@ -66,7 +62,7 @@
 public void g_io_appmenu_load(GLib.TypeModule module)
 {
     // boilerplate - all modules need this
-    GLib.IOExtensionPoint.implement(ValaPanel.Applet.EXTENSION_POINT,typeof(GlobalMenuApplet),"org.valapanel.appmenu",10);
+    GLib.IOExtensionPoint.implement(ValaPanel.APPLET_EXTENSION_POINT,typeof(GlobalMenuApplet),"org.valapanel.appmenu",10);
 }
 
 public void g_io_appmenu_unload(GLib.IOModule module)
diff -Nru -w vala-panel-appmenu-0.7.6+dfsg1/applets/xfce4-plugin-appmenu.vala vala-panel-appmenu-24.05+dfsg/applets/xfce4-plugin-appmenu.vala
--- vala-panel-appmenu-0.7.6+dfsg1/applets/xfce4-plugin-appmenu.vala	2020-10-28 22:08:48.000000000 +0100
+++ vala-panel-appmenu-24.05+dfsg/applets/xfce4-plugin-appmenu.vala	2024-05-22 13:16:00.000000000 +0200
@@ -32,13 +32,12 @@
         widget = layout;
         add(widget);
         add_action_widget(widget);
-        this.width_request = -1;
         try{
             Xfconf.init();
             channel = this.get_channel();
             Xfconf.Property.bind(channel,this.get_property_base()+"/"+Key.COMPACT_MODE,typeof(bool),widget,Key.COMPACT_MODE);
             Xfconf.Property.bind(channel,this.get_property_base()+"/"+Key.BOLD_APPLICATION_NAME,typeof(bool),widget,Key.BOLD_APPLICATION_NAME);
-            Xfconf.Property.bind(channel,this.get_property_base()+"/expand",typeof(bool),widget,"hexpand");
+            Xfconf.Property.bind(channel,this.get_property_base()+"/"+"expand",typeof(bool),widget,"hexpand");
             this.menu_show_configure();
         } catch (Xfconf.Error e) {
             stderr.printf("Xfconf init failed. Configuration will not be saved.\n");
@@ -54,15 +53,15 @@
                                               null );
         Gtk.Box dlg_vbox = dlg.get_content_area() as Gtk.Box;
         var entry = new CheckButton.with_label(_("Use Compact mode (all menus in application menu)"));
-        entry.bind_property("active",widget,Key.COMPACT_MODE,BindingFlags.SYNC_CREATE);
+        widget.bind_property(Key.COMPACT_MODE, entry, "active", BindingFlags.BIDIRECTIONAL | BindingFlags.SYNC_CREATE);
         dlg_vbox.pack_start(entry,false,false,2);
         entry.show();
         entry = new CheckButton.with_label(_("Use bold application name"));
-        entry.bind_property("active",widget,Key.BOLD_APPLICATION_NAME,BindingFlags.SYNC_CREATE);
+        widget.bind_property(Key.BOLD_APPLICATION_NAME, entry, "active", BindingFlags.BIDIRECTIONAL | BindingFlags.SYNC_CREATE);
         dlg_vbox.pack_start(entry,false,false,2);
         entry.show();
         entry = new CheckButton.with_label(_("Expand plugin on panel"));
-        entry.bind_property("active",widget,"hexpand",BindingFlags.SYNC_CREATE);
+        widget.bind_property("hexpand", entry, "active", BindingFlags.BIDIRECTIONAL | BindingFlags.SYNC_CREATE);
         dlg_vbox.pack_start(entry,false,false,2);
         entry.show();
         dlg.show();
@@ -73,6 +72,11 @@
     }
     private Xfconf.Channel channel;
     private unowned MenuWidget widget;
+
+    ~AppmenuPlugin() {
+        Xfconf.Property.unbind_all(this);
+        Xfconf.shutdown();
+    }
 }
 
 [ModuleInit]
diff -Nru -w vala-panel-appmenu-0.7.6+dfsg1/data/meson.build vala-panel-appmenu-24.05+dfsg/data/meson.build
--- vala-panel-appmenu-0.7.6+dfsg1/data/meson.build	2020-10-28 22:08:48.000000000 +0100
+++ vala-panel-appmenu-24.05+dfsg/data/meson.build	2024-05-22 13:16:00.000000000 +0200
@@ -3,7 +3,7 @@
 cdata.set('CMAKE_INSTALL_FULL_DATAROOTDIR', join_paths(prefix,datadir))
 
 if vala_panel_found
-    vp_applets_datadir = vp.get_pkgconfig_variable('applets_data')
+    vp_applets_datadir = vp.get_variable(pkgconfig:'applets_data')
     desktop = vcs_tag(
 	    command : ['git','describe','--tags'],
 	    input: 'appmenu.plugin.desktop.in',
@@ -19,7 +19,7 @@
 endif
 
 if mate_found
-    mate_applet_datadir = join_paths(mp.get_pkgconfig_variable('prefix'),datadir,'mate-panel','applets')
+    mate_applet_datadir = join_paths(mp.get_variable(pkgconfig:'prefix'),datadir,'mate-panel','applets')
     mate_desktop = configure_file(input : 'appmenu-mate.plugin.desktop.in',
                output : 'appmenu-mate.desktop.in',
 			   configuration : cdata)
@@ -32,7 +32,7 @@
 endif
 
 if xfce_found
-    xfce_applet_datadir = join_paths(xp.get_pkgconfig_variable('prefix'),datadir,'xfce4','panel','plugins')
+    xfce_applet_datadir = join_paths(xp.get_variable(pkgconfig:'prefix'),datadir,'xfce4','panel','plugins')
     i18n.merge_file(
       input: 'appmenu.desktop.in',
       output: 'appmenu.desktop',
diff -Nru -w vala-panel-appmenu-0.7.6+dfsg1/debian/changelog vala-panel-appmenu-24.05+dfsg/debian/changelog
--- vala-panel-appmenu-0.7.6+dfsg1/debian/changelog	2024-10-05 02:54:06.000000000 +0200
+++ vala-panel-appmenu-24.05+dfsg/debian/changelog	2025-04-09 21:11:12.000000000 +0200
@@ -1,3 +1,37 @@
+vala-panel-appmenu (24.05+dfsg-2) unstable; urgency=medium
+
+  * debian/control:
+    + Update versioned B-D: libvalapanel-dev (>= 24.03).
+
+ -- Mike Gabriel <sunweaver@debian.org>  Wed, 09 Apr 2025 21:11:12 +0200
+
+vala-panel-appmenu (24.05+dfsg-1) unstable; urgency=medium
+
+  * New upstream release.
+    - xfce4-appmenu-plugin: Make appmenu expand work with updated Xfce 4.20.
+      (Closes:  #1094010).
+  * debian/patches:
+    + Drop 0001_Update-LINGUAS.patch. Not required anymore.
+    + Add 2001_build-appmenu-glib-translator-statically.patch. Build and link
+      appmenu-glib-translator statically.
+  * debian/watch:
+    + Adjust to new syntax as required GitLab.
+  * debian/control:
+    + Drop reference to appmenu-gtk2-module. (Closes: #1095102).
+    + Add B-D: libxfce4ui-2-dev. (Although this should be better handled by
+      libxfce4panel-2.0-dev). (Closes: #1091049).
+    + Bump Standards-Version: to 4.7.2. No changes needed.
+    + Add to B-D: libwnck-3-dev.
+    + Make package binNMU'able (fix relation between arch:any and arch:all
+      bin:pkgs).
+  * debian/{control,rules}:
+    + Drop bamf(daemon) as B-D / D.
+  * debian/copyright:
+    + Update auto-generated copyright.in file.
+    + Update copyright attributions.
+
+ -- Mike Gabriel <sunweaver@debian.org>  Wed, 09 Apr 2025 18:36:51 +0200
+
 vala-panel-appmenu (0.7.6+dfsg1-7) unstable; urgency=medium
 
   * Team upload
diff -Nru -w vala-panel-appmenu-0.7.6+dfsg1/debian/control vala-panel-appmenu-24.05+dfsg/debian/control
--- vala-panel-appmenu-0.7.6+dfsg1/debian/control	2024-10-05 02:54:06.000000000 +0200
+++ vala-panel-appmenu-24.05+dfsg/debian/control	2025-04-09 21:10:38.000000000 +0200
@@ -9,16 +9,16 @@
 Build-Depends: debhelper-compat (= 13),
                budgie-core-dev,
                meson (>= 0.51.0),
-               libbamf3-dev,
-               bamfdaemon,
                libglib2.0-dev,
                libgtk-3-dev,
                libmate-panel-applet-dev,
-               libvalapanel-dev (>= 0.4.92),
+               libvalapanel-dev (>= 24.03),
+               libwnck-3-dev,
                libxfce4panel-2.0-dev,
+               libxfce4ui-2-dev,
                libxfconf-0-dev,
                valac,
-Standards-Version: 4.6.2
+Standards-Version: 4.7.2
 Rules-Requires-Root: no
 Homepage: https://gitlab.com/vala-panel-project/vala-panel-appmenu
 Vcs-Git: https://salsa.debian.org/debian-ayatana-team/vala-panel-appmenu.git
@@ -26,8 +26,7 @@
 
 Package: budgie-appmenu-applet
 Architecture: any
-Depends: bamfdaemon,
-         vala-panel-appmenu-common (= ${source:Version}),
+Depends: vala-panel-appmenu-common (>= ${source:Version}),
          appmenu-registrar,
          ${misc:Depends},
          ${shlibs:Depends},
@@ -35,7 +34,6 @@
             libdbusmenu-glib4,
             libdbusmenu-gtk3-4,
             libdbusmenu-gtk4,
-            appmenu-gtk2-module,
             appmenu-gtk3-module,
 Description: Application Menu plugin for budgie-panel
  This is an Application Menu (Global Menu) plugin. It is built using
@@ -47,8 +45,7 @@
 Package: xfce4-appmenu-plugin
 Section: xfce
 Architecture: any
-Depends: bamfdaemon,
-         vala-panel-appmenu-common (= ${source:Version}),
+Depends: vala-panel-appmenu-common (>= ${source:Version}),
          appmenu-registrar,
          ${misc:Depends},
          ${shlibs:Depends},
@@ -56,7 +53,6 @@
             libdbusmenu-glib4,
             libdbusmenu-gtk3-4,
             libdbusmenu-gtk4,
-            appmenu-gtk2-module,
             appmenu-gtk3-module,
 Description: Application Menu plugin for xfce4-panel
  This is an Application Menu (Global Menu) plugin. It is built using
@@ -67,8 +63,7 @@
 
 Package: mate-applet-appmenu
 Architecture: any
-Depends: bamfdaemon,
-         vala-panel-appmenu-common (= ${source:Version}),
+Depends: vala-panel-appmenu-common (>= ${source:Version}),
          appmenu-registrar,
          ${misc:Depends},
          ${shlibs:Depends},
@@ -76,7 +71,6 @@
             libdbusmenu-glib4,
             libdbusmenu-gtk3-4,
             libdbusmenu-gtk4,
-            appmenu-gtk2-module,
             appmenu-gtk3-module,
 Description: Application Menu plugin for mate-panel
  This is an Application Menu (Global Menu) plugin. It is built using
@@ -87,8 +81,7 @@
 
 Package: vala-panel-appmenu
 Architecture: any
-Depends: bamfdaemon,
-         vala-panel-appmenu-common (= ${source:Version}),
+Depends: vala-panel-appmenu-common (>= ${source:Version}),
          appmenu-registrar,
          ${misc:Depends},
          ${shlibs:Depends},
@@ -96,7 +89,6 @@
             libdbusmenu-glib4,
             libdbusmenu-gtk3-4,
             libdbusmenu-gtk4,
-            appmenu-gtk2-module,
             appmenu-gtk3-module,
 Description: Application Menu plugin for vala-panel
  This is an Application Menu (Global Menu) plugin. It is built using
diff -Nru -w vala-panel-appmenu-0.7.6+dfsg1/debian/copyright vala-panel-appmenu-24.05+dfsg/debian/copyright
--- vala-panel-appmenu-0.7.6+dfsg1/debian/copyright	2024-10-05 02:54:06.000000000 +0200
+++ vala-panel-appmenu-24.05+dfsg/debian/copyright	2025-04-09 18:39:18.000000000 +0200
@@ -9,6 +9,10 @@
  for a standalone src:package..
 
 Files: .clang-format
+ .gitattributes
+ .gitignore
+ .gitlab-ci.yml
+ .gitmodules
  README.md
  applets/meson.build
  data/.gitignore
@@ -18,11 +22,6 @@
  data/meson.build
  data/org.valapanel.appmenu.gschema.xml
  lib/appmenu.css
- lib/dbusmenu-importer/com.canonical.dbusmenu.xml
- lib/dbusmenu-importer/importer-enums.c.template
- lib/dbusmenu-importer/importer-enums.h.template
- lib/dbusmenu-importer/item-pixbuf.c
- lib/dbusmenu-importer/meson.build
  lib/desktop-menus.ui
  lib/libappmenu.gresource.xml
  lib/meson.build
@@ -227,6 +226,11 @@
  po/zh_HK.po
  po/zh_TW.po
  po/zu.po
+ subprojects/appmenu-glib-translator/com.canonical.dbusmenu.xml
+ subprojects/appmenu-glib-translator/importer-enums.c.template
+ subprojects/appmenu-glib-translator/importer-enums.h.template
+ subprojects/appmenu-glib-translator/item-pixbuf.c
+ subprojects/appmenu-glib-translator/meson.build
  vapi/config.vala.in
 Copyright: 2015-2017, Konstantin Pugin <ria.freelander@gmail.com>
 License: LGPL-3+
@@ -236,32 +240,12 @@
  Assuming main author as copyright holder and assuming license as found in
  LICENSE file.
 
-Files: lib/dbusmenu-importer/debug.c
-Copyright: 2018, Konstantin Pugin <ria.freelander@gmail.com>
-  2013-2018 Allison Lortie <desrt@desrt.ca>
-License: LGPL-3+
-
 Files: applets/budgie-plugin-appmenu.vala
  applets/mate-plugin-appmenu.vala
  applets/valapanel-plugin-appmenu.vala
  applets/xfce4-plugin-appmenu.vala
  lib/appmenu-abstractions.vala
- lib/appmenu-bamf.vala
  lib/appmenu-wnck.vala
- lib/dbus-menu-importer.vapi
- lib/dbusmenu-importer/debug.h
- lib/dbusmenu-importer/definitions.h
- lib/dbusmenu-importer/importer.c
- lib/dbusmenu-importer/importer.h
- lib/dbusmenu-importer/item.c
- lib/dbusmenu-importer/item.h
- lib/dbusmenu-importer/model.c
- lib/dbusmenu-importer/model.h
- lib/dbusmenu-importer/section.c
- lib/dbusmenu-importer/section.h
- lib/dbusmenu-importer/test.c
- lib/dbusmenu-importer/utils.c
- lib/dbusmenu-importer/utils.h
  lib/helper-dbus.vala
  lib/helper-dbusmenu.vala
  lib/helper-desktop.vala
@@ -276,7 +260,19 @@
  lib/matcher.vapi
  lib/menu-widget.vala
  lib/registrar.vala
- vapi/gio-addons-2.0.vapi
+ subprojects/appmenu-glib-translator/debug.h
+ subprojects/appmenu-glib-translator/definitions.h
+ subprojects/appmenu-glib-translator/importer.c
+ subprojects/appmenu-glib-translator/importer.h
+ subprojects/appmenu-glib-translator/item.c
+ subprojects/appmenu-glib-translator/item.h
+ subprojects/appmenu-glib-translator/model.c
+ subprojects/appmenu-glib-translator/model.h
+ subprojects/appmenu-glib-translator/section.c
+ subprojects/appmenu-glib-translator/section.h
+ subprojects/appmenu-glib-translator/test.c
+ subprojects/appmenu-glib-translator/utils.c
+ subprojects/appmenu-glib-translator/utils.h
 Copyright: 2015, Konstantin Pugin <ria.freelander@gmail.com>
   2015-2016, Konstantin Pugin <ria.freelander@gmail.com>
   2016, Konstantin Pugin <ria.freelander@gmail.com>
@@ -301,10 +297,15 @@
  No license specified. Assuming license as in
  LICENSE file.
 
+Files: subprojects/appmenu-glib-translator/debug.c
+Copyright: 2013-2018, Allison Lortie <desrt@desrt.ca>
+  2018, Konstantin Pugin <ria.freelander@gmail.com>
+License: LGPL-3+
+
 Files: debian/*
 Copyright: 2015-2016, Konstantin Pugin <ria.freelander@gmail.com>
            2017, Martin Wimpress <martin.wimpress@ubuntu.com>
-           2017, Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
+           2017-2025, Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
 License: LGPL-3+
 
 License: LGPL-3+
diff -Nru -w vala-panel-appmenu-0.7.6+dfsg1/debian/copyright.in vala-panel-appmenu-24.05+dfsg/debian/copyright.in
--- vala-panel-appmenu-0.7.6+dfsg1/debian/copyright.in	2024-10-05 02:54:06.000000000 +0200
+++ vala-panel-appmenu-24.05+dfsg/debian/copyright.in	2025-04-09 18:39:18.000000000 +0200
@@ -2,7 +2,7 @@
 Upstream-Name: FIXME
 Upstream-Contact: FIXME
 Source: FIXME
-Disclaimer: Autogenerated by CDBS
+Disclaimer: Autogenerated by licensecheck
 
 Files: README.md
  applets/meson.build
@@ -19,10 +19,12 @@
  debian/mate-applet-appmenu-disable
  debian/mate-applet-appmenu-enable
  debian/mate-applet-appmenu.install
+ debian/patches/2001_build-appmenu-glib-translator-statically.patch
  debian/patches/README
+ debian/patches/series
  debian/rules
  debian/source/format
- debian/upstream
+ debian/upstream/metadata
  debian/vala-panel-appmenu-common.install
  debian/vala-panel-appmenu-common.maintscript
  debian/vala-panel-appmenu.install
@@ -32,15 +34,9 @@
  debian/xfce4-appmenu-plugin-enable
  debian/xfce4-appmenu-plugin.install
  lib/appmenu.css
- lib/dbusmenu-importer/com.canonical.dbusmenu.xml
- lib/dbusmenu-importer/importer-enums.c.template
- lib/dbusmenu-importer/importer-enums.h.template
- lib/dbusmenu-importer/item-pixbuf.c
- lib/dbusmenu-importer/meson.build
  lib/desktop-menus.ui
  lib/libappmenu.gresource.xml
  lib/meson.build
- meson.build
  meson_options.txt
  po/LINGUAS
  po/LINGUAS.in
@@ -77,6 +73,7 @@
  po/cu.po
  po/cv.po
  po/cy.po
+ po/da.po
  po/de.po
  po/dv.po
  po/dz.po
@@ -86,6 +83,7 @@
  po/en_CA.po
  po/en_GB.po
  po/eo.po
+ po/es.po
  po/et.po
  po/eu.po
  po/fa.po
@@ -108,6 +106,7 @@
  po/ho.po
  po/hr.po
  po/ht.po
+ po/hu.po
  po/hy.po
  po/hz.po
  po/ia.po
@@ -120,6 +119,7 @@
  po/is.po
  po/it.po
  po/iu.po
+ po/ja.po
  po/jv.po
  po/ka.po
  po/kg.po
@@ -174,6 +174,7 @@
  po/os.po
  po/pa.po
  po/pi.po
+ po/pl.po
  po/ps.po
  po/pt.po
  po/pt_BR.po
@@ -221,6 +222,7 @@
  po/uk.po
  po/ur.po
  po/uz.po
+ po/vala-panel-appmenu.pot
  po/ve.po
  po/vi.po
  po/vo.po
@@ -235,7 +237,14 @@
  po/zh_HK.po
  po/zh_TW.po
  po/zu.po
+ subprojects/appmenu-glib-translator/com.canonical.dbusmenu.xml
+ subprojects/appmenu-glib-translator/importer-enums.c.template
+ subprojects/appmenu-glib-translator/importer-enums.h.template
+ subprojects/appmenu-glib-translator/item-pixbuf.c
  vapi/config.vala.in
+ vapi/libmatepanelapplet-4.0.vapi
+ vapi/libxfce4panel-2.0.vapi
+ vapi/libxfconf-0.vapi
 Copyright: NONE
 License: UNKNOWN
  FIXME
@@ -245,22 +254,7 @@
  applets/valapanel-plugin-appmenu.vala
  applets/xfce4-plugin-appmenu.vala
  lib/appmenu-abstractions.vala
- lib/appmenu-bamf.vala
  lib/appmenu-wnck.vala
- lib/dbus-menu-importer.vapi
- lib/dbusmenu-importer/debug.h
- lib/dbusmenu-importer/definitions.h
- lib/dbusmenu-importer/importer.c
- lib/dbusmenu-importer/importer.h
- lib/dbusmenu-importer/item.c
- lib/dbusmenu-importer/item.h
- lib/dbusmenu-importer/model.c
- lib/dbusmenu-importer/model.h
- lib/dbusmenu-importer/section.c
- lib/dbusmenu-importer/section.h
- lib/dbusmenu-importer/test.c
- lib/dbusmenu-importer/utils.c
- lib/dbusmenu-importer/utils.h
  lib/helper-dbus.vala
  lib/helper-dbusmenu.vala
  lib/helper-desktop.vala
@@ -275,46 +269,50 @@
  lib/matcher.vapi
  lib/menu-widget.vala
  lib/registrar.vala
- vapi/gio-addons-2.0.vapi
+ subprojects/appmenu-glib-translator/debug.h
+ subprojects/appmenu-glib-translator/definitions.h
+ subprojects/appmenu-glib-translator/importer.c
+ subprojects/appmenu-glib-translator/importer.h
+ subprojects/appmenu-glib-translator/item.c
+ subprojects/appmenu-glib-translator/item.h
+ subprojects/appmenu-glib-translator/model.c
+ subprojects/appmenu-glib-translator/model.h
+ subprojects/appmenu-glib-translator/section.c
+ subprojects/appmenu-glib-translator/section.h
+ subprojects/appmenu-glib-translator/test.c
+ subprojects/appmenu-glib-translator/utils.c
+ subprojects/appmenu-glib-translator/utils.h
 Copyright: 2015, Konstantin Pugin <ria.freelander@gmail.com>
   2015-2016, Konstantin Pugin <ria.freelander@gmail.com>
   2016, Konstantin Pugin <ria.freelander@gmail.com>
   2018, Konstantin Pugin <ria.freelander@gmail.com>
   2020, Konstantin Pugin <ria.freelander@gmail.com>
-License: LGPL (v3 or later)
- FIXME
-
-Files: po/da.po
- po/es.po
- po/hu.po
- po/ja.po
- po/pl.po
- po/vala-panel-appmenu.pot
-Copyright: YEAR THE PACKAGE'S COPYRIGHT HOLDER
-License: UNKNOWN
+License: LGPL-3+
  FIXME
 
-Files: vapi/libmatepanelapplet-4.0.vapi
- vapi/libxfce4panel-2.0.vapi
- vapi/libxfconf-0.vapi
+Files: meson.build
+ subprojects/appmenu-glib-translator/meson.build
 Copyright: NONE
-License: GENERATED FILE
+License: LGPL-3
  FIXME
 
-Files: debian/changelog
-Copyright: attributions.
-License: GENERATED FILE
+Files: LICENSE
+Copyright: 2007, Free Software Foundation, Inc. <http://fsf.org/>
+License: LGPL-3
  FIXME
 
-Files: lib/dbusmenu-importer/debug.c
+Files: subprojects/appmenu-glib-translator/debug.c
 Copyright: 2013-2018, Allison Lortie <desrt@desrt.ca>
   2018, Konstantin Pugin <ria.freelander@gmail.com>
-License: LGPL (v3 or later)
+License: LGPL-3+
  FIXME
 
-Files: LICENSE
-Copyright: 2007, Free Software Foundation, Inc. <http:fsf.org/>
-License: UNKNOWN
+Files: debian/copyright
+Copyright: 2015, Konstantin Pugin <ria.freelander@gmail.com>
+  2015-2016, Konstantin Pugin <ria.freelander@gmail.com>
+  2015-2017, Konstantin Pugin <ria.freelander@gmail.com>
+  2016, Konstantin Pugin
+License: LGPL-3+
  FIXME
 
 Files: data/appmenu-budgie.desktop.in
@@ -322,8 +320,10 @@
 License: UNKNOWN
  FIXME
 
-Files: debian/copyright
-Copyright: -format/1.0/
+Files: debian/changelog
+Copyright: attributions.
+  format.
+  watch}: New upstream home (GitLab.com).
 License: UNKNOWN
  FIXME
 
diff -Nru -w vala-panel-appmenu-0.7.6+dfsg1/debian/patches/0001_Update-LINGUAS.patch vala-panel-appmenu-24.05+dfsg/debian/patches/0001_Update-LINGUAS.patch
--- vala-panel-appmenu-0.7.6+dfsg1/debian/patches/0001_Update-LINGUAS.patch	2024-10-05 02:54:06.000000000 +0200
+++ vala-panel-appmenu-24.05+dfsg/debian/patches/0001_Update-LINGUAS.patch	1970-01-01 01:00:00.000000000 +0100
@@ -1,20 +0,0 @@
-From 442bcebcc00ea3a51057de0d1290593be7f9deb3 Mon Sep 17 00:00:00 2001
-From: Konstantin <ria.freelander@gmail.com>
-Date: Wed, 27 Oct 2021 07:47:37 +0000
-Subject: [PATCH] Update LINGUAS
-
-Signed-off-by: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
----
- po/LINGUAS | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/po/LINGUAS b/po/LINGUAS
-index e66ec1c..3ee3bdd 100644
---- a/po/LINGUAS
-+++ b/po/LINGUAS
-@@ -1 +1 @@
--aa ab ae af ak am an ar as ast av ay az ba be bg bh bi bm bn bo br bs ca ce ch ckb co cr cs cu cv cy da de dv dz ee el en_AU en_CA en_GB eo es et eu fa ff fi fj fo fr fr_CA fy ga gd gl gn gu gv ha he hi ho hr ht hu hy hz ia id ie ig ii ik io is it iu ja jv ka kg ki kj kk kl km kn ko kr ks ku kv kw ky la lb lg li ln lo lt lu lv mg mh mi mk ml mn mo mr ms mt my na nb nd ne ng nl nn nb nr nv ny oc oj om or os pa pi pl ps pt pt_BR qu rm rn ro ru rue rw sa sc sd se sg si sk sl sm sma sn so sq sr ss st su sv sw ta te tg th ti tk tl tn to tr ts tt tw ty ug uk ur uz ve vi vo wa wo xh yi yo za zh zh_CN zh_HK zh_TW zu
-+aa ab ae af ak am an ar as ast av ay az ba be bg bh bi bm bn bo br bs ca ce ch ckb co cr cs cu cv cy da de dv dz ee el en_AU en_CA en_GB eo es et eu fa ff fi fj fo fr fr_CA fy ga gd gl gn gu gv ha he hi ho hr ht hu hy hz ia id ie ig ii ik io is it iu ja jv ka kg ki kj kk kl km kn ko kr ks ku kv kw ky la lb lg li ln lo lt lu lv mg mh mi mk ml mn mo mr ms mt my na nb nd ne ng nl nn nr nv ny oc oj om or os pa pi pl ps pt pt_BR qu rm rn ro ru rue rw sa sc sd se sg si sk sl sm sma sn so sq sr ss st su sv sw ta te tg th ti tk tl tn to tr ts tt tw ty ug uk ur uz ve vi vo wa wo xh yi yo za zh zh_CN zh_HK zh_TW zu
--- 
-2.30.2
-
diff -Nru -w vala-panel-appmenu-0.7.6+dfsg1/debian/patches/2001_build-appmenu-glib-translator-statically.patch vala-panel-appmenu-24.05+dfsg/debian/patches/2001_build-appmenu-glib-translator-statically.patch
--- vala-panel-appmenu-0.7.6+dfsg1/debian/patches/2001_build-appmenu-glib-translator-statically.patch	1970-01-01 01:00:00.000000000 +0100
+++ vala-panel-appmenu-24.05+dfsg/debian/patches/2001_build-appmenu-glib-translator-statically.patch	2025-04-09 18:38:50.000000000 +0200
@@ -0,0 +1,47 @@
+Description: Build and link appmenu-glib-translator library statically.
+Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
+
+--- a/subprojects/appmenu-glib-translator/meson.build
++++ b/subprojects/appmenu-glib-translator/meson.build
+@@ -47,23 +47,13 @@
+ 
+ importer_name = 'appmenu-glib-translator'
+ 
+-importer_lib = library(importer_name, imp_sources, importer_enums_gen, imp_dbus,
++importer_lib = static_library(importer_name, imp_sources, importer_enums_gen, imp_dbus,
+     dependencies: [giounix, gdkpixbuf],
+-    version: meson.project_version(),
+-    install: true,
+-    soversion: 0,
++    install: false,
+     pic : true
+ )
+ importer_inc = include_directories('.')
+ imp_public = ['importer.h']
+-install_headers(imp_public, subdir : importer_name)
+-
+-pkgconfig.generate(importer_lib,
+-             name: importer_name,
+-             description: 'A translator from DBusMenu to GMenuModel',
+-             requires: [giounix, gdkpixbuf],
+-             extra_cflags: ['-I${includedir}/'+importer_name]
+-            )
+ 
+ importer_gir = gnome.generate_gir(importer_lib,
+                     sources: imp_public,
+@@ -73,13 +63,13 @@
+                     identifier_prefix: 'DBusMenu',
+                     symbol_prefix: 'dbus_menu',
+                     nsversion: meson.project_version(),
+-                    install: true
++                    install: false
+ )
+ 
+ importer_vapi = gnome.generate_vapi(importer_name,
+     sources: importer_gir[0],
+     packages: 'gio-2.0',
+-    install: true,
++    install: false,
+ )
+ 
+ importer_dep = declare_dependency(
diff -Nru -w vala-panel-appmenu-0.7.6+dfsg1/debian/patches/series vala-panel-appmenu-24.05+dfsg/debian/patches/series
--- vala-panel-appmenu-0.7.6+dfsg1/debian/patches/series	2024-10-05 02:54:06.000000000 +0200
+++ vala-panel-appmenu-24.05+dfsg/debian/patches/series	2025-04-09 18:39:18.000000000 +0200
@@ -1 +1 @@
-0001_Update-LINGUAS.patch
+2001_build-appmenu-glib-translator-statically.patch
diff -Nru -w vala-panel-appmenu-0.7.6+dfsg1/debian/rules vala-panel-appmenu-24.05+dfsg/debian/rules
--- vala-panel-appmenu-0.7.6+dfsg1/debian/rules	2024-10-05 02:54:06.000000000 +0200
+++ vala-panel-appmenu-24.05+dfsg/debian/rules	2025-04-09 18:39:18.000000000 +0200
@@ -10,7 +10,7 @@
 PKD   = $(word 1,$(abspath $(dir $(MAKEFILE_LIST))))
 PKG   = $(DEB_SOURCE)
 UVER  = $(shell echo $(DEB_VERSION) | cut -d "-" -f1)
-DTYPE = +dfsg1
+DTYPE = +dfsg
 VER  ?= $(subst $(DTYPE),,$(UVER))
 
 %:
@@ -18,7 +18,7 @@
 
 override_dh_auto_configure:
 	dh_auto_configure -- \
-	        -Dwm_backend=bamf \
+	        -Dwm_backend=auto \
 		-Dvalapanel=enabled \
 	        -Dxfce=enabled \
 	        -Dmate=enabled \
@@ -26,9 +26,7 @@
 	        $(NULL)
 
 execute_after_dh_auto_install:
-	rm debian/tmp/usr/share/vala-panel-appmenu/doc/README.md
-	rm debian/tmp/usr/share/vala-panel-appmenu/doc/LICENSE
-	rmdir debian/tmp/usr/share/vala-panel-appmenu/doc/
+	rm $(CURDIR)/debian/tmp/usr/share/licenses/vala-panel-appmenu/LICENSE
 	#mkdir -p $(CURDIR)/debian/tmp/usr/lib/budgie-desktop/plugins/appmenu-budgie
 	#mv $(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/budgie-desktop/plugins/budgie-vala-panel-appmenu-plugin/* $(CURDIR)/debian/tmp/usr/lib/budgie-desktop/plugins/appmenu-budgie
 
@@ -48,14 +46,17 @@
 	$(if $(wildcard $(PKG)-$(VER)),$(error $(PKG)-$(VER) exist, aborting..))
 	@echo "# Extracting..."
 	mkdir $(PKG)-$(VER) \
-	    && tar -xf $(PKG)_$(VER).orig.tar.xz --directory $(PKG)-$(VER) --strip-components 1 \
+	    && TARFILE=$$(find $(PKG)_$(VER).orig.tar.* | head -n1) \
+	    && tar -xf $${TARFILE} --directory $(PKG)-$(VER) --strip-components 1 \
 	    || $(RM) -r $(PKG)-$(VER)
 	@echo "# Cleaning-up..."
 	cd $(PKG)-$(VER) \
 	    && $(RM) -r -v \
 	        _ccache/ \
 	        rpm/ \
-	        subprojects/ \
+	        subprojects/appmenu-gtk-module \
+	        subprojects/jayatana \
+	        subprojects/registrar \
 	        po/stamp-it \
 	        $(NULL)
 	$(RM) -v $(PKG)_$(VER).orig.tar.*
diff -Nru -w vala-panel-appmenu-0.7.6+dfsg1/debian/vala-panel-appmenu.install vala-panel-appmenu-24.05+dfsg/debian/vala-panel-appmenu.install
--- vala-panel-appmenu-0.7.6+dfsg1/debian/vala-panel-appmenu.install	2024-10-05 02:54:06.000000000 +0200
+++ vala-panel-appmenu-24.05+dfsg/debian/vala-panel-appmenu.install	2025-04-09 18:39:18.000000000 +0200
@@ -1,2 +1,3 @@
 usr/lib/*/vala-panel/*
+usr/share/doc/vala-panel-appmenu/README.md
 usr/share/vala-panel/*
diff -Nru -w vala-panel-appmenu-0.7.6+dfsg1/debian/watch vala-panel-appmenu-24.05+dfsg/debian/watch
--- vala-panel-appmenu-0.7.6+dfsg1/debian/watch	2024-10-05 02:54:06.000000000 +0200
+++ vala-panel-appmenu-24.05+dfsg/debian/watch	2025-04-09 18:39:18.000000000 +0200
@@ -1,2 +1,3 @@
 version=4
-https://gitlab.com/vala-panel-project/vala-panel-appmenu/-/tags/?([\d\.]+) .*/uploads/.*/vala-panel-appmenu-?([\d\.]+)\.tar\.xz
+opts="searchmode=plain, repacksuffix=+dfsg, dversionmangle=s/\+dfsg//" \
+https://gitlab.com/vala-panel-project/@PACKAGE@/tags?sort=updated_desc -/archive/v?\d[\d.]+/@PACKAGE@-@ANY_VERSION@@ARCHIVE_EXT@
diff -Nru -w vala-panel-appmenu-0.7.6+dfsg1/.gitattributes vala-panel-appmenu-24.05+dfsg/.gitattributes
--- vala-panel-appmenu-0.7.6+dfsg1/.gitattributes	1970-01-01 01:00:00.000000000 +0100
+++ vala-panel-appmenu-24.05+dfsg/.gitattributes	2024-05-22 13:16:00.000000000 +0200
@@ -0,0 +1 @@
+subprojects/* linguist-vendored
diff -Nru -w vala-panel-appmenu-0.7.6+dfsg1/.gitignore vala-panel-appmenu-24.05+dfsg/.gitignore
--- vala-panel-appmenu-0.7.6+dfsg1/.gitignore	1970-01-01 01:00:00.000000000 +0100
+++ vala-panel-appmenu-24.05+dfsg/.gitignore	2024-05-22 13:16:00.000000000 +0200
@@ -0,0 +1,49 @@
+*.debhelper
+*.la
+*.lo
+*.log
+*.m4
+*.pc
+*.pyc
+*.stamp
+*.substvars
+.deps
+.libs
+.cache
+Makefile
+Makefile.in
+autom4te.cache
+build
+build-aux
+config.log
+config.status
+configure
+debian/autoreconf.after
+debian/autoreconf.before
+debian/files
+debian/libunity-gtk-parser-dev
+debian/libunity-gtk-parser-dev-common
+debian/libunity-gtk-parser0
+debian/libunity-gtk2-parser-dev
+debian/libunity-gtk2-parser0
+debian/libunity-gtk3-parser-dev
+debian/libunity-gtk3-parser0
+debian/tmp
+debian/unity-gtk-module
+debian/unity-gtk-module-common
+debian/unity-gtk2-module
+debian/unity-gtk3-module
+docs/reference/unity-gtk-module/html
+docs/reference/unity-gtk-module/xml
+docs/reference/unity-gtk-module/unity-gtk-module-decl-list.txt
+docs/reference/unity-gtk-module/unity-gtk-module-decl.txt
+docs/reference/unity-gtk-module/unity-gtk-module-undeclared.txt
+docs/reference/unity-gtk-module/unity-gtk-module-undocumented.txt
+docs/reference/unity-gtk-module/unity-gtk-module-unused.txt
+docs/reference/unity-gtk-module/unity-gtk-module.args
+docs/reference/unity-gtk-module/unity-gtk-module.hierarchy
+docs/reference/unity-gtk-module/unity-gtk-module.interfaces
+docs/reference/unity-gtk-module/unity-gtk-module.prerequisites
+docs/reference/unity-gtk-module/unity-gtk-module.signals
+libtool
+data/appmenu.desktop.plugin.in
\ Kein Zeilenumbruch am Dateiende.
diff -Nru -w vala-panel-appmenu-0.7.6+dfsg1/.gitlab-ci.yml vala-panel-appmenu-24.05+dfsg/.gitlab-ci.yml
--- vala-panel-appmenu-0.7.6+dfsg1/.gitlab-ci.yml	1970-01-01 01:00:00.000000000 +0100
+++ vala-panel-appmenu-24.05+dfsg/.gitlab-ci.yml	2024-05-22 13:16:00.000000000 +0200
@@ -0,0 +1,107 @@
+stages:
+  - build
+  - release
+before_script:
+  - mkdir -p _ccache
+  - export CCACHE_BASEDIR=${PWD}
+  - export CCACHE_DIR=${PWD}/_ccache
+
+cache:
+  paths:
+    - _ccache/
+
+build-applet-alpine:
+  image: alpine:edge
+  stage: build
+  script:
+   - apk add --no-cache python3 gobject-introspection-dev gtk+3.0-dev vala meson ninja xz libwnck3-dev build-base git
+   - git clone https://gitlab.com/vala-panel-project/vala-panel.git
+   - meson --prefix=/usr vp-build vala-panel && meson install -C vp-build && rm -rf vala-panel && rm -rf vp-build
+   - meson --prefix=/usr -Dregistrar=disabled -Djayatana=disabled -Dappmenu-gtk-module=disabled build
+   - meson compile -C build
+   - meson install -C build --no-rebuild
+   - meson dist -C build --no-tests
+  artifacts:
+    paths:
+    - "build/meson-dist/vala-panel-appmenu*.tar.xz"
+    expire_in: 1 week
+
+build-gtk-module-main:
+  image: alpine:edge
+  stage: build
+  script:
+   - apk add --no-cache python3 gtk+3.0-dev gtk+2.0-dev xz meson ninja libwnck3-dev build-base git
+   - export VERSION=$(git describe --abbrev=0)
+   - meson --prefix=/usr build subprojects/appmenu-gtk-module
+   - meson compile -C build
+   - meson install -C build --no-rebuild
+   - meson dist -C build --no-tests
+  artifacts:
+    paths:
+    - "build/meson-dist/appmenu-gtk-module*.tar.xz"
+    expire_in: 1 week
+
+build-glib-translator-main:
+  image: alpine:edge
+  stage: build
+  script:
+   - apk add --no-cache python3 glib-dev gobject-introspection-dev vala xz meson build-base git
+   - export VERSION=$(git describe --abbrev=0)
+   - meson --prefix=/usr build subprojects/appmenu-glib-translator
+   - meson compile -C build
+   - meson install -C build --no-rebuild
+   - meson dist -C build --no-tests
+  artifacts:
+    paths:
+    - "build/meson-dist/appmenu-glib-translator*.tar.xz"
+    expire_in: 1 week
+
+build-registrar-main:
+  image: alpine:edge
+  stage: build
+  script:
+   - apk add --no-cache python3 glib-dev meson xz build-base git
+   - export VERSION=$(git describe --abbrev=0)
+   - meson --prefix=/usr --libexecdir=lib build subprojects/registrar
+   - meson compile -C build
+   - meson install -C build --no-rebuild
+   - meson dist -C build --no-tests
+  artifacts:
+    paths:
+    - "build/meson-dist/registrar*.tar.xz"
+    expire_in: 1 week
+
+
+build-jayatana-main:
+  image: alpine:edge
+  stage: build
+  script:
+   - apk add --no-cache libdbusmenu-glib-dev python3 build-base ninja libxkbcommon-dev git libx11-dev meson glib-dev java-common openjdk21-jdk
+   - meson --prefix=/usr --libexecdir=lib build subprojects/jayatana
+   - meson compile -C build
+   - meson install -C build --no-rebuild
+   - meson dist -C build --no-tests
+  artifacts:
+    paths:
+    - "build/meson-dist/jayatana*.tar.xz"
+    expire_in: 1 week
+
+
+release-main:
+  image: alpine:edge
+  stage: release
+  script:
+    - apk add --no-cache python3 py3-pip
+    - pip3 install --break-system-packages gitlab-release
+    - gitlab-release --link-in-desc --link-artifact *.tar.xz
+  artifacts:
+    paths:
+      # Must include files passed to gitlab_release
+    - "build/meson-dist/appmenu-glib-translator*.tar.xz"
+    - "build/meson-dist/appmenu-gtk-module*.tar.xz"
+    - "build/meson-dist/registrar*.tar.xz"
+    - "build/meson-dist/vala-panel-appmenu*.tar.xz"
+    - "build/meson-dist/jayatana*.tar.xz"
+  only:
+    - tags
+
diff -Nru -w vala-panel-appmenu-0.7.6+dfsg1/.gitmodules vala-panel-appmenu-24.05+dfsg/.gitmodules
--- vala-panel-appmenu-0.7.6+dfsg1/.gitmodules	1970-01-01 01:00:00.000000000 +0100
+++ vala-panel-appmenu-24.05+dfsg/.gitmodules	2024-05-22 13:16:00.000000000 +0200
@@ -0,0 +1,3 @@
+[submodule "cmake"]
+	path = cmake
+	url = https://gitlab.com/vala-panel-project/cmake-vala.git
diff -Nru -w vala-panel-appmenu-0.7.6+dfsg1/lib/appmenu-abstractions.vala vala-panel-appmenu-24.05+dfsg/lib/appmenu-abstractions.vala
--- vala-panel-appmenu-0.7.6+dfsg1/lib/appmenu-abstractions.vala	2020-10-28 22:08:48.000000000 +0100
+++ vala-panel-appmenu-24.05+dfsg/lib/appmenu-abstractions.vala	2024-05-22 13:16:00.000000000 +0200
@@ -48,7 +48,7 @@
                 var con = Bus.get_sync(BusType.SESSION);
                 con.call.begin(
                     "org.valapanel.AppMenu.Registrar",
-                    "/Registrar",
+                    "/org/valapanel/AppMenu/Registrar",
                     "org.valapanel.AppMenu.Registrar",
                     "Reference",
                     null,null,
@@ -66,7 +66,7 @@
                 var con = Bus.get_sync(BusType.SESSION,null);
                 con.call.begin(
                     "org.valapanel.AppMenu.Registrar",
-                    "/Registrar",
+                    "/org/valapanel/AppMenu/Registrar",
                     "org.valapanel.AppMenu.Registrar",
                     "UnReference",
                     null,null,
diff -Nru -w vala-panel-appmenu-0.7.6+dfsg1/lib/appmenu-bamf.vala vala-panel-appmenu-24.05+dfsg/lib/appmenu-bamf.vala
--- vala-panel-appmenu-0.7.6+dfsg1/lib/appmenu-bamf.vala	2020-10-28 22:08:48.000000000 +0100
+++ vala-panel-appmenu-24.05+dfsg/lib/appmenu-bamf.vala	1970-01-01 01:00:00.000000000 +0100
@@ -1,247 +0,0 @@
-/*
- * vala-panel-appmenu
- * Copyright (C) 2015 Konstantin Pugin <ria.freelander@gmail.com>
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-using GLib;
-using Gtk;
-
-namespace Appmenu
-{
-    DBusMenuHelper get_dbus_menu_helper_with_bamf(MenuWidget w, string name, ObjectPath path, Bamf.Application? app)
-    {
-        string? title = null;
-        DesktopAppInfo? info = null;
-        if (app != null)
-        {
-            var desktop_file = app.get_desktop_file();
-            if (desktop_file != null)
-            {
-                info = new DesktopAppInfo.from_filename(desktop_file);
-                title = info.get_name();
-            }
-        }
-        if (title == null && app != null)
-            title = app.get_name();
-        return new DBusMenuHelper(w,name,path,title,info);
-    }
-    MenuModelHelper get_menu_model_helper_with_bamf(MenuWidget w, Bamf.Window window, Bamf.Application? app)
-    {
-        var gtk_unique_bus_name = window.get_utf8_prop("_GTK_UNIQUE_BUS_NAME");
-        var app_menu_path = window.get_utf8_prop("_GTK_APP_MENU_OBJECT_PATH");
-        var menubar_path = window.get_utf8_prop("_GTK_MENUBAR_OBJECT_PATH");
-        var application_path = window.get_utf8_prop("_GTK_APPLICATION_OBJECT_PATH");
-        var window_path = window.get_utf8_prop("_GTK_WINDOW_OBJECT_PATH");
-        var unity_path = window.get_utf8_prop("_UNITY_OBJECT_PATH");
-        DesktopAppInfo? info = null;
-        string? title = null;
-        if (app != null)
-        {
-            var desktop_file = app.get_desktop_file();
-            if (desktop_file != null)
-            {
-                info = new DesktopAppInfo.from_filename(desktop_file);
-                title = info.get_name();
-            }
-        }
-        if (title == null && app != null)
-            title = app.get_name();
-        if (title == null)
-            title = window.get_name();
-        return new MenuModelHelper(w,gtk_unique_bus_name,app_menu_path,menubar_path,application_path,window_path,unity_path,title,info);
-    }
-    DBusAppMenu get_stub_helper_with_bamf(MenuWidget w, Bamf.Application app)
-    {
-        DesktopAppInfo? info = null;
-        string? title = null;
-        var desktop_file = app.get_desktop_file();
-        if (desktop_file != null)
-        {
-            info = new DesktopAppInfo.from_filename(desktop_file);
-            title = info.get_name();
-        }
-        if (title == null)
-            title = app.get_name();
-        return new DBusAppMenu(w,title,null,info);
-    }
-    internal class BackendImpl : Backend
-    {
-        private HashTable<uint,unowned Bamf.Window> desktop_menus;
-        private Bamf.Matcher matcher;
-        private Helper helper;
-        private Bamf.Application active_application;
-        private Bamf.Window active_window;
-        private int menu_update_delay = 500; // should be close enough to avoid flickering
-        private uint delayed_menu_update_id = 0;
-        construct
-        {
-            desktop_menus = new HashTable<uint,unowned Bamf.Window>(direct_hash,direct_equal);
-            matcher = Bamf.Matcher.get_default();
-            proxy.window_registered.connect(register_menu_window);
-            proxy.window_unregistered.connect(unregister_menu_window);
-            proxy.registrar_changed.connect((h)=>{
-                on_active_window_changed(this.active_window,this.active_window);
-            });
-            matcher.active_window_changed.connect(on_active_window_changed);
-            matcher.view_opened.connect(on_window_opened);
-            matcher.view_closed.connect(on_window_closed);
-            foreach (unowned Bamf.Window window in matcher.get_windows())
-                on_window_opened(window);
-            foreach (unowned Bamf.Application app in matcher.get_running_applications())
-                on_window_opened(app);
-            on_active_window_changed(null,matcher.get_active_window());
-        }
-        public BackendImpl()
-        {
-            Object();
-        }
-        ~BackendImpl()
-        {
-            SignalHandler.disconnect_by_data(proxy,this);
-            SignalHandler.disconnect_by_data(matcher,this);
-        }
-        public override void set_active_window_menu(MenuWidget widget)
-        {
-            helper = null;
-            if(type == ModelType.MENUMODEL)
-                helper = get_menu_model_helper_with_bamf(widget, active_window, active_application);
-            else if(type == ModelType.DBUSMENU)
-                create_dbusmenu_for_bamf_window(widget,active_window);
-            else if(type == ModelType.DESKTOP)
-                helper = new DesktopHelper(widget);
-            else if(type == ModelType.STUB)
-            {
-                helper = get_stub_helper_with_bamf(widget,active_application);
-                widget.set_menubar(null);
-            }
-        }
-        private void register_menu_window(uint window_id, string sender, ObjectPath menu_object_path)
-        {
-            if (window_id != matcher.get_active_window().get_xid())
-                return;
-            this.active_window = matcher.get_active_window();
-            this.type = ModelType.DBUSMENU;
-            active_model_changed();
-        }
-        private void create_dbusmenu_for_bamf_window(MenuWidget menu,Bamf.Window window)
-        {
-            uint xid = window.get_xid();
-            string name;
-            ObjectPath path;
-            proxy.get_menu_for_window(xid,out name, out path);
-            active_application = matcher.get_application_for_xid(xid);
-            helper = get_dbus_menu_helper_with_bamf(menu,name,path,active_application);
-        }
-        private void unregister_menu_window(uint window_id)
-        {
-            desktop_menus.remove(window_id);
-        }
-        private void on_window_opened(Bamf.View view)
-        {
-            if(view is Bamf.Window)
-            {
-                unowned Bamf.Window window = view as Bamf.Window;
-                if (window.get_window_type() == Bamf.WindowType.DESKTOP)
-                    desktop_menus.insert(window.get_xid(),window);
-            }
-        }
-        private void reset_menu_update_timeout() {
-            if (delayed_menu_update_id > 0) {
-                Source.remove(delayed_menu_update_id);
-            }
-            delayed_menu_update_id = 0;
-        }
-        private void on_window_closed(Bamf.View view)
-        {
-            if (view is Bamf.Window) {
-                unregister_menu_window((view as Bamf.Window).get_xid());
-            }
-            delayed_menu_update_id = Timeout.add(menu_update_delay, menu_update_timeout);
-        }
-        private bool menu_update_timeout() {
-            unowned Bamf.Window win = matcher.get_active_window();
-            type = ModelType.NONE;
-            lookup_menu(win);
-            active_model_changed();
-            delayed_menu_update_id = 0;
-            return false;
-        }
-        private void on_active_window_changed(Bamf.Window? prev, Bamf.Window? next)
-        {
-            reset_menu_update_timeout();
-            unowned Bamf.Window win = next != null ? next : matcher.get_active_window();
-            type = ModelType.NONE;
-            lookup_menu(win);
-            active_model_changed();
-        }
-        private void lookup_menu(Bamf.Window? window)
-        {
-            uint xid = 0;
-            Bamf.Window? win = window;
-            while (win != null && type == ModelType.NONE)
-            {
-                xid = window.get_xid();
-                unowned Bamf.Application app = matcher.get_application_for_window(win);
-                if (type == ModelType.NONE)
-                {
-                    string name;
-                    ObjectPath path;
-                    proxy.get_menu_for_window(xid,out name, out path);
-                    /* Check DBusMenu sanity to differ it from MenuModel*/
-                    if (!(name.length <= 0 && path == "/"))
-                    {
-                        this.active_application = app;
-                        this.active_window = win;
-                        this.type = ModelType.DBUSMENU;
-                    }
-                }
-                /* First look to see if we can get these from the
-                   GMenuModel access */
-                if (type == ModelType.NONE)
-                {
-                    var uniquename = window.get_utf8_prop ("_GTK_UNIQUE_BUS_NAME");
-                    if (uniquename != null)
-                    {
-                        this.active_window = win;
-                        this.active_application = app;
-                        if (window.get_window_type() == Bamf.WindowType.DESKTOP)
-                            this.type = ModelType.DESKTOP;
-                        else
-                            this.type = ModelType.MENUMODEL;
-                    }
-                }
-                if (type == ModelType.NONE)
-                {
-                    debug("Looking for parent window on XID %u", xid);
-                    win = win.get_transient();
-                    if (win == null && app != null)
-                    {
-                        this.active_window = win;
-                        this.active_application = app;
-                        type = ModelType.STUB;
-                    }
-                }
-            }
-            if (type == ModelType.NONE)
-            {
-                this.active_window = null;
-                this.active_application = null;
-                type = ModelType.DESKTOP;
-            }
-            return;
-        }
-    }
-}
diff -Nru -w vala-panel-appmenu-0.7.6+dfsg1/lib/appmenu.css vala-panel-appmenu-24.05+dfsg/lib/appmenu.css
--- vala-panel-appmenu-0.7.6+dfsg1/lib/appmenu.css	2020-10-28 22:08:48.000000000 +0100
+++ vala-panel-appmenu-24.05+dfsg/lib/appmenu.css	2024-05-22 13:16:00.000000000 +0200
@@ -7,14 +7,14 @@
 
 .-vala-panel-appmenu-core scrolledwindow,
 .-vala-panel-appmenu-private > menuitem,
-.-vala-panel-appmenu-private > menuitem:first-child > label {
+.-vala-panel-appmenu-private > menuitem:last-child > label {
     margin-top: 0;
     margin-bottom: 0;
     padding-top: 0;
     padding-bottom: 0;
 }
 
-menubar.-vala-panel-appmenu-bold > menuitem:first-child > label {
+menubar.-vala-panel-appmenu-bold > menuitem:last-child > label {
    font-weight: bolder;
 }
 
diff -Nru -w vala-panel-appmenu-0.7.6+dfsg1/lib/dbusmenu-importer/com.canonical.dbusmenu.xml vala-panel-appmenu-24.05+dfsg/lib/dbusmenu-importer/com.canonical.dbusmenu.xml
--- vala-panel-appmenu-0.7.6+dfsg1/lib/dbusmenu-importer/com.canonical.dbusmenu.xml	2020-10-28 22:08:48.000000000 +0100
+++ vala-panel-appmenu-24.05+dfsg/lib/dbusmenu-importer/com.canonical.dbusmenu.xml	1970-01-01 01:00:00.000000000 +0100
@@ -1,60 +0,0 @@
-<node>
-   <interface name="com.canonical.dbusmenu">
-      <annotation name="org.gtk.GDBus.C.Name" value="Xml" />
-      <property name="Version" type="u" access="read" />
-      <property name="Status" type="s" access="read" />
-      <property name="TextDirection" type="s" access="read" />
-      <property name="IconThemePath" type="as" access="read" />
-      <signal name="ItemsPropertiesUpdated">
-         <arg type="a(ia{sv})" direction="out" />
-         <arg type="a(ias)" direction="out" />
-      </signal>
-      <signal name="LayoutUpdated">
-         <arg name="revision" type="u" direction="out" />
-         <arg name="parentId" type="i" direction="out" />
-      </signal>
-      <signal name="ItemActivationRequested">
-         <arg name="id" type="i" direction="out" />
-         <arg name="timeStamp" type="u" direction="out" />
-      </signal>
-      <method name="Event">
-         <arg name="id" type="i" direction="in" />
-         <arg name="eventId" type="s" direction="in" />
-         <arg name="data" type="v" direction="in" />
-         <arg name="timestamp" type="u" direction="in" />
-         <annotation name="org.freedesktop.DBus.Method.NoReply" value="true" />
-      </method>
-      <method name="EventGroup">
-         <arg type="a(isvu)" name="events" direction="in" />
-         <arg type="ai" name="idErrors" direction="out" />
-      </method>
-      <method name="GetProperty">
-         <arg type="v" direction="out" />
-         <arg name="id" type="i" direction="in" />
-         <arg name="property" type="s" direction="in" />
-      </method>
-      <method name="GetLayout">
-         <arg type="u" direction="out" />
-         <arg name="parentId" type="i" direction="in" />
-         <arg name="recursionDepth" type="i" direction="in" />
-         <arg name="propertyNames" type="as" direction="in" />
-         <arg name="item" type="(ia{sv}av)" direction="out" />
-      </method>
-      <method name="GetGroupProperties">
-         <arg type="a(ia{sv})" direction="out" />
-         <arg name="ids" type="ai" direction="in" />
-         <arg name="propertyNames" type="as" direction="in" />
-      </method>
-      <method name="AboutToShow">
-         <arg name="needUpdate" type="b" direction="out" />
-         <arg name="id" type="i" direction="in" />
-      </method>
-      <method name="AboutToShowGroup">
-         <arg type="ai" name="ids" direction="in" />
-         <arg type="ai" name="updatesNeeded" direction="out" />
-         <arg type="ai" name="idErrors" direction="out" />
-      </method>
-   </interface>
-</node>
-
-
diff -Nru -w vala-panel-appmenu-0.7.6+dfsg1/lib/dbusmenu-importer/debug.c vala-panel-appmenu-24.05+dfsg/lib/dbusmenu-importer/debug.c
--- vala-panel-appmenu-0.7.6+dfsg1/lib/dbusmenu-importer/debug.c	2020-10-28 22:08:48.000000000 +0100
+++ vala-panel-appmenu-24.05+dfsg/lib/dbusmenu-importer/debug.c	1970-01-01 01:00:00.000000000 +0100
@@ -1,157 +0,0 @@
-/*
- * vala-panel-appmenu
- * Copyright (C) 2018 Konstantin Pugin <ria.freelander@gmail.com>
- * Copyright (C) 2013-2018 Allison Lortie <desrt@desrt.ca>
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "debug.h"
-#include <gio/gio.h>
-#include <stdbool.h>
-/* Markup printing {{{1 */
-
-/* This used to be part of GLib, but it was removed before the stable
- * release because it wasn't generally useful.  We want it here, though.
- */
-
-G_GNUC_INTERNAL void g_menu_markup_print_to_console(GMenuModel *menu)
-{
-	GString *str = g_string_new(NULL);
-	g_menu_markup_print_string(str, menu, 4, 4);
-	char *cstr = g_string_free(str, false);
-	g_print("%s\n", cstr);
-}
-
-G_GNUC_INTERNAL void dbus_menu_print_variant(GVariant *var)
-{
-	g_autofree char *pr = g_variant_print(var, true);
-	g_print("%s\n", pr);
-}
-
-static void indent_string(GString *string, gint indent)
-{
-	while (indent--)
-		g_string_append_c(string, ' ');
-}
-
-G_GNUC_INTERNAL GString *g_menu_markup_print_string(GString *string, GMenuModel *model, gint indent,
-                                                    gint tabstop)
-{
-	gboolean need_nl = false;
-	gint i, n;
-
-	if G_UNLIKELY (string == NULL)
-		string = g_string_new(NULL);
-
-	n = g_menu_model_get_n_items(model);
-
-	for (i = 0; i < n; i++)
-	{
-		GMenuAttributeIter *attr_iter;
-		GMenuLinkIter *link_iter;
-		GString *contents;
-		GString *attrs;
-
-		attr_iter = g_menu_model_iterate_item_attributes(model, i);
-		link_iter = g_menu_model_iterate_item_links(model, i);
-		contents  = g_string_new(NULL);
-		attrs     = g_string_new(NULL);
-
-		while (g_menu_attribute_iter_next(attr_iter))
-		{
-			const char *name = g_menu_attribute_iter_get_name(attr_iter);
-			GVariant *value  = g_menu_attribute_iter_get_value(attr_iter);
-
-			if (g_variant_is_of_type(value, G_VARIANT_TYPE_STRING))
-			{
-				char *str;
-				str = g_markup_printf_escaped(" %s='%s'",
-				                              name,
-				                              g_variant_get_string(value, NULL));
-				g_string_append(attrs, str);
-				g_free(str);
-			}
-
-			else
-			{
-				char *printed;
-				char *str;
-				const char *type;
-
-				printed = g_variant_print(value, true);
-				type    = g_variant_type_peek_string(g_variant_get_type(value));
-				str     = g_markup_printf_escaped(
-                                    "<attribute name='%s' type='%s'>%s</attribute>\n",
-                                    name,
-                                    type,
-                                    printed);
-				indent_string(contents, indent + tabstop);
-				g_string_append(contents, str);
-				g_free(printed);
-				g_free(str);
-			}
-
-			g_variant_unref(value);
-		}
-		g_object_unref(attr_iter);
-
-		while (g_menu_link_iter_next(link_iter))
-		{
-			const char *name = g_menu_link_iter_get_name(link_iter);
-			GMenuModel *menu = g_menu_link_iter_get_value(link_iter);
-			char *str;
-
-			if (contents->str[0])
-				g_string_append_c(contents, '\n');
-
-			str = g_markup_printf_escaped("<link name='%s'>\n", name);
-			indent_string(contents, indent + tabstop);
-			g_string_append(contents, str);
-			g_free(str);
-
-			g_menu_markup_print_string(contents, menu, indent + 2 * tabstop, tabstop);
-
-			indent_string(contents, indent + tabstop);
-			g_string_append(contents, "</link>\n");
-			g_object_unref(menu);
-		}
-		g_object_unref(link_iter);
-
-		if (contents->str[0])
-		{
-			indent_string(string, indent);
-			g_string_append_printf(string, "<item%s>\n", attrs->str);
-			g_string_append(string, contents->str);
-			indent_string(string, indent);
-			g_string_append(string, "</item>\n");
-			need_nl = true;
-		}
-
-		else
-		{
-			if (need_nl)
-				g_string_append_c(string, '\n');
-
-			indent_string(string, indent);
-			g_string_append_printf(string, "<item%s/>\n", attrs->str);
-			need_nl = false;
-		}
-
-		g_string_free(contents, true);
-		g_string_free(attrs, true);
-	}
-
-	return string;
-}
diff -Nru -w vala-panel-appmenu-0.7.6+dfsg1/lib/dbusmenu-importer/debug.h vala-panel-appmenu-24.05+dfsg/lib/dbusmenu-importer/debug.h
--- vala-panel-appmenu-0.7.6+dfsg1/lib/dbusmenu-importer/debug.h	2020-10-28 22:08:48.000000000 +0100
+++ vala-panel-appmenu-24.05+dfsg/lib/dbusmenu-importer/debug.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,27 +0,0 @@
-/*
- * vala-panel-appmenu
- * Copyright (C) 2018 Konstantin Pugin <ria.freelander@gmail.com>
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef DEBUG_H
-#define DEBUG_H
-
-#include <gio/gio.h>
-G_GNUC_INTERNAL GString *g_menu_markup_print_string(GString *string, GMenuModel *model, gint indent,
-                                                    gint tabstop);
-G_GNUC_INTERNAL void g_menu_markup_print_to_console(GMenuModel *menu);
-G_GNUC_INTERNAL void dbus_menu_print_variant(GVariant *var);
-#endif // DEBUG_H
diff -Nru -w vala-panel-appmenu-0.7.6+dfsg1/lib/dbusmenu-importer/definitions.h vala-panel-appmenu-24.05+dfsg/lib/dbusmenu-importer/definitions.h
--- vala-panel-appmenu-0.7.6+dfsg1/lib/dbusmenu-importer/definitions.h	2020-10-28 22:08:48.000000000 +0100
+++ vala-panel-appmenu-24.05+dfsg/lib/dbusmenu-importer/definitions.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,125 +0,0 @@
-/*
- * vala-panel-appmenu
- * Copyright (C) 2018 Konstantin Pugin <ria.freelander@gmail.com>
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef DEFINITIONS_H
-#define DEFINITIONS_H
-
-#define DBUS_MENU_ACTION_NAMESPACE "dbusmenu"
-#define DBUS_MENU_ACTION_NAMESPACE_PREFIX DBUS_MENU_ACTION_NAMESPACE "."
-
-#define ACTION_PREFIX "id-"
-#define SUBMENU_PREFIX "submenu-"
-#define CURRENT_TIME 0L
-#define HAS_ICON_NAME "has-icon-name"
-
-typedef enum
-{
-	DBUS_MENU_ACTION_SECTION,
-	DBUS_MENU_ACTION_NORMAL,
-	DBUS_MENU_ACTION_CHECKMARK,
-	DBUS_MENU_ACTION_RADIO,
-	DBUS_MENU_ACTION_SUBMENU,
-	DBUS_MENU_ACTION_ALL
-} DBusMenuActionType;
-
-#define SUBMENU_ACTION_MENUMODEL_QUARK_STR "submenu-action_menumodel"
-#define ACTIVATE_ID_QUARK_STR "checker-quark"
-#define POPULATED_QUARK "is-populated"
-
-#define DBUS_MENU_PROP_TYPE "type"
-#define DBUS_MENU_TYPE_SEPARATOR "separator"
-#define DBUS_MENU_TYPE_NORMAL "normal"
-
-#define DBUS_MENU_PROP_TOGGLE_TYPE "toggle-type"
-#define DBUS_MENU_TOGGLE_TYPE_CHECK "checkmark"
-#define DBUS_MENU_TOGGLE_TYPE_RADIO "radio"
-
-#define DBUS_MENU_PROP_CHILDREN_DISPLAY "children-display"
-#define DBUS_MENU_CHILDREN_DISPLAY_SUBMENU "submenu"
-
-#define DBUS_MENU_SHORTCUT_CONTROL "Control"
-#define DBUS_MENU_SHORTCUT_ALT "Alt"
-#define DBUS_MENU_SHORTCUT_SHIFT "Shift"
-#define DBUS_MENU_SHORTCUT_SUPER "Super"
-
-#define DBUS_MENUMODEL_SHORTCUT_SHIFT "<Shift>"
-#define DBUS_MENUMODEL_SHORTCUT_CONTROL "<Control>"
-#define DBUS_MENUMODEL_SHORTCUT_ALT "<Alt>"
-#define DBUS_MENUMODEL_SHORTCUT_SUPER "<Super>"
-
-#define DBUS_MENU_DISABLED_ACTION "ls.disabled"
-#define DBUS_MENU_DISABLED_SUBMENU "disabled-submenu"
-#define DBUS_MENU_PROPERTY_ENABLED "enabled"
-#define DBUS_MENU_PROPERTY_TOGGLE_STATE "toggle-state"
-#define DBUS_MENU_ACTION_RADIO_SELECTED "+"
-#define DBUS_MENU_ACTION_RADIO_UNSELECTED "-"
-
-#define G_MENU_ATTRIBUTE_ACCEL "accel"
-#define G_MENU_ATTRIBUTE_ACCEL_TEXT "x-canonical-accel"
-#define G_MENU_ATTRIBUTE_SUBMENU_ACTION "submenu-action"
-#define G_MENU_ATTRIBUTE_HIDDEN_WHEN "hidden-when"
-#define G_MENU_ATTRIBUTE_VERB_ICON "verb-icon"
-#define G_MENU_HIDDEN_WHEN_ACTION_MISSING "action-missing"
-#define G_MENU_HIDDEN_WHEN_ACTION_DISABLED "action-disabled"
-
-#define g_signal_handlers_block_by_func_only(instance, func)                                       \
-	g_signal_handlers_block_matched((instance),                                                \
-	                                (GSignalMatchType)(G_SIGNAL_MATCH_FUNC),                   \
-	                                0,                                                         \
-	                                0,                                                         \
-	                                NULL,                                                      \
-	                                (gpointer)(func),                                          \
-	                                NULL)
-
-#define g_signal_handlers_unblock_by_func_only(instance, func)                                     \
-	g_signal_handlers_unblock_matched((instance),                                              \
-	                                  (GSignalMatchType)(G_SIGNAL_MATCH_FUNC),                 \
-	                                  0,                                                       \
-	                                  0,                                                       \
-	                                  NULL,                                                    \
-	                                  (gpointer)(func),                                        \
-	                                  NULL)
-
-#define g_signal_handlers_block_by_data(instance, data)                                            \
-	g_signal_handlers_block_matched((instance),                                                \
-	                                (GSignalMatchType)(G_SIGNAL_MATCH_DATA),                   \
-	                                0,                                                         \
-	                                0,                                                         \
-	                                NULL,                                                      \
-	                                NULL,                                                      \
-	                                (data))
-
-#define g_signal_handlers_unblock_by_data(instance, data)                                          \
-	g_signal_handlers_unblock_matched((instance),                                              \
-	                                  (GSignalMatchType)(G_SIGNAL_MATCH_DATA),                 \
-	                                  0,                                                       \
-	                                  0,                                                       \
-	                                  NULL,                                                    \
-	                                  NULL,                                                    \
-	                                  (data))
-
-#define g_signal_handlers_disconnect_by_func_only(instance, func)                                  \
-	g_signal_handlers_disconnect_matched((instance),                                           \
-	                                     (GSignalMatchType)(G_SIGNAL_MATCH_FUNC),              \
-	                                     0,                                                    \
-	                                     0,                                                    \
-	                                     NULL,                                                 \
-	                                     (gpointer)(func),                                     \
-	                                     NULL)
-
-#endif // DEFINITIONS_H
diff -Nru -w vala-panel-appmenu-0.7.6+dfsg1/lib/dbusmenu-importer/importer.c vala-panel-appmenu-24.05+dfsg/lib/dbusmenu-importer/importer.c
--- vala-panel-appmenu-0.7.6+dfsg1/lib/dbusmenu-importer/importer.c	2020-10-28 22:08:48.000000000 +0100
+++ vala-panel-appmenu-24.05+dfsg/lib/dbusmenu-importer/importer.c	1970-01-01 01:00:00.000000000 +0100
@@ -1,255 +0,0 @@
-/*
- * vala-panel-appmenu
- * Copyright (C) 2018 Konstantin Pugin <ria.freelander@gmail.com>
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "importer.h"
-#include "dbusmenu-interface.h"
-#include "model.h"
-
-struct _DBusMenuImporter
-{
-	GObject parent_instance;
-	char *bus_name;
-	char *object_path;
-	ulong name_id;
-	GCancellable *cancellable;
-	DBusMenuXml *proxy;
-	DBusMenuModel *top_model;
-	GSimpleActionGroup *all_actions;
-};
-
-enum
-{
-	PROP_NULL,
-	PROP_BUS_NAME,
-	PROP_OBJECT_PATH,
-	PROP_MODEL,
-	PROP_ACTION_GROUP,
-	LAST_PROP
-};
-
-static GParamSpec *properties[LAST_PROP] = { NULL };
-G_DEFINE_TYPE(DBusMenuImporter, dbus_menu_importer, G_TYPE_OBJECT)
-
-static bool dbus_menu_importer_check(DBusMenuImporter *menu)
-{
-	if (DBUS_MENU_IS_XML(menu->proxy))
-		return dbus_menu_xml_get_version(menu->proxy) >= 2;
-	return false;
-}
-
-static void dbus_menu_importer_on_root_model_changed(GMenuModel *model, gint position, gint removed,
-                                                     gint added, gpointer user_data)
-{
-	DBusMenuImporter *menu = DBUS_MENU_IMPORTER(user_data);
-	g_object_notify_by_pspec(G_OBJECT(menu), properties[PROP_MODEL]);
-}
-
-static void proxy_ready_cb(GObject *source_object, GAsyncResult *res, gpointer user_data)
-{
-	g_autoptr(GError) error = NULL;
-	DBusMenuXml *proxy      = dbus_menu_xml_proxy_new_finish(res, &error);
-
-	if (g_error_matches(error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
-		return;
-
-	DBusMenuImporter *menu = DBUS_MENU_IMPORTER(user_data);
-	menu->proxy            = proxy;
-
-	if (error)
-	{
-		g_warning("%s", error->message);
-		return;
-	}
-	if (dbus_menu_importer_check(menu))
-		g_object_set(menu->top_model, "xml", proxy, NULL);
-	g_object_notify_by_pspec(G_OBJECT(menu), properties[PROP_MODEL]);
-}
-
-static void name_appeared_cb(GDBusConnection *connection, const char *name, const char *name_owner,
-                             gpointer user_data)
-{
-	DBusMenuImporter *menu = DBUS_MENU_IMPORTER(user_data);
-
-	dbus_menu_xml_proxy_new(connection,
-	                        G_DBUS_PROXY_FLAGS_NONE,
-	                        menu->bus_name,
-	                        menu->object_path,
-	                        menu->cancellable,
-	                        proxy_ready_cb,
-	                        menu);
-}
-
-static void name_vanished_cb(GDBusConnection *connection, const char *name, gpointer user_data)
-{
-	DBusMenuImporter *menu = DBUS_MENU_IMPORTER(user_data);
-
-	g_object_set(menu->top_model, "xml", NULL, NULL);
-	g_object_notify_by_pspec(G_OBJECT(menu), properties[PROP_MODEL]);
-	g_clear_object(&menu->proxy);
-}
-
-static void dbus_menu_importer_constructed(GObject *object)
-{
-	G_OBJECT_CLASS(dbus_menu_importer_parent_class)->constructed(object);
-	DBusMenuImporter *menu = DBUS_MENU_IMPORTER(object);
-
-	menu->name_id = g_bus_watch_name(G_BUS_TYPE_SESSION,
-	                                 menu->bus_name,
-	                                 G_BUS_NAME_WATCHER_FLAGS_NONE,
-	                                 name_appeared_cb,
-	                                 name_vanished_cb,
-	                                 menu,
-	                                 NULL);
-}
-
-static void dbus_menu_importer_dispose(GObject *object)
-{
-	DBusMenuImporter *menu = DBUS_MENU_IMPORTER(object);
-
-	if (menu->name_id > 0)
-	{
-		g_bus_unwatch_name(menu->name_id);
-		menu->name_id = 0;
-	}
-	g_cancellable_cancel(menu->cancellable);
-	g_clear_object(&menu->cancellable);
-	g_signal_handlers_disconnect_by_data(menu->top_model, menu);
-	g_clear_object(&menu->top_model);
-	g_clear_object(&menu->proxy);
-	g_clear_object(&menu->all_actions);
-
-	G_OBJECT_CLASS(dbus_menu_importer_parent_class)->dispose(object);
-}
-
-static void dbus_menu_importer_finalize(GObject *object)
-{
-	DBusMenuImporter *menu = DBUS_MENU_IMPORTER(object);
-
-	g_clear_pointer(&menu->bus_name, g_free);
-	g_clear_pointer(&menu->object_path, g_free);
-
-	G_OBJECT_CLASS(dbus_menu_importer_parent_class)->finalize(object);
-}
-
-static void dbus_menu_importer_set_property(GObject *object, guint property_id, const GValue *value,
-                                            GParamSpec *pspec)
-{
-	DBusMenuImporter *menu = DBUS_MENU_IMPORTER(object);
-
-	switch (property_id)
-	{
-	case PROP_BUS_NAME:
-		menu->bus_name = g_value_dup_string(value);
-		break;
-
-	case PROP_OBJECT_PATH:
-		menu->object_path = g_value_dup_string(value);
-		break;
-
-	default:
-		G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec);
-		break;
-	}
-}
-
-static void dbus_menu_importer_get_property(GObject *object, guint property_id, GValue *value,
-                                            GParamSpec *pspec)
-{
-	DBusMenuImporter *menu = DBUS_MENU_IMPORTER(object);
-	switch (property_id)
-	{
-	case PROP_MODEL:
-		g_value_set_object(value, menu->top_model);
-		break;
-	case PROP_ACTION_GROUP:
-		g_value_set_object(value, menu->all_actions);
-		break;
-
-	default:
-		G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec);
-		break;
-	}
-}
-
-static void install_properties(GObjectClass *object_class)
-{
-	properties[PROP_BUS_NAME] =
-	    g_param_spec_string("bus-name",
-	                        "bus-name",
-	                        "bus-name",
-	                        NULL,
-	                        G_PARAM_CONSTRUCT_ONLY | G_PARAM_WRITABLE | G_PARAM_STATIC_STRINGS);
-
-	properties[PROP_OBJECT_PATH] =
-	    g_param_spec_string("object-path",
-	                        "object-path",
-	                        "object-path",
-	                        NULL,
-	                        G_PARAM_CONSTRUCT_ONLY | G_PARAM_WRITABLE | G_PARAM_STATIC_STRINGS);
-	properties[PROP_MODEL] = g_param_spec_object("model",
-	                                             "model",
-	                                             "model",
-	                                             G_TYPE_MENU_MODEL,
-	                                             G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
-	properties[PROP_ACTION_GROUP] =
-	    g_param_spec_object("action-group",
-	                        "action-group",
-	                        "action-group",
-	                        G_TYPE_ACTION_GROUP,
-	                        G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
-
-	g_object_class_install_properties(object_class, LAST_PROP, properties);
-}
-
-static void dbus_menu_importer_class_init(DBusMenuImporterClass *menu_class)
-{
-	GObjectClass *object_class;
-
-	object_class = G_OBJECT_CLASS(menu_class);
-
-	object_class->constructed  = dbus_menu_importer_constructed;
-	object_class->dispose      = dbus_menu_importer_dispose;
-	object_class->finalize     = dbus_menu_importer_finalize;
-	object_class->set_property = dbus_menu_importer_set_property;
-	object_class->get_property = dbus_menu_importer_get_property;
-
-	install_properties(object_class);
-}
-
-static void dbus_menu_importer_init(DBusMenuImporter *menu)
-{
-	menu->proxy       = NULL;
-	menu->all_actions = g_simple_action_group_new();
-	menu->top_model =
-	    dbus_menu_model_new(0, NULL, menu->proxy, G_ACTION_GROUP(menu->all_actions));
-	g_signal_connect(menu->top_model,
-	                 "items-changed",
-	                 G_CALLBACK(dbus_menu_importer_on_root_model_changed),
-	                 menu);
-	menu->cancellable = g_cancellable_new();
-}
-
-DBusMenuImporter *dbus_menu_importer_new(const char *bus_name, const char *object_path)
-{
-	return g_object_new(dbus_menu_importer_get_type(),
-	                    "bus-name",
-	                    bus_name,
-	                    "object-path",
-	                    object_path,
-	                    NULL);
-}
diff -Nru -w vala-panel-appmenu-0.7.6+dfsg1/lib/dbusmenu-importer/importer-enums.c.template vala-panel-appmenu-24.05+dfsg/lib/dbusmenu-importer/importer-enums.c.template
--- vala-panel-appmenu-0.7.6+dfsg1/lib/dbusmenu-importer/importer-enums.c.template	2020-10-28 22:08:48.000000000 +0100
+++ vala-panel-appmenu-24.05+dfsg/lib/dbusmenu-importer/importer-enums.c.template	1970-01-01 01:00:00.000000000 +0100
@@ -1,88 +0,0 @@
-/*** BEGIN file-header ***/
-#include "importer-enums.h"
-
-/*** END file-header ***/
-
-/*** BEGIN file-production ***/
-/* enumerations from "@basename@" */
-#include "@basename@"
-
-/*** END file-production ***/
-
-/*** BEGIN value-header ***/
-GType
-@enum_name@_get_type (void)
-{
-	static GType the_type = 0;
-	
-	if (the_type == 0)
-	{
-		static const G@Type@Value values[] = {
-/*** END value-header ***/
-
-/*** BEGIN value-production ***/
-			{ @VALUENAME@,
-			  "@VALUENAME@",
-			  "@valuenick@" },
-/*** END value-production ***/
-
-/*** BEGIN value-tail ***/
-			{ 0, NULL, NULL }
-		};
-		the_type = g_@type@_register_static (
-				g_intern_static_string ("@EnumName@"),
-				values);
-	}
-	return the_type;
-}
-
-/**
-	@enum_name@_get_nick:
-	@value: The value of @EnumName@ to get the nick of
-
-	Looks up in the enum table for the nick of @value.
-
-	Return value: The nick for the given value or #NULL on error
-*/
-const gchar *
-@enum_name@_get_nick (@EnumName@ value)
-{
-	GEnumClass * class = G_ENUM_CLASS(g_type_class_ref(@enum_name@_get_type()));
-	g_return_val_if_fail(class != NULL, NULL);
-
-	const gchar * ret = NULL;
-	GEnumValue * val = g_enum_get_value(class, value);
-	if (val != NULL) {
-		ret = val->value_nick;
-	}
-
-	g_type_class_unref(class);
-	return ret;
-}
-
-/**
-	@enum_name@_get_value_from_nick:
-	@nick: The enum nick to lookup
-
-	Looks up in the enum table for the value of @nick.
-
-	Return value: The value for the given @nick
-*/
-@EnumName@
-@enum_name@_get_value_from_nick (const gchar * nick)
-{
-	GEnumClass * class = G_ENUM_CLASS(g_type_class_ref(@enum_name@_get_type()));
-	g_return_val_if_fail(class != NULL, 0);
-
-	@EnumName@ ret = 0;
-	GEnumValue * val = g_enum_get_value_by_nick(class, nick);
-	if (val != NULL) {
-		ret = val->value;
-	}
-
-	g_type_class_unref(class);
-	return ret;
-}
-
-/*** END value-tail ***/
-
diff -Nru -w vala-panel-appmenu-0.7.6+dfsg1/lib/dbusmenu-importer/importer-enums.h.template vala-panel-appmenu-24.05+dfsg/lib/dbusmenu-importer/importer-enums.h.template
--- vala-panel-appmenu-0.7.6+dfsg1/lib/dbusmenu-importer/importer-enums.h.template	2020-10-28 22:08:48.000000000 +0100
+++ vala-panel-appmenu-24.05+dfsg/lib/dbusmenu-importer/importer-enums.h.template	1970-01-01 01:00:00.000000000 +0100
@@ -1,32 +0,0 @@
-/*** BEGIN file-header ***/
-#ifndef IMPORTER_ENUM_TYPES_H
-#define IMPORTER_ENUM_TYPES_H
-
-#include <glib-object.h>
-
-G_BEGIN_DECLS
-
-/*** END file-header ***/
-
-/*** BEGIN file-production ***/
-/* Enumerations from "@basename@" */
-#include "@basename@"
-
-/*** END file-production ***/
-
-/*** BEGIN enumeration-production ***/
-
-#define DBUS_MENU_TYPE_@ENUMSHORT@	(@enum_name@_get_type())
-
-GType @enum_name@_get_type (void) G_GNUC_CONST;
-const gchar * @enum_name@_get_nick (@EnumName@ value) G_GNUC_CONST;
-@EnumName@ @enum_name@_get_value_from_nick (const gchar * nick) G_GNUC_CONST;
-
-/*** END enumeration-production ***/
-
-/*** BEGIN file-tail ***/
-G_END_DECLS
-
-#endif /* VALA_PANEL_ENUM_TYPES_H */
-/*** END file-tail ***/
-
diff -Nru -w vala-panel-appmenu-0.7.6+dfsg1/lib/dbusmenu-importer/importer.h vala-panel-appmenu-24.05+dfsg/lib/dbusmenu-importer/importer.h
--- vala-panel-appmenu-0.7.6+dfsg1/lib/dbusmenu-importer/importer.h	2020-10-28 22:08:48.000000000 +0100
+++ vala-panel-appmenu-24.05+dfsg/lib/dbusmenu-importer/importer.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,33 +0,0 @@
-/*
- * vala-panel-appmenu
- * Copyright (C) 2018 Konstantin Pugin <ria.freelander@gmail.com>
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef IMPORTER_H
-#define IMPORTER_H
-
-#include <gio/gio.h>
-#include <stdbool.h>
-
-G_BEGIN_DECLS
-
-G_DECLARE_FINAL_TYPE(DBusMenuImporter, dbus_menu_importer, DBUS_MENU, IMPORTER, GObject)
-
-DBusMenuImporter *dbus_menu_importer_new(const char *bus_name, const char *object_path);
-
-G_END_DECLS
-
-#endif
diff -Nru -w vala-panel-appmenu-0.7.6+dfsg1/lib/dbusmenu-importer/item.c vala-panel-appmenu-24.05+dfsg/lib/dbusmenu-importer/item.c
--- vala-panel-appmenu-0.7.6+dfsg1/lib/dbusmenu-importer/item.c	2020-10-28 22:08:48.000000000 +0100
+++ vala-panel-appmenu-24.05+dfsg/lib/dbusmenu-importer/item.c	1970-01-01 01:00:00.000000000 +0100
@@ -1,617 +0,0 @@
-/*
- * vala-panel-appmenu
- * Copyright (C) 2018 Konstantin Pugin <ria.freelander@gmail.com>
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include <stdbool.h>
-
-#include "dbusmenu-interface.h"
-#include "definitions.h"
-#include "item.h"
-#include "utils.h"
-
-#define ITEM_MAGIC 0xDEADBEEF
-#define item_set_magic(item) (item)->magic = GUINT_TO_POINTER(ITEM_MAGIC)
-#define item_check_magic(item) (GPOINTER_TO_UINT((item)->magic) == ITEM_MAGIC)
-
-#define submenu_str(en) ((en) ? G_MENU_LINK_SUBMENU : DBUS_MENU_DISABLED_SUBMENU)
-
-G_GNUC_INTERNAL void dbus_menu_item_free(gpointer data);
-G_GNUC_INTERNAL DBusMenuItem *dbus_menu_item_copy(DBusMenuItem *src);
-G_DEFINE_BOXED_TYPE(DBusMenuItem, dbus_menu_item, dbus_menu_item_copy, dbus_menu_item_free)
-#if 0
-#include "item-pixbuf.c"
-#endif
-
-static void act_props_try_update(DBusMenuItem *item);
-
-G_GNUC_INTERNAL DBusMenuItem *dbus_menu_item_new_first_section(u_int32_t id,
-                                                               GActionGroup *action_group)
-{
-	DBusMenuItem *item = g_slice_new0(DBusMenuItem);
-	item->id           = id;
-	item->action_type  = DBUS_MENU_ACTION_SECTION;
-	item->enabled      = false;
-	item->toggled      = false;
-	item->attrs =
-	    g_hash_table_new_full(g_str_hash, g_str_equal, g_free, (GDestroyNotify)g_variant_unref);
-	item->links = g_hash_table_new_full(g_str_hash, g_str_equal, NULL, g_object_unref);
-	item->ref_action_group = action_group;
-	item_set_magic(item);
-	return item;
-}
-
-G_GNUC_INTERNAL DBusMenuItem *dbus_menu_item_new(u_int32_t id, DBusMenuModel *parent_model,
-                                                 GVariant *props)
-{
-	DBusMenuItem *item = g_slice_new0(DBusMenuItem);
-	DBusMenuXml *xml;
-	GVariantIter iter;
-	const char *prop;
-	GVariant *value;
-	item_set_magic(item);
-	item->enabled = true;
-	item->toggled = false;
-	item->id      = id;
-	item->attrs =
-	    g_hash_table_new_full(g_str_hash, g_str_equal, g_free, (GDestroyNotify)g_variant_unref);
-	item->links = g_hash_table_new_full(g_str_hash, g_str_equal, NULL, g_object_unref);
-	g_object_get(parent_model, "action-group", &item->ref_action_group, "xml", &xml, NULL);
-	g_variant_iter_init(&iter, props);
-	// Iterate by immutable properties, it is construct_only
-	bool action_creator_found = false;
-	while (g_variant_iter_loop(&iter, "{&sv}", &prop, &value))
-	{
-		if (g_strcmp0(prop, DBUS_MENU_PROP_CHILDREN_DISPLAY) == 0)
-		{
-			if (value == NULL)
-			{
-				g_hash_table_remove(item->attrs, G_MENU_ATTRIBUTE_SUBMENU_ACTION);
-				continue;
-			}
-			else if (g_strcmp0(g_variant_get_string(value, NULL),
-			                   DBUS_MENU_CHILDREN_DISPLAY_SUBMENU) == 0)
-			{
-				item->action_type = DBUS_MENU_ACTION_SUBMENU;
-				g_autofree char *name =
-				    dbus_menu_action_get_name(id, item->action_type, true);
-				g_hash_table_insert(item->attrs,
-				                    g_strdup(G_MENU_ATTRIBUTE_SUBMENU_ACTION),
-				                    g_variant_new_string(name));
-				action_creator_found = true;
-			}
-		}
-		else if (g_strcmp0(prop, DBUS_MENU_PROP_TOGGLE_TYPE) == 0)
-		{
-			g_autofree char *name =
-			    dbus_menu_action_get_name(id, item->action_type, true);
-			if (g_strcmp0(g_variant_get_string(value, NULL),
-			              DBUS_MENU_TOGGLE_TYPE_CHECK) == 0)
-			{
-				item->action_type = DBUS_MENU_ACTION_CHECKMARK;
-				g_hash_table_insert(item->attrs,
-				                    g_strdup(G_MENU_ATTRIBUTE_ACTION),
-				                    g_variant_new_string(name));
-				action_creator_found = true;
-			}
-			else if (g_strcmp0(g_variant_get_string(value, NULL),
-			                   DBUS_MENU_TOGGLE_TYPE_RADIO) == 0)
-			{
-				item->action_type = DBUS_MENU_ACTION_RADIO;
-				g_hash_table_insert(item->attrs,
-				                    g_strdup(G_MENU_ATTRIBUTE_ACTION),
-				                    g_variant_new_string(name));
-				GVariant *vstr =
-				    g_variant_new_string(DBUS_MENU_ACTION_RADIO_SELECTED);
-				g_hash_table_insert(item->attrs,
-				                    g_strdup(G_MENU_ATTRIBUTE_TARGET),
-				                    g_variant_ref_sink(vstr));
-				action_creator_found = true;
-			}
-		}
-		else if (g_strcmp0(prop, DBUS_MENU_PROP_TYPE) == 0)
-		{
-			const char *type = g_variant_get_string(value, NULL);
-			if (!g_strcmp0(type, DBUS_MENU_TYPE_SEPARATOR))
-			{
-				item->action_type    = DBUS_MENU_ACTION_SECTION;
-				action_creator_found = true;
-			}
-			else if (!g_strcmp0(type, DBUS_MENU_TYPE_NORMAL))
-			{
-				item->action_type = DBUS_MENU_ACTION_NORMAL;
-				g_autofree char *name =
-				    dbus_menu_action_get_name(id, item->action_type, true);
-				g_hash_table_insert(item->attrs,
-				                    g_strdup(G_MENU_ATTRIBUTE_ACTION),
-				                    g_variant_new_string(name));
-				action_creator_found = true;
-			}
-		}
-		else if (g_strcmp0(prop, "x-kde-title") == 0)
-		{
-			item->action_type = DBUS_MENU_ACTION_SECTION;
-			g_hash_table_insert(item->attrs, g_strdup(G_MENU_ATTRIBUTE_LABEL), value);
-			action_creator_found = true;
-		}
-		else if (!action_creator_found)
-		{
-			item->action_type = DBUS_MENU_ACTION_NORMAL;
-			g_autofree char *name =
-			    dbus_menu_action_get_name(id, item->action_type, true);
-			g_hash_table_insert(item->attrs,
-			                    g_strdup(G_MENU_ATTRIBUTE_ACTION),
-			                    g_variant_new_string(name));
-			action_creator_found = true;
-		}
-	}
-	if (item->action_type != DBUS_MENU_ACTION_SECTION)
-		g_hash_table_insert(item->attrs,
-		                    g_strdup(G_MENU_ATTRIBUTE_LABEL),
-		                    g_variant_new_string(""));
-	dbus_menu_item_update_props(item, props);
-	return item;
-}
-
-G_GNUC_INTERNAL void dbus_menu_item_free(gpointer data)
-{
-	DBusMenuItem *item = (DBusMenuItem *)data;
-	if (item == NULL)
-		return;
-	item->magic = NULL;
-	g_clear_pointer(&item->attrs, g_hash_table_destroy);
-	g_clear_pointer(&item->links, g_hash_table_destroy);
-	g_clear_object(&item->ref_action);
-	g_slice_free(DBusMenuItem, data);
-}
-
-G_GNUC_INTERNAL DBusMenuItem *dbus_menu_item_copy(DBusMenuItem *src)
-{
-	DBusMenuItem *dst     = g_slice_new0(DBusMenuItem);
-	dst->id               = src->id;
-	dst->action_type      = src->action_type;
-	dst->enabled          = src->enabled;
-	dst->toggled          = src->toggled;
-	dst->ref_action       = G_ACTION(g_object_ref(src->ref_action));
-	dst->ref_action_group = src->ref_action_group;
-	dst->attrs            = g_hash_table_ref(src->attrs);
-	dst->links            = g_hash_table_ref(src->links);
-	return dst;
-}
-
-static bool attr_update_checked(DBusMenuItem *item, const char *key, GVariant *value)
-{
-	GVariant *old  = (GVariant *)g_hash_table_lookup(item->attrs, key);
-	bool are_equal = false;
-	if (old != NULL)
-		are_equal = g_variant_equal(old, value);
-	if (!are_equal)
-	{
-		g_hash_table_insert(item->attrs, g_strdup(key), g_variant_ref_sink(value));
-		return true;
-	}
-	return false;
-}
-
-G_GNUC_INTERNAL bool dbus_menu_item_is_firefox_stub(DBusMenuItem *item)
-{
-	const char *hidden_when =
-	    (const char *)g_hash_table_lookup(item->attrs, G_MENU_ATTRIBUTE_HIDDEN_WHEN);
-	const char *action =
-	    (const char *)g_hash_table_lookup(item->attrs, G_MENU_ATTRIBUTE_ACTION);
-	const char *label = (const char *)g_hash_table_lookup(item->attrs, G_MENU_ATTRIBUTE_LABEL);
-	if (!g_strcmp0(hidden_when, G_MENU_HIDDEN_WHEN_ACTION_MISSING) &&
-	    !g_strcmp0(action, DBUS_MENU_DISABLED_ACTION) && !g_strcmp0(label, "Label Empty"))
-		return true;
-	return false;
-}
-
-G_GNUC_INTERNAL void dbus_menu_item_preload(DBusMenuItem *item)
-{
-	if (!item_check_magic(item))
-		return;
-	if (item->action_type != DBUS_MENU_ACTION_SUBMENU)
-		return;
-	int id;
-	DBusMenuXml *xml = NULL;
-	bool need_update;
-	DBusMenuModel *submenu =
-	    DBUS_MENU_MODEL(g_hash_table_lookup(item->links, submenu_str(item->enabled)));
-	if (!submenu || !DBUS_MENU_IS_MODEL(submenu))
-		return;
-	g_object_get(submenu, "parent-id", &id, "xml", &xml, NULL);
-	if (!xml || !DBUS_MENU_IS_XML(xml))
-		return;
-	dbus_menu_xml_call_event_sync(xml,
-	                              id,
-	                              "opened",
-	                              g_variant_new("v", g_variant_new_int32(0)),
-	                              CURRENT_TIME,
-	                              NULL,
-	                              NULL);
-	dbus_menu_xml_call_about_to_show_sync(xml, id, (gboolean *)&need_update, NULL, NULL);
-	need_update = need_update || dbus_menu_model_is_layout_update_required(submenu);
-	if (need_update)
-		dbus_menu_model_update_layout(submenu);
-}
-
-G_GNUC_INTERNAL bool dbus_menu_item_copy_attrs(DBusMenuItem *src, DBusMenuItem *dst)
-{
-	GHashTableIter iter;
-	g_hash_table_iter_init(&iter, src->attrs);
-	bool is_updated = false;
-	char *key;
-	GVariant *value;
-	while (g_hash_table_iter_next(&iter, (void **)&key, (void **)&value))
-	{
-		is_updated = attr_update_checked(dst, key, value) || is_updated;
-	}
-	return is_updated;
-}
-
-G_GNUC_INTERNAL bool dbus_menu_item_update_enabled(DBusMenuItem *item, bool enabled)
-{
-	bool updated = false;
-	if (item->action_type == DBUS_MENU_ACTION_SUBMENU && !item->toggled)
-	{
-		DBusMenuModel *submenu =
-		    DBUS_MENU_MODEL(g_hash_table_lookup(item->links, submenu_str(item->enabled)));
-		if (item->enabled != enabled)
-		{
-			if (submenu != NULL)
-			{
-				g_object_ref(submenu);
-				g_hash_table_remove(item->links, submenu_str(item->enabled));
-				g_hash_table_insert(item->links, submenu_str(enabled), submenu);
-			}
-			if (enabled)
-			{
-				g_hash_table_remove(item->attrs, G_MENU_ATTRIBUTE_ACTION);
-			}
-			else
-			{
-				g_hash_table_insert(item->attrs,
-				                    g_strdup(G_MENU_ATTRIBUTE_ACTION),
-				                    g_variant_new_string(
-				                        DBUS_MENU_DISABLED_ACTION));
-			}
-			updated = true;
-		}
-	}
-	item->enabled = enabled;
-	act_props_try_update(item);
-	return updated;
-}
-
-static void act_props_try_update(DBusMenuItem *item)
-{
-	if (!G_IS_ACTION(item->ref_action))
-		return;
-	g_simple_action_set_enabled(G_SIMPLE_ACTION(item->ref_action), item->enabled);
-	if (item->action_type == DBUS_MENU_ACTION_RADIO)
-	{
-		dbus_menu_action_lock(item->ref_action);
-		g_action_change_state((item->ref_action),
-		                      g_variant_new_string(
-		                          item->toggled ? DBUS_MENU_ACTION_RADIO_SELECTED
-		                                        : DBUS_MENU_ACTION_RADIO_UNSELECTED));
-		dbus_menu_action_unlock(item->ref_action);
-	}
-	else if (item->action_type == DBUS_MENU_ACTION_CHECKMARK)
-	{
-		dbus_menu_action_lock(item->ref_action);
-		g_action_change_state((item->ref_action), g_variant_new_boolean(item->toggled));
-		dbus_menu_action_unlock(item->ref_action);
-	}
-}
-
-static bool dbus_menu_item_update_shortcut(DBusMenuItem *item, GVariant *value)
-{
-	GString *new_accel_string = g_string_new(NULL);
-	if (g_variant_n_children(value) != 1)
-		g_debug("Unable to parse shortcut correctly, too many keys. Taking first.");
-
-	GVariantIter iter;
-	GVariant *child = g_variant_get_child_value(value, 0);
-	g_variant_iter_init(&iter, child);
-	char *string;
-
-	while (g_variant_iter_loop(&iter, "s", &string))
-	{
-		if (g_strcmp0(string, DBUS_MENU_SHORTCUT_CONTROL) == 0)
-			g_string_append(new_accel_string, DBUS_MENUMODEL_SHORTCUT_CONTROL);
-		else if (g_strcmp0(string, DBUS_MENU_SHORTCUT_ALT) == 0)
-			g_string_append(new_accel_string, DBUS_MENUMODEL_SHORTCUT_ALT);
-		else if (g_strcmp0(string, DBUS_MENU_SHORTCUT_SHIFT) == 0)
-			g_string_append(new_accel_string, DBUS_MENUMODEL_SHORTCUT_SHIFT);
-		else if (g_strcmp0(string, DBUS_MENU_SHORTCUT_SUPER) == 0)
-			g_string_append(new_accel_string, DBUS_MENUMODEL_SHORTCUT_SUPER);
-		else
-			g_string_append(new_accel_string, string);
-	}
-	g_variant_unref(child);
-	g_autofree char *str = g_string_free(new_accel_string, false);
-	GVariant *new_accel  = g_variant_new_string(str);
-	bool updated         = attr_update_checked(item, G_MENU_ATTRIBUTE_ACCEL, new_accel);
-	if (!updated)
-		g_variant_unref(new_accel);
-	return updated;
-}
-
-G_GNUC_INTERNAL bool dbus_menu_item_update_props(DBusMenuItem *item, GVariant *props)
-{
-	GVariantIter iter;
-	const char *prop;
-	GVariant *value;
-	bool properties_is_updated = false;
-
-	g_variant_iter_init(&iter, props);
-	while (g_variant_iter_loop(&iter, "{&sv}", &prop, &value))
-	{
-		if (g_strcmp0(prop, "accessible-desc") == 0)
-		{
-			// TODO: Can we supported this property?
-			// properties_is_updated = true;
-		}
-		else if (g_strcmp0(prop, "enabled") == 0)
-		{
-			bool enabled = g_variant_get_boolean(value);
-			properties_is_updated =
-			    dbus_menu_item_update_enabled(item, enabled) || properties_is_updated;
-		}
-#if 0
-		else if (g_strcmp0(prop, "icon-data") == 0)
-		{
-			// icon-name has more priority
-            if (!g_hash_table_lookup(item->attrs, G_MENU_ATTRIBUTE_ICON))
-			{
-				g_autoptr(GIcon) icon = g_icon_new_pixbuf_from_variant(value);
-				GVariant *value       = g_icon_serialize(icon);
-				properties_is_updated =
-				    properties_is_updated ||
-                    attr_update_checked(item,
-				                                       G_MENU_ATTRIBUTE_ICON,
-				                                       value);
-				properties_is_updated =
-				    properties_is_updated ||
-                    attr_update_checked(item,
-				                                       G_MENU_ATTRIBUTE_VERB_ICON,
-				                                       value);
-			}
-		}
-		else if (g_strcmp0(prop, "icon-name") == 0)
-		{
-			g_autoptr(GIcon) icon =
-			    g_themed_icon_new(g_variant_get_string(value, NULL));
-			GVariant *value             = g_icon_serialize(icon);
-			g_autoptr(GVariant) boolvar = g_variant_new_boolean(true);
-			properties_is_updated =
-			    properties_is_updated ||
-                attr_update_checked(item, G_MENU_ATTRIBUTE_ICON, value);
-			properties_is_updated =
-			    properties_is_updated ||
-                attr_update_checked(item,
-			                                       G_MENU_ATTRIBUTE_VERB_ICON,
-			                                       value);
-			properties_is_updated =
-			    properties_is_updated ||
-                attr_update_checked(item, HAS_ICON_NAME, boolvar);
-		}
-#endif
-		else if (g_strcmp0(prop, "label") == 0)
-		{
-			properties_is_updated =
-			    attr_update_checked(item, G_MENU_ATTRIBUTE_LABEL, value) ||
-			    properties_is_updated;
-		}
-		else if (g_strcmp0(prop, "shortcut") == 0)
-		{
-			properties_is_updated =
-			    dbus_menu_item_update_shortcut(item, value) || properties_is_updated;
-		}
-		else if (g_strcmp0(prop, "toggle-state") == 0)
-		{
-			item->toggled = g_variant_get_int32(value) > 0;
-			act_props_try_update(item);
-		}
-		else if (g_strcmp0(prop, "visible") == 0)
-		{
-			bool vis = g_variant_get_boolean(value);
-			if (item->action_type == DBUS_MENU_ACTION_SECTION)
-			{
-				item->toggled = !vis;
-			}
-			else if (vis)
-			{
-				g_autofree char *name =
-				    dbus_menu_action_get_name(item->id, item->action_type, true);
-				bool found =
-				    g_hash_table_remove(item->attrs, G_MENU_ATTRIBUTE_HIDDEN_WHEN);
-				if (found)
-				{
-					g_hash_table_insert(item->attrs,
-					                    g_strdup(G_MENU_ATTRIBUTE_ACTION),
-					                    g_variant_new_string(name));
-					properties_is_updated = true;
-				}
-			}
-			else
-			{
-				bool found = g_hash_table_contains(item->attrs,
-				                                   G_MENU_ATTRIBUTE_HIDDEN_WHEN);
-				if (!found)
-				{
-					g_hash_table_insert(item->attrs,
-					                    g_strdup(G_MENU_ATTRIBUTE_HIDDEN_WHEN),
-					                    g_variant_new_string(
-					                        G_MENU_HIDDEN_WHEN_ACTION_MISSING));
-					g_hash_table_insert(item->attrs,
-					                    g_strdup(G_MENU_ATTRIBUTE_ACTION),
-					                    g_variant_new_string(
-					                        DBUS_MENU_DISABLED_ACTION));
-					properties_is_updated = true;
-				}
-			}
-		}
-		else
-		{
-			g_debug("updating unsupported property - '%s'", prop);
-		}
-	}
-	return properties_is_updated;
-}
-
-G_GNUC_INTERNAL bool dbus_menu_item_remove_props(DBusMenuItem *item, GVariant *props)
-{
-	GVariantIter iter;
-	const char *prop;
-	bool properties_is_updated = false;
-
-	g_variant_iter_init(&iter, props);
-	while (g_variant_iter_next(&iter, "&s", &prop))
-	{
-		if (g_strcmp0(prop, "accessible-desc") == 0)
-		{
-			// TODO: Can we support this property?
-			// properties_is_updated = true;
-		}
-		else if (g_strcmp0(prop, "enabled") == 0)
-		{
-			bool enabled = true;
-			dbus_menu_item_update_enabled(item, enabled);
-		}
-		else if (g_strcmp0(prop, "icon-name") == 0)
-		{
-			if (g_hash_table_lookup(item->attrs, HAS_ICON_NAME))
-			{
-				g_hash_table_remove(item->attrs, G_MENU_ATTRIBUTE_ICON);
-				g_hash_table_remove(item->attrs, G_MENU_ATTRIBUTE_VERB_ICON);
-				g_hash_table_remove(item->attrs, HAS_ICON_NAME);
-				properties_is_updated = true;
-			}
-		}
-		else if (g_strcmp0(prop, "icon-data") == 0)
-		{
-			if (!g_hash_table_lookup(item->attrs, HAS_ICON_NAME))
-			{
-				g_hash_table_remove(item->attrs, G_MENU_ATTRIBUTE_ICON);
-				g_hash_table_remove(item->attrs, G_MENU_ATTRIBUTE_VERB_ICON);
-				properties_is_updated = true;
-			}
-		}
-		else if (g_strcmp0(prop, "label") == 0)
-		{
-			g_hash_table_remove(item->attrs, G_MENU_ATTRIBUTE_LABEL);
-			properties_is_updated = true;
-		}
-		else if (g_strcmp0(prop, "shortcut") == 0)
-		{
-			g_hash_table_remove(item->attrs, G_MENU_ATTRIBUTE_ACCEL);
-			properties_is_updated = true;
-		}
-		else if (g_strcmp0(prop, "visible") == 0)
-		{
-			g_autofree char *name =
-			    dbus_menu_action_get_name(item->id, item->action_type, false);
-			g_hash_table_remove(item->attrs, G_MENU_ATTRIBUTE_HIDDEN_WHEN);
-			g_hash_table_insert(item->attrs,
-			                    g_strdup(G_MENU_ATTRIBUTE_ACTION),
-			                    g_variant_new_string(name));
-			properties_is_updated = true;
-		}
-		else
-		{
-			g_debug("removing unsupported property - '%s'", prop);
-		}
-	}
-	return properties_is_updated;
-}
-
-G_GNUC_INTERNAL int dbus_menu_item_compare_func(const DBusMenuItem *a, const DBusMenuItem *b,
-                                                gpointer user_data)
-{
-	return b->id - a->id;
-}
-
-G_GNUC_INTERNAL int dbus_menu_item_id_compare_func(const DBusMenuItem *a, gconstpointer b,
-                                                   gpointer user_data)
-{
-	return GPOINTER_TO_UINT(b) - a->id;
-}
-
-G_GNUC_INTERNAL bool dbus_menu_item_compare_immutable(DBusMenuItem *a, DBusMenuItem *b)
-{
-	if (a->id != b->id)
-		return false;
-	if (a->ref_action_group != b->ref_action_group)
-		return false;
-	if (a->action_type != b->action_type)
-		return false;
-	return true;
-}
-
-static bool dbus_menu_item_is_submenu(DBusMenuItem *item)
-{
-	if (!item)
-		return false;
-	if (item->action_type != DBUS_MENU_ACTION_SUBMENU)
-		return false;
-	return true;
-}
-
-G_GNUC_INTERNAL void dbus_menu_item_copy_submenu(DBusMenuItem *src, DBusMenuItem *dst,
-                                                 DBusMenuModel *parent)
-{
-	DBusMenuXml *xml;
-	DBusMenuModel *submenu = NULL;
-	g_object_get(parent, "xml", &xml, NULL);
-	if (!dbus_menu_item_is_submenu(src))
-	{
-		if (dst->action_type == DBUS_MENU_ACTION_SUBMENU)
-		{
-			if (dst->toggled)
-				dst->enabled = true;
-			submenu = dbus_menu_model_new(dst->id, parent, xml, dst->ref_action_group);
-			g_hash_table_insert(dst->links, submenu_str(dst->enabled), submenu);
-		}
-		return;
-	}
-	if (dst->action_type == DBUS_MENU_ACTION_SUBMENU &&
-	    src->action_type == DBUS_MENU_ACTION_SUBMENU)
-	{
-		if (src->toggled || dst->toggled)
-			dst->enabled = dst->toggled = true;
-		submenu =
-		    DBUS_MENU_MODEL(g_hash_table_lookup(src->links, submenu_str(src->enabled)));
-		g_hash_table_insert(dst->links, submenu_str(dst->enabled), g_object_ref(submenu));
-		g_object_set(submenu, "parent-id", dst->id, NULL);
-	}
-}
-
-G_GNUC_INTERNAL void dbus_menu_item_generate_action(DBusMenuItem *item, DBusMenuModel *parent)
-{
-	if (item->action_type == DBUS_MENU_ACTION_SECTION)
-		return;
-	DBusMenuXml *xml;
-	DBusMenuModel *submenu = g_hash_table_lookup(item->links, submenu_str(item->enabled));
-	g_object_get(parent, "xml", &xml, NULL);
-	item->ref_action = dbus_menu_action_reference(item->id,
-	                                              xml,
-	                                              submenu,
-	                                              G_ACTION_MAP(item->ref_action_group),
-	                                              item->action_type);
-	act_props_try_update(item);
-}
diff -Nru -w vala-panel-appmenu-0.7.6+dfsg1/lib/dbusmenu-importer/item.h vala-panel-appmenu-24.05+dfsg/lib/dbusmenu-importer/item.h
--- vala-panel-appmenu-0.7.6+dfsg1/lib/dbusmenu-importer/item.h	2020-10-28 22:08:48.000000000 +0100
+++ vala-panel-appmenu-24.05+dfsg/lib/dbusmenu-importer/item.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,81 +0,0 @@
-/*
- * vala-panel-appmenu
- * Copyright (C) 2018 Konstantin Pugin <ria.freelander@gmail.com>
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef ITEM_H
-#define ITEM_H
-
-#include <gio/gio.h>
-#include <stdbool.h>
-
-#include "dbusmenu-interface.h"
-#include "definitions.h"
-#include "model.h"
-
-G_BEGIN_DECLS
-
-typedef struct
-{
-	int section_num;
-	int place;
-	u_int32_t id;
-	GActionGroup *ref_action_group;
-	// FIXME: Cannot have activatable submenu item.
-	GAction *ref_action;
-	GHashTable *attrs;
-	GHashTable *links;
-	DBusMenuActionType action_type;
-	bool enabled;
-	bool toggled;
-	gpointer magic;
-} DBusMenuItem;
-
-G_GNUC_INTERNAL DBusMenuItem *dbus_menu_item_new(u_int32_t id, DBusMenuModel *parent_model,
-                                                 GVariant *props);
-G_GNUC_INTERNAL DBusMenuItem *dbus_menu_item_new_first_section(u_int32_t id,
-                                                               GActionGroup *action_group);
-
-G_GNUC_INTERNAL void dbus_menu_item_free(gpointer data);
-
-G_GNUC_INTERNAL bool dbus_menu_item_update_enabled(DBusMenuItem *item, bool enabled);
-
-G_GNUC_INTERNAL bool dbus_menu_item_update_props(DBusMenuItem *item, GVariant *props);
-
-G_GNUC_INTERNAL bool dbus_menu_item_remove_props(DBusMenuItem *item, GVariant *props);
-
-G_GNUC_INTERNAL bool dbus_menu_item_compare_immutable(DBusMenuItem *a, DBusMenuItem *b);
-
-G_GNUC_INTERNAL bool dbus_menu_item_copy_attributes(DBusMenuItem *src, DBusMenuItem *dst);
-
-G_GNUC_INTERNAL bool dbus_menu_item_is_firefox_stub(DBusMenuItem *item);
-
-G_GNUC_INTERNAL void dbus_menu_item_copy_submenu(DBusMenuItem *src, DBusMenuItem *dst,
-                                                 DBusMenuModel *parent);
-
-G_GNUC_INTERNAL void dbus_menu_item_generate_action(DBusMenuItem *item, DBusMenuModel *parent);
-
-G_GNUC_INTERNAL void dbus_menu_item_preload(DBusMenuItem *item);
-
-G_GNUC_INTERNAL int dbus_menu_item_id_compare_func(const DBusMenuItem *a, gconstpointer b,
-                                                   gpointer user_data);
-
-G_GNUC_INTERNAL int dbus_menu_item_compare_func(const DBusMenuItem *a, const DBusMenuItem *b,
-                                                gpointer user_data);
-
-G_END_DECLS
-
-#endif // ITEM_H
diff -Nru -w vala-panel-appmenu-0.7.6+dfsg1/lib/dbusmenu-importer/item-pixbuf.c vala-panel-appmenu-24.05+dfsg/lib/dbusmenu-importer/item-pixbuf.c
--- vala-panel-appmenu-0.7.6+dfsg1/lib/dbusmenu-importer/item-pixbuf.c	2020-10-28 22:08:48.000000000 +0100
+++ vala-panel-appmenu-24.05+dfsg/lib/dbusmenu-importer/item-pixbuf.c	1970-01-01 01:00:00.000000000 +0100
@@ -1,22 +0,0 @@
-#include <gdk-pixbuf/gdk-pixbuf.h>
-#include <gio/gio.h>
-
-G_GNUC_INTERNAL GIcon *g_icon_new_pixbuf_from_variant(GVariant *variant)
-{
-	gsize length;
-	const unsigned char *data =
-	    (const unsigned char *)g_variant_get_fixed_array(variant, &length, sizeof(guchar));
-	if (length == 0)
-		return NULL;
-
-	g_autoptr(GInputStream) stream = g_memory_input_stream_new_from_data(data, length, NULL);
-	if (stream == NULL)
-		return NULL;
-
-	g_autoptr(GError) error = NULL;
-	GdkPixbuf *pixbuf       = gdk_pixbuf_new_from_stream(stream, NULL, &error);
-	if (error != NULL)
-		g_warning("Unable to build GdkPixbuf from icon data: %s", error->message);
-
-	return G_ICON(pixbuf);
-}
diff -Nru -w vala-panel-appmenu-0.7.6+dfsg1/lib/dbusmenu-importer/meson.build vala-panel-appmenu-24.05+dfsg/lib/dbusmenu-importer/meson.build
--- vala-panel-appmenu-0.7.6+dfsg1/lib/dbusmenu-importer/meson.build	2020-10-28 22:08:48.000000000 +0100
+++ vala-panel-appmenu-24.05+dfsg/lib/dbusmenu-importer/meson.build	1970-01-01 01:00:00.000000000 +0100
@@ -1,40 +0,0 @@
-imp_sources = files(
-    'definitions.h',
-    'debug.c',
-    'debug.h',
-    'item.c',
-    'item.h',
-    'importer.c',
-    'importer.h',
-    'model.h',
-    'model.c',
-    'section.c',
-    'section.h',
-    'utils.c',
-    'utils.h'
-    )
-imp_headers = files('definitions.h')
-enum = 'importer-enums'
-importer_enums_gen = gnome.mkenums(
-  enum,
-  sources: imp_headers,
-  c_template: enum + '.c.template',
-  h_template: enum + '.h.template',
-)
-imp_dbus = gnome.gdbus_codegen(
-    'dbusmenu-interface',
-    sources: 'com.canonical.dbusmenu.xml',
-    interface_prefix: 'com.canonical',
-    autocleanup: 'all',
-    namespace: 'DBusMenu'
-)
-
-importer_lib = static_library('importer',imp_sources, importer_enums_gen, imp_dbus,
-    dependencies: [giounix, gdkpixbuf],
-    pic : true
-)
-importer_inc = include_directories('.')
-importer_dep = declare_dependency(
-        include_directories: importer_inc,
-        link_whole: importer_lib
-)
diff -Nru -w vala-panel-appmenu-0.7.6+dfsg1/lib/dbusmenu-importer/model.c vala-panel-appmenu-24.05+dfsg/lib/dbusmenu-importer/model.c
--- vala-panel-appmenu-0.7.6+dfsg1/lib/dbusmenu-importer/model.c	2020-10-28 22:08:48.000000000 +0100
+++ vala-panel-appmenu-24.05+dfsg/lib/dbusmenu-importer/model.c	1970-01-01 01:00:00.000000000 +0100
@@ -1,820 +0,0 @@
-/*
- * vala-panel-appmenu
- * Copyright (C) 2018 Konstantin Pugin <ria.freelander@gmail.com>
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include <inttypes.h>
-
-#include "debug.h"
-#include "definitions.h"
-#include "item.h"
-#include "model.h"
-#include "section.h"
-
-struct _DBusMenuModel
-{
-	GMenuModel parent_instance;
-
-	uint parent_id;
-	uint current_revision;
-	GCancellable *cancellable;
-	DBusMenuXml *xml;
-	GActionGroup *received_action_group;
-	GSequence *items;
-	bool layout_update_required;
-	bool layout_update_in_progress;
-};
-
-static const char *property_names[] = { "accessible-desc",
-	                                "children-display",
-	                                "disposition",
-	                                "enabled",
-	                                "icon-data",
-	                                "icon-name",
-	                                "label",
-	                                "shortcut",
-	                                "toggle-type",
-	                                "toggle-state",
-	                                "type",
-	                                "visible",
-	                                NULL };
-enum
-{
-	PROP_NULL         = 0,
-	PROP_XML          = 1,
-	PROP_ACTION_GROUP = 2,
-	PROP_PARENT_ID    = 3,
-	NUM_PROPS
-};
-
-static GParamSpec *properties[NUM_PROPS] = { NULL };
-
-static DBusMenuItem *dbus_menu_model_find(DBusMenuModel *menu, uint item_id);
-static DBusMenuItem *dbus_menu_model_find_section(DBusMenuModel *menu, uint section_num);
-static GSequenceIter *dbus_menu_model_find_place(DBusMenuModel *menu, uint section_num, int place);
-
-G_DEFINE_TYPE(DBusMenuModel, dbus_menu_model, G_TYPE_MENU_MODEL)
-
-static gint dbus_menu_model_get_n_items(GMenuModel *model)
-{
-	DBusMenuModel *menu      = (DBusMenuModel *)(model);
-	GSequenceIter *last_iter = g_sequence_iter_prev(g_sequence_get_end_iter(menu->items));
-	DBusMenuItem *last       = g_sequence_get(last_iter);
-	return last->section_num + 1;
-}
-
-static void dbus_menu_model_get_item_attributes(GMenuModel *model, gint position,
-                                                GHashTable **table)
-{
-	DBusMenuModel *menu = DBUS_MENU_MODEL(model);
-	for (GSequenceIter *iter = g_sequence_get_begin_iter(menu->items);
-	     !g_sequence_iter_is_end(iter);
-	     iter = g_sequence_iter_next(iter))
-	{
-		DBusMenuItem *item = (DBusMenuItem *)g_sequence_get(iter);
-		if (item->section_num == position && item->place == -1)
-		{
-			*table = g_hash_table_ref(item->attrs);
-			return;
-		}
-	}
-}
-
-static void dbus_menu_model_get_item_links(GMenuModel *model, gint position, GHashTable **table)
-{
-	DBusMenuModel *menu = DBUS_MENU_MODEL(model);
-	for (GSequenceIter *iter = g_sequence_get_begin_iter(menu->items);
-	     !g_sequence_iter_is_end(iter);
-	     iter = g_sequence_iter_next(iter))
-	{
-		DBusMenuItem *item = (DBusMenuItem *)g_sequence_get(iter);
-		if (item->section_num == position && item->place == -1)
-		{
-			*table = g_hash_table_ref(item->links);
-			return;
-		}
-	}
-}
-
-static int dbus_menu_model_is_mutable(GMenuModel *model)
-{
-	return true;
-}
-
-struct layout_data
-{
-	GMenuModel *model;
-	int section_num;
-	uint pos;
-	uint old_num;
-	uint new_num;
-};
-
-GSequence *dbus_menu_model_items(DBusMenuModel *model)
-{
-	return model->items;
-}
-
-int queue_compare_func(const struct layout_data *a, const struct layout_data *b)
-{
-	if (a->model != b->model)
-		return DBUS_MENU_IS_MODEL(a->model) ? -1 : 1;
-	else if (a->old_num != b->old_num)
-		return b->old_num - a->old_num;
-	else if (a->new_num != b->new_num)
-		return b->new_num - a->new_num;
-	else if (a->pos != b->pos)
-		return b->pos - a->pos;
-	return 0;
-}
-
-static int dbus_menu_model_sort_func(gconstpointer a, gconstpointer b,
-                                     G_GNUC_UNUSED void *user_data)
-{
-	DBusMenuItem *aitem = (DBusMenuItem *)a;
-	DBusMenuItem *bitem = (DBusMenuItem *)b;
-
-	if (bitem->section_num != aitem->section_num)
-		return aitem->section_num - bitem->section_num;
-
-	return aitem->place - bitem->place;
-}
-
-static void add_signal_to_queue(DBusMenuModel *model, GQueue *queue, int sect_num, int pos,
-                                int removed, int added)
-{
-	struct layout_data *data = g_new0(struct layout_data, 1);
-	if (sect_num >= 0)
-	{
-		DBusMenuItem *item = dbus_menu_model_find_section(model, sect_num);
-		data->model = G_MENU_MODEL(g_hash_table_lookup(item->links, G_MENU_LINK_SECTION));
-	}
-	else
-	{
-		data->model = G_MENU_MODEL(model);
-	}
-	data->section_num = sect_num;
-	data->pos         = pos;
-	data->old_num     = removed;
-	data->new_num     = added;
-	gpointer l        = g_queue_find_custom(queue, data, (GCompareFunc)queue_compare_func);
-	if (!l)
-		g_queue_push_head(queue, data);
-}
-
-static bool queue_emit_all(GQueue *queue)
-{
-	struct layout_data *index = NULL;
-	while ((index = (struct layout_data *)g_queue_pop_head(queue)))
-	{
-		g_menu_model_items_changed(index->model,
-		                           index->pos,
-		                           index->old_num,
-		                           index->new_num);
-		g_free(index);
-	}
-	return G_SOURCE_REMOVE;
-}
-
-static bool preload_idle(DBusMenuItem *item)
-{
-	dbus_menu_item_preload(item);
-	return G_SOURCE_REMOVE;
-}
-
-static void menu_item_copy_and_load(DBusMenuModel *menu, DBusMenuItem *old, DBusMenuItem *new_item)
-{
-	dbus_menu_item_copy_submenu(old, new_item, menu);
-	dbus_menu_item_generate_action(new_item, menu);
-	// It is a preload hack. If this is a toplevel menu, we need to fetch menu under toplevel to
-	// avoid menu jumping bug. Now we need to use it for all menus - no menus are preloaded,
-	// AFAIK
-	dbus_menu_item_update_enabled(new_item, true);
-	new_item->toggled = true;
-	g_timeout_add_full(100, 300, (GSourceFunc)preload_idle, new_item, NULL);
-}
-
-// We deal only with layouts with depth 1 (not all)
-static void layout_parse(DBusMenuModel *menu, GVariant *layout)
-{
-	guint id;
-	GVariant *props;
-	GVariant *items;
-	if (!g_variant_is_of_type(layout, G_VARIANT_TYPE("(ia{sv}av)")))
-	{
-		g_warning(
-		    "Type of return value for 'layout' property in "
-		    "'GetLayout' call should be '(ia{sv}av)' but got '%s'",
-		    g_variant_get_type_string(layout));
-
-		return;
-	}
-	if (menu->layout_update_in_progress)
-		return;
-	menu->layout_update_required    = false;
-	menu->layout_update_in_progress = true;
-	g_variant_get(layout, "(i@a{sv}@av)", &id, &props, &items);
-	g_variant_unref(props);
-	g_autoptr(GQueue) signal_queue = g_queue_new();
-	GVariantIter iter;
-	GVariant *child;
-	// Start parsing. We need to track section number, and also GSequenceIter to
-	// current section. Also we track change position, number of added and removed
-	// items for current section
-	uint section_num            = 0;
-	uint place                  = 0;
-	uint old_sections           = g_menu_model_get_n_items(G_MENU_MODEL(menu));
-	uint added                  = 0;
-	int change_pos              = -1;
-	GSequenceIter *current_iter = g_sequence_get_begin_iter(menu->items);
-	g_variant_iter_init(&iter, items);
-	while ((child = g_variant_iter_next_value(&iter)))
-	{
-		GVariant *value = g_variant_get_variant(child);
-		guint cid;
-		GVariant *cprops;
-		GVariant *citems;
-		g_variant_get(value, "(i@a{sv}@av)", &cid, &cprops, &citems);
-		g_variant_unref(citems);
-
-		DBusMenuItem *old      = NULL;
-		DBusMenuItem *new_item = dbus_menu_item_new(cid, menu, cprops);
-		// We receive a section (separator or x-kde-title)
-		if (new_item->action_type == DBUS_MENU_ACTION_SECTION)
-		{
-			bool is_valid_section = !new_item->toggled && place > 0;
-			// Section is valid, so, parse it
-			if (is_valid_section)
-			{
-				// Do some common tasks: increment section_num and iter
-				++section_num;
-				place--;
-				new_item->section_num = section_num;
-				new_item->place       = -1;
-				GSequenceIter *old_iter =
-				    g_sequence_lookup(menu->items,
-				                      new_item,
-				                      dbus_menu_model_sort_func,
-				                      NULL);
-				if (!old_iter)
-				{
-					g_hash_table_insert(
-					    new_item->links,
-					    G_MENU_LINK_SECTION,
-					    dbus_menu_section_model_new(menu, section_num));
-					old_iter =
-					    g_sequence_insert_sorted(menu->items,
-					                             new_item,
-					                             dbus_menu_model_sort_func,
-					                             NULL);
-				}
-				else
-					dbus_menu_item_free(new_item);
-				old =
-				    (DBusMenuItem *)g_sequence_get(g_sequence_iter_prev(old_iter));
-				int delta                 = old->place - place;
-				GSequenceIter *place_iter = g_sequence_iter_move(old_iter, -delta);
-				// Cleanup all items in prev section (if there is more items than
-				// current)
-				if (delta > 0)
-					g_sequence_remove_range(place_iter, old_iter);
-				// If we already have this section in old layout, and items to this
-				// section was added and/or removed, we add a signal to signal_queue
-				// about this change. Else do nothing, section signal will do it for
-				// us
-				if ((delta > 0 || added > 0) && section_num <= old_sections)
-				{
-					add_signal_to_queue(menu,
-					                    signal_queue,
-					                    section_num - 1,
-					                    change_pos < 0 ? place + 1 : change_pos,
-					                    MAX(0, delta),
-					                    MAX(0, added));
-				}
-				// Update current_section and reset current_iter and added to new
-				// section
-				current_iter = g_sequence_iter_next(old_iter);
-				added        = 0;
-				change_pos   = -1;
-				place        = 0;
-			}
-			// If section was invalid, just free received item.
-			else
-				dbus_menu_item_free(new_item);
-		}
-		else if (!dbus_menu_item_is_firefox_stub(new_item))
-		{
-			new_item->section_num   = section_num;
-			new_item->place         = place;
-			GSequenceIter *old_iter = g_sequence_lookup(menu->items,
-			                                            new_item,
-			                                            dbus_menu_model_sort_func,
-			                                            NULL);
-			// There is no old item on this place
-			if (!old_iter)
-			{
-				if (!added)
-					change_pos = change_pos < 0 ? place : change_pos;
-				menu_item_copy_and_load(menu, NULL, new_item);
-				current_iter = g_sequence_insert_sorted(menu->items,
-				                                        new_item,
-				                                        dbus_menu_model_sort_func,
-				                                        NULL);
-				added++;
-			}
-			// If there is an old item exists, we need to check this properties
-			else
-			{
-				old = (DBusMenuItem *)g_sequence_get(old_iter);
-				// We should compare properties of old and new item
-				bool diff    = !dbus_menu_item_compare_immutable(old, new_item);
-				bool updated = dbus_menu_item_update_props(old, cprops);
-				if (diff)
-				{
-					// Immutable properties was different, replace menu item
-					menu_item_copy_and_load(menu, old, new_item);
-					g_sequence_remove(old_iter);
-					current_iter =
-					    g_sequence_insert_sorted(menu->items,
-					                             new_item,
-					                             dbus_menu_model_sort_func,
-					                             NULL);
-				}
-				else
-				{
-					// Just free unneeded item
-					dbus_menu_item_free(new_item);
-				}
-				// If item was updated - add a signal to queue about it, but only if
-				// section was in old layout
-				if ((diff || updated) && section_num < old_sections)
-				{
-					add_signal_to_queue(menu,
-					                    signal_queue,
-					                    section_num,
-					                    place,
-					                    1,
-					                    1);
-				}
-			}
-			current_iter = g_sequence_iter_next(current_iter);
-			place++;
-		}
-		else
-			// Just free unnedede item
-			dbus_menu_item_free(new_item);
-		g_variant_unref(cprops);
-		g_variant_unref(value);
-		g_variant_unref(child);
-	}
-	section_num++;
-	int secdiff = old_sections - section_num;
-	if (secdiff > 0)
-	{
-		GSequenceIter *section_iter = dbus_menu_model_find_place(menu, section_num, -1);
-		g_sequence_remove_range(section_iter, g_sequence_get_end_iter(menu->items));
-	}
-	// We need to manage last section's changes. And check its validity
-	if (secdiff >= 0)
-	{
-		place--;
-		DBusMenuItem *old = (DBusMenuItem *)g_sequence_get(
-		    g_sequence_iter_prev(g_sequence_get_end_iter(menu->items)));
-		int delta                 = old->place - place;
-		GSequenceIter *last_iter  = g_sequence_get_end_iter(menu->items);
-		GSequenceIter *place_iter = g_sequence_iter_move(last_iter, -delta);
-
-		// Cleanup all items in prev section (if there is more items than
-		// current)
-		if (delta > 0)
-			g_sequence_remove_range(place_iter, last_iter);
-		// If section number is not changed, emit a signal about last section.
-		// Because if we emit it and section will be a part of sections signal, this can
-		// duplicate menu items
-		if ((delta > 0 || added > 0))
-		{
-			add_signal_to_queue(menu,
-			                    signal_queue,
-			                    section_num - 1,
-			                    change_pos < 0 ? place + 1 : change_pos,
-			                    MAX(0, delta),
-			                    MAX(0, added));
-		}
-	}
-	// If sections was changed, add change signal to queue
-	if (secdiff != 0)
-	{
-		add_signal_to_queue(menu,
-		                    signal_queue,
-		                    -1,
-		                    MIN(old_sections, section_num),
-		                    (secdiff) > 0 ? ABS(secdiff) : 0,
-		                    (secdiff) < 0 ? ABS(secdiff) : 0);
-	}
-	g_variant_unref(items);
-	// Emit all signals from queus by LIFO order
-	queue_emit_all(signal_queue);
-}
-
-static void get_layout_cb(GObject *source_object, GAsyncResult *res, gpointer user_data)
-{
-	g_autoptr(GVariant) layout = NULL;
-	guint revision;
-	if (!DBUS_MENU_IS_MODEL(user_data))
-		return;
-	DBusMenuModel *menu     = DBUS_MENU_MODEL(user_data);
-	g_autoptr(GError) error = NULL;
-	dbus_menu_xml_call_get_layout_finish((DBusMenuXml *)(source_object),
-	                                     &revision,
-	                                     &layout,
-	                                     res,
-	                                     &error);
-	if (error != NULL)
-	{
-		if (!g_error_matches(error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
-			g_warning("%s", error->message);
-		return;
-	}
-	layout_parse(menu, layout);
-	menu->layout_update_in_progress = false;
-	if (menu->layout_update_required)
-		dbus_menu_model_update_layout(menu);
-}
-
-static void dbus_menu_update_item_properties_from_layout_sync(DBusMenuModel *menu,
-                                                              DBusMenuItem *item, int sect_n,
-                                                              int pos)
-{
-	g_return_if_fail(DBUS_MENU_IS_MODEL(menu));
-	g_autoptr(GVariant) props      = NULL;
-	g_autoptr(GVariant) items      = NULL;
-	g_autoptr(GVariant) layout     = NULL;
-	g_autoptr(GError) error        = NULL;
-	g_autoptr(GQueue) signal_queue = g_queue_new();
-	guint id, revision;
-	dbus_menu_xml_call_get_layout_sync(menu->xml,
-	                                   item->id,
-	                                   0,
-	                                   property_names,
-	                                   &revision,
-	                                   &layout,
-	                                   menu->cancellable,
-	                                   &error);
-	if (error != NULL)
-	{
-		if (!g_error_matches(error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
-			g_warning("%s", error->message);
-		return;
-	}
-	g_variant_get(layout, "(i@a{sv}@av)", &id, &props, &items);
-	bool is_item_updated = dbus_menu_item_update_props(item, props);
-	if (is_item_updated)
-		add_signal_to_queue(menu, signal_queue, sect_n, pos, 1, 1);
-	queue_emit_all(signal_queue);
-}
-
-G_GNUC_INTERNAL void dbus_menu_model_update_layout_sync(DBusMenuModel *menu)
-{
-	g_return_if_fail(DBUS_MENU_IS_MODEL(menu));
-	g_autoptr(GVariant) layout = NULL;
-	g_autoptr(GError) error    = NULL;
-	guint revision;
-	if (menu->layout_update_in_progress)
-		menu->layout_update_required = true;
-	else
-		dbus_menu_xml_call_get_layout_sync(menu->xml,
-		                                   menu->parent_id,
-		                                   1,
-		                                   property_names,
-		                                   &revision,
-		                                   &layout,
-		                                   menu->cancellable,
-		                                   &error);
-	if (error != NULL)
-	{
-		if (!g_error_matches(error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
-			g_warning("%s", error->message);
-		return;
-	}
-	layout_parse(menu, layout);
-	menu->layout_update_in_progress = false;
-	if (menu->layout_update_required)
-		dbus_menu_model_update_layout_sync(menu);
-}
-
-G_GNUC_INTERNAL void dbus_menu_model_update_layout(DBusMenuModel *menu)
-{
-	g_return_if_fail(DBUS_MENU_IS_MODEL(menu));
-	if (menu->layout_update_in_progress)
-		menu->layout_update_required = true;
-	else
-		dbus_menu_xml_call_get_layout(menu->xml,
-		                              menu->parent_id,
-		                              1,
-		                              property_names,
-		                              menu->cancellable,
-		                              get_layout_cb,
-		                              menu);
-}
-
-static void layout_updated_cb(DBusMenuXml *proxy, guint revision, gint parent, DBusMenuModel *menu)
-{
-	if (!DBUS_MENU_IS_XML(proxy))
-		return;
-	if (((uint)parent == menu->parent_id) && menu->current_revision < revision)
-	{
-		g_debug("Remote attempt to update %u with rev %u\n", parent, revision);
-		dbus_menu_model_update_layout(menu);
-		menu->current_revision = revision;
-		return;
-	}
-	DBusMenuItem *item = dbus_menu_model_find(menu, (uint)parent);
-	if (item != NULL)
-		dbus_menu_update_item_properties_from_layout_sync(menu,
-		                                                  item,
-		                                                  item->section_num,
-		                                                  item->place);
-}
-
-static void item_activation_requested_cb(DBusMenuXml *proxy, gint id, guint timestamp,
-                                         DBusMenuModel *menu)
-{
-	if (!DBUS_MENU_IS_XML(proxy))
-		return;
-	g_autofree char *ordinary_name = g_strdup_printf(ACTION_PREFIX "%u", id);
-	g_action_group_activate_action(menu->received_action_group, ordinary_name, NULL);
-	g_debug("activation requested: id - %d, timestamp - %d", id, timestamp);
-}
-
-static void items_properties_loop(DBusMenuModel *menu, GVariant *up_props, GQueue *signal_queue,
-                                  bool is_removal)
-{
-	GVariantIter iter;
-	guint id;
-	GVariant *props;
-	g_variant_iter_init(&iter, up_props);
-	while (g_variant_iter_loop(&iter, !is_removal ? "(i@a{sv})" : "(i@as)", &id, &props))
-	{
-		DBusMenuItem *item   = (DBusMenuItem *)dbus_menu_model_find(menu, id);
-		bool is_item_updated = false;
-		if (item != NULL)
-		{
-			// It is the best what we can do to update a section
-			if (item->action_type == DBUS_MENU_ACTION_SECTION)
-			{
-				//                            dbus_menu_model_update_layout(menu);
-			}
-			else
-			{
-				is_item_updated = !is_removal
-				                      ? dbus_menu_item_update_props(item, props)
-				                      : dbus_menu_item_remove_props(item, props);
-				if (is_item_updated)
-					add_signal_to_queue(menu,
-					                    signal_queue,
-					                    item->section_num,
-					                    item->place,
-					                    1,
-					                    1);
-			}
-		}
-	}
-}
-
-static void items_properties_updated_cb(DBusMenuXml *proxy, GVariant *updated_props,
-                                        GVariant *removed_props, DBusMenuModel *menu)
-{
-	if (!DBUS_MENU_IS_XML(proxy))
-		return;
-	if (menu->layout_update_in_progress == true)
-		return;
-	g_autoptr(GQueue) signal_queue = g_queue_new();
-	items_properties_loop(menu, updated_props, signal_queue, false);
-	items_properties_loop(menu, removed_props, signal_queue, true);
-	queue_emit_all(signal_queue);
-}
-
-static void on_xml_property_changed(DBusMenuModel *model)
-{
-	if (!DBUS_MENU_IS_XML(model->xml))
-		return;
-	g_signal_connect(model->xml,
-	                 "items-properties-updated",
-	                 G_CALLBACK(items_properties_updated_cb),
-	                 model);
-	g_signal_connect(model->xml, "layout-updated", G_CALLBACK(layout_updated_cb), model);
-	g_signal_connect(model->xml,
-	                 "item-activation-requested",
-	                 G_CALLBACK(item_activation_requested_cb),
-	                 model);
-	if (model->parent_id == 0)
-		dbus_menu_model_update_layout(model);
-}
-
-G_GNUC_INTERNAL DBusMenuModel *dbus_menu_model_new(uint parent_id, DBusMenuModel *parent,
-                                                   DBusMenuXml *xml, GActionGroup *action_group)
-{
-	DBusMenuModel *ret = (DBusMenuModel *)g_object_new(dbus_menu_model_get_type(),
-	                                                   "parent-id",
-	                                                   parent_id,
-	                                                   "xml",
-	                                                   xml,
-	                                                   "action-group",
-	                                                   action_group,
-	                                                   NULL);
-	if (parent != NULL)
-		g_object_bind_property(parent, "xml", ret, "xml", G_BINDING_SYNC_CREATE);
-	return ret;
-}
-
-static void dbus_menu_model_set_property(GObject *object, guint property_id, const GValue *value,
-                                         GParamSpec *pspec)
-{
-	DBusMenuModel *menu = (DBusMenuModel *)(object);
-	void *old_xml       = menu->xml;
-
-	switch (property_id)
-	{
-	case PROP_XML:
-		menu->xml = DBUS_MENU_XML(g_value_get_object(value));
-		if (menu->xml != NULL && old_xml != menu->xml)
-		{
-			if (old_xml != NULL)
-				g_signal_handlers_disconnect_by_data(old_xml, menu);
-			on_xml_property_changed(menu);
-		}
-		break;
-	case PROP_ACTION_GROUP:
-		menu->received_action_group = G_ACTION_GROUP(g_value_get_object(value));
-		break;
-	case PROP_PARENT_ID:
-		menu->layout_update_required = true;
-		menu->parent_id              = g_value_get_uint(value);
-		break;
-	default:
-		G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec);
-		break;
-	}
-}
-
-static void dbus_menu_model_get_property(GObject *object, guint property_id, GValue *value,
-                                         GParamSpec *pspec)
-{
-	DBusMenuModel *menu;
-
-	menu = (DBusMenuModel *)(object);
-
-	switch (property_id)
-	{
-	case PROP_XML:
-		g_value_set_object(value, menu->xml);
-		break;
-	case PROP_PARENT_ID:
-		g_value_set_uint(value, menu->parent_id);
-		break;
-	case PROP_ACTION_GROUP:
-		g_value_set_object(value, menu->received_action_group);
-		break;
-	default:
-		G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec);
-		break;
-	}
-}
-
-G_GNUC_INTERNAL bool dbus_menu_model_is_layout_update_required(DBusMenuModel *model)
-{
-	return model->layout_update_required;
-}
-
-G_GNUC_INTERNAL void dbus_menu_model_set_layout_update_required(DBusMenuModel *model, bool required)
-{
-	model->layout_update_required = required;
-}
-
-static DBusMenuItem *dbus_menu_model_find(DBusMenuModel *menu, uint item_id)
-{
-	for (GSequenceIter *iter = g_sequence_get_begin_iter(menu->items);
-	     !g_sequence_iter_is_end(iter);
-	     iter = g_sequence_iter_next(iter))
-	{
-		DBusMenuItem *item = (DBusMenuItem *)g_sequence_get(iter);
-		if (item->id == item_id)
-			return item;
-	}
-	return NULL;
-}
-
-static GSequenceIter *dbus_menu_model_find_place(DBusMenuModel *menu, uint section_num, int place)
-{
-	for (GSequenceIter *iter = g_sequence_get_begin_iter(menu->items);
-	     !g_sequence_iter_is_end(iter);
-	     iter = g_sequence_iter_next(iter))
-	{
-		DBusMenuItem *item = (DBusMenuItem *)g_sequence_get(iter);
-		if (item->section_num == section_num && item->place == place)
-			return iter;
-	}
-	return NULL;
-}
-
-static DBusMenuItem *dbus_menu_model_find_section(DBusMenuModel *menu, uint section_num)
-{
-	return (DBusMenuItem *)g_sequence_get(dbus_menu_model_find_place(menu, section_num, -1));
-}
-
-static void dbus_menu_model_init(DBusMenuModel *menu)
-{
-	menu->cancellable               = g_cancellable_new();
-	menu->parent_id                 = UINT_MAX;
-	menu->items                     = g_sequence_new(dbus_menu_item_free);
-	menu->layout_update_required    = true;
-	menu->layout_update_in_progress = false;
-	menu->current_revision          = 0;
-}
-
-static void dbus_menu_model_constructed(GObject *object)
-{
-	G_OBJECT_CLASS(dbus_menu_model_parent_class)->constructed(object);
-	DBusMenuModel *menu = DBUS_MENU_MODEL(object);
-
-	DBusMenuItem *first_section =
-	    dbus_menu_item_new_first_section(menu->parent_id, menu->received_action_group);
-	first_section->section_num = 0;
-	first_section->place       = -1;
-	g_hash_table_insert(first_section->links,
-	                    G_MENU_LINK_SECTION,
-	                    dbus_menu_section_model_new(menu, 0));
-	g_sequence_insert_sorted(menu->items, first_section, dbus_menu_model_sort_func, NULL);
-}
-
-static void dbus_menu_model_finalize(GObject *object)
-{
-	DBusMenuModel *menu = (DBusMenuModel *)(object);
-	if (menu->xml)
-		g_signal_handlers_disconnect_by_data(menu->xml, menu);
-	g_cancellable_cancel(menu->cancellable);
-	g_clear_object(&menu->cancellable);
-	g_clear_pointer(&menu->items, g_sequence_free);
-
-	G_OBJECT_CLASS(dbus_menu_model_parent_class)->finalize(object);
-}
-
-static void install_properties(GObjectClass *object_class)
-{
-	properties[PROP_XML] =
-	    g_param_spec_object("xml",
-	                        "xml",
-	                        "xml",
-	                        dbus_menu_xml_get_type(),
-	                        (GParamFlags)(G_PARAM_CONSTRUCT | G_PARAM_READABLE |
-	                                      G_PARAM_WRITABLE | G_PARAM_STATIC_STRINGS));
-
-	properties[PROP_ACTION_GROUP] =
-	    g_param_spec_object("action-group",
-	                        "action-group",
-	                        "action-group",
-	                        g_action_group_get_type(),
-	                        (GParamFlags)(G_PARAM_CONSTRUCT_ONLY | G_PARAM_WRITABLE |
-	                                      G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
-	properties[PROP_PARENT_ID] =
-	    g_param_spec_uint("parent-id",
-	                      "parent-id",
-	                      "parent-id",
-	                      0,
-	                      UINT_MAX,
-	                      0,
-	                      (GParamFlags)(G_PARAM_CONSTRUCT | G_PARAM_WRITABLE |
-	                                    G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
-
-	g_object_class_install_properties(object_class, NUM_PROPS, properties);
-}
-
-static void dbus_menu_model_class_init(DBusMenuModelClass *klass)
-{
-	GMenuModelClass *model_class = G_MENU_MODEL_CLASS(klass);
-	GObjectClass *object_class   = G_OBJECT_CLASS(klass);
-
-	object_class->finalize     = dbus_menu_model_finalize;
-	object_class->set_property = dbus_menu_model_set_property;
-	object_class->get_property = dbus_menu_model_get_property;
-	object_class->constructed  = dbus_menu_model_constructed;
-
-	model_class->is_mutable          = dbus_menu_model_is_mutable;
-	model_class->get_n_items         = dbus_menu_model_get_n_items;
-	model_class->get_item_attributes = dbus_menu_model_get_item_attributes;
-	model_class->get_item_links      = dbus_menu_model_get_item_links;
-	install_properties(object_class);
-}
diff -Nru -w vala-panel-appmenu-0.7.6+dfsg1/lib/dbusmenu-importer/model.h vala-panel-appmenu-24.05+dfsg/lib/dbusmenu-importer/model.h
--- vala-panel-appmenu-0.7.6+dfsg1/lib/dbusmenu-importer/model.h	2020-10-28 22:08:48.000000000 +0100
+++ vala-panel-appmenu-24.05+dfsg/lib/dbusmenu-importer/model.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,41 +0,0 @@
-/*
- * vala-panel-appmenu
- * Copyright (C) 2018 Konstantin Pugin <ria.freelander@gmail.com>
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef MODEL_H
-#define MODEL_H
-
-#include "dbusmenu-interface.h"
-#include <gio/gio.h>
-#include <stdbool.h>
-
-G_BEGIN_DECLS
-
-G_DECLARE_FINAL_TYPE(DBusMenuModel, dbus_menu_model, DBUS_MENU, MODEL, GMenuModel)
-G_GNUC_INTERNAL DBusMenuModel *dbus_menu_model_new(uint parent_id, DBusMenuModel *parent,
-                                                   DBusMenuXml *xml, GActionGroup *action_group);
-G_GNUC_INTERNAL void dbus_menu_model_update_layout(DBusMenuModel *menu);
-G_GNUC_INTERNAL void dbus_menu_model_update_layout_sync(DBusMenuModel *menu);
-G_GNUC_INTERNAL bool dbus_menu_model_is_layout_update_required(DBusMenuModel *model);
-G_GNUC_INTERNAL void dbus_menu_model_set_layout_update_required(DBusMenuModel *model,
-                                                                bool required);
-
-G_GNUC_INTERNAL GSequence *dbus_menu_model_items(DBusMenuModel *model);
-
-G_END_DECLS
-
-#endif
diff -Nru -w vala-panel-appmenu-0.7.6+dfsg1/lib/dbusmenu-importer/section.c vala-panel-appmenu-24.05+dfsg/lib/dbusmenu-importer/section.c
--- vala-panel-appmenu-0.7.6+dfsg1/lib/dbusmenu-importer/section.c	2020-10-28 22:08:48.000000000 +0100
+++ vala-panel-appmenu-24.05+dfsg/lib/dbusmenu-importer/section.c	1970-01-01 01:00:00.000000000 +0100
@@ -1,195 +0,0 @@
-/*
- * vala-panel-appmenu
- * Copyright (C) 2018 Konstantin Pugin <ria.freelander@gmail.com>
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "section.h"
-#include "item.h"
-enum
-{
-	PROP_NULL          = 0,
-	PROP_PARENT_MODEL  = 1,
-	PROP_SECTION_INDEX = 2,
-	NUM_PROPS
-};
-
-static GParamSpec *properties[NUM_PROPS] = { NULL };
-
-G_DEFINE_TYPE(DBusMenuSectionModel, dbus_menu_section_model, G_TYPE_MENU_MODEL)
-
-static int dbus_menu_section_model_is_mutable(GMenuModel *model)
-{
-	return true;
-}
-
-static gint dbus_menu_section_model_get_n_items(GMenuModel *model)
-{
-	DBusMenuSectionModel *menu = DBUS_MENU_SECTION_MODEL(model);
-	GSequence *items           = dbus_menu_model_items(menu->parent_model);
-	int begin = 0, end = -1;
-	for (GSequenceIter *iter = g_sequence_get_begin_iter(items); !g_sequence_iter_is_end(iter);
-	     iter                = g_sequence_iter_next(iter))
-	{
-		DBusMenuItem *item = (DBusMenuItem *)g_sequence_get(iter);
-		if (item->section_num == menu->section_index && item->place == -1)
-			begin = g_sequence_iter_get_position(iter);
-		end = g_sequence_iter_get_position(iter);
-		if (item->section_num == menu->section_index + 1 && item->place == -1)
-		{
-			end--;
-			break;
-		}
-	}
-	return end - begin;
-}
-
-static void dbus_menu_section_model_get_item_attributes(GMenuModel *model, gint position,
-                                                        GHashTable **table)
-{
-	DBusMenuSectionModel *menu = DBUS_MENU_SECTION_MODEL(model);
-	GSequence *items           = dbus_menu_model_items(menu->parent_model);
-	for (GSequenceIter *iter = g_sequence_get_begin_iter(items); !g_sequence_iter_is_end(iter);
-	     iter                = g_sequence_iter_next(iter))
-	{
-		DBusMenuItem *item = (DBusMenuItem *)g_sequence_get(iter);
-		if (item->section_num == menu->section_index && item->place == position)
-		{
-			*table = g_hash_table_ref(item->attrs);
-			return;
-		}
-	}
-}
-
-static void dbus_menu_section_model_get_item_links(GMenuModel *model, gint position,
-                                                   GHashTable **table)
-{
-	DBusMenuSectionModel *menu = DBUS_MENU_SECTION_MODEL(model);
-	GSequence *items           = dbus_menu_model_items(menu->parent_model);
-	for (GSequenceIter *iter = g_sequence_get_begin_iter(items); !g_sequence_iter_is_end(iter);
-	     iter                = g_sequence_iter_next(iter))
-	{
-		DBusMenuItem *item = (DBusMenuItem *)g_sequence_get(iter);
-		if (item->section_num == menu->section_index && item->place == position)
-		{
-			if (g_hash_table_contains(item->links, G_MENU_LINK_SECTION))
-				g_warning("Item has section, but should not\n");
-			*table = g_hash_table_ref(item->links);
-			return;
-		}
-	}
-}
-static void dbus_menu_section_model_init(DBusMenuSectionModel *menu)
-{
-	menu->parent_model = NULL;
-}
-
-static void dbus_menu_section_model_finalize(GObject *object)
-{
-	G_OBJECT_CLASS(dbus_menu_section_model_parent_class)->finalize(object);
-}
-
-static void install_properties(GObjectClass *object_class)
-{
-	properties[PROP_PARENT_MODEL] =
-	    g_param_spec_object("parent-model",
-	                        "parent-model",
-	                        "parent-model",
-	                        dbus_menu_model_get_type(),
-	                        (GParamFlags)(G_PARAM_CONSTRUCT_ONLY | G_PARAM_READABLE |
-	                                      G_PARAM_WRITABLE | G_PARAM_STATIC_STRINGS));
-
-	properties[PROP_SECTION_INDEX] =
-	    g_param_spec_uint("section-index",
-	                      "section-index",
-	                      "section-index",
-	                      0,
-	                      UINT_MAX,
-	                      0,
-	                      (GParamFlags)(G_PARAM_CONSTRUCT_ONLY | G_PARAM_WRITABLE |
-	                                    G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
-
-	g_object_class_install_properties(object_class, NUM_PROPS, properties);
-}
-
-static void dbus_menu_section_model_set_property(GObject *object, guint property_id,
-                                                 const GValue *value, GParamSpec *pspec)
-{
-	DBusMenuSectionModel *menu = DBUS_MENU_SECTION_MODEL(object);
-
-	switch (property_id)
-	{
-	case PROP_PARENT_MODEL:
-		menu->parent_model = DBUS_MENU_MODEL(g_value_get_object(value));
-		break;
-	case PROP_SECTION_INDEX:
-		menu->section_index = g_value_get_uint(value);
-		break;
-	default:
-		G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec);
-		break;
-	}
-}
-
-static void dbus_menu_section_model_get_property(GObject *object, guint property_id, GValue *value,
-                                                 GParamSpec *pspec)
-{
-	DBusMenuSectionModel *menu = DBUS_MENU_SECTION_MODEL(object);
-
-	switch (property_id)
-	{
-	case PROP_PARENT_MODEL:
-		g_value_set_object(value, menu->parent_model);
-		break;
-	case PROP_SECTION_INDEX:
-		g_value_set_uint(value, menu->section_index);
-		break;
-	default:
-		G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec);
-		break;
-	}
-}
-
-static void dbus_menu_section_model_constructed(GObject *object)
-{
-	G_OBJECT_CLASS(dbus_menu_section_model_parent_class)->constructed(object);
-}
-
-static void dbus_menu_section_model_class_init(DBusMenuSectionModelClass *klass)
-{
-	GMenuModelClass *model_class = G_MENU_MODEL_CLASS(klass);
-	GObjectClass *object_class   = G_OBJECT_CLASS(klass);
-
-	object_class->finalize     = dbus_menu_section_model_finalize;
-	object_class->set_property = dbus_menu_section_model_set_property;
-	object_class->get_property = dbus_menu_section_model_get_property;
-	object_class->constructed  = dbus_menu_section_model_constructed;
-
-	model_class->is_mutable          = dbus_menu_section_model_is_mutable;
-	model_class->get_n_items         = dbus_menu_section_model_get_n_items;
-	model_class->get_item_attributes = dbus_menu_section_model_get_item_attributes;
-	model_class->get_item_links      = dbus_menu_section_model_get_item_links;
-	install_properties(object_class);
-}
-
-DBusMenuSectionModel *dbus_menu_section_model_new(DBusMenuModel *parent, int section_index)
-{
-	return DBUS_MENU_SECTION_MODEL(g_object_new(dbus_menu_section_model_get_type(),
-	                                            "parent-model",
-	                                            parent,
-	                                            "section-index",
-	                                            section_index,
-	                                            NULL));
-}
diff -Nru -w vala-panel-appmenu-0.7.6+dfsg1/lib/dbusmenu-importer/section.h vala-panel-appmenu-24.05+dfsg/lib/dbusmenu-importer/section.h
--- vala-panel-appmenu-0.7.6+dfsg1/lib/dbusmenu-importer/section.h	2020-10-28 22:08:48.000000000 +0100
+++ vala-panel-appmenu-24.05+dfsg/lib/dbusmenu-importer/section.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,42 +0,0 @@
-/*
- * vala-panel-appmenu
- * Copyright (C) 2018 Konstantin Pugin <ria.freelander@gmail.com>
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef SECTION_H
-#define SECTION_H
-
-#include "model.h"
-#include <gio/gio.h>
-
-G_BEGIN_DECLS
-
-G_DECLARE_FINAL_TYPE(DBusMenuSectionModel, dbus_menu_section_model, DBUS_MENU, SECTION_MODEL,
-                     GMenuModel)
-
-struct _DBusMenuSectionModel
-{
-	GMenuModel parent_instance;
-
-	DBusMenuModel *parent_model;
-	uint section_index;
-};
-
-DBusMenuSectionModel *dbus_menu_section_model_new(DBusMenuModel *parent, int section_index);
-
-G_END_DECLS
-
-#endif // SECTION_H
diff -Nru -w vala-panel-appmenu-0.7.6+dfsg1/lib/dbusmenu-importer/test.c vala-panel-appmenu-24.05+dfsg/lib/dbusmenu-importer/test.c
--- vala-panel-appmenu-0.7.6+dfsg1/lib/dbusmenu-importer/test.c	2020-10-28 22:08:48.000000000 +0100
+++ vala-panel-appmenu-24.05+dfsg/lib/dbusmenu-importer/test.c	1970-01-01 01:00:00.000000000 +0100
@@ -1,79 +0,0 @@
-/*
- * vala-panel-appmenu
- * Copyright (C) 2018 Konstantin Pugin <ria.freelander@gmail.com>
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include "debug.h"
-#include "importer.h"
-#include <gtk/gtk.h>
-#include <stdbool.h>
-
-void on_importer_model_changed(GObject *obj, GParamSpec *pspec, gpointer data)
-{
-	DBusMenuImporter *importer = (DBusMenuImporter *)obj;
-	GMenuModel *model;
-	GActionGroup *action_group;
-	g_object_get(importer, "model", &model, "action-group", &action_group, NULL);
-	if (GTK_IS_MENU_SHELL(data))
-	{
-		GtkMenuShell *menubar = GTK_MENU_SHELL(data);
-		gtk_widget_insert_action_group(menubar, "dbusmenu", action_group);
-		gtk_menu_shell_bind_model(menubar, model, NULL, true);
-	}
-	else if (GTK_IS_MENU_BUTTON(data))
-	{
-		GtkMenuButton *btn = GTK_MENU_BUTTON(data);
-		GtkMenu *popover   = gtk_popover_new_from_model(btn, model);
-		gtk_widget_insert_action_group(popover, "dbusmenu", action_group);
-		gtk_menu_button_set_popover(btn, popover);
-	}
-}
-
-int main(int argc, char *argv[])
-{
-	gtk_init(&argc, &argv);
-
-	GtkWindow *window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
-	gtk_window_set_position(GTK_WINDOW(window), GTK_WIN_POS_CENTER);
-	gtk_window_set_default_size(GTK_WINDOW(window), 1000, 1000);
-	gtk_window_set_title(GTK_WINDOW(window), "Submenu");
-
-	GtkBox *vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
-	gtk_container_add(GTK_CONTAINER(window), vbox);
-
-	GtkMenuBar *menubar = gtk_menu_bar_new();
-	GtkMenuButton *menu = gtk_menu_button_new();
-	//	DBusMenuImporter *importer = dbus_menu_importer_new("org.krusader", "/MenuBar/2");
-	DBusMenuImporter *importer = dbus_menu_importer_new(":1.250", "/MenuBar/1");
-	//	DBusMenuImporter *importer = dbus_menu_importer_new(":1.49", "/MenuBar/2");
-	//	DBusMenuImporter *importer =
-	//	    dbus_menu_importer_new(":1.227", "/com/canonical/menu/300003e");
-	//	DBusMenuImporter *importer =
-	//	    dbus_menu_importer_new(":1.458", "/com/canonical/menu/4600016");
-	//	DBusMenuImporter *importer =
-	//	    dbus_menu_importer_new(":1.542", "/com/canonical/menu/2600041");
-	g_signal_connect(importer, "notify::model", G_CALLBACK(on_importer_model_changed), menubar);
-	g_signal_connect(importer, "notify::model", G_CALLBACK(on_importer_model_changed), menu);
-	g_signal_connect(window, "destroy", G_CALLBACK(gtk_main_quit), NULL);
-	gtk_box_pack_start(GTK_BOX(vbox), menubar, FALSE, FALSE, 0);
-	gtk_box_pack_start(GTK_BOX(vbox), menu, FALSE, FALSE, 0);
-
-	gtk_widget_show_all(window);
-
-	gtk_main();
-
-	return 0;
-}
diff -Nru -w vala-panel-appmenu-0.7.6+dfsg1/lib/dbusmenu-importer/utils.c vala-panel-appmenu-24.05+dfsg/lib/dbusmenu-importer/utils.c
--- vala-panel-appmenu-0.7.6+dfsg1/lib/dbusmenu-importer/utils.c	2020-10-28 22:08:48.000000000 +0100
+++ vala-panel-appmenu-24.05+dfsg/lib/dbusmenu-importer/utils.c	1970-01-01 01:00:00.000000000 +0100
@@ -1,280 +0,0 @@
-/*
- * vala-panel-appmenu
- * Copyright (C) 2018 Konstantin Pugin <ria.freelander@gmail.com>
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#include <stdbool.h>
-#include <stdio.h>
-#include <utils.h>
-
-#include "definitions.h"
-#include "model.h"
-
-static void activate_ordinary_cb(GSimpleAction *action, GVariant *parameter, gpointer user_data)
-{
-	DBusMenuXml *xml = DBUS_MENU_XML(user_data);
-	u_int32_t id;
-	sscanf(g_action_get_name(G_ACTION(action)), ACTION_PREFIX "%u", &id);
-	// use CURRENT_TIME instead of gtk_get_current_event_time to avoid linking to GTK.
-	dbus_menu_xml_call_event_sync(xml,
-	                              id,
-	                              "clicked",
-	                              g_variant_new("v", g_variant_new_int32(0)),
-	                              CURRENT_TIME,
-	                              NULL,
-	                              NULL);
-}
-
-static void activate_checkbox_cb(GSimpleAction *action, GVariant *parameter, gpointer user_data)
-{
-	DBusMenuXml *xml = DBUS_MENU_XML(user_data);
-	u_int32_t id;
-	sscanf(g_action_get_name(G_ACTION(action)), ACTION_PREFIX "%u", &id);
-	g_autoptr(GVariant) state = g_action_get_state(G_ACTION(action));
-	// use CURRENT_TIME instead of gtk_get_current_event_time to avoid linking to GTK.
-	dbus_menu_xml_call_event_sync(xml,
-	                              id,
-	                              "clicked",
-	                              g_variant_new("v", g_variant_new_int32(0)),
-	                              CURRENT_TIME,
-	                              NULL,
-	                              NULL);
-	g_action_change_state(G_ACTION(action),
-	                      g_variant_new_boolean(!g_variant_get_boolean(state)));
-}
-
-static void state_radio_cb(GSimpleAction *action, GVariant *parameter, gpointer user_data)
-{
-	DBusMenuXml *xml   = DBUS_MENU_XML(user_data);
-	const char *id_str = g_action_get_name(G_ACTION(action));
-	uint id;
-	sscanf(id_str, ACTION_PREFIX "%u", &id);
-	// use CURRENT_TIME instead of gtk_get_current_event_time to avoid linking to GTK.
-	dbus_menu_xml_call_event_sync(xml,
-	                              id,
-	                              "clicked",
-	                              g_variant_new("v", g_variant_new_int32(0)),
-	                              CURRENT_TIME,
-	                              NULL,
-	                              NULL);
-	g_simple_action_set_state(action, parameter);
-}
-
-static GAction *dbus_menu_action_new(DBusMenuXml *xml, u_int32_t id, DBusMenuActionType action_type)
-{
-	GSimpleAction *ret;
-	g_autofree char *name = g_strdup_printf(ACTION_PREFIX "%u", id);
-	if (action_type == DBUS_MENU_ACTION_CHECKMARK)
-	{
-		ret = g_simple_action_new_stateful(name, NULL, g_variant_new_boolean(false));
-		g_signal_connect(ret, "activate", G_CALLBACK(activate_checkbox_cb), xml);
-		return G_ACTION(ret);
-	}
-	else if (action_type == DBUS_MENU_ACTION_RADIO)
-	{
-		ret = g_simple_action_new_stateful(name,
-		                                   G_VARIANT_TYPE_STRING,
-		                                   g_variant_new_string(
-		                                       DBUS_MENU_ACTION_RADIO_UNSELECTED));
-		g_signal_connect(ret, "activate", G_CALLBACK(state_radio_cb), xml);
-		return G_ACTION(ret);
-	}
-	else if (action_type == DBUS_MENU_ACTION_NORMAL)
-	{
-		ret = g_simple_action_new(name, NULL);
-		g_signal_connect(ret, "activate", G_CALLBACK(activate_ordinary_cb), xml);
-		return G_ACTION(ret);
-	}
-	g_assert_not_reached();
-}
-
-// static bool source_state_false(gpointer *data)
-//{
-//	GSimpleAction *submenu = G_SIMPLE_ACTION(data);
-//	g_simple_action_set_state(submenu, g_variant_new_boolean(false));
-//	return true;
-//}
-
-static void state_submenu_cb(GSimpleAction *action, GVariant *parameter, gpointer user_data)
-{
-	g_return_if_fail(DBUS_MENU_IS_MODEL(user_data));
-	DBusMenuModel *model = DBUS_MENU_MODEL(user_data);
-	DBusMenuXml *xml;
-	u_int32_t id;
-	g_object_get(model, "parent-id", &id, "xml", &xml, NULL);
-	bool request_open = g_variant_get_boolean(parameter);
-	GVariant *statev  = g_action_get_state(G_ACTION(action));
-	bool opened       = g_variant_get_boolean(statev);
-	g_variant_unref(statev);
-	bool need_update = true;
-	if (request_open && !opened)
-	{
-		// Use opened before actual open. For Firefox.
-		dbus_menu_xml_call_event_sync(xml,
-		                              id,
-		                              "opened",
-		                              g_variant_new("v", g_variant_new_int32(0)),
-		                              CURRENT_TIME,
-		                              NULL,
-		                              NULL);
-		dbus_menu_xml_call_about_to_show_sync(xml,
-		                                      id,
-		                                      (gboolean *)&need_update,
-		                                      NULL,
-		                                      NULL);
-		if (g_menu_model_get_n_items(G_MENU_MODEL(model)) == 0)
-			need_update = true;
-		need_update = need_update || dbus_menu_model_is_layout_update_required(model);
-		if (need_update)
-		{
-			// TODD: Populate layout after request;
-			if (DBUS_MENU_IS_MODEL(model))
-				dbus_menu_model_update_layout(model);
-		}
-		g_simple_action_set_state(action, g_variant_new_boolean(true));
-		// TODO: change state to false after menu closing, not by time
-		//                g_timeout_add(500, (GSourceFunc)source_state_false, action);
-	}
-	else if (request_open)
-	{
-		g_simple_action_set_state(action, g_variant_new_boolean(true));
-		need_update = dbus_menu_model_is_layout_update_required(model);
-		if (need_update)
-		{
-			// TODD: Populate layout after request;
-			if (DBUS_MENU_IS_MODEL(model))
-				dbus_menu_model_update_layout(model);
-		}
-	}
-	else
-	{
-		dbus_menu_xml_call_event_sync(xml,
-		                              id,
-		                              "closed",
-		                              g_variant_new("v", g_variant_new_int32(0)),
-		                              CURRENT_TIME,
-		                              NULL,
-		                              NULL);
-		g_simple_action_set_state(action, g_variant_new_boolean(false));
-	}
-}
-
-static GAction *dbus_menu_submenu_action_new(DBusMenuModel *model)
-{
-	uint id;
-	g_object_get(model, "parent-id", &id, NULL);
-	g_autofree char *name = g_strdup_printf(SUBMENU_PREFIX "%u", id);
-	GSimpleAction *ret    = g_simple_action_new_stateful(name,
-                                                          G_VARIANT_TYPE_BOOLEAN,
-                                                          g_variant_new_boolean(false));
-	g_signal_connect(ret, "change-state", G_CALLBACK(state_submenu_cb), model);
-	return G_ACTION(ret);
-}
-
-G_GNUC_INTERNAL char *dbus_menu_action_get_name(uint id, DBusMenuActionType action_type,
-                                                bool use_prefix)
-{
-	return g_strdup_printf("%s%s%u",
-	                       use_prefix ? DBUS_MENU_ACTION_NAMESPACE_PREFIX : "",
-	                       action_type == DBUS_MENU_ACTION_SUBMENU ? SUBMENU_PREFIX
-	                                                               : ACTION_PREFIX,
-	                       id);
-}
-
-G_GNUC_INTERNAL void dbus_menu_action_replace_signals(GAction *action, DBusMenuXml *xml,
-                                                      DBusMenuModel *submenu,
-                                                      DBusMenuActionType action_type)
-{
-	if (action_type == DBUS_MENU_ACTION_SUBMENU)
-	{
-		g_signal_handlers_disconnect_by_func_only(action, state_submenu_cb);
-		g_signal_connect(action, "change-state", G_CALLBACK(state_submenu_cb), submenu);
-	}
-	else if (action_type == DBUS_MENU_ACTION_RADIO)
-	{
-		g_signal_handlers_disconnect_by_func_only(action, state_radio_cb);
-		g_signal_connect(action, "activate", G_CALLBACK(state_radio_cb), xml);
-	}
-	else if (action_type == DBUS_MENU_ACTION_CHECKMARK)
-	{
-		g_signal_handlers_disconnect_by_func_only(action, activate_checkbox_cb);
-		g_signal_connect(action, "activate", G_CALLBACK(activate_checkbox_cb), xml);
-	}
-	else
-	{
-		g_signal_handlers_disconnect_by_func_only(action, activate_ordinary_cb);
-		g_signal_connect(action, "activate", G_CALLBACK(activate_ordinary_cb), xml);
-	}
-}
-
-G_GNUC_INTERNAL GAction *dbus_menu_action_reference(u_int32_t id, DBusMenuXml *xml,
-                                                    DBusMenuModel *submenu,
-                                                    GActionMap *action_group,
-                                                    DBusMenuActionType action_type)
-{
-	bool is_submenu           = action_type == DBUS_MENU_ACTION_SUBMENU;
-	const char *action_prefix = is_submenu ? SUBMENU_PREFIX : ACTION_PREFIX;
-	g_autofree char *name     = g_strdup_printf("%s%u", action_prefix, id);
-	GAction *ret              = g_action_map_lookup_action(action_group, name);
-	bool check_parameter      = false;
-	if (ret)
-	{
-		g_object_ref(ret);
-		const GVariantType *state_type = g_action_get_state_type(ret);
-		if (state_type == NULL)
-			check_parameter = check_parameter || action_type == DBUS_MENU_ACTION_NORMAL;
-		else if (is_submenu)
-		{
-			check_parameter = check_parameter ||
-			                  g_variant_type_equal(state_type, G_VARIANT_TYPE_BOOLEAN);
-		}
-		else
-		{
-			check_parameter = check_parameter ||
-			                  (action_type == DBUS_MENU_ACTION_RADIO &&
-			                   g_variant_type_equal(state_type, G_VARIANT_TYPE_STRING));
-			check_parameter =
-			    check_parameter ||
-			    (action_type == DBUS_MENU_ACTION_CHECKMARK &&
-			     g_variant_type_equal(state_type, G_VARIANT_TYPE_BOOLEAN));
-		}
-		if (check_parameter)
-			dbus_menu_action_replace_signals(ret, xml, submenu, action_type);
-		else
-			g_action_map_remove_action(action_group, name);
-	}
-	if (ret == NULL || !check_parameter)
-	{
-		if (is_submenu)
-			ret = dbus_menu_submenu_action_new(submenu);
-		else
-			ret = dbus_menu_action_new(xml, id, action_type);
-		g_action_map_add_action(G_ACTION_MAP(action_group), ret);
-	}
-	return ret;
-}
-
-G_GNUC_INTERNAL void dbus_menu_action_lock(GAction *action)
-{
-	g_signal_handlers_block_by_func_only(action, activate_checkbox_cb);
-	g_signal_handlers_block_by_func_only(action, state_radio_cb);
-}
-
-G_GNUC_INTERNAL void dbus_menu_action_unlock(GAction *action)
-{
-	g_signal_handlers_unblock_by_func_only(action, activate_checkbox_cb);
-	g_signal_handlers_unblock_by_func_only(action, state_radio_cb);
-}
diff -Nru -w vala-panel-appmenu-0.7.6+dfsg1/lib/dbusmenu-importer/utils.h vala-panel-appmenu-24.05+dfsg/lib/dbusmenu-importer/utils.h
--- vala-panel-appmenu-0.7.6+dfsg1/lib/dbusmenu-importer/utils.h	2020-10-28 22:08:48.000000000 +0100
+++ vala-panel-appmenu-24.05+dfsg/lib/dbusmenu-importer/utils.h	1970-01-01 01:00:00.000000000 +0100
@@ -1,45 +0,0 @@
-/*
- * vala-panel-appmenu
- * Copyright (C) 2018 Konstantin Pugin <ria.freelander@gmail.com>
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef UTILS_H
-#define UTILS_H
-
-#include "dbusmenu-interface.h"
-#include "definitions.h"
-#include "model.h"
-#include <gio/gio.h>
-
-G_BEGIN_DECLS
-
-G_GNUC_INTERNAL GAction *dbus_menu_action_reference(u_int32_t id, DBusMenuXml *xml,
-                                                    DBusMenuModel *submenu,
-                                                    GActionMap *action_group,
-                                                    DBusMenuActionType type);
-
-G_GNUC_INTERNAL char *dbus_menu_action_get_name(uint id, DBusMenuActionType action_type,
-                                                bool use_prefix);
-G_GNUC_INTERNAL void dbus_menu_action_replace_signals(GAction *action, DBusMenuXml *xml,
-                                                      DBusMenuModel *submenu,
-                                                      DBusMenuActionType action_type);
-
-G_GNUC_INTERNAL void dbus_menu_action_lock(GAction *action);
-G_GNUC_INTERNAL void dbus_menu_action_unlock(GAction *action);
-
-G_END_DECLS
-
-#endif // UTILS_H
diff -Nru -w vala-panel-appmenu-0.7.6+dfsg1/lib/dbus-menu-importer.vapi vala-panel-appmenu-24.05+dfsg/lib/dbus-menu-importer.vapi
--- vala-panel-appmenu-0.7.6+dfsg1/lib/dbus-menu-importer.vapi	2020-10-28 22:08:48.000000000 +0100
+++ vala-panel-appmenu-24.05+dfsg/lib/dbus-menu-importer.vapi	1970-01-01 01:00:00.000000000 +0100
@@ -1,38 +0,0 @@
-/*
- * vala-panel-appmenu
- * Copyright (C) 2018 Konstantin Pugin <ria.freelander@gmail.com>
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-using GLib;
-
-namespace DBusMenu
-{
-	[CCode(cheader_filename = "dbusmenu-importer/importer.h")]
-	public class Importer : Object
-	{
-		[NoAccessorMethod]
-		public string bus_name {construct;}
-		[NoAccessorMethod]
-		public string object_path {construct;}
-		[NoAccessorMethod]
-		public GLib.MenuModel model {owned get;}
-		[NoAccessorMethod]
-		public GLib.ActionGroup action_group {owned get;}
-		public Importer(string bus_name, string object_path);
-		public bool check();
-	}
-}
-
diff -Nru -w vala-panel-appmenu-0.7.6+dfsg1/lib/helper-dbus.vala vala-panel-appmenu-24.05+dfsg/lib/helper-dbus.vala
--- vala-panel-appmenu-0.7.6+dfsg1/lib/helper-dbus.vala	2020-10-28 22:08:48.000000000 +0100
+++ vala-panel-appmenu-24.05+dfsg/lib/helper-dbus.vala	2024-05-22 13:16:00.000000000 +0200
@@ -128,7 +128,7 @@
         private void activate_quit(GLib.SimpleAction action, Variant? param)
         {
             try {
-                Posix.kill((Posix.pid_t)dbus.get_connection_unix_process_id(this.connection), Posix.SIGQUIT);
+                Posix.kill((Posix.pid_t)dbus.get_connection_unix_process_id(this.connection), Posix.Signal.QUIT);
             } catch (Error e) {
                 stderr.printf("%s\n",e.message);
             }
diff -Nru -w vala-panel-appmenu-0.7.6+dfsg1/lib/helper-desktop.vala vala-panel-appmenu-24.05+dfsg/lib/helper-desktop.vala
--- vala-panel-appmenu-0.7.6+dfsg1/lib/helper-desktop.vala	2020-10-28 22:08:48.000000000 +0100
+++ vala-panel-appmenu-24.05+dfsg/lib/helper-desktop.vala	2024-05-22 13:16:00.000000000 +0200
@@ -105,6 +105,12 @@
                         info = AppInfo.create_from_commandline("pcmanfm --desktop-pref",null,
                         AppInfoCreateFlags.SUPPORTS_STARTUP_NOTIFICATION) as DesktopAppInfo;
                         break;
+                    case "UnityX":
+                        info = new DesktopAppInfo("unityx-appearance-panel.desktop");
+                        break;
+                    case "Budgie:GNOME":
+                        info = new DesktopAppInfo("budgie-desktop-settings.desktop");
+                        break;
                     default:
                         warning("Unknown desktop environment\n");
                         info = AppInfo.create_from_commandline("gnome-control-center backgrounds",null,
@@ -131,6 +137,17 @@
                     case "LXDE":
                         info = new DesktopAppInfo("lxappearance.desktop");
                         break;
+                    case "UnityX":
+                        info = new DesktopAppInfo("unityx-control-center.desktop");
+                        break;
+                    case "Budgie:GNOME":
+                        string control_center = "gnome-control-center";
+                        if (Environment.find_program_in_path("budgie-control-center") != null) {
+                            control_center = "budgie-control-center";
+                        }
+                        info = AppInfo.create_from_commandline(control_center,null,
+                        AppInfoCreateFlags.SUPPORTS_STARTUP_NOTIFICATION) as DesktopAppInfo;
+                        break;
                     default:
                         warning("Unknown desktop environment\n");
                         info = AppInfo.create_from_commandline("gnome-control-center",null,
diff -Nru -w vala-panel-appmenu-0.7.6+dfsg1/lib/menu-widget.vala vala-panel-appmenu-24.05+dfsg/lib/menu-widget.vala
--- vala-panel-appmenu-0.7.6+dfsg1/lib/menu-widget.vala	2020-10-28 22:08:48.000000000 +0100
+++ vala-panel-appmenu-24.05+dfsg/lib/menu-widget.vala	2024-05-22 13:16:00.000000000 +0200
@@ -78,11 +78,6 @@
         }
         private void restock()
         {
-            unowned Gtk.StyleContext mcontext = mwidget.get_style_context();
-            if(bold_application_name)
-                mcontext.add_class("-vala-panel-appmenu-bold");
-            else
-                mcontext.remove_class("-vala-panel-appmenu-bold");
             var menu = new GLib.Menu();
             if (this.appmenu != null)
                 menu.append_section(null,this.appmenu);
@@ -117,6 +112,11 @@
             }
             else
                 mwidget.bind_model(menu,null,true);
+            unowned Gtk.StyleContext mcontext = mwidget.get_style_context();
+            if(bold_application_name)
+                mcontext.add_class("-vala-panel-appmenu-bold");
+            else
+                mcontext.remove_class("-vala-panel-appmenu-bold");
         }
         public void set_appmenu(GLib.MenuModel? appmenu_model)
         {
diff -Nru -w vala-panel-appmenu-0.7.6+dfsg1/lib/meson.build vala-panel-appmenu-24.05+dfsg/lib/meson.build
--- vala-panel-appmenu-0.7.6+dfsg1/lib/meson.build	2020-10-28 22:08:48.000000000 +0100
+++ vala-panel-appmenu-24.05+dfsg/lib/meson.build	2024-05-22 13:16:00.000000000 +0200
@@ -1,4 +1,3 @@
-subdir('dbusmenu-importer')
 sources = files(
     'appmenu-abstractions.vala',
     'registrar.vala',
@@ -8,15 +7,10 @@
     'helper-dbusmenu.vala',
     'helper-menumodel.vala',
     'launcher.vapi',
-    'dbus-menu-importer.vapi',
     'launcher.c',
     'launcher.h'
 )
 
-bamf_src = files(
-    'appmenu-bamf.vala'
-)
-
 wnck_src = files(
     'appmenu-wnck.vala',
     'matcher.c',
@@ -33,26 +27,11 @@
 )
 valac = meson.get_compiler('vala')
 posix_dep = valac.find_library('posix')
-vver = valac.version()
-addons_versions = {
-    '>0.35.0': '<0.36.18',
-    '>0.39.0': '<0.40.14',
-    '>0.41.0': '<0.42.6',
-    '>0.43.0': '<0.44.0'
-}
-foreach series, ver : addons_versions
-    if vver.version_compare(series) and vver.version_compare(ver)
-            sources += files('../vapi/gio-addons-2.0.vapi')
-        break
-    endif
-endforeach
+
+importer_dep = dependency('appmenu-glib-translator', fallback : ['appmenu-glib-translator', 'importer_dep'])
 
 appmenu_deps = [giounix, gtk, importer_dep, posix_dep]
 appmenu_cflags = []
-if backend_bamf
-    sources += bamf_src
-    appmenu_deps += bamf
-endif
 if backend_wnck
     sources += wnck_src
     appmenu_deps += wnck
diff -Nru -w vala-panel-appmenu-0.7.6+dfsg1/meson.build vala-panel-appmenu-24.05+dfsg/meson.build
--- vala-panel-appmenu-0.7.6+dfsg1/meson.build	2020-10-28 22:08:48.000000000 +0100
+++ vala-panel-appmenu-24.05+dfsg/meson.build	2024-05-22 13:16:00.000000000 +0200
@@ -2,7 +2,7 @@
   'vala-panel-appmenu',
   'vala',
   'c',
-version : '0.7.6',
+version : '24.02',
 meson_version : '>=0.51.0',
 license : 'LGPL-3.0-or-later',
 default_options : ['c_std=gnu11', 'buildtype=debugoptimized', 'warning_level=1']
@@ -23,7 +23,6 @@
 
 gnome = import('gnome')
 i18n = import('i18n')
-cmake = import('cmake')
 
 ###############
 # Directories #
@@ -46,27 +45,20 @@
 gtk = dependency('gtk+-3.0', version: gtk_ver)
 
 backend_opt = get_option('wm_backend')
-backend_bamf = false
 backend_wnck = false
 
-bamf_ver = '>=0.5.0'
-bamf = dependency('libbamf3', version: bamf_ver, required: backend_opt == 'bamf')
-
 wnck_ver = '>=3.4.8'
 wnck = dependency('libwnck-3.0', version: wnck_ver, required: backend_opt == 'wnck')
 
-if(bamf.found() and (backend_opt == 'bamf' or backend_opt == 'auto'))
-    backend_bamf = true
-endif
-if(wnck.found() and (backend_opt == 'wnck' or backend_opt == 'auto') and not backend_bamf)
+if(wnck.found() and (backend_opt == 'wnck' or backend_opt == 'auto'))
     backend_wnck = true
 endif
 
-if(not (backend_bamf or backend_wnck))
-    error('No backend available (either libbamf3 or libwnck3 required)')
+if(not (backend_wnck))
+    error('No backend available (libwnck3 required)')
 endif
 
-vp_ver = '>=0.4.89'
+vp_ver = '>=24.03'
 vp = dependency('vala-panel', version:  vp_ver, required: get_option('valapanel'))
 vala_panel_found = vp.found()
 
@@ -105,7 +97,7 @@
 #  Subprojects  #
 #################
 subproject('registrar', required: get_option('registrar'))
-cmake.subproject('jayatana', required: get_option('jayatana'))
+subproject('jayatana', required: get_option('jayatana'))
 subproject('appmenu-gtk-module', required: get_option('appmenu-gtk-module'))
 
 subdir('lib')
@@ -113,8 +105,5 @@
 subdir('data')
 subdir('po')
 
-readmes = [
-    'README.md',
-    'LICENSE',
-]
-install_data(readmes, install_dir : join_paths(get_option('datadir'), meson.project_name(), 'doc'))
+install_data('README.md', install_dir : join_paths(get_option('datadir'), 'doc', meson.project_name()))
+install_data('LICENSE', install_dir : join_paths(get_option('datadir'), 'licenses', meson.project_name()))
diff -Nru -w vala-panel-appmenu-0.7.6+dfsg1/meson_options.txt vala-panel-appmenu-24.05+dfsg/meson_options.txt
--- vala-panel-appmenu-0.7.6+dfsg1/meson_options.txt	2020-10-28 22:08:48.000000000 +0100
+++ vala-panel-appmenu-24.05+dfsg/meson_options.txt	2024-05-22 13:16:00.000000000 +0200
@@ -1,4 +1,4 @@
-option('wm_backend', type: 'combo', choices: ['auto','wnck','bamf'], value: 'auto', description: 'Backend for appmenu')
+option('wm_backend', type: 'combo', choices: ['auto','wnck'], value: 'auto', description: 'Backend for appmenu')
 
 option('valapanel', type: 'feature', value: 'auto', description: 'Vala Panel Integration - 0.5.x')
 option('xfce', type: 'feature', value: 'auto', description: 'Xfce Panel Integration')
diff -Nru -w vala-panel-appmenu-0.7.6+dfsg1/po/ar.po vala-panel-appmenu-24.05+dfsg/po/ar.po
--- vala-panel-appmenu-0.7.6+dfsg1/po/ar.po	2020-10-28 22:08:48.000000000 +0100
+++ vala-panel-appmenu-24.05+dfsg/po/ar.po	2024-05-22 13:16:00.000000000 +0200
@@ -1,4 +1,169 @@
 msgid ""
 msgstr ""
+"Project-Id-Version: \n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2024-01-05 15:47+0300\n"
+"PO-Revision-Date: 2024-01-05 15:47+0300\n"
+"Last-Translator: Mohamed Benkouider <mbkasr@gmail.com>\n"
+"Language-Team: \n"
+"Language: ar\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Poedit 2.0.4\n"
+
+#: ../lib/appmenu-desktop.vala:39 ../lib/appmenu-desktop.vala:65
+#: ../lib/helper-desktop.vala:58
+msgid "_Desktop"
+msgstr "_سطح المكتب"
+
+#: ../lib/appmenu-desktop.vala:153 ../lib/appmenu-desktop.vala:205
+#: ../lib/helper-desktop.vala:192
+msgid "No files"
+msgstr "لا ملفات"
+
+#: ../lib/appmenu-bamf.vala:37 ../lib/desktop-menus.ui:40
+msgid "_New Window..."
+msgstr "_نافذة جديدة"
+
+#: ../lib/appmenu-bamf.vala:38 ../lib/desktop-menus.ui:45
+msgid "Close _This"
+msgstr "_أغلق هذا"
+
+#: ../lib/appmenu-bamf.vala:39 ../lib/desktop-menus.ui:50
+msgid "Close _All"
+msgstr "أغلق ال_كل"
+
+#: ../lib/menu-widget-menumodel.vala:42 ../lib/menu-widget-menumodel.vala:63
+msgid "_Application"
+msgstr "_تطبيق"
+
+#: ../lib/desktop-menus.ui:6
+msgid "_Desktop Settings"
+msgstr "_إعدادات سطح المكتب"
+
+#: ../lib/desktop-menus.ui:10
+msgid "_System Settings"
+msgstr "إعدادات الن_ظام"
+
+#: ../lib/desktop-menus.ui:17
+msgid "_Files"
+msgstr "_الملفات"
+
+#: ../data/xfce/appmenu.desktop.xfce.in:5 ../data/appmenu.desktop.plugin.in:4
+#: ../data/appmenu.desktop.xfce.in:5 ../data/appmenu.desktop.in:5
+#: ../data/appmenu.plugin.desktop.in:4
+#: ../data/org.valapanel.appmenu.desktop.in:4
+msgid "AppMenu Plugin"
+msgstr "لاحقة AppMenu"
+
+#: ../data/xfce/appmenu.desktop.xfce.in:6 ../data/appmenu.desktop.plugin.in:5
+#: ../data/appmenu.desktop.xfce.in:6 ../data/appmenu.desktop.in:6
+#: ../data/appmenu.plugin.desktop.in:5
+#: ../data/org.valapanel.appmenu.desktop.in:5
+msgid "Display AppMenu (Global Menu)"
+msgstr "أظهر AppMenu (القائمة العامة)"
+
+#: ../data/xfce/appmenu.desktop.xfce.in:7
+#: ../data/appmenu-mate.desktop.plugin.in:11 ../data/appmenu.desktop.xfce.in:7
+#: ../data/appmenu-mate.desktop.in:11 ../data/appmenu-mate.plugin.desktop.in:11
+#: ../data/appmenu.desktop.in:7
+msgid "applications-system"
+msgstr "نظام-التطبيقات"
+
+#: ../lib/desktop-menus.ui:21
+msgid "_Documents"
+msgstr "ال_مستندات"
+
+#: ../lib/desktop-menus.ui:25
+msgid "_Music"
+msgstr "الم_وسيقى"
+
+#: ../lib/desktop-menus.ui:29
+msgid "_Pictures"
+msgstr "ال_صور"
+
+#: ../lib/desktop-menus.ui:33
+msgid "_Video"
+msgstr "م_قاطع الفيديو"
+
+#: ../lib/budgie-plugin-appmenu.vala:51 ../lib/valapanel-plugin-appmenu.vala:73
+#: ../lib/valapanel-plugin-appmenu.vala:88 ../lib/mate-plugin-appmenu.vala:43
+#: ../lib/xfce4-plugin-appmenu.vala:56 ../lib/valapanel-plugin-appmenu.vala:67
+msgid "Use Compact mode (all menus in application menu)"
+msgstr "استعمل الوضع المدمج (كل القوائم في قائمة التطبيقات)"
+
+#: ../lib/budgie-plugin-appmenu.vala:54 ../lib/mate-plugin-appmenu.vala:46
+#: ../lib/valapanel-plugin-appmenu.vala:76
+#: ../lib/valapanel-plugin-appmenu.vala:91 ../lib/xfce4-plugin-appmenu.vala:59
+#: ../lib/valapanel-plugin-appmenu.vala:70
+msgid "Use bold application name"
+msgstr "استعمل اسم تطبيق عريض"
+
+#: ../lib/helper-dbus.vala:101
+msgid "Application"
+msgstr "التطبيق"
+
+#: ../lib/mate-plugin-appmenu.vala:36
+msgid "_Preferences"
+msgstr "ال_تفضيلات"
+
+#: ../lib/mate-plugin-appmenu.vala:39 ../lib/valapanel-plugin-appmenu.vala:85
+#: ../lib/xfce4-plugin-appmenu.vala:52
+msgid "Configure AppMenu"
+msgstr "أعدّ AppMenu"
+
+#: ../lib/mate-plugin-appmenu.vala:43 ../lib/xfce4-plugin-appmenu.vala:56
+msgid "Use Compact mode (all menus in application menu"
+msgstr "استعمل الوضع المدمج (كل القوائم في قائمة التطبيقات"
+
+#: ../lib/xfce4-plugin-appmenu.vala:62
+msgid "Expand plugin on panel"
+msgstr "وسّع ملحق في اللوحة"
+
+#: ../lib/desktop-menus.ui:40
+msgid "_New"
+msgstr "_جديد"
+
+#: ../lib/desktop-menus.ui:51
+msgid "_Quit"
+msgstr "أ_غلق"
+
+#: ../data/appmenu-budgie.desktop.plugin.in:4
+#: ../data/appmenu-budgie.desktop.in:4
+msgid "Global Menu"
+msgstr "القائمة العامة"
+
+#: ../data/appmenu-budgie.desktop.plugin.in:5
+#: ../data/appmenu-budgie.desktop.in:5
+msgid "Show menus from windows"
+msgstr "اعرض قوائم من النوافذ"
+
+#: ../data/appmenu-budgie.desktop.plugin.in:9
+#: ../data/appmenu-budgie.desktop.in:9
+msgid "view-grid-symbolic"
+msgstr "عرض-شبكة-رمزي"
+
+#: ../data/appmenu-mate.desktop.plugin.in:5 ../data/appmenu-mate.desktop.in:5
+#: ../data/appmenu-mate.plugin.desktop.in:5
+msgid "Appmenu applet factory"
+msgstr "مصنع التطبيقات المصغرة لـ Appmenu"
+
+#: ../data/appmenu-mate.desktop.plugin.in:9 ../data/appmenu-mate.desktop.in:9
+#: ../data/appmenu-mate.plugin.desktop.in:9
+msgid "Global Application Menu"
+msgstr "قائمة التطبيقات العامة"
+
+#: ../data/appmenu-mate.desktop.plugin.in:10 ../data/appmenu-mate.desktop.in:10
+#: ../data/appmenu-mate.plugin.desktop.in:10
+msgid "All menus will hosts here"
+msgstr "كل القوائم ستستضاف هنا"
+
+#: ../lib/menu-widget.vala:114
+msgid "Compact Menu"
+msgstr "القائمة المدمجة"
+
+#: ../data/appmenu.desktop.plugin.in:6 ../data/appmenu.plugin.desktop.in:6
+#: ../data/org.valapanel.appmenu.desktop.in:6
+msgid "preferences-system-symbolic"
+msgstr "تفضيلات-نظام-رمزي"
diff -Nru -w vala-panel-appmenu-0.7.6+dfsg1/po/it.po vala-panel-appmenu-24.05+dfsg/po/it.po
--- vala-panel-appmenu-0.7.6+dfsg1/po/it.po	2020-10-28 22:08:48.000000000 +0100
+++ vala-panel-appmenu-24.05+dfsg/po/it.po	2024-05-22 13:16:00.000000000 +0200
@@ -1,5 +1,175 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# Gianvito Cavasoli <gianvito@gmx.it>, 2020.
+#
 msgid ""
 msgstr ""
+"Project-Id-Version: vala-panel-appmenu\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2019-04-24 16:13+0300\n"
+"PO-Revision-Date: 2020-05-06 18:30+0200\n"
+"Last-Translator: Gianvito Cavasoli <gianvito@gmx.it>\n"
+"Language-Team: Italian <gnome-it-list@gnome.org>\n"
+"Language: it\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
-"Plural-Forms: nplurals=2; plural=n != 1;\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1)\n"
+"X-Generator: Gtranslator 3.36.0\n"
+
+#: ../lib/appmenu-desktop.vala:39 ../lib/appmenu-desktop.vala:65
+#: ../lib/helper-desktop.vala:58
+msgid "_Desktop"
+msgstr "_Scrivania"
+
+#: ../lib/appmenu-desktop.vala:153 ../lib/appmenu-desktop.vala:205
+#: ../lib/helper-desktop.vala:192
+msgid "No files"
+msgstr "Nessun file"
+
+#: ../lib/appmenu-bamf.vala:37 ../lib/desktop-menus.ui:40
+msgid "_New Window..."
+msgstr "_Nuova finestra…"
+
+#: ../lib/appmenu-bamf.vala:38 ../lib/desktop-menus.ui:45
+msgid "Close _This"
+msgstr "Chiudi _questo"
+
+#: ../lib/appmenu-bamf.vala:39 ../lib/desktop-menus.ui:50
+msgid "Close _All"
+msgstr "Chiudi tutto"
+
+#: ../lib/menu-widget-menumodel.vala:42 ../lib/menu-widget-menumodel.vala:63
+msgid "_Application"
+msgstr "_Applicazione"
+
+#: ../lib/desktop-menus.ui:6
+msgid "_Desktop Settings"
+msgstr "Impostazioni della _scrivania"
+
+#: ../lib/desktop-menus.ui:10
+msgid "_System Settings"
+msgstr "Impostazioni del s_istema"
+
+#: ../lib/desktop-menus.ui:17
+msgid "_Files"
+msgstr "_File"
+
+#: ../data/xfce/appmenu.desktop.xfce.in:5 ../data/appmenu.desktop.plugin.in:4
+#: ../data/appmenu.desktop.xfce.in:5 ../data/appmenu.desktop.in:5
+#: ../data/appmenu.plugin.desktop.in:4
+#: ../data/org.valapanel.appmenu.desktop.in:4
+msgid "AppMenu Plugin"
+msgstr "Plugin AppMenu"
+
+#: ../data/xfce/appmenu.desktop.xfce.in:6 ../data/appmenu.desktop.plugin.in:5
+#: ../data/appmenu.desktop.xfce.in:6 ../data/appmenu.desktop.in:6
+#: ../data/appmenu.plugin.desktop.in:5
+#: ../data/org.valapanel.appmenu.desktop.in:5
+msgid "Display AppMenu (Global Menu)"
+msgstr "Mostra il AppMenu (menù globale)"
+
+#: ../data/xfce/appmenu.desktop.xfce.in:7
+#: ../data/appmenu-mate.desktop.plugin.in:11 ../data/appmenu.desktop.xfce.in:7
+#: ../data/appmenu-mate.desktop.in:11 ../data/appmenu-mate.plugin.desktop.in:11
+#: ../data/appmenu.desktop.in:7
+msgid "applications-system"
+msgstr "applications-system"
+
+#: ../lib/desktop-menus.ui:21
+msgid "_Documents"
+msgstr "_Documenti"
+
+#: ../lib/desktop-menus.ui:25
+msgid "_Music"
+msgstr "_Musica"
+
+#: ../lib/desktop-menus.ui:29
+msgid "_Pictures"
+msgstr "_Immagini"
+
+#: ../lib/desktop-menus.ui:33
+msgid "_Video"
+msgstr "_Video"
+
+#: ../lib/budgie-plugin-appmenu.vala:51 ../lib/valapanel-plugin-appmenu.vala:73
+#: ../lib/valapanel-plugin-appmenu.vala:88 ../lib/mate-plugin-appmenu.vala:43
+#: ../lib/xfce4-plugin-appmenu.vala:56 ../lib/valapanel-plugin-appmenu.vala:67
+msgid "Use Compact mode (all menus in application menu)"
+msgstr "Usa la modalità compatta (tutti i menù nel menù dell'applicazione)"
+
+#: ../lib/budgie-plugin-appmenu.vala:54 ../lib/mate-plugin-appmenu.vala:46
+#: ../lib/valapanel-plugin-appmenu.vala:76
+#: ../lib/valapanel-plugin-appmenu.vala:91 ../lib/xfce4-plugin-appmenu.vala:59
+#: ../lib/valapanel-plugin-appmenu.vala:70
+msgid "Use bold application name"
+msgstr "Usa il grassetto per il nome dell'applicazione"
+
+#: ../lib/helper-dbus.vala:101
+msgid "Application"
+msgstr "Applicazione"
+
+#: ../lib/mate-plugin-appmenu.vala:36
+msgid "_Preferences"
+msgstr "Preferen_ze"
+
+#: ../lib/mate-plugin-appmenu.vala:39 ../lib/valapanel-plugin-appmenu.vala:85
+#: ../lib/xfce4-plugin-appmenu.vala:52
+msgid "Configure AppMenu"
+msgstr "Configura AppMenu"
+
+#: ../lib/mate-plugin-appmenu.vala:43 ../lib/xfce4-plugin-appmenu.vala:56
+msgid "Use Compact mode (all menus in application menu"
+msgstr "Usa la modalità compatta (tutti i menù nel menù dell'applicazione)"
+
+#: ../lib/xfce4-plugin-appmenu.vala:62
+msgid "Expand plugin on panel"
+msgstr "Espandi il plugin sul pannello"
+
+#: ../lib/desktop-menus.ui:40
+msgid "_New"
+msgstr "_Nuova"
+
+#: ../lib/desktop-menus.ui:51
+msgid "_Quit"
+msgstr "_Esci"
+
+#: ../data/appmenu-budgie.desktop.plugin.in:4
+#: ../data/appmenu-budgie.desktop.in:4
+msgid "Global Menu"
+msgstr "Menù globale"
+
+#: ../data/appmenu-budgie.desktop.plugin.in:5
+#: ../data/appmenu-budgie.desktop.in:5
+msgid "Show menus from windows"
+msgstr "Mostra i menù dalle finestre"
+
+#: ../data/appmenu-budgie.desktop.plugin.in:9
+#: ../data/appmenu-budgie.desktop.in:9
+msgid "view-grid-symbolic"
+msgstr "view-grid-symbolic"
+
+#: ../data/appmenu-mate.desktop.plugin.in:5 ../data/appmenu-mate.desktop.in:5
+#: ../data/appmenu-mate.plugin.desktop.in:5
+msgid "Appmenu applet factory"
+msgstr "Fattoria applet appmenu"
+
+#: ../data/appmenu-mate.desktop.plugin.in:9 ../data/appmenu-mate.desktop.in:9
+#: ../data/appmenu-mate.plugin.desktop.in:9
+msgid "Global Application Menu"
+msgstr "Menù globale dell'applicazione"
+
+#: ../data/appmenu-mate.desktop.plugin.in:10 ../data/appmenu-mate.desktop.in:10
+#: ../data/appmenu-mate.plugin.desktop.in:10
+msgid "All menus will hosts here"
+msgstr "Tutti i menù saranno ospitati qui"
+
+#: ../lib/menu-widget.vala:114
+msgid "Compact Menu"
+msgstr "Menù compatto"
+
+#: ../data/appmenu.desktop.plugin.in:6 ../data/appmenu.plugin.desktop.in:6
+#: ../data/org.valapanel.appmenu.desktop.in:6
+msgid "preferences-system-symbolic"
+msgstr "preferences-system-symbolic"
diff -Nru -w vala-panel-appmenu-0.7.6+dfsg1/po/LINGUAS vala-panel-appmenu-24.05+dfsg/po/LINGUAS
--- vala-panel-appmenu-0.7.6+dfsg1/po/LINGUAS	2020-10-28 22:08:48.000000000 +0100
+++ vala-panel-appmenu-24.05+dfsg/po/LINGUAS	2024-05-22 13:16:00.000000000 +0200
@@ -1 +1 @@
-aa ab ae af ak am an ar as ast av ay az ba be bg bh bi bm bn bo br bs ca ce ch ckb co cr cs cu cv cy da de dv dz ee el en_AU en_CA en_GB eo es et eu fa ff fi fj fo fr fr_CA fy ga gd gl gn gu gv ha he hi ho hr ht hu hy hz ia id ie ig ii ik io is it iu ja jv ka kg ki kj kk kl km kn ko kr ks ku kv kw ky la lb lg li ln lo lt lu lv mg mh mi mk ml mn mo mr ms mt my na nb nd ne ng nl nn nb nr nv ny oc oj om or os pa pi pl ps pt pt_BR qu rm rn ro ru rue rw sa sc sd se sg si sk sl sm sma sn so sq sr ss st su sv sw ta te tg th ti tk tl tn to tr ts tt tw ty ug uk ur uz ve vi vo wa wo xh yi yo za zh zh_CN zh_HK zh_TW zu
+aa ab ae af ak am an ar as ast av ay az ba be bg bh bi bm bn bo br bs ca ce ch ckb co cr cs cu cv cy da de dv dz ee el en_AU en_CA en_GB eo es et eu fa ff fi fj fo fr fr_CA fy ga gd gl gn gu gv ha he hi ho hr ht hu hy hz ia id ie ig ii ik io is it iu ja jv ka kg ki kj kk kl km kn ko kr ks ku kv kw ky la lb lg li ln lo lt lu lv mg mh mi mk ml mn mo mr ms mt my na nb nd ne ng nl nn nr nv ny oc oj om or os pa pi pl ps pt pt_BR qu rm rn ro ru rue rw sa sc sd se sg si sk sl sm sma sn so sq sr ss st su sv sw ta te tg th ti tk tl tn to tr ts tt tw ty ug uk ur uz ve vi vo wa wo xh yi yo za zh zh_CN zh_HK zh_TW zu
diff -Nru -w vala-panel-appmenu-0.7.6+dfsg1/po/pt.po vala-panel-appmenu-24.05+dfsg/po/pt.po
--- vala-panel-appmenu-0.7.6+dfsg1/po/pt.po	2020-10-28 22:08:48.000000000 +0100
+++ vala-panel-appmenu-24.05+dfsg/po/pt.po	2024-05-22 13:16:00.000000000 +0200
@@ -1,5 +1,177 @@
+# # Portuguese translation for Vala Panel Application Menu.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+# Hugo Carvalho <hugokarvalho@hotmail.com>, 2022.
+#
 msgid ""
 msgstr ""
+"Project-Id-Version: AppMenu\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2019-04-24 16:13+0300\n"
+"PO-Revision-Date: \n"
+"Last-Translator: Hugo Carvalho <hugokarvalho@hotmail.com>\n"
+"Language-Team: \n"
+"Language: pt\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=2; plural=n != 1;\n"
+"X-Generator: Poedit 3.0.1\n"
+
+#: ../lib/appmenu-desktop.vala:39 ../lib/appmenu-desktop.vala:65
+#: ../lib/helper-desktop.vala:58
+msgid "_Desktop"
+msgstr "_Desktop"
+
+#: ../lib/appmenu-desktop.vala:153 ../lib/appmenu-desktop.vala:205
+#: ../lib/helper-desktop.vala:192
+msgid "No files"
+msgstr "Sem ficheiros"
+
+#: ../lib/appmenu-bamf.vala:37 ../lib/desktop-menus.ui:40
+msgid "_New Window..."
+msgstr "_Nova janela..."
+
+#: ../lib/appmenu-bamf.vala:38 ../lib/desktop-menus.ui:45
+msgid "Close _This"
+msgstr "_Fechar isto"
+
+#: ../lib/appmenu-bamf.vala:39 ../lib/desktop-menus.ui:50
+msgid "Close _All"
+msgstr "Fech_ar tudo"
+
+#: ../lib/menu-widget-menumodel.vala:42 ../lib/menu-widget-menumodel.vala:63
+msgid "_Application"
+msgstr "_Aplicação"
+
+#: ../lib/desktop-menus.ui:6
+msgid "_Desktop Settings"
+msgstr "Definições do Desktop"
+
+#: ../lib/desktop-menus.ui:10
+msgid "_System Settings"
+msgstr "Definições do Sistema"
+
+#: ../lib/desktop-menus.ui:17
+msgid "_Files"
+msgstr "_Ficheiros"
+
+#: ../data/xfce/appmenu.desktop.xfce.in:5 ../data/appmenu.desktop.plugin.in:4
+#: ../data/appmenu.desktop.xfce.in:5 ../data/appmenu.desktop.in:5
+#: ../data/appmenu.plugin.desktop.in:4
+#: ../data/org.valapanel.appmenu.desktop.in:4
+msgid "AppMenu Plugin"
+msgstr "Plugin AppMenu"
+
+#: ../data/xfce/appmenu.desktop.xfce.in:6 ../data/appmenu.desktop.plugin.in:5
+#: ../data/appmenu.desktop.xfce.in:6 ../data/appmenu.desktop.in:6
+#: ../data/appmenu.plugin.desktop.in:5
+#: ../data/org.valapanel.appmenu.desktop.in:5
+msgid "Display AppMenu (Global Menu)"
+msgstr "Mostrar AppMenu (Menu Global)"
+
+#: ../data/xfce/appmenu.desktop.xfce.in:7
+#: ../data/appmenu-mate.desktop.plugin.in:11 ../data/appmenu.desktop.xfce.in:7
+#: ../data/appmenu-mate.desktop.in:11 ../data/appmenu-mate.plugin.desktop.in:11
+#: ../data/appmenu.desktop.in:7
+msgid "applications-system"
+msgstr "applications-system"
+
+#: ../lib/desktop-menus.ui:21
+msgid "_Documents"
+msgstr "_Documentos"
+
+#: ../lib/desktop-menus.ui:25
+msgid "_Music"
+msgstr "_Música"
+
+#: ../lib/desktop-menus.ui:29
+msgid "_Pictures"
+msgstr "_Imagens"
+
+#: ../lib/desktop-menus.ui:33
+msgid "_Video"
+msgstr "_Vídeo"
+
+#: ../lib/budgie-plugin-appmenu.vala:51 ../lib/valapanel-plugin-appmenu.vala:73
+#: ../lib/valapanel-plugin-appmenu.vala:88 ../lib/mate-plugin-appmenu.vala:43
+#: ../lib/xfce4-plugin-appmenu.vala:56 ../lib/valapanel-plugin-appmenu.vala:67
+msgid "Use Compact mode (all menus in application menu)"
+msgstr "Usar o modo Compacto (todos os menus no menu de aplicações)"
+
+#: ../lib/budgie-plugin-appmenu.vala:54 ../lib/mate-plugin-appmenu.vala:46
+#: ../lib/valapanel-plugin-appmenu.vala:76
+#: ../lib/valapanel-plugin-appmenu.vala:91 ../lib/xfce4-plugin-appmenu.vala:59
+#: ../lib/valapanel-plugin-appmenu.vala:70
+msgid "Use bold application name"
+msgstr "Usar nome de aplicação em negrito"
+
+#: ../lib/helper-dbus.vala:101
+msgid "Application"
+msgstr "Aplicação"
+
+#: ../lib/mate-plugin-appmenu.vala:36
+msgid "_Preferences"
+msgstr "_Preferências"
+
+#: ../lib/mate-plugin-appmenu.vala:39 ../lib/valapanel-plugin-appmenu.vala:85
+#: ../lib/xfce4-plugin-appmenu.vala:52
+msgid "Configure AppMenu"
+msgstr "Configurar o AppMenu"
+
+#: ../lib/mate-plugin-appmenu.vala:43 ../lib/xfce4-plugin-appmenu.vala:56
+msgid "Use Compact mode (all menus in application menu"
+msgstr "Usar o modo Compacto (todos os menus no menu de aplicações"
+
+#: ../lib/xfce4-plugin-appmenu.vala:62
+msgid "Expand plugin on panel"
+msgstr "Expandir o plugin no painel"
+
+#: ../lib/desktop-menus.ui:40
+msgid "_New"
+msgstr "_Novo"
+
+#: ../lib/desktop-menus.ui:51
+msgid "_Quit"
+msgstr "_Sair"
+
+#: ../data/appmenu-budgie.desktop.plugin.in:4
+#: ../data/appmenu-budgie.desktop.in:4
+msgid "Global Menu"
+msgstr "Menu Global"
+
+#: ../data/appmenu-budgie.desktop.plugin.in:5
+#: ../data/appmenu-budgie.desktop.in:5
+msgid "Show menus from windows"
+msgstr "Mostrar menus das janelas"
+
+#: ../data/appmenu-budgie.desktop.plugin.in:9
+#: ../data/appmenu-budgie.desktop.in:9
+msgid "view-grid-symbolic"
+msgstr "view-grid-symbolic"
+
+#: ../data/appmenu-mate.desktop.plugin.in:5 ../data/appmenu-mate.desktop.in:5
+#: ../data/appmenu-mate.plugin.desktop.in:5
+msgid "Appmenu applet factory"
+msgstr "Appmenu applet factory"
+
+#: ../data/appmenu-mate.desktop.plugin.in:9 ../data/appmenu-mate.desktop.in:9
+#: ../data/appmenu-mate.plugin.desktop.in:9
+msgid "Global Application Menu"
+msgstr "Menu de aplicações global"
+
+#: ../data/appmenu-mate.desktop.plugin.in:10 ../data/appmenu-mate.desktop.in:10
+#: ../data/appmenu-mate.plugin.desktop.in:10
+msgid "All menus will hosts here"
+msgstr "Todos os menus serão alojados aqui"
+
+#: ../lib/menu-widget.vala:114
+msgid "Compact Menu"
+msgstr "Menu Compacto"
+
+#: ../data/appmenu.desktop.plugin.in:6 ../data/appmenu.plugin.desktop.in:6
+#: ../data/org.valapanel.appmenu.desktop.in:6
+msgid "preferences-system-symbolic"
+msgstr "preferences-system-symbolic"
diff -Nru -w vala-panel-appmenu-0.7.6+dfsg1/README.md vala-panel-appmenu-24.05+dfsg/README.md
--- vala-panel-appmenu-0.7.6+dfsg1/README.md	2020-10-28 22:08:48.000000000 +0100
+++ vala-panel-appmenu-24.05+dfsg/README.md	2024-05-22 13:16:00.000000000 +0200
@@ -9,7 +9,7 @@
  * GLib (>= 2.50.0)
  * GTK+ (>= 3.22.0)
  * valac (>= 0.24.0)
- * libbamf (>=0.5.0)
+ * libwnck (>=3.4.8)
 
 ---
 Compilation Instructions (Non-Distribution-Specific)
@@ -17,24 +17,20 @@
   * Install all the required dependencies listed above. These packages may have different names depending on your distribution. Please see [below](#dependency-packages) for the package names on some specific distributions (i.e. Ubuntu).
   * Clone this repository to your `home` directory by typing:
   `git clone https://gitlab.com/vala-panel-project/vala-panel-appmenu.git` then `cd` into the directory.
-  * type `git submodule init && git submodule update --remote --merge` to download the submodules (this will download the cmake and dbus-menu submodules you see in the repository, above)
-  * type `mkdir build && cd build` (to keep things tidy)
-  * You're **almost** ready to run `cmake`. First, review the following flags:
-    * CMAKE FLAGS:
-      * `-DENABLE_XFCE=[ON/OFF]` Use `ON` to compile applet for XFCE Panel
-      * `-DENABLE_BUDGIE=[ON/OFF]` Use `ON` to compile for budgie (experimental)
-      * `-DENABLE_VALAPANEL=[ON/OFF]` Use `ON` to compile for Vala Panel
-      * `-DENABLE_MATE=[ON/OFF]` Use `ON` to compile for MATE Panel
-      * `-DENABLE_JAYATANA=[ON/OFF]` Use `ON` to include Jayatana library (enable global menu for java swing applications)
-      * `-DENABLE_APPMENU_GTK_MODULE=ON` Use this flag if you are compiling for a distro other than Arch (see instructions below for including unity-gtk-module with Arch) or Ubuntu (Ubuntu users can install unity-gtk-module from the ubuntu repositories--see 'Post-build Instructions', below).
-      * `-DCMAKE_INSTALL_PREFIX=[path]` By default, Vala-Panel-Appmenu will install in the `/usr/local` directory. You can use this flag to change that. For some DEs (XFCE, for example), it is required to match install prefix with panel prefix (`/usr` in most distros), so, do not forget it.
-  * once you've decided on any flags you want to include, type (from your build directory) `cmake [flags] ..`
-  * once the build is successful, you can compile and install Vala-Panel-Appmenu by typing `make && sudo make install`
+  * You're **almost** ready to run `meson`. First, review the following flags:
+    * Meson flags:
+      * `-Dxfce=[enabled/disabled]` Use `enabled` to compile applet for XFCE Panel
+      * `-Dbudgie=[enabled/disabled]` Use `enabled` to compile for budgie (experimental)
+      * `-Dvalapanel=[enabled/disabled]` Use `enabled` to compile for Vala Panel
+      * `-Dmate=[enabled/disabled]` Use `enabled` to compile for MATE Panel
+      * `-Djayatana=[enabled/disabled]` Use `enabled` to include Jayatana library (enable global menu for java swing applications), requires CMake
+      * `-Dappmenu-gtk-module=enabled` Use this flag if you are compiling for a distro other than Arch (see instructions below for including unity-gtk-module with Arch) or Ubuntu (Ubuntu users can install unity-gtk-module from the ubuntu repositories--see 'Post-build Instructions', below).
+      * `--prefix=[path]` By default, Vala-Panel-Appmenu will install in the `/usr/local` directory. You can use this flag to change that. For some DEs (XFCE, for example), it is required to match install prefix with panel prefix (`/usr` in most distros), so, do not forget it.
+  * once you've decided on any flags you want to include, type (from your build directory) `meson [flags] [dir]`
+  * once the build is successful, you can compile and install Vala-Panel-Appmenu by typing `cd [dir] && ninja && sudo ninja install`
 ---
 Post-Build Instructions
 ---
-- Install bamfdaemon (if it is not bundled with libbamf)
-  - It is strongly recommend to add bamfdaemon to autostart
 - Install GTK module using instructions below
 - To get QT menus to work, install your distribution's qt4 and qt5 appmenu packages. In Ubuntu 17.04, for example, this involves typing `sudo apt-get install appmenu-qt`
   
@@ -46,12 +42,12 @@
 
  **ARCH-BASED DISTROS**
 * Install from AUR [appmenu-gtk-module-git](https://aur.archlinux.org/packages/appmenu-gtk-module-git/) for GTK applications to work
-* Install [Appmenu](https://www.archlinux.org/packages/community/x86_64/appmenu-qt4/) to get appmenu for Qt4 Applications to work. Qt 5.7 must work out of the box.
+* Install [Appmenu](https://aur.archlinux.org/packages/appmenu-qt4) to get appmenu for Qt4 Applications to work. Qt 5.7 must work out of the box.
 * Install these [libdbusmenu-glib](https://archlinux.org/packages/libdbusmenu-glib/) [libdbusmenu-gtk3](https://archlinux.org/packages/libdbusmenu-gtk3/) [libdbusmenu-gtk2](https://archlinux.org/packages/libdbusmenu-gtk2/) to get Chromium/Google Chrome to work
  - Follow instructions in the (appmenu-gtk-module) [README](subprojects/appmenu-gtk-module/README.md), if it is not enabled automatically.
 
  **DISTROS OTHER THAN ARCH OR UBUNTU**
- - When building vala-panel-appmenu with CMAKE, use the flag, `-DENABLE_APPMENU_GTK_MODULE=ON`
+ - When building vala-panel-appmenu with meson, use the flag, `-Dappmenu-gtk-module=enabled`
  - Follow instructions in the (appmenu-gtk-module) [README](subprojects/appmenu-gtk-module/README.md)
 
 
@@ -97,7 +93,7 @@
 There are some problems with the implementation, notably that you need to include `env XDG_CURRENT_DESKTOP=Unity` to the beginning of your launch command.
 
 Basic Instructions for Enabling JAyatana:
-* Install OpenJDK >= 7 or JDK >= 1.7
+* Install OpenJDK >= 9 or JDK >= 1.9
 * Build vala-panel-appmenu with `-DENABLE_JAYATANA=ON`
 * Add following lines to your ~/.profile and ~/.bashrc, in any order:
 ```
diff -Nru -w vala-panel-appmenu-0.7.6+dfsg1/subprojects/appmenu-glib-translator/com.canonical.dbusmenu.xml vala-panel-appmenu-24.05+dfsg/subprojects/appmenu-glib-translator/com.canonical.dbusmenu.xml
--- vala-panel-appmenu-0.7.6+dfsg1/subprojects/appmenu-glib-translator/com.canonical.dbusmenu.xml	1970-01-01 01:00:00.000000000 +0100
+++ vala-panel-appmenu-24.05+dfsg/subprojects/appmenu-glib-translator/com.canonical.dbusmenu.xml	2024-05-22 13:16:00.000000000 +0200
@@ -0,0 +1,60 @@
+<node>
+   <interface name="com.canonical.dbusmenu">
+      <annotation name="org.gtk.GDBus.C.Name" value="Xml" />
+      <property name="Version" type="u" access="read" />
+      <property name="Status" type="s" access="read" />
+      <property name="TextDirection" type="s" access="read" />
+      <property name="IconThemePath" type="as" access="read" />
+      <signal name="ItemsPropertiesUpdated">
+         <arg type="a(ia{sv})" direction="out" />
+         <arg type="a(ias)" direction="out" />
+      </signal>
+      <signal name="LayoutUpdated">
+         <arg name="revision" type="u" direction="out" />
+         <arg name="parentId" type="i" direction="out" />
+      </signal>
+      <signal name="ItemActivationRequested">
+         <arg name="id" type="i" direction="out" />
+         <arg name="timeStamp" type="u" direction="out" />
+      </signal>
+      <method name="Event">
+         <arg name="id" type="i" direction="in" />
+         <arg name="eventId" type="s" direction="in" />
+         <arg name="data" type="v" direction="in" />
+         <arg name="timestamp" type="u" direction="in" />
+         <annotation name="org.freedesktop.DBus.Method.NoReply" value="true" />
+      </method>
+      <method name="EventGroup">
+         <arg type="a(isvu)" name="events" direction="in" />
+         <arg type="ai" name="idErrors" direction="out" />
+      </method>
+      <method name="GetProperty">
+         <arg type="v" direction="out" />
+         <arg name="id" type="i" direction="in" />
+         <arg name="property" type="s" direction="in" />
+      </method>
+      <method name="GetLayout">
+         <arg type="u" direction="out" />
+         <arg name="parentId" type="i" direction="in" />
+         <arg name="recursionDepth" type="i" direction="in" />
+         <arg name="propertyNames" type="as" direction="in" />
+         <arg name="item" type="(ia{sv}av)" direction="out" />
+      </method>
+      <method name="GetGroupProperties">
+         <arg type="a(ia{sv})" direction="out" />
+         <arg name="ids" type="ai" direction="in" />
+         <arg name="propertyNames" type="as" direction="in" />
+      </method>
+      <method name="AboutToShow">
+         <arg name="needUpdate" type="b" direction="out" />
+         <arg name="id" type="i" direction="in" />
+      </method>
+      <method name="AboutToShowGroup">
+         <arg type="ai" name="ids" direction="in" />
+         <arg type="ai" name="updatesNeeded" direction="out" />
+         <arg type="ai" name="idErrors" direction="out" />
+      </method>
+   </interface>
+</node>
+
+
diff -Nru -w vala-panel-appmenu-0.7.6+dfsg1/subprojects/appmenu-glib-translator/debug.c vala-panel-appmenu-24.05+dfsg/subprojects/appmenu-glib-translator/debug.c
--- vala-panel-appmenu-0.7.6+dfsg1/subprojects/appmenu-glib-translator/debug.c	1970-01-01 01:00:00.000000000 +0100
+++ vala-panel-appmenu-24.05+dfsg/subprojects/appmenu-glib-translator/debug.c	2024-05-22 13:16:00.000000000 +0200
@@ -0,0 +1,157 @@
+/*
+ * vala-panel-appmenu
+ * Copyright (C) 2018 Konstantin Pugin <ria.freelander@gmail.com>
+ * Copyright (C) 2013-2018 Allison Lortie <desrt@desrt.ca>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "debug.h"
+#include <gio/gio.h>
+#include <stdbool.h>
+/* Markup printing {{{1 */
+
+/* This used to be part of GLib, but it was removed before the stable
+ * release because it wasn't generally useful.  We want it here, though.
+ */
+
+G_GNUC_INTERNAL void g_menu_markup_print_to_console(GMenuModel *menu)
+{
+	GString *str = g_string_new(NULL);
+	g_menu_markup_print_string(str, menu, 4, 4);
+	char *cstr = g_string_free(str, false);
+	g_print("%s\n", cstr);
+}
+
+G_GNUC_INTERNAL void dbus_menu_print_variant(GVariant *var)
+{
+	g_autofree char *pr = g_variant_print(var, true);
+	g_print("%s\n", pr);
+}
+
+static void indent_string(GString *string, gint indent)
+{
+	while (indent--)
+		g_string_append_c(string, ' ');
+}
+
+G_GNUC_INTERNAL GString *g_menu_markup_print_string(GString *string, GMenuModel *model, gint indent,
+                                                    gint tabstop)
+{
+	gboolean need_nl = false;
+	gint i, n;
+
+	if G_UNLIKELY (string == NULL)
+		string = g_string_new(NULL);
+
+	n = g_menu_model_get_n_items(model);
+
+	for (i = 0; i < n; i++)
+	{
+		GMenuAttributeIter *attr_iter;
+		GMenuLinkIter *link_iter;
+		GString *contents;
+		GString *attrs;
+
+		attr_iter = g_menu_model_iterate_item_attributes(model, i);
+		link_iter = g_menu_model_iterate_item_links(model, i);
+		contents  = g_string_new(NULL);
+		attrs     = g_string_new(NULL);
+
+		while (g_menu_attribute_iter_next(attr_iter))
+		{
+			const char *name = g_menu_attribute_iter_get_name(attr_iter);
+			GVariant *value  = g_menu_attribute_iter_get_value(attr_iter);
+
+			if (g_variant_is_of_type(value, G_VARIANT_TYPE_STRING))
+			{
+				char *str;
+				str = g_markup_printf_escaped(" %s='%s'",
+				                              name,
+				                              g_variant_get_string(value, NULL));
+				g_string_append(attrs, str);
+				g_free(str);
+			}
+
+			else
+			{
+				char *printed;
+				char *str;
+				const char *type;
+
+				printed = g_variant_print(value, true);
+				type    = g_variant_type_peek_string(g_variant_get_type(value));
+				str     = g_markup_printf_escaped(
+                                    "<attribute name='%s' type='%s'>%s</attribute>\n",
+                                    name,
+                                    type,
+                                    printed);
+				indent_string(contents, indent + tabstop);
+				g_string_append(contents, str);
+				g_free(printed);
+				g_free(str);
+			}
+
+			g_variant_unref(value);
+		}
+		g_object_unref(attr_iter);
+
+		while (g_menu_link_iter_next(link_iter))
+		{
+			const char *name = g_menu_link_iter_get_name(link_iter);
+			GMenuModel *menu = g_menu_link_iter_get_value(link_iter);
+			char *str;
+
+			if (contents->str[0])
+				g_string_append_c(contents, '\n');
+
+			str = g_markup_printf_escaped("<link name='%s'>\n", name);
+			indent_string(contents, indent + tabstop);
+			g_string_append(contents, str);
+			g_free(str);
+
+			g_menu_markup_print_string(contents, menu, indent + 2 * tabstop, tabstop);
+
+			indent_string(contents, indent + tabstop);
+			g_string_append(contents, "</link>\n");
+			g_object_unref(menu);
+		}
+		g_object_unref(link_iter);
+
+		if (contents->str[0])
+		{
+			indent_string(string, indent);
+			g_string_append_printf(string, "<item%s>\n", attrs->str);
+			g_string_append(string, contents->str);
+			indent_string(string, indent);
+			g_string_append(string, "</item>\n");
+			need_nl = true;
+		}
+
+		else
+		{
+			if (need_nl)
+				g_string_append_c(string, '\n');
+
+			indent_string(string, indent);
+			g_string_append_printf(string, "<item%s/>\n", attrs->str);
+			need_nl = false;
+		}
+
+		g_string_free(contents, true);
+		g_string_free(attrs, true);
+	}
+
+	return string;
+}
diff -Nru -w vala-panel-appmenu-0.7.6+dfsg1/subprojects/appmenu-glib-translator/debug.h vala-panel-appmenu-24.05+dfsg/subprojects/appmenu-glib-translator/debug.h
--- vala-panel-appmenu-0.7.6+dfsg1/subprojects/appmenu-glib-translator/debug.h	1970-01-01 01:00:00.000000000 +0100
+++ vala-panel-appmenu-24.05+dfsg/subprojects/appmenu-glib-translator/debug.h	2024-05-22 13:16:00.000000000 +0200
@@ -0,0 +1,27 @@
+/*
+ * vala-panel-appmenu
+ * Copyright (C) 2018 Konstantin Pugin <ria.freelander@gmail.com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef DEBUG_H
+#define DEBUG_H
+
+#include <gio/gio.h>
+G_GNUC_INTERNAL GString *g_menu_markup_print_string(GString *string, GMenuModel *model, gint indent,
+                                                    gint tabstop);
+G_GNUC_INTERNAL void g_menu_markup_print_to_console(GMenuModel *menu);
+G_GNUC_INTERNAL void dbus_menu_print_variant(GVariant *var);
+#endif // DEBUG_H
diff -Nru -w vala-panel-appmenu-0.7.6+dfsg1/subprojects/appmenu-glib-translator/definitions.h vala-panel-appmenu-24.05+dfsg/subprojects/appmenu-glib-translator/definitions.h
--- vala-panel-appmenu-0.7.6+dfsg1/subprojects/appmenu-glib-translator/definitions.h	1970-01-01 01:00:00.000000000 +0100
+++ vala-panel-appmenu-24.05+dfsg/subprojects/appmenu-glib-translator/definitions.h	2024-05-22 13:16:00.000000000 +0200
@@ -0,0 +1,125 @@
+/*
+ * vala-panel-appmenu
+ * Copyright (C) 2018 Konstantin Pugin <ria.freelander@gmail.com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef DEFINITIONS_H
+#define DEFINITIONS_H
+
+#define DBUS_MENU_ACTION_NAMESPACE "dbusmenu"
+#define DBUS_MENU_ACTION_NAMESPACE_PREFIX DBUS_MENU_ACTION_NAMESPACE "."
+
+#define ACTION_PREFIX "id-"
+#define SUBMENU_PREFIX "submenu-"
+#define CURRENT_TIME 0L
+#define HAS_ICON_NAME "has-icon-name"
+
+typedef enum
+{
+	DBUS_MENU_ACTION_SECTION,
+	DBUS_MENU_ACTION_NORMAL,
+	DBUS_MENU_ACTION_CHECKMARK,
+	DBUS_MENU_ACTION_RADIO,
+	DBUS_MENU_ACTION_SUBMENU,
+	DBUS_MENU_ACTION_ALL
+} DBusMenuActionType;
+
+#define SUBMENU_ACTION_MENUMODEL_QUARK_STR "submenu-action_menumodel"
+#define ACTIVATE_ID_QUARK_STR "checker-quark"
+#define POPULATED_QUARK "is-populated"
+
+#define DBUS_MENU_PROP_TYPE "type"
+#define DBUS_MENU_TYPE_SEPARATOR "separator"
+#define DBUS_MENU_TYPE_NORMAL "normal"
+
+#define DBUS_MENU_PROP_TOGGLE_TYPE "toggle-type"
+#define DBUS_MENU_TOGGLE_TYPE_CHECK "checkmark"
+#define DBUS_MENU_TOGGLE_TYPE_RADIO "radio"
+
+#define DBUS_MENU_PROP_CHILDREN_DISPLAY "children-display"
+#define DBUS_MENU_CHILDREN_DISPLAY_SUBMENU "submenu"
+
+#define DBUS_MENU_SHORTCUT_CONTROL "Control"
+#define DBUS_MENU_SHORTCUT_ALT "Alt"
+#define DBUS_MENU_SHORTCUT_SHIFT "Shift"
+#define DBUS_MENU_SHORTCUT_SUPER "Super"
+
+#define DBUS_MENUMODEL_SHORTCUT_SHIFT "<Shift>"
+#define DBUS_MENUMODEL_SHORTCUT_CONTROL "<Control>"
+#define DBUS_MENUMODEL_SHORTCUT_ALT "<Alt>"
+#define DBUS_MENUMODEL_SHORTCUT_SUPER "<Super>"
+
+#define DBUS_MENU_DISABLED_ACTION "ls.disabled"
+#define DBUS_MENU_DISABLED_SUBMENU "disabled-submenu"
+#define DBUS_MENU_PROPERTY_ENABLED "enabled"
+#define DBUS_MENU_PROPERTY_TOGGLE_STATE "toggle-state"
+#define DBUS_MENU_ACTION_RADIO_SELECTED "+"
+#define DBUS_MENU_ACTION_RADIO_UNSELECTED "-"
+
+#define G_MENU_ATTRIBUTE_ACCEL "accel"
+#define G_MENU_ATTRIBUTE_ACCEL_TEXT "x-canonical-accel"
+#define G_MENU_ATTRIBUTE_SUBMENU_ACTION "submenu-action"
+#define G_MENU_ATTRIBUTE_HIDDEN_WHEN "hidden-when"
+#define G_MENU_ATTRIBUTE_VERB_ICON "verb-icon"
+#define G_MENU_HIDDEN_WHEN_ACTION_MISSING "action-missing"
+#define G_MENU_HIDDEN_WHEN_ACTION_DISABLED "action-disabled"
+
+#define g_signal_handlers_block_by_func_only(instance, func)                                       \
+	g_signal_handlers_block_matched((instance),                                                \
+	                                (GSignalMatchType)(G_SIGNAL_MATCH_FUNC),                   \
+	                                0,                                                         \
+	                                0,                                                         \
+	                                NULL,                                                      \
+	                                (gpointer)(func),                                          \
+	                                NULL)
+
+#define g_signal_handlers_unblock_by_func_only(instance, func)                                     \
+	g_signal_handlers_unblock_matched((instance),                                              \
+	                                  (GSignalMatchType)(G_SIGNAL_MATCH_FUNC),                 \
+	                                  0,                                                       \
+	                                  0,                                                       \
+	                                  NULL,                                                    \
+	                                  (gpointer)(func),                                        \
+	                                  NULL)
+
+#define g_signal_handlers_block_by_data(instance, data)                                            \
+	g_signal_handlers_block_matched((instance),                                                \
+	                                (GSignalMatchType)(G_SIGNAL_MATCH_DATA),                   \
+	                                0,                                                         \
+	                                0,                                                         \
+	                                NULL,                                                      \
+	                                NULL,                                                      \
+	                                (data))
+
+#define g_signal_handlers_unblock_by_data(instance, data)                                          \
+	g_signal_handlers_unblock_matched((instance),                                              \
+	                                  (GSignalMatchType)(G_SIGNAL_MATCH_DATA),                 \
+	                                  0,                                                       \
+	                                  0,                                                       \
+	                                  NULL,                                                    \
+	                                  NULL,                                                    \
+	                                  (data))
+
+#define g_signal_handlers_disconnect_by_func_only(instance, func)                                  \
+	g_signal_handlers_disconnect_matched((instance),                                           \
+	                                     (GSignalMatchType)(G_SIGNAL_MATCH_FUNC),              \
+	                                     0,                                                    \
+	                                     0,                                                    \
+	                                     NULL,                                                 \
+	                                     (gpointer)(func),                                     \
+	                                     NULL)
+
+#endif // DEFINITIONS_H
diff -Nru -w vala-panel-appmenu-0.7.6+dfsg1/subprojects/appmenu-glib-translator/importer.c vala-panel-appmenu-24.05+dfsg/subprojects/appmenu-glib-translator/importer.c
--- vala-panel-appmenu-0.7.6+dfsg1/subprojects/appmenu-glib-translator/importer.c	1970-01-01 01:00:00.000000000 +0100
+++ vala-panel-appmenu-24.05+dfsg/subprojects/appmenu-glib-translator/importer.c	2024-05-22 13:16:00.000000000 +0200
@@ -0,0 +1,255 @@
+/*
+ * vala-panel-appmenu
+ * Copyright (C) 2018 Konstantin Pugin <ria.freelander@gmail.com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "importer.h"
+#include "dbusmenu-interface.h"
+#include "model.h"
+
+struct _DBusMenuImporter
+{
+	GObject parent_instance;
+	char *bus_name;
+	char *object_path;
+	ulong name_id;
+	GCancellable *cancellable;
+	DBusMenuXml *proxy;
+	DBusMenuModel *top_model;
+	GSimpleActionGroup *all_actions;
+};
+
+enum
+{
+	PROP_NULL,
+	PROP_BUS_NAME,
+	PROP_OBJECT_PATH,
+	PROP_MODEL,
+	PROP_ACTION_GROUP,
+	LAST_PROP
+};
+
+static GParamSpec *properties[LAST_PROP] = { NULL };
+G_DEFINE_TYPE(DBusMenuImporter, dbus_menu_importer, G_TYPE_OBJECT)
+
+static bool dbus_menu_importer_check(DBusMenuImporter *menu)
+{
+	if (DBUS_MENU_IS_XML(menu->proxy))
+		return dbus_menu_xml_get_version(menu->proxy) >= 2;
+	return false;
+}
+
+static void dbus_menu_importer_on_root_model_changed(GMenuModel *model, gint position, gint removed,
+                                                     gint added, gpointer user_data)
+{
+	DBusMenuImporter *menu = DBUS_MENU_IMPORTER(user_data);
+	g_object_notify_by_pspec(G_OBJECT(menu), properties[PROP_MODEL]);
+}
+
+static void proxy_ready_cb(GObject *source_object, GAsyncResult *res, gpointer user_data)
+{
+	g_autoptr(GError) error = NULL;
+	DBusMenuXml *proxy      = dbus_menu_xml_proxy_new_finish(res, &error);
+
+	if (g_error_matches(error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
+		return;
+
+	DBusMenuImporter *menu = DBUS_MENU_IMPORTER(user_data);
+	menu->proxy            = proxy;
+
+	if (error)
+	{
+		g_warning("%s", error->message);
+		return;
+	}
+	if (dbus_menu_importer_check(menu))
+		g_object_set(menu->top_model, "xml", proxy, NULL);
+	g_object_notify_by_pspec(G_OBJECT(menu), properties[PROP_MODEL]);
+}
+
+static void name_appeared_cb(GDBusConnection *connection, const char *name, const char *name_owner,
+                             gpointer user_data)
+{
+	DBusMenuImporter *menu = DBUS_MENU_IMPORTER(user_data);
+
+	dbus_menu_xml_proxy_new(connection,
+	                        G_DBUS_PROXY_FLAGS_NONE,
+	                        menu->bus_name,
+	                        menu->object_path,
+	                        menu->cancellable,
+	                        proxy_ready_cb,
+	                        menu);
+}
+
+static void name_vanished_cb(GDBusConnection *connection, const char *name, gpointer user_data)
+{
+	DBusMenuImporter *menu = DBUS_MENU_IMPORTER(user_data);
+
+	g_object_set(menu->top_model, "xml", NULL, NULL);
+	g_object_notify_by_pspec(G_OBJECT(menu), properties[PROP_MODEL]);
+	g_clear_object(&menu->proxy);
+}
+
+static void dbus_menu_importer_constructed(GObject *object)
+{
+	G_OBJECT_CLASS(dbus_menu_importer_parent_class)->constructed(object);
+	DBusMenuImporter *menu = DBUS_MENU_IMPORTER(object);
+
+	menu->name_id = g_bus_watch_name(G_BUS_TYPE_SESSION,
+	                                 menu->bus_name,
+	                                 G_BUS_NAME_WATCHER_FLAGS_NONE,
+	                                 name_appeared_cb,
+	                                 name_vanished_cb,
+	                                 menu,
+	                                 NULL);
+}
+
+static void dbus_menu_importer_dispose(GObject *object)
+{
+	DBusMenuImporter *menu = DBUS_MENU_IMPORTER(object);
+
+	if (menu->name_id > 0)
+	{
+		g_bus_unwatch_name(menu->name_id);
+		menu->name_id = 0;
+	}
+	g_cancellable_cancel(menu->cancellable);
+	g_clear_object(&menu->cancellable);
+	g_signal_handlers_disconnect_by_data(menu->top_model, menu);
+	g_clear_object(&menu->top_model);
+	g_clear_object(&menu->proxy);
+	g_clear_object(&menu->all_actions);
+
+	G_OBJECT_CLASS(dbus_menu_importer_parent_class)->dispose(object);
+}
+
+static void dbus_menu_importer_finalize(GObject *object)
+{
+	DBusMenuImporter *menu = DBUS_MENU_IMPORTER(object);
+
+	g_clear_pointer(&menu->bus_name, g_free);
+	g_clear_pointer(&menu->object_path, g_free);
+
+	G_OBJECT_CLASS(dbus_menu_importer_parent_class)->finalize(object);
+}
+
+static void dbus_menu_importer_set_property(GObject *object, guint property_id, const GValue *value,
+                                            GParamSpec *pspec)
+{
+	DBusMenuImporter *menu = DBUS_MENU_IMPORTER(object);
+
+	switch (property_id)
+	{
+	case PROP_BUS_NAME:
+		menu->bus_name = g_value_dup_string(value);
+		break;
+
+	case PROP_OBJECT_PATH:
+		menu->object_path = g_value_dup_string(value);
+		break;
+
+	default:
+		G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec);
+		break;
+	}
+}
+
+static void dbus_menu_importer_get_property(GObject *object, guint property_id, GValue *value,
+                                            GParamSpec *pspec)
+{
+	DBusMenuImporter *menu = DBUS_MENU_IMPORTER(object);
+	switch (property_id)
+	{
+	case PROP_MODEL:
+		g_value_set_object(value, menu->top_model);
+		break;
+	case PROP_ACTION_GROUP:
+		g_value_set_object(value, menu->all_actions);
+		break;
+
+	default:
+		G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec);
+		break;
+	}
+}
+
+static void install_properties(GObjectClass *object_class)
+{
+	properties[PROP_BUS_NAME] =
+	    g_param_spec_string("bus-name",
+	                        "bus-name",
+	                        "bus-name",
+	                        NULL,
+	                        G_PARAM_CONSTRUCT_ONLY | G_PARAM_WRITABLE | G_PARAM_STATIC_STRINGS);
+
+	properties[PROP_OBJECT_PATH] =
+	    g_param_spec_string("object-path",
+	                        "object-path",
+	                        "object-path",
+	                        NULL,
+	                        G_PARAM_CONSTRUCT_ONLY | G_PARAM_WRITABLE | G_PARAM_STATIC_STRINGS);
+	properties[PROP_MODEL] = g_param_spec_object("model",
+	                                             "model",
+	                                             "model",
+	                                             G_TYPE_MENU_MODEL,
+	                                             G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
+	properties[PROP_ACTION_GROUP] =
+	    g_param_spec_object("action-group",
+	                        "action-group",
+	                        "action-group",
+	                        G_TYPE_ACTION_GROUP,
+	                        G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
+
+	g_object_class_install_properties(object_class, LAST_PROP, properties);
+}
+
+static void dbus_menu_importer_class_init(DBusMenuImporterClass *menu_class)
+{
+	GObjectClass *object_class;
+
+	object_class = G_OBJECT_CLASS(menu_class);
+
+	object_class->constructed  = dbus_menu_importer_constructed;
+	object_class->dispose      = dbus_menu_importer_dispose;
+	object_class->finalize     = dbus_menu_importer_finalize;
+	object_class->set_property = dbus_menu_importer_set_property;
+	object_class->get_property = dbus_menu_importer_get_property;
+
+	install_properties(object_class);
+}
+
+static void dbus_menu_importer_init(DBusMenuImporter *menu)
+{
+	menu->proxy       = NULL;
+	menu->all_actions = g_simple_action_group_new();
+	menu->top_model =
+	    dbus_menu_model_new(0, NULL, menu->proxy, G_ACTION_GROUP(menu->all_actions));
+	g_signal_connect(menu->top_model,
+	                 "items-changed",
+	                 G_CALLBACK(dbus_menu_importer_on_root_model_changed),
+	                 menu);
+	menu->cancellable = g_cancellable_new();
+}
+
+DBusMenuImporter *dbus_menu_importer_new(const char *bus_name, const char *object_path)
+{
+	return g_object_new(dbus_menu_importer_get_type(),
+	                    "bus-name",
+	                    bus_name,
+	                    "object-path",
+	                    object_path,
+	                    NULL);
+}
diff -Nru -w vala-panel-appmenu-0.7.6+dfsg1/subprojects/appmenu-glib-translator/importer-enums.c.template vala-panel-appmenu-24.05+dfsg/subprojects/appmenu-glib-translator/importer-enums.c.template
--- vala-panel-appmenu-0.7.6+dfsg1/subprojects/appmenu-glib-translator/importer-enums.c.template	1970-01-01 01:00:00.000000000 +0100
+++ vala-panel-appmenu-24.05+dfsg/subprojects/appmenu-glib-translator/importer-enums.c.template	2024-05-22 13:16:00.000000000 +0200
@@ -0,0 +1,88 @@
+/*** BEGIN file-header ***/
+#include "importer-enums.h"
+
+/*** END file-header ***/
+
+/*** BEGIN file-production ***/
+/* enumerations from "@basename@" */
+#include "@basename@"
+
+/*** END file-production ***/
+
+/*** BEGIN value-header ***/
+GType
+@enum_name@_get_type (void)
+{
+	static GType the_type = 0;
+	
+	if (the_type == 0)
+	{
+		static const G@Type@Value values[] = {
+/*** END value-header ***/
+
+/*** BEGIN value-production ***/
+			{ @VALUENAME@,
+			  "@VALUENAME@",
+			  "@valuenick@" },
+/*** END value-production ***/
+
+/*** BEGIN value-tail ***/
+			{ 0, NULL, NULL }
+		};
+		the_type = g_@type@_register_static (
+				g_intern_static_string ("@EnumName@"),
+				values);
+	}
+	return the_type;
+}
+
+/**
+	@enum_name@_get_nick:
+	@value: The value of @EnumName@ to get the nick of
+
+	Looks up in the enum table for the nick of @value.
+
+	Return value: The nick for the given value or #NULL on error
+*/
+const gchar *
+@enum_name@_get_nick (@EnumName@ value)
+{
+	GEnumClass * class = G_ENUM_CLASS(g_type_class_ref(@enum_name@_get_type()));
+	g_return_val_if_fail(class != NULL, NULL);
+
+	const gchar * ret = NULL;
+	GEnumValue * val = g_enum_get_value(class, value);
+	if (val != NULL) {
+		ret = val->value_nick;
+	}
+
+	g_type_class_unref(class);
+	return ret;
+}
+
+/**
+	@enum_name@_get_value_from_nick:
+	@nick: The enum nick to lookup
+
+	Looks up in the enum table for the value of @nick.
+
+	Return value: The value for the given @nick
+*/
+@EnumName@
+@enum_name@_get_value_from_nick (const gchar * nick)
+{
+	GEnumClass * class = G_ENUM_CLASS(g_type_class_ref(@enum_name@_get_type()));
+	g_return_val_if_fail(class != NULL, 0);
+
+	@EnumName@ ret = 0;
+	GEnumValue * val = g_enum_get_value_by_nick(class, nick);
+	if (val != NULL) {
+		ret = val->value;
+	}
+
+	g_type_class_unref(class);
+	return ret;
+}
+
+/*** END value-tail ***/
+
diff -Nru -w vala-panel-appmenu-0.7.6+dfsg1/subprojects/appmenu-glib-translator/importer-enums.h.template vala-panel-appmenu-24.05+dfsg/subprojects/appmenu-glib-translator/importer-enums.h.template
--- vala-panel-appmenu-0.7.6+dfsg1/subprojects/appmenu-glib-translator/importer-enums.h.template	1970-01-01 01:00:00.000000000 +0100
+++ vala-panel-appmenu-24.05+dfsg/subprojects/appmenu-glib-translator/importer-enums.h.template	2024-05-22 13:16:00.000000000 +0200
@@ -0,0 +1,32 @@
+/*** BEGIN file-header ***/
+#ifndef IMPORTER_ENUM_TYPES_H
+#define IMPORTER_ENUM_TYPES_H
+
+#include <glib-object.h>
+
+G_BEGIN_DECLS
+
+/*** END file-header ***/
+
+/*** BEGIN file-production ***/
+/* Enumerations from "@basename@" */
+#include "@basename@"
+
+/*** END file-production ***/
+
+/*** BEGIN enumeration-production ***/
+
+#define DBUS_MENU_TYPE_@ENUMSHORT@	(@enum_name@_get_type())
+
+GType @enum_name@_get_type (void) G_GNUC_CONST;
+const gchar * @enum_name@_get_nick (@EnumName@ value) G_GNUC_CONST;
+@EnumName@ @enum_name@_get_value_from_nick (const gchar * nick) G_GNUC_CONST;
+
+/*** END enumeration-production ***/
+
+/*** BEGIN file-tail ***/
+G_END_DECLS
+
+#endif /* VALA_PANEL_ENUM_TYPES_H */
+/*** END file-tail ***/
+
diff -Nru -w vala-panel-appmenu-0.7.6+dfsg1/subprojects/appmenu-glib-translator/importer.h vala-panel-appmenu-24.05+dfsg/subprojects/appmenu-glib-translator/importer.h
--- vala-panel-appmenu-0.7.6+dfsg1/subprojects/appmenu-glib-translator/importer.h	1970-01-01 01:00:00.000000000 +0100
+++ vala-panel-appmenu-24.05+dfsg/subprojects/appmenu-glib-translator/importer.h	2024-05-22 13:16:00.000000000 +0200
@@ -0,0 +1,33 @@
+/*
+ * vala-panel-appmenu
+ * Copyright (C) 2018 Konstantin Pugin <ria.freelander@gmail.com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef IMPORTER_H
+#define IMPORTER_H
+
+#include <gio/gio.h>
+#include <stdbool.h>
+
+G_BEGIN_DECLS
+
+G_DECLARE_FINAL_TYPE(DBusMenuImporter, dbus_menu_importer, DBUS_MENU, IMPORTER, GObject)
+
+DBusMenuImporter *dbus_menu_importer_new(const char *bus_name, const char *object_path);
+
+G_END_DECLS
+
+#endif
diff -Nru -w vala-panel-appmenu-0.7.6+dfsg1/subprojects/appmenu-glib-translator/item.c vala-panel-appmenu-24.05+dfsg/subprojects/appmenu-glib-translator/item.c
--- vala-panel-appmenu-0.7.6+dfsg1/subprojects/appmenu-glib-translator/item.c	1970-01-01 01:00:00.000000000 +0100
+++ vala-panel-appmenu-24.05+dfsg/subprojects/appmenu-glib-translator/item.c	2024-05-22 13:16:00.000000000 +0200
@@ -0,0 +1,620 @@
+/*
+ * vala-panel-appmenu
+ * Copyright (C) 2018 Konstantin Pugin <ria.freelander@gmail.com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <stdbool.h>
+
+#include "dbusmenu-interface.h"
+#include "definitions.h"
+#include "item.h"
+#include "utils.h"
+
+#define ITEM_MAGIC 0xDEADBEEF
+#define item_set_magic(item) (item)->magic = GUINT_TO_POINTER(ITEM_MAGIC)
+#define item_check_magic(item) (GPOINTER_TO_UINT((item)->magic) == ITEM_MAGIC)
+
+#define submenu_str(en) ((en) ? G_MENU_LINK_SUBMENU : DBUS_MENU_DISABLED_SUBMENU)
+
+G_GNUC_INTERNAL void dbus_menu_item_free(gpointer data);
+G_GNUC_INTERNAL DBusMenuItem *dbus_menu_item_copy(DBusMenuItem *src);
+G_DEFINE_BOXED_TYPE(DBusMenuItem, dbus_menu_item, dbus_menu_item_copy, dbus_menu_item_free)
+#if 0
+#include "item-pixbuf.c"
+#endif
+
+static void act_props_try_update(DBusMenuItem *item);
+
+G_GNUC_INTERNAL DBusMenuItem *dbus_menu_item_new_first_section(u_int32_t id,
+                                                               GActionGroup *action_group)
+{
+	DBusMenuItem *item = g_slice_new0(DBusMenuItem);
+	item->id           = id;
+	item->action_type  = DBUS_MENU_ACTION_SECTION;
+	item->enabled      = false;
+	item->toggled      = false;
+	item->attrs =
+	    g_hash_table_new_full(g_str_hash, g_str_equal, g_free, (GDestroyNotify)g_variant_unref);
+	item->links = g_hash_table_new_full(g_str_hash, g_str_equal, NULL, g_object_unref);
+	item->ref_action_group = action_group;
+	item_set_magic(item);
+	return item;
+}
+
+G_GNUC_INTERNAL DBusMenuItem *dbus_menu_item_new(u_int32_t id, DBusMenuModel *parent_model,
+                                                 GVariant *props)
+{
+	DBusMenuItem *item = g_slice_new0(DBusMenuItem);
+	DBusMenuXml *xml;
+	GVariantIter iter;
+	const char *prop;
+	GVariant *value;
+	item_set_magic(item);
+	item->enabled = true;
+	item->toggled = false;
+	item->id      = id;
+	item->attrs =
+	    g_hash_table_new_full(g_str_hash, g_str_equal, g_free, (GDestroyNotify)g_variant_unref);
+	item->links = g_hash_table_new_full(g_str_hash, g_str_equal, NULL, g_object_unref);
+	g_object_get(parent_model, "action-group", &item->ref_action_group, "xml", &xml, NULL);
+	g_variant_iter_init(&iter, props);
+	// Iterate by immutable properties, it is construct_only
+	bool action_creator_found = false;
+	while (g_variant_iter_loop(&iter, "{&sv}", &prop, &value))
+	{
+		if (g_strcmp0(prop, DBUS_MENU_PROP_CHILDREN_DISPLAY) == 0)
+		{
+			if (value == NULL)
+			{
+				g_hash_table_remove(item->attrs, G_MENU_ATTRIBUTE_SUBMENU_ACTION);
+				continue;
+			}
+			else if (g_strcmp0(g_variant_get_string(value, NULL),
+			                   DBUS_MENU_CHILDREN_DISPLAY_SUBMENU) == 0)
+			{
+				item->action_type = DBUS_MENU_ACTION_SUBMENU;
+				g_autofree char *name =
+				    dbus_menu_action_get_name(id, item->action_type, true);
+				g_hash_table_insert(item->attrs,
+				                    g_strdup(G_MENU_ATTRIBUTE_SUBMENU_ACTION),
+				                    g_variant_new_string(name));
+				action_creator_found = true;
+			}
+		}
+		else if (g_strcmp0(prop, DBUS_MENU_PROP_TOGGLE_TYPE) == 0)
+		{
+			g_autofree char *name =
+			    dbus_menu_action_get_name(id, item->action_type, true);
+			if (g_strcmp0(g_variant_get_string(value, NULL),
+			              DBUS_MENU_TOGGLE_TYPE_CHECK) == 0)
+			{
+				item->action_type = DBUS_MENU_ACTION_CHECKMARK;
+				g_hash_table_insert(item->attrs,
+				                    g_strdup(G_MENU_ATTRIBUTE_ACTION),
+				                    g_variant_new_string(name));
+				action_creator_found = true;
+			}
+			else if (g_strcmp0(g_variant_get_string(value, NULL),
+			                   DBUS_MENU_TOGGLE_TYPE_RADIO) == 0)
+			{
+				item->action_type = DBUS_MENU_ACTION_RADIO;
+				g_hash_table_insert(item->attrs,
+				                    g_strdup(G_MENU_ATTRIBUTE_ACTION),
+				                    g_variant_new_string(name));
+				GVariant *vstr =
+				    g_variant_new_string(DBUS_MENU_ACTION_RADIO_SELECTED);
+				g_hash_table_insert(item->attrs,
+				                    g_strdup(G_MENU_ATTRIBUTE_TARGET),
+				                    g_variant_ref_sink(vstr));
+				action_creator_found = true;
+			}
+		}
+		else if (g_strcmp0(prop, DBUS_MENU_PROP_TYPE) == 0)
+		{
+			const char *type = g_variant_get_string(value, NULL);
+			if (!g_strcmp0(type, DBUS_MENU_TYPE_SEPARATOR))
+			{
+				item->action_type    = DBUS_MENU_ACTION_SECTION;
+				action_creator_found = true;
+			}
+			else if (!g_strcmp0(type, DBUS_MENU_TYPE_NORMAL))
+			{
+				item->action_type = DBUS_MENU_ACTION_NORMAL;
+				g_autofree char *name =
+				    dbus_menu_action_get_name(id, item->action_type, true);
+				g_hash_table_insert(item->attrs,
+				                    g_strdup(G_MENU_ATTRIBUTE_ACTION),
+				                    g_variant_new_string(name));
+				action_creator_found = true;
+			}
+		}
+		else if (g_strcmp0(prop, "x-kde-title") == 0)
+		{
+			item->action_type = DBUS_MENU_ACTION_SECTION;
+			g_hash_table_insert(item->attrs, g_strdup(G_MENU_ATTRIBUTE_LABEL), value);
+			action_creator_found = true;
+		}
+		else if (!action_creator_found)
+		{
+			item->action_type = DBUS_MENU_ACTION_NORMAL;
+			g_autofree char *name =
+			    dbus_menu_action_get_name(id, item->action_type, true);
+			g_hash_table_insert(item->attrs,
+			                    g_strdup(G_MENU_ATTRIBUTE_ACTION),
+			                    g_variant_new_string(name));
+			action_creator_found = true;
+		}
+	}
+	if (item->action_type != DBUS_MENU_ACTION_SECTION)
+		g_hash_table_insert(item->attrs,
+		                    g_strdup(G_MENU_ATTRIBUTE_LABEL),
+		                    g_variant_new_string(""));
+	dbus_menu_item_update_props(item, props);
+	return item;
+}
+
+G_GNUC_INTERNAL void dbus_menu_item_free(gpointer data)
+{
+	DBusMenuItem *item = (DBusMenuItem *)data;
+	if (item == NULL)
+		return;
+	item->magic = NULL;
+	g_clear_pointer(&item->attrs, g_hash_table_destroy);
+	g_clear_pointer(&item->links, g_hash_table_destroy);
+	g_clear_object(&item->ref_action);
+	g_source_remove_by_user_data(item);
+	g_slice_free(DBusMenuItem, data);
+}
+
+G_GNUC_INTERNAL DBusMenuItem *dbus_menu_item_copy(DBusMenuItem *src)
+{
+	DBusMenuItem *dst     = g_slice_new0(DBusMenuItem);
+	dst->id               = src->id;
+	dst->action_type      = src->action_type;
+	dst->enabled          = src->enabled;
+	dst->toggled          = src->toggled;
+	dst->ref_action       = G_ACTION(g_object_ref(src->ref_action));
+	dst->ref_action_group = src->ref_action_group;
+	dst->attrs            = g_hash_table_ref(src->attrs);
+	dst->links            = g_hash_table_ref(src->links);
+	return dst;
+}
+
+static bool attr_update_checked(DBusMenuItem *item, const char *key, GVariant *value)
+{
+	GVariant *old  = (GVariant *)g_hash_table_lookup(item->attrs, key);
+	bool are_equal = false;
+	if (old != NULL)
+		are_equal = g_variant_equal(old, value);
+	if (!are_equal)
+	{
+		g_hash_table_insert(item->attrs, g_strdup(key), g_variant_ref_sink(value));
+		return true;
+	}
+	return false;
+}
+
+G_GNUC_INTERNAL bool dbus_menu_item_is_firefox_stub(DBusMenuItem *item)
+{
+	const char *hidden_when =
+	    (const char *)g_hash_table_lookup(item->attrs, G_MENU_ATTRIBUTE_HIDDEN_WHEN);
+	const char *action =
+	    (const char *)g_hash_table_lookup(item->attrs, G_MENU_ATTRIBUTE_ACTION);
+	const char *label = (const char *)g_hash_table_lookup(item->attrs, G_MENU_ATTRIBUTE_LABEL);
+	if (!g_strcmp0(hidden_when, G_MENU_HIDDEN_WHEN_ACTION_MISSING) &&
+	    !g_strcmp0(action, DBUS_MENU_DISABLED_ACTION) && !g_strcmp0(label, "Label Empty"))
+		return true;
+	return false;
+}
+
+G_GNUC_INTERNAL void dbus_menu_item_preload(DBusMenuItem *item)
+{
+	if (!item_check_magic(item))
+		return;
+	if (item->action_type != DBUS_MENU_ACTION_SUBMENU)
+		return;
+	int id;
+	DBusMenuXml *xml = NULL;
+	bool need_update;
+	DBusMenuModel *submenu =
+	    DBUS_MENU_MODEL(g_hash_table_lookup(item->links, submenu_str(item->enabled)));
+	if (!submenu || !DBUS_MENU_IS_MODEL(submenu))
+		return;
+	g_object_get(submenu, "parent-id", &id, "xml", &xml, NULL);
+	if (!xml || !DBUS_MENU_IS_XML(xml))
+		return;
+	dbus_menu_xml_call_event_sync(xml,
+	                              id,
+	                              "opened",
+	                              g_variant_new("v", g_variant_new_int32(0)),
+	                              CURRENT_TIME,
+	                              NULL,
+	                              NULL);
+	dbus_menu_xml_call_about_to_show_sync(xml, id, (gboolean *)&need_update, NULL, NULL);
+	need_update = need_update || dbus_menu_model_is_layout_update_required(submenu);
+	if (need_update)
+		dbus_menu_model_update_layout(submenu);
+}
+
+G_GNUC_INTERNAL bool dbus_menu_item_copy_attrs(DBusMenuItem *src, DBusMenuItem *dst)
+{
+	GHashTableIter iter;
+	g_hash_table_iter_init(&iter, src->attrs);
+	bool is_updated = false;
+	char *key;
+	GVariant *value;
+	while (g_hash_table_iter_next(&iter, (void **)&key, (void **)&value))
+	{
+		is_updated = attr_update_checked(dst, key, value) || is_updated;
+	}
+	return is_updated;
+}
+
+G_GNUC_INTERNAL bool dbus_menu_item_update_enabled(DBusMenuItem *item, bool enabled)
+{
+	bool updated = false;
+	if (item->action_type == DBUS_MENU_ACTION_SUBMENU && !item->toggled)
+	{
+		DBusMenuModel *submenu =
+		    DBUS_MENU_MODEL(g_hash_table_lookup(item->links, submenu_str(item->enabled)));
+		if (item->enabled != enabled)
+		{
+			if (submenu != NULL)
+			{
+				g_object_ref(submenu);
+				g_hash_table_remove(item->links, submenu_str(item->enabled));
+				g_hash_table_insert(item->links, submenu_str(enabled), submenu);
+			}
+			if (enabled)
+			{
+				g_hash_table_remove(item->attrs, G_MENU_ATTRIBUTE_ACTION);
+			}
+			else
+			{
+				g_hash_table_insert(item->attrs,
+				                    g_strdup(G_MENU_ATTRIBUTE_ACTION),
+				                    g_variant_new_string(
+				                        DBUS_MENU_DISABLED_ACTION));
+			}
+			updated = true;
+		}
+	}
+	item->enabled = enabled;
+	act_props_try_update(item);
+	return updated;
+}
+
+static void act_props_try_update(DBusMenuItem *item)
+{
+	if (!G_IS_ACTION(item->ref_action))
+		return;
+	g_simple_action_set_enabled(G_SIMPLE_ACTION(item->ref_action), item->enabled);
+	if (item->action_type == DBUS_MENU_ACTION_RADIO)
+	{
+		dbus_menu_action_lock(item->ref_action);
+		g_action_change_state((item->ref_action),
+		                      g_variant_new_string(
+		                          item->toggled ? DBUS_MENU_ACTION_RADIO_SELECTED
+		                                        : DBUS_MENU_ACTION_RADIO_UNSELECTED));
+		dbus_menu_action_unlock(item->ref_action);
+	}
+	else if (item->action_type == DBUS_MENU_ACTION_CHECKMARK)
+	{
+		dbus_menu_action_lock(item->ref_action);
+		g_action_change_state((item->ref_action), g_variant_new_boolean(item->toggled));
+		dbus_menu_action_unlock(item->ref_action);
+	}
+}
+
+static bool dbus_menu_item_update_shortcut(DBusMenuItem *item, GVariant *value)
+{
+	GString *new_accel_string = g_string_new(NULL);
+	if (g_variant_n_children(value) != 1)
+		g_debug("Unable to parse shortcut correctly, too many keys. Taking first.");
+
+	GVariantIter iter;
+	GVariant *child = g_variant_get_child_value(value, 0);
+	g_variant_iter_init(&iter, child);
+	char *string;
+
+	while (g_variant_iter_loop(&iter, "s", &string))
+	{
+		if (g_strcmp0(string, DBUS_MENU_SHORTCUT_CONTROL) == 0)
+			g_string_append(new_accel_string, DBUS_MENUMODEL_SHORTCUT_CONTROL);
+		else if (g_strcmp0(string, DBUS_MENU_SHORTCUT_ALT) == 0)
+			g_string_append(new_accel_string, DBUS_MENUMODEL_SHORTCUT_ALT);
+		else if (g_strcmp0(string, DBUS_MENU_SHORTCUT_SHIFT) == 0)
+			g_string_append(new_accel_string, DBUS_MENUMODEL_SHORTCUT_SHIFT);
+		else if (g_strcmp0(string, DBUS_MENU_SHORTCUT_SUPER) == 0)
+			g_string_append(new_accel_string, DBUS_MENUMODEL_SHORTCUT_SUPER);
+		else
+			g_string_append(new_accel_string, string);
+	}
+	g_variant_unref(child);
+	g_autofree char *str = g_string_free(new_accel_string, false);
+	GVariant *new_accel  = g_variant_new_string(str);
+	bool updated         = attr_update_checked(item, G_MENU_ATTRIBUTE_ACCEL, new_accel);
+	if (!updated)
+		g_variant_unref(new_accel);
+	return updated;
+}
+
+G_GNUC_INTERNAL bool dbus_menu_item_update_props(DBusMenuItem *item, GVariant *props)
+{
+	GVariantIter iter;
+	const char *prop;
+	GVariant *value;
+	bool properties_is_updated = false;
+
+	g_variant_iter_init(&iter, props);
+	while (g_variant_iter_loop(&iter, "{&sv}", &prop, &value))
+	{
+		if (g_strcmp0(prop, "accessible-desc") == 0)
+		{
+			// TODO: Can we supported this property?
+			// properties_is_updated = true;
+		}
+		else if (g_strcmp0(prop, "enabled") == 0)
+		{
+			bool enabled = g_variant_get_boolean(value);
+			properties_is_updated =
+			    dbus_menu_item_update_enabled(item, enabled) || properties_is_updated;
+		}
+#if 0
+		else if (g_strcmp0(prop, "icon-data") == 0)
+		{
+			// icon-name has more priority
+            if (!g_hash_table_lookup(item->attrs, G_MENU_ATTRIBUTE_ICON))
+			{
+				g_autoptr(GIcon) icon = g_icon_new_pixbuf_from_variant(value);
+				GVariant *value       = g_icon_serialize(icon);
+				properties_is_updated =
+				    properties_is_updated ||
+                    attr_update_checked(item,
+				                                       G_MENU_ATTRIBUTE_ICON,
+				                                       value);
+				properties_is_updated =
+				    properties_is_updated ||
+                    attr_update_checked(item,
+				                                       G_MENU_ATTRIBUTE_VERB_ICON,
+				                                       value);
+			}
+		}
+		else if (g_strcmp0(prop, "icon-name") == 0)
+		{
+			g_autoptr(GIcon) icon =
+			    g_themed_icon_new(g_variant_get_string(value, NULL));
+			GVariant *value             = g_icon_serialize(icon);
+			g_autoptr(GVariant) boolvar = g_variant_new_boolean(true);
+			properties_is_updated =
+			    properties_is_updated ||
+                attr_update_checked(item, G_MENU_ATTRIBUTE_ICON, value);
+			properties_is_updated =
+			    properties_is_updated ||
+                attr_update_checked(item,
+			                                       G_MENU_ATTRIBUTE_VERB_ICON,
+			                                       value);
+			properties_is_updated =
+			    properties_is_updated ||
+                attr_update_checked(item, HAS_ICON_NAME, boolvar);
+		}
+#endif
+		else if (g_strcmp0(prop, "label") == 0)
+		{
+			properties_is_updated =
+			    attr_update_checked(item, G_MENU_ATTRIBUTE_LABEL, value) ||
+			    properties_is_updated;
+		}
+		else if (g_strcmp0(prop, "shortcut") == 0)
+		{
+			properties_is_updated =
+			    dbus_menu_item_update_shortcut(item, value) || properties_is_updated;
+		}
+		else if (g_strcmp0(prop, "toggle-state") == 0)
+		{
+			item->toggled = g_variant_get_int32(value) > 0;
+			act_props_try_update(item);
+		}
+		else if (g_strcmp0(prop, "visible") == 0)
+		{
+			bool vis = g_variant_get_boolean(value);
+			if (item->action_type == DBUS_MENU_ACTION_SECTION)
+			{
+				item->toggled = !vis;
+			}
+			else if (vis)
+			{
+				g_autofree char *name =
+				    dbus_menu_action_get_name(item->id, item->action_type, true);
+				bool found =
+				    g_hash_table_remove(item->attrs, G_MENU_ATTRIBUTE_HIDDEN_WHEN);
+				if (found)
+				{
+					g_hash_table_insert(item->attrs,
+					                    g_strdup(G_MENU_ATTRIBUTE_ACTION),
+					                    g_variant_new_string(name));
+					properties_is_updated = true;
+				}
+			}
+			else
+			{
+				bool found = g_hash_table_contains(item->attrs,
+				                                   G_MENU_ATTRIBUTE_HIDDEN_WHEN);
+				if (!found)
+				{
+					g_hash_table_insert(item->attrs,
+					                    g_strdup(G_MENU_ATTRIBUTE_HIDDEN_WHEN),
+					                    g_variant_new_string(
+					                        G_MENU_HIDDEN_WHEN_ACTION_MISSING));
+					g_hash_table_insert(item->attrs,
+					                    g_strdup(G_MENU_ATTRIBUTE_ACTION),
+					                    g_variant_new_string(
+					                        DBUS_MENU_DISABLED_ACTION));
+					properties_is_updated = true;
+				}
+			}
+		}
+		else
+		{
+			g_debug("updating unsupported property - '%s'", prop);
+		}
+	}
+	return properties_is_updated;
+}
+
+G_GNUC_INTERNAL bool dbus_menu_item_remove_props(DBusMenuItem *item, GVariant *props)
+{
+	GVariantIter iter;
+	const char *prop;
+	bool properties_is_updated = false;
+
+	g_variant_iter_init(&iter, props);
+	while (g_variant_iter_next(&iter, "&s", &prop))
+	{
+		if (g_strcmp0(prop, "accessible-desc") == 0)
+		{
+			// TODO: Can we support this property?
+			// properties_is_updated = true;
+		}
+		else if (g_strcmp0(prop, "enabled") == 0)
+		{
+			bool enabled = true;
+			dbus_menu_item_update_enabled(item, enabled);
+		}
+		else if (g_strcmp0(prop, "icon-name") == 0)
+		{
+			if (g_hash_table_lookup(item->attrs, HAS_ICON_NAME))
+			{
+				g_hash_table_remove(item->attrs, G_MENU_ATTRIBUTE_ICON);
+				g_hash_table_remove(item->attrs, G_MENU_ATTRIBUTE_VERB_ICON);
+				g_hash_table_remove(item->attrs, HAS_ICON_NAME);
+				properties_is_updated = true;
+			}
+		}
+		else if (g_strcmp0(prop, "icon-data") == 0)
+		{
+			if (!g_hash_table_lookup(item->attrs, HAS_ICON_NAME))
+			{
+				g_hash_table_remove(item->attrs, G_MENU_ATTRIBUTE_ICON);
+				g_hash_table_remove(item->attrs, G_MENU_ATTRIBUTE_VERB_ICON);
+				properties_is_updated = true;
+			}
+		}
+		else if (g_strcmp0(prop, "label") == 0)
+		{
+			g_hash_table_remove(item->attrs, G_MENU_ATTRIBUTE_LABEL);
+			properties_is_updated = true;
+		}
+		else if (g_strcmp0(prop, "shortcut") == 0)
+		{
+			g_hash_table_remove(item->attrs, G_MENU_ATTRIBUTE_ACCEL);
+			properties_is_updated = true;
+		}
+		else if (g_strcmp0(prop, "visible") == 0)
+		{
+			g_autofree char *name =
+			    dbus_menu_action_get_name(item->id, item->action_type, false);
+			g_hash_table_remove(item->attrs, G_MENU_ATTRIBUTE_HIDDEN_WHEN);
+			g_hash_table_insert(item->attrs,
+			                    g_strdup(G_MENU_ATTRIBUTE_ACTION),
+			                    g_variant_new_string(name));
+			properties_is_updated = true;
+		}
+		else
+		{
+			g_debug("removing unsupported property - '%s'", prop);
+		}
+	}
+	return properties_is_updated;
+}
+
+G_GNUC_INTERNAL int dbus_menu_item_compare_func(const DBusMenuItem *a, const DBusMenuItem *b,
+                                                gpointer user_data)
+{
+	return b->id - a->id;
+}
+
+G_GNUC_INTERNAL int dbus_menu_item_id_compare_func(const DBusMenuItem *a, gconstpointer b,
+                                                   gpointer user_data)
+{
+	return GPOINTER_TO_UINT(b) - a->id;
+}
+
+G_GNUC_INTERNAL bool dbus_menu_item_compare_immutable(DBusMenuItem *a, DBusMenuItem *b)
+{
+	if (a->id != b->id)
+		return false;
+	if (a->ref_action_group != b->ref_action_group)
+		return false;
+	if (a->action_type != b->action_type)
+		return false;
+	return true;
+}
+
+static bool dbus_menu_item_is_submenu(DBusMenuItem *item)
+{
+	if (!item)
+		return false;
+	if (item->action_type != DBUS_MENU_ACTION_SUBMENU)
+		return false;
+	return true;
+}
+
+G_GNUC_INTERNAL void dbus_menu_item_copy_submenu(DBusMenuItem *src, DBusMenuItem *dst,
+                                                 DBusMenuModel *parent)
+{
+	DBusMenuXml *xml;
+	DBusMenuModel *submenu = NULL;
+	g_object_get(parent, "xml", &xml, NULL);
+	if (!dbus_menu_item_is_submenu(src))
+	{
+		if (dst->action_type == DBUS_MENU_ACTION_SUBMENU)
+		{
+			if (dst->toggled)
+				dst->enabled = true;
+			submenu = dbus_menu_model_new(dst->id, parent, xml, dst->ref_action_group);
+			g_hash_table_insert(dst->links, submenu_str(dst->enabled), submenu);
+		}
+		return;
+	}
+	if (dst->action_type == DBUS_MENU_ACTION_SUBMENU &&
+	    src->action_type == DBUS_MENU_ACTION_SUBMENU)
+	{
+		if (src->toggled || dst->toggled)
+			dst->enabled = dst->toggled = true;
+		submenu =
+		    DBUS_MENU_MODEL(g_hash_table_lookup(src->links, submenu_str(src->enabled)));
+		g_hash_table_insert(dst->links, submenu_str(dst->enabled), g_object_ref(submenu));
+		g_object_set(submenu, "parent-id", dst->id, NULL);
+	}
+}
+
+G_GNUC_INTERNAL void dbus_menu_item_generate_action(DBusMenuItem *item, DBusMenuModel *parent)
+{
+	if (item->action_type == DBUS_MENU_ACTION_SECTION)
+		return;
+	if(!item->ref_action_group)
+		return;
+	DBusMenuXml *xml;
+	DBusMenuModel *submenu = g_hash_table_lookup(item->links, submenu_str(item->enabled));
+	g_object_get(parent, "xml", &xml, NULL);
+	item->ref_action = dbus_menu_action_reference(item->id,
+	                                              xml,
+	                                              submenu,
+	                                              G_ACTION_MAP(item->ref_action_group),
+	                                              item->action_type);
+	act_props_try_update(item);
+}
diff -Nru -w vala-panel-appmenu-0.7.6+dfsg1/subprojects/appmenu-glib-translator/item.h vala-panel-appmenu-24.05+dfsg/subprojects/appmenu-glib-translator/item.h
--- vala-panel-appmenu-0.7.6+dfsg1/subprojects/appmenu-glib-translator/item.h	1970-01-01 01:00:00.000000000 +0100
+++ vala-panel-appmenu-24.05+dfsg/subprojects/appmenu-glib-translator/item.h	2024-05-22 13:16:00.000000000 +0200
@@ -0,0 +1,80 @@
+/*
+ * vala-panel-appmenu
+ * Copyright (C) 2018 Konstantin Pugin <ria.freelander@gmail.com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef ITEM_H
+#define ITEM_H
+
+#include <gio/gio.h>
+#include <stdbool.h>
+
+#include "definitions.h"
+#include "model.h"
+
+G_BEGIN_DECLS
+
+typedef struct
+{
+	int section_num;
+	int place;
+	u_int32_t id;
+	GActionGroup *ref_action_group;
+	// FIXME: Cannot have activatable submenu item.
+	GAction *ref_action;
+	GHashTable *attrs;
+	GHashTable *links;
+	DBusMenuActionType action_type;
+	bool enabled;
+	bool toggled;
+	gpointer magic;
+} DBusMenuItem;
+
+G_GNUC_INTERNAL DBusMenuItem *dbus_menu_item_new(u_int32_t id, DBusMenuModel *parent_model,
+                                                 GVariant *props);
+G_GNUC_INTERNAL DBusMenuItem *dbus_menu_item_new_first_section(u_int32_t id,
+                                                               GActionGroup *action_group);
+
+G_GNUC_INTERNAL void dbus_menu_item_free(gpointer data);
+
+G_GNUC_INTERNAL bool dbus_menu_item_update_enabled(DBusMenuItem *item, bool enabled);
+
+G_GNUC_INTERNAL bool dbus_menu_item_update_props(DBusMenuItem *item, GVariant *props);
+
+G_GNUC_INTERNAL bool dbus_menu_item_remove_props(DBusMenuItem *item, GVariant *props);
+
+G_GNUC_INTERNAL bool dbus_menu_item_compare_immutable(DBusMenuItem *a, DBusMenuItem *b);
+
+G_GNUC_INTERNAL bool dbus_menu_item_copy_attributes(DBusMenuItem *src, DBusMenuItem *dst);
+
+G_GNUC_INTERNAL bool dbus_menu_item_is_firefox_stub(DBusMenuItem *item);
+
+G_GNUC_INTERNAL void dbus_menu_item_copy_submenu(DBusMenuItem *src, DBusMenuItem *dst,
+                                                 DBusMenuModel *parent);
+
+G_GNUC_INTERNAL void dbus_menu_item_generate_action(DBusMenuItem *item, DBusMenuModel *parent);
+
+G_GNUC_INTERNAL void dbus_menu_item_preload(DBusMenuItem *item);
+
+G_GNUC_INTERNAL int dbus_menu_item_id_compare_func(const DBusMenuItem *a, gconstpointer b,
+                                                   gpointer user_data);
+
+G_GNUC_INTERNAL int dbus_menu_item_compare_func(const DBusMenuItem *a, const DBusMenuItem *b,
+                                                gpointer user_data);
+
+G_END_DECLS
+
+#endif // ITEM_H
diff -Nru -w vala-panel-appmenu-0.7.6+dfsg1/subprojects/appmenu-glib-translator/item-pixbuf.c vala-panel-appmenu-24.05+dfsg/subprojects/appmenu-glib-translator/item-pixbuf.c
--- vala-panel-appmenu-0.7.6+dfsg1/subprojects/appmenu-glib-translator/item-pixbuf.c	1970-01-01 01:00:00.000000000 +0100
+++ vala-panel-appmenu-24.05+dfsg/subprojects/appmenu-glib-translator/item-pixbuf.c	2024-05-22 13:16:00.000000000 +0200
@@ -0,0 +1,22 @@
+#include <gdk-pixbuf/gdk-pixbuf.h>
+#include <gio/gio.h>
+
+G_GNUC_INTERNAL GIcon *g_icon_new_pixbuf_from_variant(GVariant *variant)
+{
+	gsize length;
+	const unsigned char *data =
+	    (const unsigned char *)g_variant_get_fixed_array(variant, &length, sizeof(guchar));
+	if (length == 0)
+		return NULL;
+
+	g_autoptr(GInputStream) stream = g_memory_input_stream_new_from_data(data, length, NULL);
+	if (stream == NULL)
+		return NULL;
+
+	g_autoptr(GError) error = NULL;
+	GdkPixbuf *pixbuf       = gdk_pixbuf_new_from_stream(stream, NULL, &error);
+	if (error != NULL)
+		g_warning("Unable to build GdkPixbuf from icon data: %s", error->message);
+
+	return G_ICON(pixbuf);
+}
diff -Nru -w vala-panel-appmenu-0.7.6+dfsg1/subprojects/appmenu-glib-translator/meson.build vala-panel-appmenu-24.05+dfsg/subprojects/appmenu-glib-translator/meson.build
--- vala-panel-appmenu-0.7.6+dfsg1/subprojects/appmenu-glib-translator/meson.build	1970-01-01 01:00:00.000000000 +0100
+++ vala-panel-appmenu-24.05+dfsg/subprojects/appmenu-glib-translator/meson.build	2024-05-22 13:16:00.000000000 +0200
@@ -0,0 +1,89 @@
+project(
+  'appmenu-glib-translator',
+  'c',
+version : '24.02',
+meson_version : '>=0.61.0',
+license : 'LGPL-3.0-or-later',
+default_options : ['c_std=gnu11', 'buildtype=debugoptimized', 'warning_level=1']
+)
+
+gnome = import('gnome')
+pkgconfig = import('pkgconfig')
+
+glib_ver = '>=2.52.0'
+giounix = dependency('gio-unix-2.0', version: glib_ver)
+gdkpixbuf = dependency('gdk-pixbuf-2.0', required: false)
+
+imp_sources = files(
+    'definitions.h',
+    'debug.c',
+    'debug.h',
+    'item.c',
+    'item.h',
+    'importer.c',
+    'importer.h',
+    'model.h',
+    'model.c',
+    'section.c',
+    'section.h',
+    'utils.c',
+    'utils.h'
+    )
+imp_headers = files('definitions.h')
+enum = 'importer-enums'
+importer_enums_gen = gnome.mkenums(
+  enum,
+  sources: imp_headers,
+  c_template: enum + '.c.template',
+  h_template: enum + '.h.template',
+)
+imp_dbus = gnome.gdbus_codegen(
+    'dbusmenu-interface',
+    sources: 'com.canonical.dbusmenu.xml',
+    interface_prefix: 'com.canonical',
+    autocleanup: 'all',
+    namespace: 'DBusMenu'
+)
+
+importer_name = 'appmenu-glib-translator'
+
+importer_lib = library(importer_name, imp_sources, importer_enums_gen, imp_dbus,
+    dependencies: [giounix, gdkpixbuf],
+    version: meson.project_version(),
+    install: true,
+    soversion: 0,
+    pic : true
+)
+importer_inc = include_directories('.')
+imp_public = ['importer.h']
+install_headers(imp_public, subdir : importer_name)
+
+pkgconfig.generate(importer_lib,
+             name: importer_name,
+             description: 'A translator from DBusMenu to GMenuModel',
+             requires: [giounix, gdkpixbuf],
+             extra_cflags: ['-I${includedir}/'+importer_name]
+            )
+
+importer_gir = gnome.generate_gir(importer_lib,
+                    sources: imp_public,
+                    includes: ['GObject-2.0', 'Gio-2.0'],
+                    header: imp_public,
+                    namespace: 'AppmenuGLibTranslator',
+                    identifier_prefix: 'DBusMenu',
+                    symbol_prefix: 'dbus_menu',
+                    nsversion: meson.project_version(),
+                    install: true
+)
+
+importer_vapi = gnome.generate_vapi(importer_name,
+    sources: importer_gir[0],
+    packages: 'gio-2.0',
+    install: true,
+)
+
+importer_dep = declare_dependency(
+        include_directories: importer_inc,
+        dependencies: [importer_vapi, giounix, gdkpixbuf],
+        link_with: importer_lib
+)
\ Kein Zeilenumbruch am Dateiende.
diff -Nru -w vala-panel-appmenu-0.7.6+dfsg1/subprojects/appmenu-glib-translator/model.c vala-panel-appmenu-24.05+dfsg/subprojects/appmenu-glib-translator/model.c
--- vala-panel-appmenu-0.7.6+dfsg1/subprojects/appmenu-glib-translator/model.c	1970-01-01 01:00:00.000000000 +0100
+++ vala-panel-appmenu-24.05+dfsg/subprojects/appmenu-glib-translator/model.c	2024-05-22 13:16:00.000000000 +0200
@@ -0,0 +1,766 @@
+/*
+ * vala-panel-appmenu
+ * Copyright (C) 2018 Konstantin Pugin <ria.freelander@gmail.com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <inttypes.h>
+
+#include "debug.h"
+#include "definitions.h"
+#include "item.h"
+#include "model.h"
+#include "section.h"
+
+struct _DBusMenuModel
+{
+	GMenuModel parent_instance;
+
+	uint parent_id;
+	uint current_revision;
+	GCancellable *cancellable;
+	DBusMenuXml *xml;
+	GActionGroup *received_action_group;
+	GSequence *items;
+	GVariant *current_layout;
+	bool layout_update_required;
+	uint parse_pending;
+};
+
+static const char *property_names[] = { "accessible-desc",
+	                                "children-display",
+	                                "disposition",
+	                                "enabled",
+	                                "icon-data",
+	                                "icon-name",
+	                                "label",
+	                                "shortcut",
+	                                "toggle-type",
+	                                "toggle-state",
+	                                "type",
+	                                "visible",
+	                                NULL };
+enum
+{
+	PROP_NULL         = 0,
+	PROP_XML          = 1,
+	PROP_ACTION_GROUP = 2,
+	PROP_PARENT_ID    = 3,
+	NUM_PROPS
+};
+
+static GParamSpec *properties[NUM_PROPS] = { NULL };
+
+static DBusMenuItem *dbus_menu_model_find(DBusMenuModel *menu, uint item_id);
+static DBusMenuItem *dbus_menu_model_find_section(DBusMenuModel *menu, uint section_num);
+static GSequenceIter *dbus_menu_model_find_place(DBusMenuModel *menu, uint section_num, int place);
+
+G_DEFINE_TYPE(DBusMenuModel, dbus_menu_model, G_TYPE_MENU_MODEL)
+
+static gint dbus_menu_model_get_n_items(GMenuModel *model)
+{
+	DBusMenuModel *menu      = (DBusMenuModel *)(model);
+	GSequenceIter *last_iter = g_sequence_iter_prev(g_sequence_get_end_iter(menu->items));
+	DBusMenuItem *last       = g_sequence_get(last_iter);
+	return last->section_num + 1;
+}
+
+static void dbus_menu_model_get_item_attributes(GMenuModel *model, gint position,
+                                                GHashTable **table)
+{
+	DBusMenuModel *menu = DBUS_MENU_MODEL(model);
+	for (GSequenceIter *iter = g_sequence_get_begin_iter(menu->items);
+	     !g_sequence_iter_is_end(iter);
+	     iter = g_sequence_iter_next(iter))
+	{
+		DBusMenuItem *item = (DBusMenuItem *)g_sequence_get(iter);
+		if (item->section_num == position && item->place == -1)
+		{
+			*table = g_hash_table_ref(item->attrs);
+			return;
+		}
+	}
+}
+
+static void dbus_menu_model_get_item_links(GMenuModel *model, gint position, GHashTable **table)
+{
+	DBusMenuModel *menu = DBUS_MENU_MODEL(model);
+	for (GSequenceIter *iter = g_sequence_get_begin_iter(menu->items);
+	     !g_sequence_iter_is_end(iter);
+	     iter = g_sequence_iter_next(iter))
+	{
+		DBusMenuItem *item = (DBusMenuItem *)g_sequence_get(iter);
+		if (item->section_num == position && item->place == -1)
+		{
+			*table = g_hash_table_ref(item->links);
+			return;
+		}
+	}
+}
+
+static int dbus_menu_model_is_mutable(GMenuModel *model)
+{
+	return true;
+}
+
+struct layout_data
+{
+	GMenuModel *model;
+	int section_num;
+	uint pos;
+	uint old_num;
+	uint new_num;
+};
+
+GSequence *dbus_menu_model_items(DBusMenuModel *model)
+{
+	return model->items;
+}
+
+int queue_compare_func(const struct layout_data *a, const struct layout_data *b)
+{
+	if (a->model != b->model)
+		return DBUS_MENU_IS_MODEL(a->model) ? -1 : 1;
+	else if (a->old_num != b->old_num)
+		return b->old_num - a->old_num;
+	else if (a->new_num != b->new_num)
+		return b->new_num - a->new_num;
+	else if (a->pos != b->pos)
+		return b->pos - a->pos;
+	return 0;
+}
+
+static int dbus_menu_model_sort_func(gconstpointer a, gconstpointer b,
+                                     G_GNUC_UNUSED void *user_data)
+{
+	DBusMenuItem *aitem = (DBusMenuItem *)a;
+	DBusMenuItem *bitem = (DBusMenuItem *)b;
+
+	if (bitem->section_num != aitem->section_num)
+		return aitem->section_num - bitem->section_num;
+
+	return aitem->place - bitem->place;
+}
+
+static void add_signal_to_queue(DBusMenuModel *model, GQueue *queue, int sect_num, int pos,
+                                int removed, int added)
+{
+	struct layout_data *data = g_new0(struct layout_data, 1);
+	if (sect_num >= 0)
+	{
+		DBusMenuItem *item = dbus_menu_model_find_section(model, sect_num);
+		data->model = G_MENU_MODEL(g_hash_table_lookup(item->links, G_MENU_LINK_SECTION));
+	}
+	else
+	{
+		data->model = G_MENU_MODEL(model);
+	}
+	data->section_num = sect_num;
+	data->pos         = pos;
+	data->old_num     = removed;
+	data->new_num     = added;
+	gpointer l        = g_queue_find_custom(queue, data, (GCompareFunc)queue_compare_func);
+	if (!l)
+		g_queue_push_head(queue, data);
+}
+
+static bool queue_emit_now(struct layout_data *index)
+{
+	if (!G_IS_MENU_MODEL(index->model))
+		return G_SOURCE_REMOVE;
+
+	g_menu_model_items_changed(index->model, index->pos, index->old_num, index->new_num);
+	return G_SOURCE_REMOVE;
+}
+
+static void queue_emit_all(GQueue *queue)
+{
+	struct layout_data *index = NULL;
+	while ((index = (struct layout_data *)g_queue_pop_head(queue)))
+		g_idle_add_full(G_PRIORITY_DEFAULT_IDLE, G_SOURCE_FUNC(queue_emit_now), index, g_free);
+}
+
+static bool preload_idle(DBusMenuItem *item)
+{
+	dbus_menu_item_preload(item);
+	return G_SOURCE_REMOVE;
+}
+
+static void menu_item_copy_and_load(DBusMenuModel *menu, DBusMenuItem *old, DBusMenuItem *new_item)
+{
+	dbus_menu_item_copy_submenu(old, new_item, menu);
+	dbus_menu_item_generate_action(new_item, menu);
+	// It is a preload hack. If this is a toplevel menu, we need to fetch menu under toplevel to
+	// avoid menu jumping bug. Now we need to use it for all menus - no menus are preloaded,
+	// AFAIK
+	dbus_menu_item_update_enabled(new_item, true);
+	new_item->toggled = true;
+	g_timeout_add_full(100, 300, (GSourceFunc)preload_idle, new_item, NULL);
+}
+
+// We deal only with layouts with depth 1 (not all)
+static void layout_parse(DBusMenuModel *menu, GVariant *layout)
+{
+	guint id;
+	GVariant *props;
+	GVariant *items;
+	if (!g_variant_is_of_type(layout, G_VARIANT_TYPE("(ia{sv}av)")))
+	{
+		g_warning(
+		    "Type of return value for 'layout' property in "
+		    "'GetLayout' call should be '(ia{sv}av)' but got '%s'",
+		    g_variant_get_type_string(layout));
+
+		return;
+	}
+	//We really should not run if we are not a menu
+	if(!DBUS_MENU_IS_MODEL(menu))
+		return;
+	g_variant_get(layout, "(i@a{sv}@av)", &id, &props, &items);
+	g_variant_unref(props);
+	GVariantIter iter;
+	GVariant *child;
+	// Start parsing. We need to track section number, and also GSequenceIter to
+	// current section. Also we track change position, number of added and removed
+	// items for current section
+	uint section_num            = 0;
+	uint place                  = 0;
+	uint old_sections           = g_menu_model_get_n_items(G_MENU_MODEL(menu));
+	uint added                  = 0;
+	int change_pos              = -1;
+	GSequenceIter *current_iter = g_sequence_get_begin_iter(menu->items);
+	g_variant_iter_init(&iter, items);
+	while ((child = g_variant_iter_next_value(&iter)))
+	{
+		GVariant *value = g_variant_get_variant(child);
+		guint cid;
+		GVariant *cprops;
+		GVariant *citems;
+		g_variant_get(value, "(i@a{sv}@av)", &cid, &cprops, &citems);
+		g_variant_unref(citems);
+
+		DBusMenuItem *old      = NULL;
+		DBusMenuItem *new_item = dbus_menu_item_new(cid, menu, cprops);
+		// We receive a section (separator or x-kde-title)
+		if (new_item->action_type == DBUS_MENU_ACTION_SECTION)
+		{
+			bool is_valid_section = !new_item->toggled && place > 0;
+			// Section is valid, so, parse it
+			if (is_valid_section)
+			{
+				// Do some common tasks: increment section_num and iter
+				++section_num;
+				place--;
+				new_item->section_num = section_num;
+				new_item->place       = -1;
+				GSequenceIter *old_iter =
+				    g_sequence_lookup(menu->items,
+				                      new_item,
+				                      dbus_menu_model_sort_func,
+				                      NULL);
+				if (!old_iter)
+				{
+					g_hash_table_insert(
+					    new_item->links,
+					    G_MENU_LINK_SECTION,
+					    dbus_menu_section_model_new(menu, section_num));
+					old_iter =
+					    g_sequence_insert_sorted(menu->items,
+					                             new_item,
+					                             dbus_menu_model_sort_func,
+					                             NULL);
+				}
+				else
+					dbus_menu_item_free(new_item);
+				old =
+				    (DBusMenuItem *)g_sequence_get(g_sequence_iter_prev(old_iter));
+				int delta                 = old->place - place;
+				GSequenceIter *place_iter = g_sequence_iter_move(old_iter, -delta);
+				// Cleanup all items in prev section (if there is more items than
+				// current)
+				if (delta > 0)
+					g_sequence_remove_range(place_iter, old_iter);
+				// Section signal will do it for us, do not send additional one
+				// Update current_section and reset current_iter and added to new
+				// section
+				current_iter = g_sequence_iter_next(old_iter);
+				added        = 0;
+				change_pos   = -1;
+				place        = 0;
+			}
+			// If section was invalid, just free received item.
+			else
+				dbus_menu_item_free(new_item);
+		}
+		else if (!dbus_menu_item_is_firefox_stub(new_item))
+		{
+			new_item->section_num   = section_num;
+			new_item->place         = place;
+			GSequenceIter *old_iter = g_sequence_lookup(menu->items,
+			                                            new_item,
+			                                            dbus_menu_model_sort_func,
+			                                            NULL);
+			// There is no old item on this place
+			if (!old_iter)
+			{
+				if (!added)
+					change_pos = change_pos < 0 ? place : change_pos;
+				menu_item_copy_and_load(menu, NULL, new_item);
+				current_iter = g_sequence_insert_sorted(menu->items,
+				                                        new_item,
+				                                        dbus_menu_model_sort_func,
+				                                        NULL);
+				added++;
+			}
+			// If there is an old item exists, we need to check this properties
+			else
+			{
+				old = (DBusMenuItem *)g_sequence_get(old_iter);
+				// We should compare properties of old and new item
+				bool diff    = !dbus_menu_item_compare_immutable(old, new_item);
+				dbus_menu_item_update_props(old, cprops);
+				if (diff)
+				{
+					// Immutable properties was different, replace menu item
+					menu_item_copy_and_load(menu, old, new_item);
+					g_sequence_remove(old_iter);
+					current_iter =
+					    g_sequence_insert_sorted(menu->items,
+					                             new_item,
+					                             dbus_menu_model_sort_func,
+					                             NULL);
+				}
+				else
+				{
+					// Just free unneeded item
+					dbus_menu_item_free(new_item);
+				}
+			}
+			current_iter = g_sequence_iter_next(current_iter);
+			place++;
+		}
+		else
+			// Just free unnedeed item
+			dbus_menu_item_free(new_item);
+		g_variant_unref(cprops);
+		g_variant_unref(value);
+		g_variant_unref(child);
+	}
+	section_num++;
+	int secdiff = old_sections - section_num;
+	if (secdiff > 0)
+	{
+		GSequenceIter *section_iter = dbus_menu_model_find_place(menu, section_num, -1);
+		g_sequence_remove_range(section_iter, g_sequence_get_end_iter(menu->items));
+	}
+	// We need to manage last section's changes. And check its validity
+	if (secdiff >= 0)
+	{
+		place--;
+		DBusMenuItem *old = (DBusMenuItem *)g_sequence_get(
+		    g_sequence_iter_prev(g_sequence_get_end_iter(menu->items)));
+		int delta                 = old->place - place;
+		GSequenceIter *last_iter  = g_sequence_get_end_iter(menu->items);
+		GSequenceIter *place_iter = g_sequence_iter_move(last_iter, -delta);
+
+		// Cleanup all items in prev section (if there is more items than
+		// current)
+		if (delta > 0)
+			g_sequence_remove_range(place_iter, last_iter);
+	}
+	g_variant_unref(items);
+	// Update all layout
+	g_menu_model_items_changed(G_MENU_MODEL(menu), 0, old_sections, section_num);
+}
+
+static bool get_layout_idle(DBusMenuModel *self)
+{
+	g_return_val_if_fail(DBUS_MENU_IS_MODEL(self), G_SOURCE_REMOVE);
+	layout_parse(self, self->current_layout);
+	self->parse_pending = 0;
+	return G_SOURCE_REMOVE;
+}
+
+static void get_layout_cb(GObject *source_object, GAsyncResult *res, gpointer user_data)
+{
+	guint revision;
+	if (!DBUS_MENU_IS_MODEL(user_data))
+		return;
+	DBusMenuModel *menu     = DBUS_MENU_MODEL(user_data);
+	g_autoptr(GError) error = NULL;
+	g_clear_pointer(&menu->current_layout, g_variant_unref);
+	dbus_menu_xml_call_get_layout_finish((DBusMenuXml *)(source_object),
+	                                     &revision,
+	                                     &menu->current_layout,
+	                                     res,
+	                                     &error);
+	if (error != NULL)
+	{
+		if (!g_error_matches(error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
+			g_warning("%s", error->message);
+		g_object_unref(menu);
+		return;
+	}
+	menu->layout_update_required = false;
+	if (!menu->parse_pending)
+		menu->parse_pending = g_timeout_add_full(G_PRIORITY_HIGH,
+		                                         100,
+		                                         (GSourceFunc)get_layout_idle,
+		                                         g_object_ref(menu),
+		                                         g_object_unref);
+	g_object_unref(menu);
+}
+
+static void dbus_menu_update_item_properties_from_layout_sync(DBusMenuModel *menu,
+                                                              DBusMenuItem *item, int sect_n,
+                                                              int pos)
+{
+	g_return_if_fail(DBUS_MENU_IS_MODEL(menu));
+
+	if (menu->parse_pending)
+	{
+		dbus_menu_model_update_layout(menu);
+		return;
+	}
+	g_autoptr(GVariant) props      = NULL;
+	g_autoptr(GVariant) items      = NULL;
+	g_autoptr(GVariant) layout     = NULL;
+	g_autoptr(GError) error        = NULL;
+	g_autoptr(GQueue) signal_queue = g_queue_new();
+	guint id, revision;
+	dbus_menu_xml_call_get_layout_sync(menu->xml,
+	                                   item->id,
+	                                   0,
+	                                   property_names,
+	                                   &revision,
+	                                   &layout,
+	                                   menu->cancellable,
+	                                   &error);
+	if (error != NULL)
+	{
+		if (!g_error_matches(error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
+			g_warning("%s", error->message);
+		return;
+	}
+	g_variant_get(layout, "(i@a{sv}@av)", &id, &props, &items);
+	bool is_item_updated = dbus_menu_item_update_props(item, props);
+	if (is_item_updated)
+		add_signal_to_queue(menu, signal_queue, sect_n, pos, 1, 1);
+	queue_emit_all(signal_queue);
+}
+
+G_GNUC_INTERNAL void dbus_menu_model_update_layout(DBusMenuModel *menu)
+{
+	g_return_if_fail(DBUS_MENU_IS_MODEL(menu));
+	dbus_menu_xml_call_get_layout(menu->xml,
+	                              menu->parent_id,
+	                              1,
+	                              property_names,
+	                              menu->cancellable,
+	                              get_layout_cb,
+	                              g_object_ref(menu));
+}
+
+static void layout_updated_cb(DBusMenuXml *proxy, guint revision, gint parent, DBusMenuModel *menu)
+{
+	if (!DBUS_MENU_IS_XML(proxy))
+		return;
+	if (((uint)parent == menu->parent_id) && menu->current_revision < revision)
+	{
+		g_debug("Remote attempt to update %u with rev %u\n", parent, revision);
+		dbus_menu_model_update_layout(menu);
+		menu->current_revision = revision;
+		return;
+	}
+	DBusMenuItem *item = dbus_menu_model_find(menu, (uint)parent);
+	if (item != NULL)
+		dbus_menu_update_item_properties_from_layout_sync(menu,
+		                                                  item,
+		                                                  item->section_num,
+		                                                  item->place);
+}
+
+static void item_activation_requested_cb(DBusMenuXml *proxy, gint id, guint timestamp,
+                                         DBusMenuModel *menu)
+{
+	if (!DBUS_MENU_IS_XML(proxy))
+		return;
+	g_autofree char *ordinary_name = g_strdup_printf(ACTION_PREFIX "%u", id);
+	g_action_group_activate_action(menu->received_action_group, ordinary_name, NULL);
+	g_debug("activation requested: id - %d, timestamp - %d", id, timestamp);
+}
+
+static void items_properties_loop(DBusMenuModel *menu, GVariant *up_props, GQueue *signal_queue,
+                                  bool is_removal)
+{
+	GVariantIter iter;
+	guint id;
+	GVariant *props;
+	g_variant_iter_init(&iter, up_props);
+	while (g_variant_iter_loop(&iter, !is_removal ? "(i@a{sv})" : "(i@as)", &id, &props))
+	{
+		DBusMenuItem *item   = (DBusMenuItem *)dbus_menu_model_find(menu, id);
+		bool is_item_updated = false;
+		if (item != NULL)
+		{
+			// It is the best what we can do to update a section
+			if (item->action_type == DBUS_MENU_ACTION_SECTION)
+			{
+				//                            dbus_menu_model_update_layout(menu);
+			}
+			else
+			{
+				is_item_updated = !is_removal
+				                      ? dbus_menu_item_update_props(item, props)
+				                      : dbus_menu_item_remove_props(item, props);
+				if (is_item_updated)
+					add_signal_to_queue(menu,
+					                    signal_queue,
+					                    item->section_num,
+					                    item->place,
+					                    1,
+					                    1);
+			}
+		}
+	}
+}
+
+static void items_properties_updated_cb(DBusMenuXml *proxy, GVariant *updated_props,
+                                        GVariant *removed_props, DBusMenuModel *menu)
+{
+	if (!DBUS_MENU_IS_XML(proxy))
+		return;
+	if (menu->parse_pending)
+		return;
+	g_autoptr(GQueue) signal_queue = g_queue_new();
+	items_properties_loop(menu, updated_props, signal_queue, false);
+	items_properties_loop(menu, removed_props, signal_queue, true);
+	queue_emit_all(signal_queue);
+}
+
+static void on_xml_property_changed(DBusMenuModel *model)
+{
+	if (!DBUS_MENU_IS_XML(model->xml))
+		return;
+	g_object_ref(model->xml);
+	g_signal_connect(model->xml,
+	                 "items-properties-updated",
+	                 G_CALLBACK(items_properties_updated_cb),
+	                 model);
+	g_signal_connect(model->xml, "layout-updated", G_CALLBACK(layout_updated_cb), model);
+	g_signal_connect(model->xml,
+	                 "item-activation-requested",
+	                 G_CALLBACK(item_activation_requested_cb),
+	                 model);
+	if (model->parent_id == 0)
+		dbus_menu_model_update_layout(model);
+}
+
+G_GNUC_INTERNAL DBusMenuModel *dbus_menu_model_new(uint parent_id, DBusMenuModel *parent,
+                                                   DBusMenuXml *xml, GActionGroup *action_group)
+{
+	DBusMenuModel *ret = (DBusMenuModel *)g_object_new(dbus_menu_model_get_type(),
+	                                                   "parent-id",
+	                                                   parent_id,
+	                                                   "xml",
+	                                                   xml,
+	                                                   "action-group",
+	                                                   action_group,
+	                                                   NULL);
+	if (parent != NULL)
+		g_object_bind_property(parent, "xml", ret, "xml", G_BINDING_SYNC_CREATE);
+	return ret;
+}
+
+static void dbus_menu_model_set_property(GObject *object, guint property_id, const GValue *value,
+                                         GParamSpec *pspec)
+{
+	DBusMenuModel *menu = (DBusMenuModel *)(object);
+	void *old_xml       = menu->xml;
+
+	switch (property_id)
+	{
+	case PROP_XML:
+		menu->xml = DBUS_MENU_XML(g_value_get_object(value));
+		if (menu->xml != NULL && old_xml != menu->xml)
+		{
+			if (old_xml != NULL)
+				g_signal_handlers_disconnect_by_data(old_xml, menu);
+			on_xml_property_changed(menu);
+			g_clear_object(&old_xml);
+		}
+		break;
+	case PROP_ACTION_GROUP:
+		g_clear_object(&menu->received_action_group);
+		menu->received_action_group = g_object_ref(G_ACTION_GROUP(g_value_get_object(value)));
+		break;
+	case PROP_PARENT_ID:
+		menu->layout_update_required = true;
+		menu->parent_id              = g_value_get_uint(value);
+		break;
+	default:
+		G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec);
+		break;
+	}
+}
+
+static void dbus_menu_model_get_property(GObject *object, guint property_id, GValue *value,
+                                         GParamSpec *pspec)
+{
+	DBusMenuModel *menu;
+
+	menu = (DBusMenuModel *)(object);
+
+	switch (property_id)
+	{
+	case PROP_XML:
+		g_value_set_object(value, menu->xml);
+		break;
+	case PROP_PARENT_ID:
+		g_value_set_uint(value, menu->parent_id);
+		break;
+	case PROP_ACTION_GROUP:
+		g_value_set_object(value, menu->received_action_group);
+		break;
+	default:
+		G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec);
+		break;
+	}
+}
+
+G_GNUC_INTERNAL bool dbus_menu_model_is_layout_update_required(DBusMenuModel *model)
+{
+	return model->layout_update_required;
+}
+
+static DBusMenuItem *dbus_menu_model_find(DBusMenuModel *menu, uint item_id)
+{
+	for (GSequenceIter *iter = g_sequence_get_begin_iter(menu->items);
+	     !g_sequence_iter_is_end(iter);
+	     iter = g_sequence_iter_next(iter))
+	{
+		DBusMenuItem *item = (DBusMenuItem *)g_sequence_get(iter);
+		if (item->id == item_id)
+			return item;
+	}
+	return NULL;
+}
+
+static GSequenceIter *dbus_menu_model_find_place(DBusMenuModel *menu, uint section_num, int place)
+{
+	for (GSequenceIter *iter = g_sequence_get_begin_iter(menu->items);
+	     !g_sequence_iter_is_end(iter);
+	     iter = g_sequence_iter_next(iter))
+	{
+		DBusMenuItem *item = (DBusMenuItem *)g_sequence_get(iter);
+		if (item->section_num == section_num && item->place == place)
+			return iter;
+	}
+	return NULL;
+}
+
+static DBusMenuItem *dbus_menu_model_find_section(DBusMenuModel *menu, uint section_num)
+{
+	return (DBusMenuItem *)g_sequence_get(dbus_menu_model_find_place(menu, section_num, -1));
+}
+
+static void dbus_menu_model_init(DBusMenuModel *menu)
+{
+	menu->cancellable            = g_cancellable_new();
+	menu->parent_id              = UINT_MAX;
+	menu->items                  = g_sequence_new(dbus_menu_item_free);
+	menu->layout_update_required = true;
+	menu->parse_pending          = 0;
+	menu->current_revision       = 0;
+}
+
+static void dbus_menu_model_constructed(GObject *object)
+{
+	G_OBJECT_CLASS(dbus_menu_model_parent_class)->constructed(object);
+	DBusMenuModel *menu = DBUS_MENU_MODEL(object);
+
+	DBusMenuItem *first_section =
+	    dbus_menu_item_new_first_section(menu->parent_id, menu->received_action_group);
+	first_section->section_num = 0;
+	first_section->place       = -1;
+	g_hash_table_insert(first_section->links,
+	                    G_MENU_LINK_SECTION,
+	                    dbus_menu_section_model_new(menu, 0));
+	g_sequence_insert_sorted(menu->items, first_section, dbus_menu_model_sort_func, NULL);
+}
+
+static void dbus_menu_model_finalize(GObject *object)
+{
+	DBusMenuModel *menu = DBUS_MENU_MODEL(object);
+	if (G_IS_OBJECT(menu->xml)) {
+		g_signal_handlers_disconnect_by_data(menu->xml, menu);
+		g_clear_object(&menu->xml);
+	}
+	g_source_remove_by_user_data(menu);
+	g_cancellable_cancel(menu->cancellable);
+	g_clear_object(&menu->cancellable);
+	g_clear_object(&menu->received_action_group);
+	g_clear_pointer(&menu->items, g_sequence_free);
+	g_clear_pointer(&menu->current_layout, g_variant_unref);
+
+	G_OBJECT_CLASS(dbus_menu_model_parent_class)->finalize(object);
+}
+
+static void install_properties(GObjectClass *object_class)
+{
+	properties[PROP_XML] =
+	    g_param_spec_object("xml",
+	                        "xml",
+	                        "xml",
+	                        dbus_menu_xml_get_type(),
+	                        (GParamFlags)(G_PARAM_CONSTRUCT | G_PARAM_READABLE |
+	                                      G_PARAM_WRITABLE | G_PARAM_STATIC_STRINGS));
+
+	properties[PROP_ACTION_GROUP] =
+	    g_param_spec_object("action-group",
+	                        "action-group",
+	                        "action-group",
+	                        g_action_group_get_type(),
+	                        (GParamFlags)(G_PARAM_CONSTRUCT_ONLY | G_PARAM_WRITABLE |
+	                                      G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+	properties[PROP_PARENT_ID] =
+	    g_param_spec_uint("parent-id",
+	                      "parent-id",
+	                      "parent-id",
+	                      0,
+	                      UINT_MAX,
+	                      0,
+	                      (GParamFlags)(G_PARAM_CONSTRUCT | G_PARAM_WRITABLE |
+	                                    G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
+	g_object_class_install_properties(object_class, NUM_PROPS, properties);
+}
+
+static void dbus_menu_model_class_init(DBusMenuModelClass *klass)
+{
+	GMenuModelClass *model_class = G_MENU_MODEL_CLASS(klass);
+	GObjectClass *object_class   = G_OBJECT_CLASS(klass);
+
+	object_class->finalize     = dbus_menu_model_finalize;
+	object_class->set_property = dbus_menu_model_set_property;
+	object_class->get_property = dbus_menu_model_get_property;
+	object_class->constructed  = dbus_menu_model_constructed;
+
+	model_class->is_mutable          = dbus_menu_model_is_mutable;
+	model_class->get_n_items         = dbus_menu_model_get_n_items;
+	model_class->get_item_attributes = dbus_menu_model_get_item_attributes;
+	model_class->get_item_links      = dbus_menu_model_get_item_links;
+	install_properties(object_class);
+}
diff -Nru -w vala-panel-appmenu-0.7.6+dfsg1/subprojects/appmenu-glib-translator/model.h vala-panel-appmenu-24.05+dfsg/subprojects/appmenu-glib-translator/model.h
--- vala-panel-appmenu-0.7.6+dfsg1/subprojects/appmenu-glib-translator/model.h	1970-01-01 01:00:00.000000000 +0100
+++ vala-panel-appmenu-24.05+dfsg/subprojects/appmenu-glib-translator/model.h	2024-05-22 13:16:00.000000000 +0200
@@ -0,0 +1,38 @@
+/*
+ * vala-panel-appmenu
+ * Copyright (C) 2018 Konstantin Pugin <ria.freelander@gmail.com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef MODEL_H
+#define MODEL_H
+
+#include "dbusmenu-interface.h"
+#include <gio/gio.h>
+#include <stdbool.h>
+
+G_BEGIN_DECLS
+
+G_DECLARE_FINAL_TYPE(DBusMenuModel, dbus_menu_model, DBUS_MENU, MODEL, GMenuModel)
+G_GNUC_INTERNAL DBusMenuModel *dbus_menu_model_new(uint parent_id, DBusMenuModel *parent,
+                                                   DBusMenuXml *xml, GActionGroup *action_group);
+G_GNUC_INTERNAL void dbus_menu_model_update_layout(DBusMenuModel *menu);
+G_GNUC_INTERNAL bool dbus_menu_model_is_layout_update_required(DBusMenuModel *model);
+
+G_GNUC_INTERNAL GSequence *dbus_menu_model_items(DBusMenuModel *model);
+
+G_END_DECLS
+
+#endif
diff -Nru -w vala-panel-appmenu-0.7.6+dfsg1/subprojects/appmenu-glib-translator/section.c vala-panel-appmenu-24.05+dfsg/subprojects/appmenu-glib-translator/section.c
--- vala-panel-appmenu-0.7.6+dfsg1/subprojects/appmenu-glib-translator/section.c	1970-01-01 01:00:00.000000000 +0100
+++ vala-panel-appmenu-24.05+dfsg/subprojects/appmenu-glib-translator/section.c	2024-05-22 13:16:00.000000000 +0200
@@ -0,0 +1,195 @@
+/*
+ * vala-panel-appmenu
+ * Copyright (C) 2018 Konstantin Pugin <ria.freelander@gmail.com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "section.h"
+#include "item.h"
+enum
+{
+	PROP_NULL          = 0,
+	PROP_PARENT_MODEL  = 1,
+	PROP_SECTION_INDEX = 2,
+	NUM_PROPS
+};
+
+static GParamSpec *properties[NUM_PROPS] = { NULL };
+
+G_DEFINE_TYPE(DBusMenuSectionModel, dbus_menu_section_model, G_TYPE_MENU_MODEL)
+
+static int dbus_menu_section_model_is_mutable(GMenuModel *model)
+{
+	return true;
+}
+
+static gint dbus_menu_section_model_get_n_items(GMenuModel *model)
+{
+	DBusMenuSectionModel *menu = DBUS_MENU_SECTION_MODEL(model);
+	GSequence *items           = dbus_menu_model_items(menu->parent_model);
+	int begin = 0, end = -1;
+	for (GSequenceIter *iter = g_sequence_get_begin_iter(items); !g_sequence_iter_is_end(iter);
+	     iter                = g_sequence_iter_next(iter))
+	{
+		DBusMenuItem *item = (DBusMenuItem *)g_sequence_get(iter);
+		if (item->section_num == menu->section_index && item->place == -1)
+			begin = g_sequence_iter_get_position(iter);
+		end = g_sequence_iter_get_position(iter);
+		if (item->section_num == menu->section_index + 1 && item->place == -1)
+		{
+			end--;
+			break;
+		}
+	}
+	return end - begin;
+}
+
+static void dbus_menu_section_model_get_item_attributes(GMenuModel *model, gint position,
+                                                        GHashTable **table)
+{
+	DBusMenuSectionModel *menu = DBUS_MENU_SECTION_MODEL(model);
+	GSequence *items           = dbus_menu_model_items(menu->parent_model);
+	for (GSequenceIter *iter = g_sequence_get_begin_iter(items); !g_sequence_iter_is_end(iter);
+	     iter                = g_sequence_iter_next(iter))
+	{
+		DBusMenuItem *item = (DBusMenuItem *)g_sequence_get(iter);
+		if (item->section_num == menu->section_index && item->place == position)
+		{
+			*table = g_hash_table_ref(item->attrs);
+			return;
+		}
+	}
+}
+
+static void dbus_menu_section_model_get_item_links(GMenuModel *model, gint position,
+                                                   GHashTable **table)
+{
+	DBusMenuSectionModel *menu = DBUS_MENU_SECTION_MODEL(model);
+	GSequence *items           = dbus_menu_model_items(menu->parent_model);
+	for (GSequenceIter *iter = g_sequence_get_begin_iter(items); !g_sequence_iter_is_end(iter);
+	     iter                = g_sequence_iter_next(iter))
+	{
+		DBusMenuItem *item = (DBusMenuItem *)g_sequence_get(iter);
+		if (item->section_num == menu->section_index && item->place == position)
+		{
+			if (g_hash_table_contains(item->links, G_MENU_LINK_SECTION))
+				g_warning("Item has section, but should not\n");
+			*table = g_hash_table_ref(item->links);
+			return;
+		}
+	}
+}
+static void dbus_menu_section_model_init(DBusMenuSectionModel *menu)
+{
+	menu->parent_model = NULL;
+}
+
+static void dbus_menu_section_model_finalize(GObject *object)
+{
+	G_OBJECT_CLASS(dbus_menu_section_model_parent_class)->finalize(object);
+}
+
+static void install_properties(GObjectClass *object_class)
+{
+	properties[PROP_PARENT_MODEL] =
+	    g_param_spec_object("parent-model",
+	                        "parent-model",
+	                        "parent-model",
+	                        dbus_menu_model_get_type(),
+	                        (GParamFlags)(G_PARAM_CONSTRUCT_ONLY | G_PARAM_READABLE |
+	                                      G_PARAM_WRITABLE | G_PARAM_STATIC_STRINGS));
+
+	properties[PROP_SECTION_INDEX] =
+	    g_param_spec_uint("section-index",
+	                      "section-index",
+	                      "section-index",
+	                      0,
+	                      UINT_MAX,
+	                      0,
+	                      (GParamFlags)(G_PARAM_CONSTRUCT_ONLY | G_PARAM_WRITABLE |
+	                                    G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
+
+	g_object_class_install_properties(object_class, NUM_PROPS, properties);
+}
+
+static void dbus_menu_section_model_set_property(GObject *object, guint property_id,
+                                                 const GValue *value, GParamSpec *pspec)
+{
+	DBusMenuSectionModel *menu = DBUS_MENU_SECTION_MODEL(object);
+
+	switch (property_id)
+	{
+	case PROP_PARENT_MODEL:
+		menu->parent_model = DBUS_MENU_MODEL(g_value_get_object(value));
+		break;
+	case PROP_SECTION_INDEX:
+		menu->section_index = g_value_get_uint(value);
+		break;
+	default:
+		G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec);
+		break;
+	}
+}
+
+static void dbus_menu_section_model_get_property(GObject *object, guint property_id, GValue *value,
+                                                 GParamSpec *pspec)
+{
+	DBusMenuSectionModel *menu = DBUS_MENU_SECTION_MODEL(object);
+
+	switch (property_id)
+	{
+	case PROP_PARENT_MODEL:
+		g_value_set_object(value, menu->parent_model);
+		break;
+	case PROP_SECTION_INDEX:
+		g_value_set_uint(value, menu->section_index);
+		break;
+	default:
+		G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec);
+		break;
+	}
+}
+
+static void dbus_menu_section_model_constructed(GObject *object)
+{
+	G_OBJECT_CLASS(dbus_menu_section_model_parent_class)->constructed(object);
+}
+
+static void dbus_menu_section_model_class_init(DBusMenuSectionModelClass *klass)
+{
+	GMenuModelClass *model_class = G_MENU_MODEL_CLASS(klass);
+	GObjectClass *object_class   = G_OBJECT_CLASS(klass);
+
+	object_class->finalize     = dbus_menu_section_model_finalize;
+	object_class->set_property = dbus_menu_section_model_set_property;
+	object_class->get_property = dbus_menu_section_model_get_property;
+	object_class->constructed  = dbus_menu_section_model_constructed;
+
+	model_class->is_mutable          = dbus_menu_section_model_is_mutable;
+	model_class->get_n_items         = dbus_menu_section_model_get_n_items;
+	model_class->get_item_attributes = dbus_menu_section_model_get_item_attributes;
+	model_class->get_item_links      = dbus_menu_section_model_get_item_links;
+	install_properties(object_class);
+}
+
+G_GNUC_INTERNAL DBusMenuSectionModel *dbus_menu_section_model_new(DBusMenuModel *parent, int section_index)
+{
+	return DBUS_MENU_SECTION_MODEL(g_object_new(dbus_menu_section_model_get_type(),
+	                                            "parent-model",
+	                                            parent,
+	                                            "section-index",
+	                                            section_index,
+	                                            NULL));
+}
diff -Nru -w vala-panel-appmenu-0.7.6+dfsg1/subprojects/appmenu-glib-translator/section.h vala-panel-appmenu-24.05+dfsg/subprojects/appmenu-glib-translator/section.h
--- vala-panel-appmenu-0.7.6+dfsg1/subprojects/appmenu-glib-translator/section.h	1970-01-01 01:00:00.000000000 +0100
+++ vala-panel-appmenu-24.05+dfsg/subprojects/appmenu-glib-translator/section.h	2024-05-22 13:16:00.000000000 +0200
@@ -0,0 +1,42 @@
+/*
+ * vala-panel-appmenu
+ * Copyright (C) 2018 Konstantin Pugin <ria.freelander@gmail.com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef SECTION_H
+#define SECTION_H
+
+#include "model.h"
+#include <gio/gio.h>
+
+G_BEGIN_DECLS
+
+G_DECLARE_FINAL_TYPE(DBusMenuSectionModel, dbus_menu_section_model, DBUS_MENU, SECTION_MODEL,
+                     GMenuModel)
+
+struct _DBusMenuSectionModel
+{
+	GMenuModel parent_instance;
+
+	DBusMenuModel *parent_model;
+	uint section_index;
+};
+
+G_GNUC_INTERNAL DBusMenuSectionModel *dbus_menu_section_model_new(DBusMenuModel *parent, int section_index);
+
+G_END_DECLS
+
+#endif // SECTION_H
diff -Nru -w vala-panel-appmenu-0.7.6+dfsg1/subprojects/appmenu-glib-translator/test.c vala-panel-appmenu-24.05+dfsg/subprojects/appmenu-glib-translator/test.c
--- vala-panel-appmenu-0.7.6+dfsg1/subprojects/appmenu-glib-translator/test.c	1970-01-01 01:00:00.000000000 +0100
+++ vala-panel-appmenu-24.05+dfsg/subprojects/appmenu-glib-translator/test.c	2024-05-22 13:16:00.000000000 +0200
@@ -0,0 +1,79 @@
+/*
+ * vala-panel-appmenu
+ * Copyright (C) 2018 Konstantin Pugin <ria.freelander@gmail.com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "debug.h"
+#include "importer.h"
+#include <gtk/gtk.h>
+#include <stdbool.h>
+
+void on_importer_model_changed(GObject *obj, GParamSpec *pspec, gpointer data)
+{
+	DBusMenuImporter *importer = (DBusMenuImporter *)obj;
+	GMenuModel *model;
+	GActionGroup *action_group;
+	g_object_get(importer, "model", &model, "action-group", &action_group, NULL);
+	if (GTK_IS_MENU_SHELL(data))
+	{
+		GtkMenuShell *menubar = GTK_MENU_SHELL(data);
+		gtk_widget_insert_action_group(menubar, "dbusmenu", action_group);
+		gtk_menu_shell_bind_model(menubar, model, NULL, true);
+	}
+	else if (GTK_IS_MENU_BUTTON(data))
+	{
+		GtkMenuButton *btn = GTK_MENU_BUTTON(data);
+		GtkMenu *popover   = gtk_popover_new_from_model(btn, model);
+		gtk_widget_insert_action_group(popover, "dbusmenu", action_group);
+		gtk_menu_button_set_popover(btn, popover);
+	}
+}
+
+int main(int argc, char *argv[])
+{
+	gtk_init(&argc, &argv);
+
+	GtkWindow *window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
+	gtk_window_set_position(GTK_WINDOW(window), GTK_WIN_POS_CENTER);
+	gtk_window_set_default_size(GTK_WINDOW(window), 1000, 1000);
+	gtk_window_set_title(GTK_WINDOW(window), "Submenu");
+
+	GtkBox *vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0);
+	gtk_container_add(GTK_CONTAINER(window), vbox);
+
+	GtkMenuBar *menubar = gtk_menu_bar_new();
+	GtkMenuButton *menu = gtk_menu_button_new();
+	//	DBusMenuImporter *importer = dbus_menu_importer_new("org.krusader", "/MenuBar/2");
+	DBusMenuImporter *importer = dbus_menu_importer_new(":1.250", "/MenuBar/1");
+	//	DBusMenuImporter *importer = dbus_menu_importer_new(":1.49", "/MenuBar/2");
+	//	DBusMenuImporter *importer =
+	//	    dbus_menu_importer_new(":1.227", "/com/canonical/menu/300003e");
+	//	DBusMenuImporter *importer =
+	//	    dbus_menu_importer_new(":1.458", "/com/canonical/menu/4600016");
+	//	DBusMenuImporter *importer =
+	//	    dbus_menu_importer_new(":1.542", "/com/canonical/menu/2600041");
+	g_signal_connect(importer, "notify::model", G_CALLBACK(on_importer_model_changed), menubar);
+	g_signal_connect(importer, "notify::model", G_CALLBACK(on_importer_model_changed), menu);
+	g_signal_connect(window, "destroy", G_CALLBACK(gtk_main_quit), NULL);
+	gtk_box_pack_start(GTK_BOX(vbox), menubar, FALSE, FALSE, 0);
+	gtk_box_pack_start(GTK_BOX(vbox), menu, FALSE, FALSE, 0);
+
+	gtk_widget_show_all(window);
+
+	gtk_main();
+
+	return 0;
+}
diff -Nru -w vala-panel-appmenu-0.7.6+dfsg1/subprojects/appmenu-glib-translator/utils.c vala-panel-appmenu-24.05+dfsg/subprojects/appmenu-glib-translator/utils.c
--- vala-panel-appmenu-0.7.6+dfsg1/subprojects/appmenu-glib-translator/utils.c	1970-01-01 01:00:00.000000000 +0100
+++ vala-panel-appmenu-24.05+dfsg/subprojects/appmenu-glib-translator/utils.c	2024-05-22 13:16:00.000000000 +0200
@@ -0,0 +1,280 @@
+/*
+ * vala-panel-appmenu
+ * Copyright (C) 2018 Konstantin Pugin <ria.freelander@gmail.com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <stdbool.h>
+#include <stdio.h>
+#include <utils.h>
+
+#include "definitions.h"
+#include "model.h"
+
+static void activate_ordinary_cb(GSimpleAction *action, GVariant *parameter, gpointer user_data)
+{
+	DBusMenuXml *xml = DBUS_MENU_XML(user_data);
+	u_int32_t id;
+	sscanf(g_action_get_name(G_ACTION(action)), ACTION_PREFIX "%u", &id);
+	// use CURRENT_TIME instead of gtk_get_current_event_time to avoid linking to GTK.
+	dbus_menu_xml_call_event_sync(xml,
+	                              id,
+	                              "clicked",
+	                              g_variant_new("v", g_variant_new_int32(0)),
+	                              CURRENT_TIME,
+	                              NULL,
+	                              NULL);
+}
+
+static void activate_checkbox_cb(GSimpleAction *action, GVariant *parameter, gpointer user_data)
+{
+	DBusMenuXml *xml = DBUS_MENU_XML(user_data);
+	u_int32_t id;
+	sscanf(g_action_get_name(G_ACTION(action)), ACTION_PREFIX "%u", &id);
+	g_autoptr(GVariant) state = g_action_get_state(G_ACTION(action));
+	// use CURRENT_TIME instead of gtk_get_current_event_time to avoid linking to GTK.
+	dbus_menu_xml_call_event_sync(xml,
+	                              id,
+	                              "clicked",
+	                              g_variant_new("v", g_variant_new_int32(0)),
+	                              CURRENT_TIME,
+	                              NULL,
+	                              NULL);
+	g_action_change_state(G_ACTION(action),
+	                      g_variant_new_boolean(!g_variant_get_boolean(state)));
+}
+
+static void state_radio_cb(GSimpleAction *action, GVariant *parameter, gpointer user_data)
+{
+	DBusMenuXml *xml   = DBUS_MENU_XML(user_data);
+	const char *id_str = g_action_get_name(G_ACTION(action));
+	uint id;
+	sscanf(id_str, ACTION_PREFIX "%u", &id);
+	// use CURRENT_TIME instead of gtk_get_current_event_time to avoid linking to GTK.
+	dbus_menu_xml_call_event_sync(xml,
+	                              id,
+	                              "clicked",
+	                              g_variant_new("v", g_variant_new_int32(0)),
+	                              CURRENT_TIME,
+	                              NULL,
+	                              NULL);
+	g_simple_action_set_state(action, parameter);
+}
+
+static GAction *dbus_menu_action_new(DBusMenuXml *xml, u_int32_t id, DBusMenuActionType action_type)
+{
+	GSimpleAction *ret;
+	g_autofree char *name = g_strdup_printf(ACTION_PREFIX "%u", id);
+	if (action_type == DBUS_MENU_ACTION_CHECKMARK)
+	{
+		ret = g_simple_action_new_stateful(name, NULL, g_variant_new_boolean(false));
+		g_signal_connect(ret, "activate", G_CALLBACK(activate_checkbox_cb), xml);
+		return G_ACTION(ret);
+	}
+	else if (action_type == DBUS_MENU_ACTION_RADIO)
+	{
+		ret = g_simple_action_new_stateful(name,
+		                                   G_VARIANT_TYPE_STRING,
+		                                   g_variant_new_string(
+		                                       DBUS_MENU_ACTION_RADIO_UNSELECTED));
+		g_signal_connect(ret, "activate", G_CALLBACK(state_radio_cb), xml);
+		return G_ACTION(ret);
+	}
+	else if (action_type == DBUS_MENU_ACTION_NORMAL)
+	{
+		ret = g_simple_action_new(name, NULL);
+		g_signal_connect(ret, "activate", G_CALLBACK(activate_ordinary_cb), xml);
+		return G_ACTION(ret);
+	}
+	g_assert_not_reached();
+}
+
+// static bool source_state_false(gpointer *data)
+//{
+//	GSimpleAction *submenu = G_SIMPLE_ACTION(data);
+//	g_simple_action_set_state(submenu, g_variant_new_boolean(false));
+//	return true;
+//}
+
+static void state_submenu_cb(GSimpleAction *action, GVariant *parameter, gpointer user_data)
+{
+	g_return_if_fail(DBUS_MENU_IS_MODEL(user_data));
+	DBusMenuModel *model = DBUS_MENU_MODEL(user_data);
+	DBusMenuXml *xml;
+	u_int32_t id;
+	g_object_get(model, "parent-id", &id, "xml", &xml, NULL);
+	bool request_open = g_variant_get_boolean(parameter);
+	GVariant *statev  = g_action_get_state(G_ACTION(action));
+	bool opened       = g_variant_get_boolean(statev);
+	g_variant_unref(statev);
+	bool need_update = true;
+	if (request_open && !opened)
+	{
+		// Use opened before actual open. For Firefox.
+		dbus_menu_xml_call_event_sync(xml,
+		                              id,
+		                              "opened",
+		                              g_variant_new("v", g_variant_new_int32(0)),
+		                              CURRENT_TIME,
+		                              NULL,
+		                              NULL);
+		dbus_menu_xml_call_about_to_show_sync(xml,
+		                                      id,
+		                                      (gboolean *)&need_update,
+		                                      NULL,
+		                                      NULL);
+		if (g_menu_model_get_n_items(G_MENU_MODEL(model)) == 0)
+			need_update = true;
+		need_update = need_update || dbus_menu_model_is_layout_update_required(model);
+		if (need_update)
+		{
+			// TODD: Populate layout after request;
+			if (DBUS_MENU_IS_MODEL(model))
+				dbus_menu_model_update_layout(model);
+		}
+		g_simple_action_set_state(action, g_variant_new_boolean(true));
+		// TODO: change state to false after menu closing, not by time
+		//                g_timeout_add(500, (GSourceFunc)source_state_false, action);
+	}
+	else if (request_open)
+	{
+		g_simple_action_set_state(action, g_variant_new_boolean(true));
+		need_update = dbus_menu_model_is_layout_update_required(model);
+		if (need_update)
+		{
+			// TODD: Populate layout after request;
+			if (DBUS_MENU_IS_MODEL(model))
+				dbus_menu_model_update_layout(model);
+		}
+	}
+	else
+	{
+		dbus_menu_xml_call_event_sync(xml,
+		                              id,
+		                              "closed",
+		                              g_variant_new("v", g_variant_new_int32(0)),
+		                              CURRENT_TIME,
+		                              NULL,
+		                              NULL);
+		g_simple_action_set_state(action, g_variant_new_boolean(false));
+	}
+}
+
+static GAction *dbus_menu_submenu_action_new(DBusMenuModel *model)
+{
+	uint id;
+	g_object_get(model, "parent-id", &id, NULL);
+	g_autofree char *name = g_strdup_printf(SUBMENU_PREFIX "%u", id);
+	GSimpleAction *ret    = g_simple_action_new_stateful(name,
+                                                          G_VARIANT_TYPE_BOOLEAN,
+                                                          g_variant_new_boolean(false));
+	g_signal_connect(ret, "change-state", G_CALLBACK(state_submenu_cb), model);
+	return G_ACTION(ret);
+}
+
+G_GNUC_INTERNAL char *dbus_menu_action_get_name(uint id, DBusMenuActionType action_type,
+                                                bool use_prefix)
+{
+	return g_strdup_printf("%s%s%u",
+	                       use_prefix ? DBUS_MENU_ACTION_NAMESPACE_PREFIX : "",
+	                       action_type == DBUS_MENU_ACTION_SUBMENU ? SUBMENU_PREFIX
+	                                                               : ACTION_PREFIX,
+	                       id);
+}
+
+G_GNUC_INTERNAL void dbus_menu_action_replace_signals(GAction *action, DBusMenuXml *xml,
+                                                      DBusMenuModel *submenu,
+                                                      DBusMenuActionType action_type)
+{
+	if (action_type == DBUS_MENU_ACTION_SUBMENU)
+	{
+		g_signal_handlers_disconnect_by_func_only(action, state_submenu_cb);
+		g_signal_connect(action, "change-state", G_CALLBACK(state_submenu_cb), submenu);
+	}
+	else if (action_type == DBUS_MENU_ACTION_RADIO)
+	{
+		g_signal_handlers_disconnect_by_func_only(action, state_radio_cb);
+		g_signal_connect(action, "activate", G_CALLBACK(state_radio_cb), xml);
+	}
+	else if (action_type == DBUS_MENU_ACTION_CHECKMARK)
+	{
+		g_signal_handlers_disconnect_by_func_only(action, activate_checkbox_cb);
+		g_signal_connect(action, "activate", G_CALLBACK(activate_checkbox_cb), xml);
+	}
+	else
+	{
+		g_signal_handlers_disconnect_by_func_only(action, activate_ordinary_cb);
+		g_signal_connect(action, "activate", G_CALLBACK(activate_ordinary_cb), xml);
+	}
+}
+
+G_GNUC_INTERNAL GAction *dbus_menu_action_reference(u_int32_t id, DBusMenuXml *xml,
+                                                    DBusMenuModel *submenu,
+                                                    GActionMap *action_group,
+                                                    DBusMenuActionType action_type)
+{
+	bool is_submenu           = action_type == DBUS_MENU_ACTION_SUBMENU;
+	const char *action_prefix = is_submenu ? SUBMENU_PREFIX : ACTION_PREFIX;
+	g_autofree char *name     = g_strdup_printf("%s%u", action_prefix, id);
+	GAction *ret              = g_action_map_lookup_action(action_group, name);
+	bool check_parameter      = false;
+	if (ret)
+	{
+		g_object_ref(ret);
+		const GVariantType *state_type = g_action_get_state_type(ret);
+		if (state_type == NULL)
+			check_parameter = check_parameter || action_type == DBUS_MENU_ACTION_NORMAL;
+		else if (is_submenu)
+		{
+			check_parameter = check_parameter ||
+			                  g_variant_type_equal(state_type, G_VARIANT_TYPE_BOOLEAN);
+		}
+		else
+		{
+			check_parameter = check_parameter ||
+			                  (action_type == DBUS_MENU_ACTION_RADIO &&
+			                   g_variant_type_equal(state_type, G_VARIANT_TYPE_STRING));
+			check_parameter =
+			    check_parameter ||
+			    (action_type == DBUS_MENU_ACTION_CHECKMARK &&
+			     g_variant_type_equal(state_type, G_VARIANT_TYPE_BOOLEAN));
+		}
+		if (check_parameter)
+			dbus_menu_action_replace_signals(ret, xml, submenu, action_type);
+		else
+			g_action_map_remove_action(action_group, name);
+	}
+	if (ret == NULL || !check_parameter)
+	{
+		if (is_submenu)
+			ret = dbus_menu_submenu_action_new(submenu);
+		else
+			ret = dbus_menu_action_new(xml, id, action_type);
+		g_action_map_add_action(G_ACTION_MAP(action_group), ret);
+	}
+	return ret;
+}
+
+G_GNUC_INTERNAL void dbus_menu_action_lock(GAction *action)
+{
+	g_signal_handlers_block_by_func_only(action, activate_checkbox_cb);
+	g_signal_handlers_block_by_func_only(action, state_radio_cb);
+}
+
+G_GNUC_INTERNAL void dbus_menu_action_unlock(GAction *action)
+{
+	g_signal_handlers_unblock_by_func_only(action, activate_checkbox_cb);
+	g_signal_handlers_unblock_by_func_only(action, state_radio_cb);
+}
diff -Nru -w vala-panel-appmenu-0.7.6+dfsg1/subprojects/appmenu-glib-translator/utils.h vala-panel-appmenu-24.05+dfsg/subprojects/appmenu-glib-translator/utils.h
--- vala-panel-appmenu-0.7.6+dfsg1/subprojects/appmenu-glib-translator/utils.h	1970-01-01 01:00:00.000000000 +0100
+++ vala-panel-appmenu-24.05+dfsg/subprojects/appmenu-glib-translator/utils.h	2024-05-22 13:16:00.000000000 +0200
@@ -0,0 +1,45 @@
+/*
+ * vala-panel-appmenu
+ * Copyright (C) 2018 Konstantin Pugin <ria.freelander@gmail.com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef UTILS_H
+#define UTILS_H
+
+#include "dbusmenu-interface.h"
+#include "definitions.h"
+#include "model.h"
+#include <gio/gio.h>
+
+G_BEGIN_DECLS
+
+G_GNUC_INTERNAL GAction *dbus_menu_action_reference(u_int32_t id, DBusMenuXml *xml,
+                                                    DBusMenuModel *submenu,
+                                                    GActionMap *action_group,
+                                                    DBusMenuActionType type);
+
+G_GNUC_INTERNAL char *dbus_menu_action_get_name(uint id, DBusMenuActionType action_type,
+                                                bool use_prefix);
+G_GNUC_INTERNAL void dbus_menu_action_replace_signals(GAction *action, DBusMenuXml *xml,
+                                                      DBusMenuModel *submenu,
+                                                      DBusMenuActionType action_type);
+
+G_GNUC_INTERNAL void dbus_menu_action_lock(GAction *action);
+G_GNUC_INTERNAL void dbus_menu_action_unlock(GAction *action);
+
+G_END_DECLS
+
+#endif // UTILS_H
diff -Nru -w vala-panel-appmenu-0.7.6+dfsg1/vapi/gio-addons-2.0.vapi vala-panel-appmenu-24.05+dfsg/vapi/gio-addons-2.0.vapi
--- vala-panel-appmenu-0.7.6+dfsg1/vapi/gio-addons-2.0.vapi	2020-10-28 22:08:48.000000000 +0100
+++ vala-panel-appmenu-24.05+dfsg/vapi/gio-addons-2.0.vapi	1970-01-01 01:00:00.000000000 +0100
@@ -1,54 +0,0 @@
-/*
- * vala-panel
- * Copyright (C) 2015 Konstantin Pugin <ria.freelander@gmail.com>
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-[CCode (cname = "volatile int")]
-public struct Volatile : int {
-}
-
-namespace Posix
-{
-    [CCode (cname = "getcwd", cheader_filename = "unistd.h")]
-    public long getcwd(char[] cwd);
-}
-[CCode (cprefix = "G", lower_case_cprefix = "g_")]
-namespace GLib
-{
-    [CCode (cname = "g_slist_free_full")]
-    public void slist_free_full(SList list, DestroyNotify? free_func);
-    namespace SignalHandler
-    {
-        [CCode (cname = "g_signal_handlers_disconnect_by_data")]
-        public void disconnect_by_data(Object instance, void* data);
-    }
-    [CCode (cname = "GSettingsBackend")]
-    public class KeyfileSettingsBackend : GLib.SettingsBackend
-    {
-        [CCode (cname = "g_keyfile_settings_backend_new", cheader_filename = "gio/gsettingsbackend.h")]
-        public KeyfileSettingsBackend(string filename, string root_path, string? root_group);
-    }
-    [CCode (cname = "GTask",cheader_filename = "gio/gio.h", type_id = "g_task_get_type ()")]
-    public class AsyncTask : GLib.Task
-    {
-        [CCode (cname = "g_task_new")]
-        public static AsyncTask create (GLib.Object? source_object, GLib.Cancellable? cancellable = null, AsyncReadyCallback? back = null);
-        [CCode (has_target = false)]
-        public delegate void TaskThreadFunc (Task task, Object source, void* task_data, Cancellable cancellable);
-        [CCode (cname = "g_task_run_in_thread")]
-        public void run_in_thread(TaskThreadFunc func);
-    }
-}

Attachment: pgpykMztw2tLU.pgp
Description: Digitale PGP-Signatur


Reply to: