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
=== modified file 'src/Indicator.vala'
--- src/Indicator.vala 2016-01-16 16:15:16 +0000
+++ src/Indicator.vala 2016-05-04 14:03:39 +0000
@@ -17,8 +17,6 @@
1717
18public class Sound.Indicator : Wingpanel.Indicator {18public class Sound.Indicator : Wingpanel.Indicator {
1919
20 private const string SETTINGS_EXEC = "/usr/bin/switchboard sound";
21
22 private Wingpanel.Widgets.OverlayIcon panel_icon;20 private Wingpanel.Widgets.OverlayIcon panel_icon;
2321
24 private Gtk.Grid main_grid;22 private Gtk.Grid main_grid;
@@ -372,9 +370,17 @@
372 }370 }
373371
374 private void show_settings () {372 private void show_settings () {
375 var cmd = new Granite.Services.SimpleCommand ("/usr/bin", SETTINGS_EXEC);
376 close ();373 close ();
377 cmd.run ();374
375 var list = new List<string> ();
376 list.append ("sound");
377
378 try {
379 var appinfo = AppInfo.create_from_commandline ("switchboard", null, AppInfoCreateFlags.SUPPORTS_URIS);
380 appinfo.launch_uris (list, null);
381 } catch (Error e) {
382 warning ("%s\n", e.message);
383 }
378 }384 }
379385
380 private void play_sound_blubble () {386 private void play_sound_blubble () {

Subscribers

People subscribed via source and target branches

to all changes: