[gnome-shell] Allow clicking on any part of section header to browse
- From: Florian Müllner <fmuellner src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-shell] Allow clicking on any part of section header to browse
- Date: Sun, 20 Dec 2009 00:01:14 +0000 (UTC)
commit 6e1a791273d8adae0369b193d7aa7059638f7d1a
Author: Florian Müllner <fmuellner src gnome org>
Date: Sun Nov 15 02:11:20 2009 +0100
Allow clicking on any part of section header to browse
This is more intuitive, though we need to make the whole thing feel more like a button.
https://bugzilla.gnome.org/show_bug.cgi?id=596985
js/ui/dash.js | 24 +++++++++++++++---------
1 files changed, 15 insertions(+), 9 deletions(-)
---
diff --git a/js/ui/dash.js b/js/ui/dash.js
index f70be4d..e50c853 100644
--- a/js/ui/dash.js
+++ b/js/ui/dash.js
@@ -596,15 +596,15 @@ MoreLink.prototype = {
let expander = new St.Bin({ style_class: "more-link-expander" });
this.actor.add(expander, { expand: true, y_fill: false });
+ },
- this.actor.connect('button-press-event', Lang.bind(this, function (b, e) {
- if (this.pane == null) {
- // Ensure the pane is created; the activated handler will call setPane
- this.emit('activated');
- }
- this._pane.toggle();
- return true;
- }));
+ activate: function() {
+ if (this.pane == null) {
+ // Ensure the pane is created; the activated handler will call setPane
+ this.emit('activated');
+ }
+ this._pane.toggle();
+ return true;
},
setPane: function (pane) {
@@ -637,7 +637,8 @@ SectionHeader.prototype = {
this.actor = new St.Bin({ style_class: "section-header",
x_align: St.Align.START,
x_fill: true,
- y_fill: true });
+ y_fill: true,
+ reactive: !suppressBrowse });
this._innerBox = new St.BoxLayout({ style_class: "section-header-inner" });
this.actor.set_child(this._innerBox);
@@ -662,9 +663,14 @@ SectionHeader.prototype = {
if (!suppressBrowse) {
this.moreLink = new MoreLink();
this._innerBox.add(this.moreLink.actor, { x_align: St.Align.END });
+ this.actor.connect('button-press-event', Lang.bind(this, this._onButtonPress));
}
},
+ _onButtonPress: function() {
+ this.moreLink.activate();
+ },
+
setTitle : function(title) {
this.text.text = title;
},
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]