Merge lp:~elementary-pantheon/switchboard-plug-sharing/prefs-spec into lp:~elementary-apps/switchboard-plug-sharing/trunk

Proposed by Danielle Foré
Status: Merged
Approved by: Corentin Noël
Approved revision: 104
Merged at revision: 104
Proposed branch: lp:~elementary-pantheon/switchboard-plug-sharing/prefs-spec
Merge into: lp:~elementary-apps/switchboard-plug-sharing/trunk
Diff against target: 51 lines (+5/-15)
2 files modified
src/Plug.vala (+4/-1)
src/Widgets/BluetoothPage.vala (+1/-14)
To merge this branch: bzr merge lp:~elementary-pantheon/switchboard-plug-sharing/prefs-spec
Reviewer Review Type Date Requested Status
elementary Apps team Pending
Review via email: mp+313271@code.launchpad.net

Commit message

Implement Preferences URL Specification

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/Plug.vala'
2--- src/Plug.vala 2016-06-10 20:45:20 +0000
3+++ src/Plug.vala 2016-12-14 20:04:20 +0000
4@@ -26,11 +26,14 @@
5 private Gtk.LinkButton link_button;
6
7 public Plug () {
8+ var settings = new Gee.TreeMap<string, string?> (null, null);
9+ settings.set ("network/share", "null");
10 Object (category : Category.NETWORK,
11 code_name: "pantheon-sharing",
12 display_name: _("Sharing"),
13 description: _("Configure file and media sharing"),
14- icon: "preferences-system-sharing");
15+ icon: "preferences-system-sharing",
16+ supported_settings: settings);
17 }
18
19 public override Gtk.Widget get_widget () {
20
21=== modified file 'src/Widgets/BluetoothPage.vala'
22--- src/Widgets/BluetoothPage.vala 2016-05-06 22:58:18 +0000
23+++ src/Widgets/BluetoothPage.vala 2016-12-14 20:04:20 +0000
24@@ -37,20 +37,6 @@
25 sharing_settings.bind ("bluetooth-accept-files", accept_combo, "active-id", SettingsBindFlags.DEFAULT);
26 sharing_settings.bind ("bluetooth-notify", notify_switch, "active", SettingsBindFlags.DEFAULT);
27
28- link_button.activate_link.connect (() => {
29- var list = new List<string> ();
30- list.append ("bluetooth");
31-
32- try {
33- var appinfo = AppInfo.create_from_commandline ("switchboard", null, AppInfoCreateFlags.SUPPORTS_URIS);
34- appinfo.launch_uris (list, null);
35- } catch (Error e) {
36- warning (e.message);
37- }
38-
39- return true;
40- });
41-
42 service_switch.notify ["active"].connect (() => {
43 set_service_state ();
44 });
45@@ -89,6 +75,7 @@
46
47 link_button.label = _("Bluetooth settings…");
48 link_button.tooltip_text = _("Open bluetooth settings");
49+ link_button.uri = "settings://network/bluetooth";
50 link_button.no_show_all = false;
51 }
52

Subscribers

People subscribed via source and target branches