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 722542 - Port the toolbar to GtkHeaderBar
Port the toolbar to GtkHeaderBar
Status: RESOLVED FIXED
Product: nautilus
Classification: Core
Component: Main Toolbar
3.11.x
Other Linux
: Normal normal
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
: 708426 722385 724582 (view as bug list)
Depends on: 724094
Blocks:
 
 
Reported: 2014-01-19 12:26 UTC by Yosef Or Boczko
Modified: 2014-02-18 17:17 UTC
See Also:
GNOME target: ---
GNOME version: 3.11/3.12


Attachments
path bar: Request enough natural width to fit all buttons (899 bytes, patch)
2014-01-19 12:32 UTC, Yosef Or Boczko
committed Details | Review
toolbar: Port to GtkHeaderBar (5.94 KB, patch)
2014-01-19 12:39 UTC, Yosef Or Boczko
none Details | Review
WIP size_group (2.80 KB, patch)
2014-01-28 15:42 UTC, Yosef Or Boczko
none Details | Review
toolbar: Port to GtkHeaderBar (7.26 KB, patch)
2014-01-29 20:04 UTC, Yosef Or Boczko
none Details | Review
toolbar: Port to GtkHeaderBar (8.38 KB, patch)
2014-02-11 11:34 UTC, Yosef Or Boczko
committed Details | Review
Fix window dragging on the path bar (1.00 KB, patch)
2014-02-16 01:47 UTC, Matthias Clasen
none Details | Review
Fix window dragging on the path bar (1.00 KB, patch)
2014-02-16 01:48 UTC, Matthias Clasen
committed Details | Review

Description Yosef Or Boczko 2014-01-19 12:26:20 UTC
Right now the toolbar is infact a GtkFrame with the style
"header-bar" and some margins.
We want reak headerbar for some reasons:
- Remove the ugly margin from the code
- Full match with other apps with headerbar
- The most important: support the "decoration-layout"
property (the "gtk-decoration-layout" property in GtkSettings)
- I guess there is more some reasons.

I was discussed with Matthias Clasen, and we had some
problem with GtkHeaderBar which he fixed them - see
bug 722340 and the match commit and also  the following
commit for the patch bar widget:
https://git.gnome.org/browse/gtk+/commit/?id=7c08896
Comment 1 Yosef Or Boczko 2014-01-19 12:32:17 UTC
Created attachment 266651 [details] [review]
path bar: Request enough natural width to fit all buttons

See the same commit in gtk+:
https://git.gnome.org/browse/gtk+/commit/?id=7c08896
Comment 2 Yosef Or Boczko 2014-01-19 12:39:03 UTC
Created attachment 266652 [details] [review]
toolbar: Port to GtkHeaderBar

It isn't complete.
I see two problems:
- The patchbar is higher than the other buttons in the headerbar
- The location entry not expand (when it shown)

Note: in the patch I changed the places of the buttons in the code,
see the b39f094 commit im gtk+.
Comment 3 Matthias Clasen 2014-01-28 04:05:39 UTC
I've managed to make it all same height by packing the pathbar and all the individual buttons in a size group.
Comment 4 Yosef Or Boczko 2014-01-28 15:42:01 UTC
Created attachment 267414 [details] [review]
WIP size_group

(In reply to comment #3)
> I've managed to make it all same height by packing the pathbar and all the
> individual buttons in a size group.

It is doesn't work for me.
Comment 5 Matthias Clasen 2014-01-29 15:36:01 UTC
Get rid of the extra hbox in there and set the headerbar valign to center, too
Comment 6 Yosef Or Boczko 2014-01-29 20:04:04 UTC
Created attachment 267574 [details] [review]
toolbar: Port to GtkHeaderBar
Comment 7 Yosef Or Boczko 2014-02-11 11:34:14 UTC
Created attachment 268783 [details] [review]
toolbar: Port to GtkHeaderBar
Comment 8 Michael Catanzaro 2014-02-15 03:00:03 UTC
IMO this would be good to have for 3.12....
Comment 9 Yosef Or Boczko 2014-02-15 19:42:31 UTC
I think this will happen just with someone will review my patch
before the freeze.
Comment 10 Matthias Clasen 2014-02-16 01:47:56 UTC
Created attachment 269244 [details] [review]
Fix window dragging on the path bar

GtkWindow relies on button press, release and motion notify
events being propagated. Therefore, we need to select for
motion notify events to make window dragging work.
Comment 11 Matthias Clasen 2014-02-16 01:48:32 UTC
Created attachment 269245 [details] [review]
Fix window dragging on the path bar

GtkWindow relies on button press, release and motion notify
events being propagated. Therefore, we need to select for
motion notify events to make window dragging work.
Comment 12 Matthias Clasen 2014-02-16 01:51:58 UTC
With this additional patch, it seems fine to me. The window dragging fix needs a recent gtk commit (8bd94a9515f0ca861a56f2f52a91a4b2b5ea96b1) to work
Comment 13 Cosimo Cecchi 2014-02-16 02:06:30 UTC
Attachment 266651 [details] pushed as 0e8bdf7 - path bar: Request enough natural width to fit all buttons
Attachment 268783 [details] pushed as 94dc4d6 - toolbar: Port to GtkHeaderBar
Attachment 269245 [details] pushed as 2fa9004 - Fix window dragging on the path bar

Thanks! I pushed all these to git master.
Comment 14 Cosimo Cecchi 2014-02-17 22:00:06 UTC
*** Bug 724582 has been marked as a duplicate of this bug. ***
Comment 15 Cosimo Cecchi 2014-02-17 22:03:01 UTC
*** Bug 722385 has been marked as a duplicate of this bug. ***
Comment 16 Cosimo Cecchi 2014-02-18 17:17:43 UTC
*** Bug 708426 has been marked as a duplicate of this bug. ***