From 7280a9aba34197557bda239bb594c0e0b23da3cd Mon Sep 17 00:00:00 2001 From: Markus Rosenstihl Date: Tue, 20 Mar 2018 21:13:28 +0100 Subject: [PATCH] - Main window updates while waiting for lock file to disappear - Maximize window on start (Fix T86) --- src/gui/DamarisGUI.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/gui/DamarisGUI.py b/src/gui/DamarisGUI.py index b8b8797..0a68fbf 100644 --- a/src/gui/DamarisGUI.py +++ b/src/gui/DamarisGUI.py @@ -183,6 +183,7 @@ class DamarisGUI: self.statusbar_init( ) + self.main_window.maximize() self.main_window.show_all( ) self.main_window.present( ) @@ -412,11 +413,15 @@ class DamarisGUI: self.log.textbuffer.create_mark( "lastdumped", self.log.textbuffer.get_end_iter( ), left_gravity=True ) # only observe lock file if you want to start immediatly after start up if self.start_immediatly: + loop_run=0 while os.path.exists(self.lockfile): time.sleep(0.2) - gtk.main_iteration() - self.experiment_script_statusbar_label.set_text("Waiting for other experiment to finish ... (Loackfile: %s)" % self.lockfile) + while gtk.events_pending(): + gtk.main_iteration(False) + if loop_run%10==0: + self.experiment_script_statusbar_label.set_text("Waiting for other experiment to finish (Lockfile: %s)" % self.lockfile) print "Lockfile still exists, waiting ... (%s)" % self.lockfile + loop_run += 1 # start experiment try: self.spool_dir = os.path.abspath( actual_config[ "spool_dir" ] )