diff options
-rw-r--r-- | configure.ac | 5 | ||||
-rw-r--r-- | debian/control | 1 | ||||
-rw-r--r-- | src/Makefile.am | 1 | ||||
-rw-r--r-- | src/phone.vala | 2 | ||||
-rw-r--r-- | vapi/url-dispatcher.vapi | 9 |
5 files changed, 16 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index 6eba857..00f2d09 100644 --- a/configure.ac +++ b/configure.ac @@ -16,9 +16,12 @@ dnl ########################################################################### GLIB_REQUIRED_VERSION=2.36 GIO_REQUIRED_VERSION=2.36 +URL_DISPATCHER_1_REQUIRED_VERSION=1 PKG_CHECK_MODULES(SERVICE_DEPS, [glib-2.0 >= $GLIB_REQUIRED_VERSION - gio-unix-2.0 >= $GIO_REQUIRED_VERSION]) + gio-unix-2.0 >= $GIO_REQUIRED_VERSION + url-dispatcher-1 >= $URL_DISPATCHER_1_REQUIRED_VERSION]) + dnl ############################## dnl # Custom Junk diff --git a/debian/control b/debian/control index baffbf4..2bbb19f 100644 --- a/debian/control +++ b/debian/control @@ -7,6 +7,7 @@ Build-Depends: debhelper (>= 9.0), dh-translations, gnome-common, libglib2.0-dev, + liburl-dispatcher1-dev, valac (>=0.18), Standards-Version: 3.9.4 Homepage: https://launchpad.net/indicator-bluetooth diff --git a/src/Makefile.am b/src/Makefile.am index 2fc41bb..8311e20 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -18,6 +18,7 @@ indicator_bluetooth_service_VALAFLAGS = \ --vapidir=./ \ --pkg config \ --pkg rfkill \ + --pkg url-dispatcher \ --pkg posix \ --pkg glib-2.0 \ --pkg gio-2.0 diff --git a/src/phone.vala b/src/phone.vala index e90cd66..f36d175 100644 --- a/src/phone.vala +++ b/src/phone.vala @@ -61,7 +61,7 @@ class Phone: Profile void show_settings (string panel) { - spawn_command_line_async ("system-settings " + panel); + UrlDispatch.send ("settings://system/bluetooth"); } Action create_settings_action () diff --git a/vapi/url-dispatcher.vapi b/vapi/url-dispatcher.vapi new file mode 100644 index 0000000..ed751ec --- /dev/null +++ b/vapi/url-dispatcher.vapi @@ -0,0 +1,9 @@ +[CCode (cprefix = "", lower_case_cprefix = "", cheader_filename = "liburl-dispatcher-1/url-dispatcher.h")] + +namespace UrlDispatch +{ + public delegate void DispatchCallback (); + + [CCode (cname = "url_dispatch_send")] + public static void send (string url, DispatchCallback? func = null); +} |