[gnome-shell/wip/gtk-notification: 10/22] messageTray: Don't remove and re-add the focus group on button changes
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/gtk-notification: 10/22] messageTray: Don't remove and re-add the focus group on button changes
- Date: Mon, 14 Oct 2013 13:54:29 +0000 (UTC)
commit d48e557b884f7b9425875bdb709d003f0bbf6986
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Sun Oct 13 22:53:58 2013 -0400
messageTray: Don't remove and re-add the focus group on button changes
js/ui/messageTray.js | 6 +-----
1 files changed, 1 insertions(+), 5 deletions(-)
---
diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js
index f5df311..4f86143 100644
--- a/js/ui/messageTray.js
+++ b/js/ui/messageTray.js
@@ -848,7 +848,6 @@ const Notification = new Lang.Class({
// %action-invoked signal with @id as a parameter
addButton: function(id, label) {
if (!this._buttonBox) {
-
let box = new St.BoxLayout({ style_class: 'notification-actions' });
this.setActionArea(box, { x_expand: false,
y_expand: false,
@@ -856,6 +855,7 @@ const Notification = new Lang.Class({
y_fill: false,
x_align: St.Align.END });
this._buttonBox = box;
+ global.focus_manager.add_group(this._buttonBox);
}
let button = new St.Button({ can_focus: true });
@@ -870,11 +870,7 @@ const Notification = new Lang.Class({
button.label = label;
}
- if (this._buttonBox.get_n_children() > 0)
- global.focus_manager.remove_group(this._buttonBox);
-
this._buttonBox.add(button);
- global.focus_manager.add_group(this._buttonBox);
button.connect('clicked', Lang.bind(this, this._onActionInvoked, id));
this.updated();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]