diff options
author | Robert Tari <robert@tari.in> | 2020-10-25 16:10:26 +0100 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2020-10-26 11:37:13 +0100 |
commit | babfaba6f6f22b9cfb821c713cac4dbaaefd8605 (patch) | |
tree | 022cde30d95c68e5922ae10f6ad3916bd11abb15 /src/desktop.vala | |
parent | 21b8f5e95840ddfb65b9fcfdd1a9fe83c07a36b9 (diff) | |
download | ayatana-indicator-bluetooth-babfaba6f6f22b9cfb821c713cac4dbaaefd8605.tar.gz ayatana-indicator-bluetooth-babfaba6f6f22b9cfb821c713cac4dbaaefd8605.tar.bz2 ayatana-indicator-bluetooth-babfaba6f6f22b9cfb821c713cac4dbaaefd8605.zip |
Make dependency on liburl-dispatcher optional.
Diffstat (limited to 'src/desktop.vala')
-rw-r--r-- | src/desktop.vala | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/src/desktop.vala b/src/desktop.vala index 4186daa..7109874 100644 --- a/src/desktop.vala +++ b/src/desktop.vala @@ -226,12 +226,26 @@ class Desktop: Profile void show_settings (string panel) { - if (Environment.get_variable ("MIR_SOCKET") != null) - UrlDispatch.send ("settings:///system/bluetooth"); - else if (is_desktop ("Unity") && Environment.find_program_in_path ("unity-control-center") != null) + +#if HAS_URLDISPATCHER + + if (Environment.get_variable ("MIR_SOCKET") != null) + { + UrlDispatch.send ("settings:///system/bluetooth"); + + return; + } + +#endif + + if (is_desktop ("Unity") && Environment.find_program_in_path ("unity-control-center") != null) + { spawn_command_line_async ("unity-control-center " + panel); + } else + { spawn_command_line_async ("gnome-control-center " + panel); + } } Action create_discoverable_action (Bluetooth bluetooth) |