Merge lp:~donadigo/wingpanel-indicator-keyboard/use-appinfo into lp:~wingpanel-devs/wingpanel-indicator-keyboard/trunk

Proposed by Adam Bieńkowski
Status: Merged
Approved by: Felipe Escoto
Approved revision: 36
Merged at revision: 36
Proposed branch: lp:~donadigo/wingpanel-indicator-keyboard/use-appinfo
Merge into: lp:~wingpanel-devs/wingpanel-indicator-keyboard/trunk
Diff against target: 21 lines (+10/-2)
1 file modified
src/Indicator.vala (+10/-2)
To merge this branch: bzr merge lp:~donadigo/wingpanel-indicator-keyboard/use-appinfo
Reviewer Review Type Date Requested Status
WingPanel Devs Pending
Review via email: mp+293781@code.launchpad.net

Commit message

* Fix bug #1575376: "Use GLib.AppInfo.launch instead of granite simple command to open system settings".

Description of the change

Fixes bug #1575376: "Use GLib.AppInfo.launch instead of granite simple command to open system settings".

Use AppInfo instead of SimpleCommand to launch Switchboard.

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/Indicator.vala'
2--- src/Indicator.vala 2016-04-20 21:31:15 +0000
3+++ src/Indicator.vala 2016-05-04 14:15:54 +0000
4@@ -78,8 +78,16 @@
5
6 private void show_settings () {
7 close ();
8- var cmd = new Granite.Services.SimpleCommand ("/usr/bin", "switchboard keyboard");
9- cmd.run ();
10+
11+ var list = new List<string> ();
12+ list.append ("keyboard");
13+
14+ try {
15+ var appinfo = AppInfo.create_from_commandline ("switchboard", null, AppInfoCreateFlags.SUPPORTS_URIS);
16+ appinfo.launch_uris (list, null);
17+ } catch (Error e) {
18+ warning ("%s\n", e.message);
19+ }
20 }
21 }
22

Subscribers

People subscribed via source and target branches