1) apply background to summary only
2) add option to disable autohide 

please test and let me know what you think ...

flo


>From d37e7a4da87af735a15383dabca73e74921bff36 Mon Sep 17 00:00:00 2001
From: Florian Scandella <[email protected]>
Date: Sat, 6 Mar 2010 17:00:33 +0100
Subject: [PATCH 1/2] [messageTray] apply background to summary only

---
 data/theme/gnome-shell.css |    6 +++---
 js/ui/messageTray.js       |    6 +++++-
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/data/theme/gnome-shell.css b/data/theme/gnome-shell.css
index 43c52b2..70a9a73 100644
--- a/data/theme/gnome-shell.css
+++ b/data/theme/gnome-shell.css
@@ -607,9 +607,6 @@ StTooltip {
 
 /* Message Tray */
 #message-tray {
-    background-gradient-direction: vertical;
-    background-gradient-start: rgba(0,0,0,0.01);
-    background-gradient-end: rgba(0,0,0,0.95);
     height: 28px;
 }
 
@@ -647,6 +644,9 @@ StTooltip {
 }
 
 #summary-mode {
+    background-gradient-direction: vertical;
+    background-gradient-start: rgba(0,0,0,0.01);
+    background-gradient-end: rgba(0,0,0,0.95);
     spacing: 10px;
     padding: 2px 4px;
 }
diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js
index fe7a081..c2c9ac6 100644
--- a/js/ui/messageTray.js
+++ b/js/ui/messageTray.js
@@ -372,6 +372,7 @@ MessageTray.prototype = {
         this.actor.add(this._summaryBin);
         this._summary = new St.BoxLayout({ name: 'summary-mode',
                                            reactive: true });
+        this._summary.hide();
         this._summaryBin.add(this._summary, { x_align: St.Align.END,
                                               x_fill: false,
                                               expand: true });
@@ -443,6 +444,7 @@ MessageTray.prototype = {
         iconBox.child = source.createIcon(ICON_SIZE);
         this._summary.insert_actor(iconBox, 0);
         this._summaryNeedsToBeShown = true;
+        this._summary.show();
         this._icons[source.id] = iconBox;
         this._sources[source.id] = source;
 
@@ -474,8 +476,10 @@ MessageTray.prototype = {
         this._summary.remove_actor(this._icons[source.id]);
         if (this._summary.get_children().length > 0)
             this._summaryNeedsToBeShown = true;
-        else
+        else {
             this._summaryNeedsToBeShown = false;
+            this._summary.hide();
+        }
         delete this._icons[source.id];
         delete this._sources[source.id];
 
-- 
1.7.0

>From f8e6401d5fc5702f29843e70e536d019df114f99 Mon Sep 17 00:00:00 2001
From: Florian Scandella <[email protected]>
Date: Sat, 6 Mar 2010 17:54:51 +0100
Subject: [PATCH 2/2] [messageTray] add option to disable autohide

---
 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

_______________________________________________
gnome-shell-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/gnome-shell-list

Reply via email to