GNOME Bugzilla – Bug 720034
use a gtkheaderbar instead of a toolbar + titlebar
Last modified: 2013-12-08 17:20:15 UTC
It would be nice to use a GtkHeaderBar instead of a toolbar + titlebar. It would make this great game even more elegant.
Created attachment 263719 [details] [review] Use a headerbar instead of a toolbar
Review of attachment 263719 [details] [review]: Thank you! For nicer fallback when the shell does not show the app menu, we probably also want the app menu to be displayed in the headerbar (using the new icon for the button), as I've done for other games [1]. That requires bumping the minimum GTK+ (3.11.2) and Vala (0.23) versions. [1] https://git.gnome.org/browse/gnome-mines/commit/?id=bdec2c91549381d1b537ecbc3bfce8be6efbe5f0
Created attachment 263730 [details] [review] Use a headerbar instead of a toolbar
New to vala. How do I get it to see new gtk api? swell-foop.vala:97.9-97.40: error: The name `show_fallback_app_menu' does not exist in the context of `Gtk.HeaderBar' headerbar.show_fallback_app_menu = true; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Created attachment 263748 [details] screenshot The easiest way, without messing with vapi files, would be to build with Vala from git master. Anyway, it works, thanks!
Created attachment 263749 [details] [review] Depend on Vala 0.23 For GTK+ 3.11.2 API
Created attachment 263750 [details] [review] Depend on GTK+ 3.11.2 For GtkHeaderbar, including the fallback app menu.
Created attachment 263751 [details] [review] Conditionally display the New button in headerbar If the app menu is displayed in the window, then this button is redundant.
Attachment 263730 [details] pushed as 0387732 - Use a headerbar instead of a toolbar Attachment 263749 [details] pushed as fb3fa09 - Depend on Vala 0.23 Attachment 263750 [details] pushed as 95cba7e - Depend on GTK+ 3.11.2 Attachment 263751 [details] pushed as a5c8f78 - Conditionally display the New button in headerbar