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

Proposed by Adam Bieńkowski
Status: Merged
Approved by: Felipe Escoto
Approved revision: 84
Merged at revision: 83
Proposed branch: lp:~donadigo/wingpanel-indicator-sound/use-appinfo
Merge into: lp:~wingpanel-devs/wingpanel-indicator-sound/trunk
Diff against target: 32 lines (+10/-4)
1 file modified
src/Indicator.vala (+10/-4)
To merge this branch: bzr merge lp:~donadigo/wingpanel-indicator-sound/use-appinfo
Reviewer Review Type Date Requested Status
WingPanel Devs Pending
Review via email: mp+293778@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-01-16 16:15:16 +0000
3+++ src/Indicator.vala 2016-05-04 14:03:39 +0000
4@@ -17,8 +17,6 @@
5
6 public class Sound.Indicator : Wingpanel.Indicator {
7
8- private const string SETTINGS_EXEC = "/usr/bin/switchboard sound";
9-
10 private Wingpanel.Widgets.OverlayIcon panel_icon;
11
12 private Gtk.Grid main_grid;
13@@ -372,9 +370,17 @@
14 }
15
16 private void show_settings () {
17- var cmd = new Granite.Services.SimpleCommand ("/usr/bin", SETTINGS_EXEC);
18 close ();
19- cmd.run ();
20+
21+ var list = new List<string> ();
22+ list.append ("sound");
23+
24+ try {
25+ var appinfo = AppInfo.create_from_commandline ("switchboard", null, AppInfoCreateFlags.SUPPORTS_URIS);
26+ appinfo.launch_uris (list, null);
27+ } catch (Error e) {
28+ warning ("%s\n", e.message);
29+ }
30 }
31
32 private void play_sound_blubble () {

Subscribers

People subscribed via source and target branches

to all changes: