From 04acab82c98f5d9cdb798ba3baac8d73b097b1df Mon Sep 17 00:00:00 2001 From: Teemu Ikonen Date: Mon, 12 Sep 2022 19:13:39 +0300 Subject: Remove set_window_buttons() from MainWindow --- main/src/ui/main_window.vala | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'main/src/ui') diff --git a/main/src/ui/main_window.vala b/main/src/ui/main_window.vala index 18fd5240..4d660f82 100644 --- a/main/src/ui/main_window.vala +++ b/main/src/ui/main_window.vala @@ -51,8 +51,6 @@ public class MainWindow : Adw.Window { this.add_css_class("dino-main"); - Gtk.Settings.get_default().notify["gtk-decoration-layout"].connect(set_window_buttons); - ((Widget)this).realize.connect(set_window_buttons); ((Widget)this).realize.connect(restore_window_size); setup_unified(); @@ -98,18 +96,6 @@ public class MainWindow : Adw.Window { right_box.prepend(conversation_titlebar.get_widget()); } - private void set_window_buttons() { - if (!Util.use_csd()) return; - Gtk.Settings? gtk_settings = Gtk.Settings.get_default(); - if (gtk_settings == null) return; - - string[] buttons = gtk_settings.gtk_decoration_layout.split(":"); - HeaderBar conversation_headerbar = this.conversation_titlebar.get_widget() as HeaderBar; - conversation_headerbar.decoration_layout = ((buttons.length == 2) ? ":" + buttons[1] : ""); - HeaderBar conversation_list_headerbar = this.conversation_list_titlebar as HeaderBar; - conversation_list_headerbar.decoration_layout = buttons[0] + ":"; - } - private void setup_stack() { stack.add_named(box, "main"); stack.add_named(welcome_placeholder, "welcome_placeholder"); -- cgit v1.2.3-70-g09d2