From 7d172d72b4712c3217f88c6c68105514872ef60a Mon Sep 17 00:00:00 2001 From: Lleyton Gray Date: Fri, 28 Apr 2023 10:01:15 -0700 Subject: [PATCH] fix: Remove conflicting modal property on windows #33 --- lib/Models/Window.vala | 15 +-------------- lib/Widgets/ApplicationWindow.vala | 14 -------------- 2 files changed, 1 insertion(+), 28 deletions(-) diff --git a/lib/Models/Window.vala b/lib/Models/Window.vala index 1917f648..e71bda0e 100644 --- a/lib/Models/Window.vala +++ b/lib/Models/Window.vala @@ -35,24 +35,11 @@ public class He.Window : Gtk.Window { } set { _parent = value; + set_modal(value != null); set_transient_for (value); } } - private new bool _modal; - /** - * If this is a modal window. - */ - public new bool modal { - get { - return this.get_modal (); - } - set { - _modal = value; - set_modal (_modal); - } - } - private bool _has_title; /** * If the window has a title bar. diff --git a/lib/Widgets/ApplicationWindow.vala b/lib/Widgets/ApplicationWindow.vala index 2ac2d95f..3f4e1f51 100644 --- a/lib/Widgets/ApplicationWindow.vala +++ b/lib/Widgets/ApplicationWindow.vala @@ -46,20 +46,6 @@ public class He.ApplicationWindow : Gtk.ApplicationWindow { private new He.AppBar title = new He.AppBar (); - private new bool _modal; - /** - * Whether this window is a modal window. - */ - public new bool modal { - get { - return modal; - } - set { - _modal = value; - set_modal (_modal); - } - } - private bool _has_title; /** * Whether this window should display a title.