main: Add optional keybindingMode parameter to pushModal()

For now we just use it to assign an identifier to modal modes in
which we want to allow some keybindings, but we don't use it for
any actual filtering; we'll start doing this shortly.

https://bugzilla.gnome.org/show_bug.cgi?id=688202
This commit is contained in:
Florian Müllner
2012-08-10 20:35:59 +02:00
parent 5f367248c5
commit b58f502dd6
8 changed files with 40 additions and 9 deletions

View File

@ -591,7 +591,7 @@ const Overview = new Lang.Class({
if (this._shown)
return;
// Do this manually instead of using _syncInputMode, to handle failure
if (!Main.pushModal(this._group))
if (!Main.pushModal(this._group, { keybindingMode: Main.KeybindingMode.OVERVIEW }))
return;
this._modal = true;
this._animateVisible();
@ -742,7 +742,8 @@ const Overview = new Lang.Class({
if (this._shown) {
if (!this._modal) {
if (Main.pushModal(this._group))
if (Main.pushModal(this._group,
{ keybindingMode: Main.KeybindingMode.OVERVIEW }))
this._modal = true;
else
this.hide();