aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2024-06-18 12:55:59 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2024-06-18 12:57:24 +0200
commit5ced7b5858c935dc6f00a238298bb35b945ad2d7 (patch)
tree5b8cbbe130c838ac8311475e903ac80bc445b3c3
parent0bf37ddcf4ca9e79a426e02ff65ad3774f63e838 (diff)
downloadarctica-greeter-5ced7b5858c935dc6f00a238298bb35b945ad2d7.tar.gz
arctica-greeter-5ced7b5858c935dc6f00a238298bb35b945ad2d7.tar.bz2
arctica-greeter-5ced7b5858c935dc6f00a238298bb35b945ad2d7.zip
src/: Don't launch Geoclue agent when in test mode.
-rw-r--r--src/arctica-greeter.vala46
1 files changed, 23 insertions, 23 deletions
diff --git a/src/arctica-greeter.vala b/src/arctica-greeter.vala
index 7a7a315..92165b3 100644
--- a/src/arctica-greeter.vala
+++ b/src/arctica-greeter.vala
@@ -1358,6 +1358,7 @@ public class ArcticaGreeter : Object
Pid atspi_pid = 0;
Pid nmapplet_pid = 0;
+ Pid geoclueagent_pid = 0;
if (!do_test_mode)
{
@@ -1385,34 +1386,33 @@ public class ArcticaGreeter : Object
{
warning ("Error starting the at-spi registry: %s", e.message);
}
- }
- Pid geoclueagent_pid = 0;
- if (AGSettings.get_boolean (AGSettings.KEY_GEOCLUE_AGENT) && (!do_test_mode))
- {
-
- try
+ if (AGSettings.get_boolean (AGSettings.KEY_GEOCLUE_AGENT) && (!do_test_mode))
{
- string[] argv = null;
- if (FileUtils.test ("/usr/lib/geoclue-2.0/demos/agent", FileTest.EXISTS)) {
- Shell.parse_argv ("/usr/lib/geoclue-2.0/demos/agent", out argv);
+ try
+ {
+ string[] argv = null;
+
+ if (FileUtils.test ("/usr/lib/geoclue-2.0/demos/agent", FileTest.EXISTS)) {
+ Shell.parse_argv ("/usr/lib/geoclue-2.0/demos/agent", out argv);
+ }
+ else if (FileUtils.test ("/usr/libexec/geoclue-2.0/demos/agent", FileTest.EXISTS)) {
+ Shell.parse_argv ("/usr/libexec/geoclue-2.0/demos/agent", out argv);
+ }
+ if (argv != null)
+ Process.spawn_async (null,
+ argv,
+ null,
+ SpawnFlags.SEARCH_PATH,
+ null,
+ out geoclueagent_pid);
+ debug ("Launched GeoClue-2.0 agent. PID: %d", geoclueagent_pid);
}
- else if (FileUtils.test ("/usr/libexec/geoclue-2.0/demos/agent", FileTest.EXISTS)) {
- Shell.parse_argv ("/usr/libexec/geoclue-2.0/demos/agent", out argv);
+ catch (Error e)
+ {
+ warning ("Error starting the GeoClue-2.0 agent: %s", e.message);
}
- if (argv != null)
- Process.spawn_async (null,
- argv,
- null,
- SpawnFlags.SEARCH_PATH,
- null,
- out geoclueagent_pid);
- debug ("Launched GeoClue-2.0 agent. PID: %d", geoclueagent_pid);
- }
- catch (Error e)
- {
- warning ("Error starting the GeoClue-2.0 agent: %s", e.message);
}
}