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 720034 - use a gtkheaderbar instead of a toolbar + titlebar
use a gtkheaderbar instead of a toolbar + titlebar
Status: RESOLVED FIXED
Product: swell-foop
Classification: Applications
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: swell-foop-maint
swell-foop-maint
Depends on:
Blocks:
 
 
Reported: 2013-12-07 17:47 UTC by William Jon McCann
Modified: 2013-12-08 17:20 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Use a headerbar instead of a toolbar (3.14 KB, patch)
2013-12-07 17:48 UTC, William Jon McCann
reviewed Details | Review
Use a headerbar instead of a toolbar (3.57 KB, patch)
2013-12-08 08:52 UTC, William Jon McCann
committed Details | Review
screenshot (847.83 KB, image/png)
2013-12-08 17:06 UTC, Michael Catanzaro
  Details
Depend on Vala 0.23 (633 bytes, patch)
2013-12-08 17:11 UTC, Michael Catanzaro
committed Details | Review
Depend on GTK+ 3.11.2 (726 bytes, patch)
2013-12-08 17:11 UTC, Michael Catanzaro
committed Details | Review
Conditionally display the New button in headerbar (1.59 KB, patch)
2013-12-08 17:19 UTC, Michael Catanzaro
committed Details | Review

Description William Jon McCann 2013-12-07 17:47:42 UTC
It would be nice to use a GtkHeaderBar instead of a toolbar + titlebar. It would make this great game even more elegant.
Comment 1 William Jon McCann 2013-12-07 17:48:01 UTC
Created attachment 263719 [details] [review]
Use a headerbar instead of a toolbar
Comment 2 Michael Catanzaro 2013-12-07 19:41:24 UTC
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
Comment 3 William Jon McCann 2013-12-08 08:52:12 UTC
Created attachment 263730 [details] [review]
Use a headerbar instead of a toolbar
Comment 4 William Jon McCann 2013-12-08 10:02:43 UTC
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;
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Comment 5 Michael Catanzaro 2013-12-08 17:06:07 UTC
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!
Comment 6 Michael Catanzaro 2013-12-08 17:11:02 UTC
Created attachment 263749 [details] [review]
Depend on Vala 0.23

For GTK+ 3.11.2 API
Comment 7 Michael Catanzaro 2013-12-08 17:11:11 UTC
Created attachment 263750 [details] [review]
Depend on GTK+ 3.11.2

For GtkHeaderbar, including the fallback app menu.
Comment 8 Michael Catanzaro 2013-12-08 17:19:38 UTC
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.
Comment 9 Michael Catanzaro 2013-12-08 17:20:06 UTC
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