From 79cb83318011ea5b23a09b4ec6b2d975bd99c568 Mon Sep 17 00:00:00 2001
From: pcworld <0188801@gmail.com>
Date: Wed, 23 Feb 2022 22:12:57 +0100
Subject: [PATCH] shell: Add disabling splash screens via gsettings
---
data/sm.puri.phosh.gschema.xml | 10 ++++++++++
src/shell.c | 4 ++++
2 files changed, 14 insertions(+)
diff --git a/data/sm.puri.phosh.gschema.xml b/data/sm.puri.phosh.gschema.xml
index 9ee8dbf17..a75b76104 100644
--- a/data/sm.puri.phosh.gschema.xml
+++ b/data/sm.puri.phosh.gschema.xml
@@ -36,6 +36,16 @@
lists touch capable apps that adapt to small screen sizes.
+
+ true
+
+ Controls whether to enable splash screens when launching applications.
+
+
+ If set to true, phosh will display a splash screen after a supported
+ application is launched and before the application shows a window.
+
+
'modemmanager'
Which backend to use for interfacing with the cellular modem
diff --git a/src/shell.c b/src/shell.c
index 57e631032..b64924503 100644
--- a/src/shell.c
+++ b/src/shell.c
@@ -1677,6 +1677,10 @@ phosh_shell_get_show_splash (PhoshShell *self)
priv = phosh_shell_get_instance_private (self);
g_return_val_if_fail (PHOSH_IS_DOCKED_MANAGER (priv->docked_manager), TRUE);
+ g_autoptr (GSettings) settings = g_settings_new ("sm.puri.phosh");
+ if (!g_settings_get_boolean (settings, "splash-screen"))
+ return FALSE;
+
if (priv->debug_flags & PHOSH_SHELL_DEBUG_FLAG_ALWAYS_SPLASH)
return TRUE;
--
GitLab