How to use Ubuntu Unity global menu in GTK #?

I am developing a simple GTK # application (nothing serious, just a small project), and I noticed that my application menu bar appears in my application window instead of the Ubuntu Unity global menu bar.

Is there a way to make the menu bar appear in the unity menu bar? I tried to work a bit with Google, but most of the results seem to be disabling this behavior - I want to enable it .

I am currently adding a menu bar to VBox through the MonoDevelop visual editor.

+8
c # ubuntu gtk # ubuntu-unity menubar
source share
1 answer

Somehow the application works fine without any changes.

My menu is in vbox, which is the only child of the main window that I created. This is the first element of vbox, not sure if this is something affecting.

And here is what I noticed:

I asked this question because when I clicked the Run button in MonoDevelop, the menu bar appeared in the window instead of the global one.

However, when I run it directly from the mono [myappname].exe command line, it works fine. Not sure what is going on here.

Thus, Unity developers have simplified the use of the global menu bar automatically, but MonoDevelop somehow does what disables this behavior when the application starts from MD. Not sure if this is an MD error, expected behavior, or if some of them occur here.

Since the application runs only from MD for testing, I accept it as it is now.

+4
source share

All Articles