[gnome-shell/benzea/systemd-user-units: 1/2] extensionPrefs: Add ability to warn about extensions being disabled
- From: Benjamin Berg <bberg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/benzea/systemd-user-units: 1/2] extensionPrefs: Add ability to warn about extensions being disabled
- Date: Mon, 15 Apr 2019 12:19:06 +0000 (UTC)
commit dd63b35c4cb826385e82c7b00f5021da5bc9e809
Author: Benjamin Berg <bberg redhat com>
Date: Mon Apr 15 11:39:50 2019 +0200
extensionPrefs: Add ability to warn about extensions being disabled
If we disable extensions after a gnome-shell failure, then we should
warn the user about this happening. The old concept was to do so in the
fail-whale, but we can't even show the fail-whale when running on
wayland.
Adding this option allows starting up the preference dialog on the next
log in and telling the user what happened then. This means we can both
tell the user what is going on and enable them to solve the issue at the
same time.
js/extensionPrefs/main.js | 22 +++++++++++++++++++++-
1 file changed, 21 insertions(+), 1 deletion(-)
---
diff --git a/js/extensionPrefs/main.js b/js/extensionPrefs/main.js
index 438788f1d..b021ea751 100644
--- a/js/extensionPrefs/main.js
+++ b/js/extensionPrefs/main.js
@@ -224,10 +224,25 @@ var Application = class {
Gio.SettingsBindFlags.DEFAULT |
Gio.SettingsBindFlags.INVERT_BOOLEAN);
+ this._hbox = new Gtk.Box({ orientation: Gtk.Orientation.VERTICAL });
+ this._window.add(this._hbox);
+
+ this._disabled_infobar = new Gtk.InfoBar();
+ this._disabled_infobar.message_type = Gtk.MessageType.ERROR;
+ this._disabled_infobar.revealed = false;
+ this._disabled_infobar.show_close_button = true;
+ this._disabled_infobar.connect('response', () => {
+ this._disabled_infobar.revealed = false;
+ });
+ let content_area = this._disabled_infobar.get_content_area();
+ let label = new Gtk.Label({label: _('Shell Extensions were disabled due to a failure! You can
re-enable them at the top.')});
+ content_area.add(label);
+ this._hbox.add(this._disabled_infobar);
+
this._mainStack = new Gtk.Stack({
transition_type: Gtk.StackTransitionType.CROSSFADE
});
- this._window.add(this._mainStack);
+ this._hbox.add(this._mainStack);
let scroll = new Gtk.ScrolledWindow({ hscrollbar_policy: Gtk.PolicyType.NEVER });
@@ -309,6 +324,11 @@ var Application = class {
let args = commandLine.get_arguments();
if (args.length) {
+ if (args[0] == '--disabled-warning') {
+ this._disabled_infobar.set_revealed(true);
+ return 0;
+ }
+
let uuid = args[0];
this._skipMainWindow = true;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]