After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 754426 - Disabling application menu adds a redundant toolbar
Disabling application menu adds a redundant toolbar
Status: RESOLVED FIXED
Product: gnome-boxes
Classification: Applications
Component: general
3.16.x
Other Linux
: Normal normal
: 3.22
Assigned To: GNOME Boxes maintainer(s)
GNOME Boxes maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2015-09-02 00:30 UTC by Bastián Díaz
Modified: 2016-03-31 13:22 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Aplication menu x2 (3.18 KB, image/png)
2015-09-02 00:30 UTC, Bastián Díaz
  Details
app-window: Set 'show-menubar' from vala (1.16 KB, patch)
2015-09-21 22:41 UTC, Zeeshan Ali
committed Details | Review

Description Bastián Díaz 2015-09-02 00:30:11 UTC
Created attachment 310456 [details]
Aplication menu x2

To use tweak tool to disable the application menu in the shell, this is duplicated in the user interface in boxes.

Thanks
Comment 1 Emmanuele Bassi (:ebassi) 2015-09-02 13:08:38 UTC
That's the expected behaviour: there are platforms that do not support the application menu outside of the application's window, so the toolkit will put it into the application's window. The menu has to go somewhere.
Comment 2 Emmanuele Bassi (:ebassi) 2015-09-02 13:16:37 UTC
Actually, no: you're right — I didn't see the icon. That's where the app menu should be.
Comment 3 Zeeshan Ali 2015-09-02 13:19:42 UTC
(In reply to Emmanuele Bassi (:ebassi) from comment #2)
> Actually, no: you're right — I didn't see the icon. That's where the app
> menu should be.

The app menu is there, just above it. Not sure what's causing this though.
Comment 4 Emmanuele Bassi (:ebassi) 2015-09-02 13:24:39 UTC
Bastián, did you change the decoration button layout setting as well? Does it contain the 'menu' identifier?
Comment 5 Emmanuele Bassi (:ebassi) 2015-09-02 13:26:05 UTC
Seems like a GTK+ bug. Re-assigning.
Comment 6 Matthias Clasen 2015-09-02 13:43:13 UTC
Given that this only happens in boxes, I'm tempted to move it back. You must be doing something wrong...
Comment 7 Bastián Díaz 2015-09-02 15:40:00 UTC
(In reply to Emmanuele Bassi (:ebassi) from comment #4)
> Bastián, did you change the decoration button layout setting as well? Does
> it contain the 'menu' identifier?

I do not quite understand the question. I have not made any changes. All I did in recent days went install the arc theme (GTK and shell) installed as dependency "gtk-engine-murrine".
I uninstalled the issue and the problem persists. I must clarify that this problem is specific to gnome-boxes.

I'm not very technical, but if I can do something to give further information I would like to guide me.

Cheersa
Comment 8 Matthias Clasen 2015-09-02 15:54:38 UTC
It has nothing to do with murrine - it happens on my Fedora machine too, with Adwaita. But only in boxes, as you say.
Comment 9 Matthias Clasen 2015-09-03 01:22:06 UTC
the problem is that boxes sticks its headerbar in a stack, instead of directly putting it in the titlebar spot. we are smart enough to make the headerbar show the icon even when it is hidden like that, but apparently not smart enough to make the window not show its menubar. As a short-term workaround, I would recommend simple setting GtkApplicationWindow::show-menubar to FALSE.
Comment 10 Zeeshan Ali 2015-09-09 12:38:57 UTC
(In reply to Matthias Clasen from comment #9)
> the problem is that boxes sticks its headerbar in a stack, instead of
> directly putting it in the titlebar spot. we are smart enough to make the
> headerbar show the icon even when it is hidden like that, but apparently not
> smart enough to make the window not show its menubar. As a short-term
> workaround, I would recommend simple setting
> GtkApplicationWindow::show-menubar to FALSE.

Actually that is already being done: https://git.gnome.org/browse/gnome-boxes/tree/data/ui/app-window.ui#n35 .
Comment 11 Matthias Clasen 2015-09-09 13:37:50 UTC
Yet, when I look at the appwindow in the inspector, show-menubar is TRUE, and setting it to FALSE makes the menubar disappear.
Comment 12 Zeeshan Ali 2015-09-09 18:24:34 UTC
(In reply to Matthias Clasen from comment #11)
> Yet, when I look at the appwindow in the inspector, show-menubar is TRUE,
> and setting it to FALSE makes the menubar disappear.

Is it possible that gtk+ has a bug on getting this from UI description? I grepped the sources and this property is only set once from the UI file.
Comment 13 Zeeshan Ali 2015-09-09 18:27:20 UTC
(In reply to Zeeshan Ali (Khattak) from comment #12)
> (In reply to Matthias Clasen from comment #11)
> > Yet, when I look at the appwindow in the inspector, show-menubar is TRUE,
> > and setting it to FALSE makes the menubar disappear.
> 
> Is it possible that gtk+ has a bug on getting this from UI description? I
> grepped the sources and this property is only set once from the UI file.

Indeed, if i set it from code, it works.
Comment 14 Matthias Clasen 2015-09-19 00:23:45 UTC
Oh, this is because you have a template there, and show-menubar is a construct property. templates can't set construct properties.
Comment 15 Zeeshan Ali 2015-09-21 13:01:17 UTC
(In reply to Matthias Clasen from comment #14)
> Oh, this is because you have a template there, and show-menubar is a
> construct property. templates can't set construct properties.

Oh? Is there a bug about it? I think gtk+ should warn about it.
Comment 16 Zeeshan Ali 2015-09-21 22:41:07 UTC
Created attachment 311808 [details] [review]
app-window: Set 'show-menubar' from vala

Apparently construct properties can't be set from templates currently so
this property never gets set and we end up with a redundant topbar and
menu if "Show application menu" is disabled through tweak-tool.
----

I pushed this patch to master but not 3.18 yet since it's frozen.
Comment 17 Zeeshan Ali 2015-09-22 13:52:56 UTC
Attachment 311808 [details] pushed as 72a2628 - app-window: Set 'show-menubar' from vala