Bug 122619 - Remove AppMenu export via DBus
Summary: Remove AppMenu export via DBus
Status: RESOLVED WONTFIX
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: graphics stack (show other bugs)
Version:
(earliest affected)
6.3.0.0.alpha0+
Hardware: All Linux (All)
: medium trivial
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: difficultyMedium, skillCpp, topicCleanup
Depends on:
Blocks:
 
Reported: 2019-01-09 23:49 UTC by Björn Michaelsen
Modified: 2022-03-15 08:54 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Global Menu working on Ubuntu 18.04.2 with the default session. (349.64 KB, image/png)
2019-03-29 18:33 UTC, Lester Carballo Pérez
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Björn Michaelsen 2019-01-09 23:49:24 UTC
Description:
LibreOffice tries to export its menues via dbus. This is obsolete as unity and its HUD is discontinued, and on modern Ubuntu (18.04 LTS), when starting LibreOffice and running:

 dbus-monitor |grep canonical

shows (among other things):

string "Could not get owner of name 'com.canonical.AppMenu.Registrar': no such name"

As such this can be removed from the source. A starting point is the define:

 ENABLE_GMENU_INTEGRATION

which can be removed (its not set anymore anyway, it seems). That code enabled unity menu integration in gtk2.

In gtk3, menu export is enabled by default, but unlikely has any effect as even on Ubuntu, com.canonical.AppMenu.Registrar is not claimed anymore.

As such the functions found with:

 git grep com.canonical.AppMenu.Registrar

can be removed. While doing this, it should be taken care to also remove all -- now dead -- dependent code.

Steps to Reproduce:
1. Start LibreOffice on latest Ubuntu 18.04

Actual Results:
DBus Menu export isnt used. 

Expected Results:
If DBus Menu export is not used even on Ubuntu, it should be removed from the code.


Reproducible: Always


User Profile Reset: No



Additional Info:
Comment 1 Arkadiy Illarionov 2019-02-22 07:50:36 UTC
Please, don't remove it. It is used by global menu plugin for {mate,vala,xfce4}-panel: https://gitlab.com/vala-panel-project/vala-panel-appmenu
Comment 2 Xisco Faulí 2019-03-21 09:41:38 UTC
(In reply to Arkadiy Illarionov from comment #1)
> Please, don't remove it. It is used by global menu plugin for
> {mate,vala,xfce4}-panel:
> https://gitlab.com/vala-panel-project/vala-panel-appmenu

@Björn Michaelsen, what do you think?
Comment 3 Xisco Faulí 2019-03-21 09:42:23 UTC
Removing easyHack keyword until a decision is taken...
Comment 4 Xisco Faulí 2019-03-28 09:51:00 UTC
(In reply to Arkadiy Illarionov from comment #1)
> Please, don't remove it. It is used by global menu plugin for
> {mate,vala,xfce4}-panel:
> https://gitlab.com/vala-panel-project/vala-panel-appmenu

Hello Konstantin,
I've just read you're a vala-panel-appmenu developer in bug 123416.
Could you please confirm Arkadiv's comment ?
Comment 5 Konstantin 2019-03-28 11:05:50 UTC
Yes, it is used in vala-panel-appmenu. It will work without it, but appmenu is very nice addition to vala-panel-appmenu and it shows in all LibreOffice windows, which, for example, allows user to open a help without requirement of switching windows.

About menu exporting - yes, entire vala-panel-appmenu works as Unity was. So, if you remove Unity menu exporting, I will get no menu in vala-panel-appmenu with GTK3 VCL Backend.

For GMenuModel protocol, LibreOffice exports org.gtk.Actions and org.gtk.Menus, as GMenuModel requires, and it works.

If you removed such GMenuModel integration, I will need to force Qt VCL backend to be used in desktops with vala-panel-appmenu (which have menus exported via DBusMenu for KDE).

About com.canonical.AppMenu.Registrar - for GTK3 menu export is not required, it is only for DBusMenu (KDE one) method, AFAIK. At least, for vala-panel-appmenu.
Comment 6 Lester Carballo Pérez 2019-03-29 18:05:51 UTC
As can be read here, Ubuntu drop Unity as the default desktop environment in 18.04 and that is true, but anyway you can install Unity 7  as easy as:

sudo apt install ubuntu-unity-desktop

Also Unity as a desktop did not die and the develop was split in to variants:

1- The Unity 7 (base on Gtk) See this project (with more than 23 developers)at:

https://launchpad.net/~unity7maintainers

And is also hosted by Ubuntu as a third-party project at:

https://community.ubuntu.com/c/desktop/ubuntu-unity-dev

2- The  Unity 8 (base on Qt) See this project at:

https://ubports.com/

They are now separate projects with different maintainers, but both continues the usage of the Global Menu at it was.

More over, i don't need to speak about the vala-panel-appmenu  project, because is already in discussion heree.

It's just to add that also in Ubuntu 18.04 we can easy add an extension and continues the usage of the global menu in the default Ubuntu session, because it also supported in GNOME Shell desktop using extensions, please see:

https://extensions.gnome.org/extension/1250/gnome-global-application-menu/

Please note, that this extension is currently discontinued, but anyone can continued it if he want. Last produced version is here:

https://github.com/jiqing112/Gnome-Global-AppMenu

Finally i need to say that instead of the original suggestion, DBus Menu export is more used than ever. So, I fully recommend that do not remove it and instead improve it as much as possible, because it now used by more peoples in more desktops. It's then now universal instead of  specific to Ubuntu.
Comment 7 Lester Carballo Pérez 2019-03-29 18:33:27 UTC
Created attachment 150406 [details]
Global Menu working on Ubuntu 18.04.2 with the default session.

Please see the terminal output in the picture for more information.
Comment 8 Konstantin 2019-03-29 21:08:57 UTC
@lestcape, they speaking about MenuModel integration in GTK backend, not about DBusMenu integration in KDE Backend.

But I confirm all your positions, and want to add more:

Now many projects want to create a HUD and searching in menus. This feature also depends heavily on menu exporting, so, removing menu exporting - no HUD.
Comment 9 QA Administrators 2022-03-15 03:55:24 UTC Comment hidden (obsolete)
Comment 10 Konstantin 2022-03-15 08:02:42 UTC
This is a bug to request a feature removal. It is a bad practice bug, and this feature is used now (but not by Ubuntu, yes, but by HUD applications). 
And you need GMenuModel for GTK4. So, I think this bug should be closed.
Comment 11 Buovjaga 2022-03-15 08:54:04 UTC
No response from Björn in years, so let's close to avoid future noise.