Skip to content

Commit

Permalink
Open splash as a separate rose command / process.
Browse files Browse the repository at this point in the history
  • Loading branch information
astroDimitrios committed Aug 8, 2024
1 parent c2ab3d4 commit dda60f4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
7 changes: 3 additions & 4 deletions metomi/rose/gtk/splash.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,7 @@ def _update_buffered(self, *args, **kwargs):
__call__ = update

def start(self):
file_name = __file__.rsplit(".", 1)[0] + ".py"
self.process = Popen([file_name] + list(self.args), stdin=PIPE)
self.process = Popen(" ".join(["rose launch-splash-screen"] + list(self.args)), shell=True, stdin=PIPE)

def stop(self):
if self.process is not None and not self.process.stdin.closed:
Expand Down Expand Up @@ -291,10 +290,10 @@ def _update_splash_screen(self, update_input):
return False


def main():
def main(argv=sys.argv):
"""Start splash screen."""
sys.path.append(os.getenv('ROSE_HOME'))
splash_screen = SplashScreen(*sys.argv[1:])
splash_screen = SplashScreen(argv[0], argv[1], argv[2])
stop_event = threading.Event()
update_thread = SplashScreenUpdaterThread(
splash_screen, stop_event, sys.stdin)
Expand Down
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ rose.commands =
env-cat = metomi.rose.env_cat:main
host-select = metomi.rose.host_select:main
host-select-client = metomi.rose.host_select_client:main
launch-splash-screen = metomi.rose.gtk.splash:main
macro = metomi.rose.macro:main
metadata-check = metomi.rose.metadata_check:main
metadata-gen = metomi.rose.metadata_gen:main
Expand Down

0 comments on commit dda60f4

Please sign in to comment.