MuseScore icon indicating copy to clipboard operation
MuseScore copied to clipboard

Fix #15473: No platform menu bar support on Linux

Open adazem009 opened this issue 2 years ago • 6 comments

Resolves: #15473

Native menu bar support is only implemented for macOS. This pull request contains changes that will enable it on Linux-based systems as well (for example the global menu bar in KDE Plasma). Uses D-Bus (com.canonical.AppMenu.Registrar) to check whether global menu is available.

I've tested this in KDE Plasma and it properly detects whether global menu is enabled.

Global menu bar

  • [x] I signed the CLA
  • [x] The title of the PR describes the problem it addresses
  • [x] Each commit's message describes its purpose and effects, and references the issue it resolves
  • [x] If changes are extensive, there is a sequence of easily reviewable commits
  • [x] The code in the PR follows the coding rules
  • [x] There are no unnecessary changes
  • [x] The code compiles and runs on my machine, preferably after each commit individually
  • [x] I created a unit test or vtest to verify the changes I made (if applicable)

adazem009 avatar Jan 11 '23 21:01 adazem009

@adazem009 Great!

In order for the unit tests to be successful, could you please update with the master

igorkorsukov avatar Jan 14 '23 22:01 igorkorsukov

The unit test failure is also on the latest master branch, but only sometimes. I still need to clean that up...

I've restarted the check for now, let's see whether it passes this time :)

cbjeukendrup avatar Jan 14 '23 23:01 cbjeukendrup

@adazem009 Great!

In order for the unit tests to be successful, could you please update with the master

Unit tests are successful now.

adazem009 avatar Jan 15 '23 21:01 adazem009

@cbjeukendrup do you have any other suggestions? or is it ready for merge? :)

igorkorsukov avatar Jan 16 '23 08:01 igorkorsukov

@cbjeukendrup do you have any other suggestions? or is it ready for merge? :)

It's ready for merge. I've already tested it on Windows and macOS just to be sure that it doesn't break anything.

adazem009 avatar Jan 16 '23 09:01 adazem009

It's probably okay, but I'll quickly check it later today!

cbjeukendrup avatar Jan 16 '23 09:01 cbjeukendrup

@cbjeukendrup I don't have KDE Plasma. I have only Ubuntu and Mint and as I know it's not easy to enable Global menu there..

I've tested this PR on Win10,Mac13 and Linux Mint and didn't found any differences with master. So, if it's safe we can merge it to master.

DmitryArefiev avatar Jan 20 '23 14:01 DmitryArefiev

Thanks for checking! In that case I'll merge it.

cbjeukendrup avatar Jan 20 '23 21:01 cbjeukendrup

Great. Thanks!

DmitryArefiev avatar Jan 23 '23 08:01 DmitryArefiev