messageTray: Make addButton/addAction take a callback
This is a much simpler API for consumers to manage. https://bugzilla.gnome.org/show_bug.cgi?id=710137
This commit is contained in:
@ -78,10 +78,8 @@ const ShellInfo = new Lang.Class({
|
||||
}
|
||||
|
||||
this._undoCallback = undoCallback;
|
||||
if (undoCallback) {
|
||||
notification.addAction('system-undo', _("Undo"));
|
||||
notification.connect('action-invoked', Lang.bind(this, this._onUndoClicked));
|
||||
}
|
||||
if (undoCallback)
|
||||
notification.addAction(_("Undo"), Lang.bind(this, this._onUndoClicked));
|
||||
|
||||
this._source.notify(notification);
|
||||
}
|
||||
|
Reference in New Issue
Block a user