[geary/cherry-pick-09bc7bdc] Merge branch 'wip/430-custom-window-buttons' into 'mainline'



commit b3140856fa2fe4692c93b4dad0f4cbc28d9ab098
Author: Michael Gratton <mike vee net>
Date:   Wed Jul 17 06:58:41 2019 +0000

    Merge branch 'wip/430-custom-window-buttons' into 'mainline'
    
    Fix handling GTK button-layout settings that are missing a ':'
    
    See merge request GNOME/geary!260
    
    (cherry picked from commit 09bc7bdc7291282710500b76d9fd1695d55ec62f)
    
    ca6d5fdc Fix handling GTK button-layout settings that are missing a ':'

 src/client/components/main-toolbar.vala | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/src/client/components/main-toolbar.vala b/src/client/components/main-toolbar.vala
index b80e6912..74c4d895 100644
--- a/src/client/components/main-toolbar.vala
+++ b/src/client/components/main-toolbar.vala
@@ -135,14 +135,14 @@ public class MainToolbar : Gtk.Box {
 
     private void set_window_buttons() {
         string[] buttons = Gtk.Settings.get_default().gtk_decoration_layout.split(":");
-        if (buttons.length != 2) {
-            warning("gtk_decoration_layout in unexpected format");
-            return;
-        }
-        show_close_button_left = show_close_button;
-        show_close_button_right = show_close_button;
-        folder_header.decoration_layout = buttons[0] + ":";
-        conversation_header.decoration_layout = ":" + buttons[1];
+        this.show_close_button_left = this.show_close_button;
+        this.show_close_button_right = this.show_close_button;
+        this.folder_header.decoration_layout = buttons[0] + ":";
+        this.conversation_header.decoration_layout = (
+            (buttons.length == 2)
+            ? ":" + buttons[1]
+            : ""
+        );
     }
 
     // Updates tooltip text depending on number of conversations selected.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]