[PATCH 2/2] [messageTray] add option to disable autohide
- From: Florian Scandella <flo chilicode com>
- Subject: [PATCH 2/2] [messageTray] add option to disable autohide
- Date: Sat, 6 Mar 2010 17:54:51 +0100
---
data/gnome-shell.schemas | 14 ++++++++++++++
js/ui/messageTray.js | 12 +++++++++++-
2 files changed, 25 insertions(+), 1 deletions(-)
diff --git a/data/gnome-shell.schemas b/data/gnome-shell.schemas
index bc3dd42..59d9b0f 100644
--- a/data/gnome-shell.schemas
+++ b/data/gnome-shell.schemas
@@ -46,6 +46,20 @@
</schema>
<schema>
+ <key>/schemas/desktop/gnome/shell/message_tray/autohide</key>
+ <applyto>/desktop/gnome/shell/message_tray/autohide</applyto>
+ <owner>gnome-shell</owner>
+ <type>bool</type>
+ <default>true</default>
+ <locale name="C">
+ <short>Whether the message tray should automatically hide itself</short>
+ <long>
+ Controls the autohide state of the message tray.
+ </long>
+ </locale>
+ </schema>
+
+ <schema>
<key>/schemas/desktop/gnome/shell/sidebar/visible</key>
<applyto>/desktop/gnome/shell/sidebar/visible</applyto>
<owner>gnome-shell</owner>
diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js
index c2c9ac6..1b01b30 100644
--- a/js/ui/messageTray.js
+++ b/js/ui/messageTray.js
@@ -416,8 +416,18 @@ MessageTray.prototype = {
this._updateState();
}));
+ this._gconf = Shell.GConf.get_default();
+ this._gconf.connect('changed::message_tray/autohide',
+ Lang.bind(this, this._updateSummaryAutohide));
+
this._sources = {};
this._icons = {};
+ this._updateSummaryAutohide();
+ },
+
+ _updateSummaryAutohide: function() {
+ this._summaryAutohide = this._gconf.get_boolean("message_tray/autohide");
+ this._updateState();
},
_setSizePosition: function() {
@@ -600,7 +610,7 @@ MessageTray.prototype = {
}
// Summary
- let summarySummoned = this._pointerInSummary || this._overviewVisible;
+ let summarySummoned = this._pointerInSummary || this._overviewVisible || !this._summaryAutohide;
let summaryPinned = this._summaryTimeoutId != 0 || this._pointerInTray || summarySummoned;
let notificationsVisible = (this._notificationState == State.SHOWING ||
--
1.7.0
--=-hk6uqpbf5ZuVVSjVzvxD--
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]