[geary/wip/430-custom-window-buttons] Fix handling GTK button-layout settings that are missing a ':'
- From: Michael Gratton <mjog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary/wip/430-custom-window-buttons] Fix handling GTK button-layout settings that are missing a ':'
- Date: Wed, 17 Jul 2019 06:39:28 +0000 (UTC)
commit ca6d5fdc883d193966fbd9eacd3ec448cb0c0a69
Author: Michael Gratton <mike vee net>
Date: Wed Jul 17 16:38:02 2019 +1000
Fix handling GTK button-layout settings that are missing a ':'
See #430
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 c7ab8273..3dc590eb 100644
--- a/src/client/components/main-toolbar.vala
+++ b/src/client/components/main-toolbar.vala
@@ -118,14 +118,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]