refactor: simplify the windowed flag

do not declare multiple variables in the same line
This commit is contained in:
Alfredo Monclus
2024-10-28 12:08:28 -03:00
parent 6ec9c3a934
commit e01acf8edc
3 changed files with 6 additions and 6 deletions

View File

@@ -210,7 +210,7 @@ class KlippyGtk:
dialog = Gtk.Dialog(title=title, modal=True, transient_for=self.screen,
default_width=self.width, default_height=self.height)
dialog.set_size_request(self.width, self.height)
if not self.screen.windowed:
if not self.screen.get_resizable():
dialog.fullscreen()
if buttons:

View File

@@ -113,7 +113,7 @@ class Prompt:
scroll.add(self.scroll_box)
content = Gtk.Grid()
if not self.screen.windowed:
if not self.screen.get_resizable():
content.attach(title, 0, 0, 1, 1)
content.attach(close, 1, 0, 1, 1)
content.attach(scroll, 0, 1, 2, 1)

View File

@@ -62,16 +62,17 @@ class KlipperScreen(Gtk.Window):
panels = {}
popup_message = None
screensaver = None
printers = printer = None
printers = None
printer = None
updating = False
_ws = None
screensaver_timeout = None
reinit_count = 0
max_retries = 4
initialized = initializing = False
initialized = False
initializing = False
popup_timeout = None
wayland = False
windowed = False
notification_log = []
prompt = None
tempstore_timeout = None
@@ -131,7 +132,6 @@ class KlipperScreen(Gtk.Window):
if mon_n > 0:
logging.error("Monitor selection is only supported for fullscreen")
self.set_resizable(True)
self.windowed = True
else:
self.width = monitor.get_geometry().width
self.height = monitor.get_geometry().height