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 757110 - 'Detach' button placement should be consistent
'Detach' button placement should be consistent
Status: RESOLVED FIXED
Product: geary
Classification: Other
Component: ux
0.10.x
Other Linux
: Normal normal
: 0.11.0
Assigned To: Geary Maintainers
Geary Maintainers
Depends on:
Blocks: 764812
 
 
Reported: 2015-10-25 21:59 UTC by Julian Delphiki
Modified: 2016-04-21 02:21 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix (951 bytes, patch)
2015-12-03 10:12 UTC, Ralph Plawetzki
accepted-commit_now Details | Review

Description Julian Delphiki 2015-10-25 21:59:31 UTC
When composing a new message inline, the 'detach' button is in the upper right.

When composing an inline reply, it's in the upper left.

There should be one consistent placement for this button. I hope this is an easy fix :)

Fedora 22, gnome 3.16.
Comment 1 Ralph Plawetzki 2015-11-13 09:12:55 UTC
Yes, I stumbled over this inconsistency too and agree with you, that it should be consistent.
When you look at the code, you see that the devs were aware of this too; there are a couple of commits [1],[2] that implement a behaviour to display the button either on the left or the ride side of the HeaderBar, depending on the position of the close button - the detach button follows the close button.

This is somehow complex, as the API changed over time [3], but the code reflects this as well.

To achieve showing the detach button on the correct side, a property is queried [4]. Debugging the code shows, that the property decoration_layout is not set, although it should be. I am using gtk+-3.0, version 3.18.2 on Arch linux x86_64.

That is where I do not know how to proceed further.

[1] https://github.com/GNOME/geary/commit/02eca78f64626b1ae2bfdf7591379c9a7e83905c
[2] https://github.com/GNOME/geary/commit/30500a7b3974d7eafd7cd2f3aa3ba76365f07271
[3] https://blogs.gnome.org/mclasen/2014/01/13/client-side-decorations-continued/
[4] https://github.com/GNOME/geary/blob/master/src/client/components/pill-toolbar.vala#L137
Comment 2 Ralph Plawetzki 2015-12-03 10:12:20 UTC
Created attachment 316710 [details] [review]
Fix

Analyzing the code shows that PillHeaderbar#close_button_at_end() is called in two cases:
- from MainToolbar when composing new e-mail
- from ComposerHeaderbar when replying to / forwarding e-mail

The former call works, as decoration_layout is initialized where the latter fails, as decoration_layout is not initialized.

This fix initializes decoration_layout correctly.
The fix is tested changing the dconf key org.gnome.desktop.wm.preferences.button-layout. Now, the detach button is displayed on the correct side when composing new mail and when replying inline.
Comment 3 Michael Gratton 2016-04-12 07:09:30 UTC
Review of attachment 316710 [details] [review]:

This seems to do the job, thanks!
Comment 4 Michael Gratton 2016-04-12 07:11:55 UTC
Will need to respin patches for Bug 764812

Adam: This is good to commit.
Comment 5 Adam Dingle 2016-04-12 08:56:28 UTC
I've landed this in master.  Closing.