Merge lp:~purejava/pantheon-mail/detach-button-side into lp:~elementary-apps/pantheon-mail/trunk

Proposed by Ralph Plawetzki
Status: Merged
Approved by: Danielle Foré
Approved revision: 1927
Merged at revision: 1927
Proposed branch: lp:~purejava/pantheon-mail/detach-button-side
Merge into: lp:~elementary-apps/pantheon-mail/trunk
Diff against target: 12 lines (+1/-1)
1 file modified
src/client/components/pill-toolbar.vala (+1/-1)
To merge this branch: bzr merge lp:~purejava/pantheon-mail/detach-button-side
Reviewer Review Type Date Requested Status
Danielle Foré Pending
Review via email: mp+281222@code.launchpad.net

Commit message

Initialize decoration_layout correctly

Description of the change

for details please see linked bug report https://bugs.launchpad.net/pantheon-mail/+bug/1528602

To post a comment you must log in.
Revision history for this message
Ralph Plawetzki (purejava) wrote :

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 button-layout with elementary-tweaks. Now, the detach button is displayed on the correct side when composing new mail and when replying inline.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/client/components/pill-toolbar.vala'
2--- src/client/components/pill-toolbar.vala 2015-12-02 18:29:22 +0000
3+++ src/client/components/pill-toolbar.vala 2015-12-22 15:16:41 +0000
4@@ -97,7 +97,7 @@
5 public bool close_button_at_end() {
6 string layout;
7 bool at_end = false;
8- layout = decoration_layout;
9+ layout = Gtk.Settings.get_default().gtk_decoration_layout;
10 // Based on logic of close_button_at_end in gtkheaderbar.c: Close button appears
11 // at end iff "close" follows a colon in the layout string.
12 if (layout != null) {

Subscribers

People subscribed via source and target branches