aboutsummaryrefslogtreecommitdiff
path: root/src/main-window.vala
diff options
context:
space:
mode:
Diffstat (limited to 'src/main-window.vala')
-rw-r--r--src/main-window.vala8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/main-window.vala b/src/main-window.vala
index 993e43e..172c6f4 100644
--- a/src/main-window.vala
+++ b/src/main-window.vala
@@ -159,7 +159,8 @@ public class MainWindow : Gtk.Window
only_on_monitor = AGSettings.get_string(AGSettings.KEY_ONLY_ON_MONITOR);
monitor_setting_ok = only_on_monitor == "auto";
- if (ArcticaGreeter.singleton.test_mode)
+ var greeter = new ArcticaGreeter ();
+ if (greeter.test_mode)
{
/* Simulate an 800x600 monitor to the left of a 640x480 monitor */
monitors = new List<Monitor> ();
@@ -375,6 +376,7 @@ public class MainWindow : Gtk.Window
}
}
+ var greeter = new ArcticaGreeter ();
switch (event.keyval)
{
case Gdk.Key.Escape:
@@ -434,14 +436,14 @@ public class MainWindow : Gtk.Window
}
return true;
case Gdk.Key.z:
- if (ArcticaGreeter.singleton.test_mode && (event.state & Gdk.ModifierType.MOD1_MASK) != 0)
+ if (greeter.test_mode && (event.state & Gdk.ModifierType.MOD1_MASK) != 0)
{
show_shutdown_dialog (ShutdownDialogType.SHUTDOWN);
return true;
}
break;
case Gdk.Key.Z:
- if (ArcticaGreeter.singleton.test_mode && (event.state & Gdk.ModifierType.MOD1_MASK) != 0)
+ if (greeter.test_mode && (event.state & Gdk.ModifierType.MOD1_MASK) != 0)
{
show_shutdown_dialog (ShutdownDialogType.RESTART);
return true;