aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRobert Ancell <robert.ancell@canonical.com>2017-04-18 08:12:26 +0000
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2017-04-18 08:12:26 +0000
commitb7ffb481d7f563be9f9a7522412fe96001689516 (patch)
treee1b4b7ae068d5e7e07327f7f63ef8418b82e25eb /src
parenta3cf506ae9fc124f1943419959a8d2cdcfc82bcc (diff)
downloadarctica-greeter-b7ffb481d7f563be9f9a7522412fe96001689516.tar.gz
arctica-greeter-b7ffb481d7f563be9f9a7522412fe96001689516.tar.bz2
arctica-greeter-b7ffb481d7f563be9f9a7522412fe96001689516.zip
Fix test mode by skipping xsettings checks.
Diffstat (limited to 'src')
-rw-r--r--src/arctica-greeter.vala68
1 files changed, 37 insertions, 31 deletions
diff --git a/src/arctica-greeter.vala b/src/arctica-greeter.vala
index 1a9d0cb..426eba5 100644
--- a/src/arctica-greeter.vala
+++ b/src/arctica-greeter.vala
@@ -97,32 +97,36 @@ public class ArcticaGreeter
warning ("Failed to load state from %s: %s\n", state_file, e.message);
}
- /* Render things after xsettings is ready */
- xsettings_ready.connect ( xsettings_ready_cb );
-
- GLib.Bus.watch_name (BusType.SESSION, "org.gnome.SettingsDaemon", BusNameWatcherFlags.NONE,
- (c, name, owner) =>
- {
- try {
- settings_daemon_proxy = GLib.Bus.get_proxy_sync (
- BusType.SESSION, "org.gnome.SettingsDaemon", "/org/gnome/SettingsDaemon");
- settings_daemon_proxy.plugin_activated.connect (
- (name) =>
- {
- if (name == "xsettings") {
- debug ("xsettings is ready");
- xsettings_ready ();
+ if (!test_mode) {
+ /* Render things after xsettings is ready */
+ xsettings_ready.connect ( xsettings_ready_cb );
+
+ GLib.Bus.watch_name (BusType.SESSION, "org.gnome.SettingsDaemon", BusNameWatcherFlags.NONE,
+ (c, name, owner) =>
+ {
+ try {
+ settings_daemon_proxy = GLib.Bus.get_proxy_sync (
+ BusType.SESSION, "org.gnome.SettingsDaemon", "/org/gnome/SettingsDaemon");
+ settings_daemon_proxy.plugin_activated.connect (
+ (name) =>
+ {
+ if (name == "xsettings") {
+ debug ("xsettings is ready");
+ xsettings_ready ();
+ }
}
- }
- );
- }
- catch (Error e)
- {
- debug ("Failed to get USD proxy, proceed anyway");
- xsettings_ready ();
- }
- },
- null);
+ );
+ }
+ catch (Error e)
+ {
+ debug ("Failed to get USD proxy, proceed anyway");
+ xsettings_ready ();
+ }
+ },
+ null);
+ }
+ else
+ xsettings_ready_cb ();
}
public string? get_state (string key)
@@ -604,14 +608,14 @@ public class ArcticaGreeter
debug ("Creating Arctica Greeter");
var greeter = new ArcticaGreeter (do_test_mode);
- greeter.greeter_ready.connect (() => {
- debug ("Showing greeter");
- greeter.show ();
- });
-
-
if (!do_test_mode)
{
+
+ greeter.greeter_ready.connect (() => {
+ debug ("Showing greeter");
+ greeter.show ();
+ });
+
// /* Start the indicator services */
// try
// {
@@ -642,6 +646,8 @@ public class ArcticaGreeter
warning ("Error starting nm-applet: %s", e.message);
}
}
+ else
+ greeter.show ();
/* Setup a handler for TERM so we quit cleanly */
GLib.Unix.signal_add(GLib.ProcessSignal.TERM, () => {