GNOME Bugzilla – Bug 728866
Use a traditional title bar instead of a header bar where necessary
Last modified: 2014-04-24 16:03:15 UTC
Not all environments desire header bars. We use the 'gtk-shell-shows-menubar' setting to decide whether to use the header bar.
Created attachment 275044 [details] [review] Use a traditional title bar instead of a header bar where necessary
Created attachment 275045 [details] [review] Use headerbar in the avatar chooser dialog only when necessary
Wondered if you'd consider doing something like this. I'm interested because under Unity we'd like to not have header bars, but I think we're not the only environment that wants this. I'm sorry that I don't have a suitable environment to test the second patch. Can construct one if you'd like.
The changes look fine to me. I made some trivial tweaks and pushed them to a new wip/trad-title-bar branch: https://git.gnome.org/browse/cheese/log/?h=wip/trad-title-bar It feels a little odd to me that whether a header bar is present comes down to a "gtk-shell-shows-menubar" setting, as there are no menu bars in Cheese, and that is a bit of an oblique way of determining whether to show traditional window decorations. There is a new GtkSetting in GTK+ 3.12 which seems more appropriate: "gtk-dialogs-use-header". That seems like a good match for the avatar chooser, and less so for the main window. Would it be OK to use that, or is the menubar setting needed for (say) Ubuntu 14.04?
Cheers. I didn't know about that setting. This isn't relevant for 14.04; I was looking at taking 3.12 into 14.10 and this is something we'd need to fix for that. I'll have to check if we plan on getting gtk+ 3.12, what Unity does there & if not whether we can backport the setting. I'll get back to you. Thanks for the fast response :).
Turned out the property was trivial to backport to 3.10. Feel free to use that (you need to invert the test in src/cheese-window.vala). I'm not aware of any central guidance to developers on this issue. https://developer.gnome.org/AlternateMenubarLayout/ by Ryan is the closest thing I'm aware of, but it doesn't really cover this case.
Thanks, I made those changes and pushed the patches to the master and gnome-3-12 branches. (I forgot to update the property name in the commit message, ah well.) If you need the patches for Cheese 3.10, I guess that it is better to keep them as downstream patches, as the property was only added to upstream GTK+ in 3.12, so it would not make sense for those patches to be on the gnome-3-10 branch.
I meant GTK+ 3.10 there; I don't think the headerbars were in cheese 3.10. :) Thanks!