[gnome-shell] [notifications] Make the whole notification clickable
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] [notifications] Make the whole notification clickable
- Date: Tue, 27 Jul 2010 11:18:02 +0000 (UTC)
commit e287aa10e3988d9fcf3920f4d1f37e7cadcebcb1
Author: Florian Müllner <fmuellner gnome org>
Date: Sun Jun 13 16:17:35 2010 +0200
[notifications] Make the whole notification clickable
It is not obvious that only the icon is clickable to activate the
default action - in fact, with the area being that tiny, many don't
even know that notifications can be clicked.
Just extend the clickable area to the whole notification.
https://bugzilla.gnome.org/show_bug.cgi?id=613932
js/ui/messageTray.js | 13 +++++++------
1 files changed, 7 insertions(+), 6 deletions(-)
---
diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js
index a45d1f6..d90ac85 100644
--- a/js/ui/messageTray.js
+++ b/js/ui/messageTray.js
@@ -99,6 +99,13 @@ Notification.prototype = {
this.actor = new St.Table({ name: 'notification',
reactive: true });
this.actor.connect('style-changed', Lang.bind(this, this._styleChanged));
+ this.actor.connect('button-release-event', Lang.bind(this,
+ function (actor, event) {
+ if (!this._actionArea ||
+ !this._actionArea.contains(event.get_source()))
+ this.source.clicked();
+ }));
+
this.update(title, banner, true);
Main.overview.connect('showing', Lang.bind(this,
@@ -136,18 +143,12 @@ Notification.prototype = {
}
this._icon = this.source.createIcon(ICON_SIZE);
- this._icon.reactive = true;
this.actor.add(this._icon, { row: 0,
col: 0,
x_expand: false,
y_expand: false,
y_fill: false });
- this._icon.connect('button-release-event', Lang.bind(this,
- function () {
- this.source.clicked();
- }));
-
// The first line should have the title, followed by the
// banner text, but ellipsized if they won't both fit. We can't
// make St.Table or St.BoxLayout do this the way we want (don't
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]