Skip to content

Commit 89d2c16

Browse files
Robin-K-Lynntlecomte
authored andcommitted
Added command line argument to disable splash screen
1 parent f2caf34 commit 89d2c16

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

friture/analyzer.py

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,11 @@ def main():
363363
"--kcachegrind",
364364
action="store_true")
365365

366+
parser.add_argument(
367+
"--no-splash",
368+
action="store_true",
369+
help="Disable the splash screen on startup")
370+
366371
program_arguments = parser.parse_args()
367372

368373
# make the Python warnings go to Friture logger
@@ -437,15 +442,17 @@ def main():
437442
os.environ['PIPEWIRE_ALSA'] = '{ application.name = "Friture" }'
438443

439444
# Splash screen
440-
pixmap = QPixmap(":/images/splash.png")
441-
splash = QSplashScreen(pixmap)
442-
splash.show()
443-
splash.showMessage("Initializing the audio subsystem")
444-
app.processEvents()
445+
if not program_arguments.no_splash:
446+
pixmap = QPixmap(":/images/splash.png")
447+
splash = QSplashScreen(pixmap)
448+
splash.show()
449+
splash.showMessage("Initializing the audio subsystem")
450+
app.processEvents()
445451

446452
window = Friture()
447453
window.show()
448-
splash.finish(window)
454+
if not program_arguments.no_splash:
455+
splash.finish(window)
449456

450457
profile = "no" # "python" or "kcachegrind" or anything else to disable
451458

0 commit comments

Comments
 (0)