messageTray: Split out addButton to allow consumers to pass a pre-made button
Some consumers may want to construct their buttons specially, so allow them to do that by adding a new API that takes a button instead of a label. https://bugzilla.gnome.org/show_bug.cgi?id=710137
This commit is contained in:
@ -79,7 +79,7 @@ const ShellInfo = new Lang.Class({
|
||||
|
||||
this._undoCallback = undoCallback;
|
||||
if (undoCallback) {
|
||||
notification.addButton('system-undo', _("Undo"));
|
||||
notification.addAction('system-undo', _("Undo"));
|
||||
notification.connect('action-invoked', Lang.bind(this, this._onUndoClicked));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user