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:
Jasper St. Pierre
2013-10-13 23:08:16 -04:00
parent 88d0731d80
commit 5023542882
5 changed files with 40 additions and 36 deletions

View File

@ -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));
}