Port to GnomeIdleMonitor

https://bugzilla.gnome.org/show_bug.cgi?id=682224
This commit is contained in:
Jasper St. Pierre
2012-08-20 00:06:50 -04:00
parent 418cf6281e
commit d106191e6a
7 changed files with 36 additions and 526 deletions

View File

@ -5,6 +5,7 @@ const Clutter = imports.gi.Clutter;
const Gdm = imports.gi.Gdm;
const Gio = imports.gi.Gio;
const GLib = imports.gi.GLib;
const GnomeDesktop = imports.gi.GnomeDesktop;
const Gtk = imports.gi.Gtk;
const Lang = imports.lang;
const Signals = imports.signals;
@ -195,9 +196,7 @@ const UnlockDialog = new Lang.Class({
return false;
}));
this._idleMonitor = Shell.IdleMonitor.get();
// this dialog is only created after user activity (curtain drag or
// escape key press), so the timeout will fire after IDLE_TIMEOUT seconds of inactivity
this._idleMonitor = new GnomeDesktop.IdleMonitor();
this._idleWatchId = this._idleMonitor.add_watch(IDLE_TIMEOUT * 1000, Lang.bind(this, this._escape));
},