aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2013-09-25 20:33:17 +0000
committerTarmac <>2013-09-25 20:33:17 +0000
commitdadbe9e87dd327a3a0735a725696e8389d9d90da (patch)
tree29b61c137ca916c59b119469cfd24525e618ac47
parentacbd029f060ed529c9197990502ac035f8d8810d (diff)
parent760dc3b93f9fd5709501f1026dba2533ec877680 (diff)
downloadayatana-indicator-bluetooth-dadbe9e87dd327a3a0735a725696e8389d9d90da.tar.gz
ayatana-indicator-bluetooth-dadbe9e87dd327a3a0735a725696e8389d9d90da.tar.bz2
ayatana-indicator-bluetooth-dadbe9e87dd327a3a0735a725696e8389d9d90da.zip
Use url-dispatcher instead of invoking system-settings directly. Fixes: https://bugs.launchpad.net/bugs/1230819.
Approved by PS Jenkins bot, Ted Gould.
-rw-r--r--configure.ac5
-rw-r--r--debian/control1
-rw-r--r--src/Makefile.am1
-rw-r--r--src/phone.vala2
-rw-r--r--vapi/url-dispatcher.vapi9
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);
+}