[gnome-shell/gnome-3-28] js/main: Throw error if no valid default stylesheet is found
- From: Marco Trevisan <marcotrevi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/gnome-3-28] js/main: Throw error if no valid default stylesheet is found
- Date: Mon, 3 Sep 2018 23:35:38 +0000 (UTC)
commit 5ae5811155c5c41b30b237d90db6358ab01d8e32
Author: Marco Trevisan (TreviƱo) <mail 3v1n0 net>
Date: Wed Aug 15 01:33:13 2018 +0000
js/main: Throw error if no valid default stylesheet is found
Throw an error using an informative message in case a mode uses a stylesheet
that can't be loaded, instead of crashing later because the theming can't be
properly computed, and thus the minimum size of the actors.
(cherry picked from commit 30cb2127a14bf291cd15e92111022d636d3c9a1f)
js/ui/main.js | 3 +++
1 file changed, 3 insertions(+)
---
diff --git a/js/ui/main.js b/js/ui/main.js
index d86cf9e81..2c54bb680 100644
--- a/js/ui/main.js
+++ b/js/ui/main.js
@@ -343,6 +343,9 @@ function loadTheme() {
let theme = new St.Theme ({ application_stylesheet: _cssStylesheet,
default_stylesheet: _defaultCssStylesheet });
+ if (theme.default_stylesheet == null)
+ throw new Error("No valid stylesheet found for '%s'".format(sessionMode.stylesheetName));
+
if (previousTheme) {
let customStylesheets = previousTheme.get_custom_stylesheets();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]