main: Use Params for optional parameters to pushModal()

As the number of optional parameters grows, it gets more convenient
to use Params instead of passing in a lot of undefined/null/0 values.

https://bugzilla.gnome.org/show_bug.cgi?id=688202
This commit is contained in:
Florian Müllner
2012-08-10 17:54:39 +02:00
parent 034408971d
commit c2065cc3e2
3 changed files with 15 additions and 13 deletions

View File

@ -226,7 +226,7 @@ const ModalDialog = new Lang.Class({
if (this.state == State.OPENED || this.state == State.OPENING)
return true;
if (!this.pushModal(timestamp))
if (!this.pushModal({ timestamp: timestamp }))
return false;
this._fadeOpen(onPrimary);
@ -276,7 +276,7 @@ const ModalDialog = new Lang.Class({
pushModal: function (timestamp) {
if (this._hasModal)
return true;
if (!Main.pushModal(this._group, timestamp))
if (!Main.pushModal(this._group, { timestamp: timestamp }))
return false;
this._hasModal = true;