GNOME Bugzilla – Bug 757110
'Detach' button placement should be consistent
Last modified: 2016-04-21 02:21:21 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.
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
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.
Review of attachment 316710 [details] [review]: This seems to do the job, thanks!
Will need to respin patches for Bug 764812 Adam: This is good to commit.
I've landed this in master. Closing.