- Main window updates while waiting for lock file to disappear

- Maximize window on start (Fix T86)
This commit is contained in:
Markus Rosenstihl 2018-03-20 21:13:28 +01:00
parent 84dd157f08
commit 7280a9aba3

View File

@ -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" ] )