Merge lp:~robert-ancell/activity-log-manager/ucc-links into lp:activity-log-manager

Proposed by Robert Ancell
Status: Merged
Merge reported by: Robert Ancell
Merged at revision: not available
Proposed branch: lp:~robert-ancell/activity-log-manager/ucc-links
Merge into: lp:activity-log-manager
Diff against target: 31 lines (+12/-2)
1 file modified
src/security-widget.vala (+12/-2)
To merge this branch: bzr merge lp:~robert-ancell/activity-log-manager/ucc-links
Reviewer Review Type Date Requested Status
PS Jenkins bot continuous-integration Approve
Activity Log Manager Pending
Review via email: mp+215790@code.launchpad.net

Commit message

Open control center links in unity-control-center if appropriate

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/security-widget.vala'
2--- src/security-widget.vala 2014-02-06 16:12:21 +0000
3+++ src/security-widget.vala 2014-04-15 02:03:59 +0000
4@@ -111,7 +111,12 @@
5 var link_password = new Gtk.LinkButton (_("Password Settings"));
6 link_password.activate_link.connect (() => {
7 try {
8- Process.spawn_command_line_async ("gnome-control-center user-accounts");
9+ var have_ucc = Environment.find_program_in_path ("unity-control-center") != null;
10+ var have_gcc = Environment.find_program_in_path ("gnome-control-center") != null;
11+ if (have_ucc && (!have_gcc || Environment.get_variable ("XDG_CURRENT_DESKTOP") == "Unity"))
12+ Process.spawn_command_line_async ("unity-control-center user-accounts");
13+ else
14+ Process.spawn_command_line_async ("gnome-control-center user-accounts");
15 } catch (SpawnError e) {
16 warning ("%s", e.message);
17 }
18@@ -124,7 +129,12 @@
19 var link_power = new Gtk.LinkButton(_("Power Settings"));
20 link_power.activate_link.connect (() => {
21 try {
22- Process.spawn_command_line_async ("gnome-control-center power");
23+ var have_ucc = Environment.find_program_in_path ("unity-control-center") != null;
24+ var have_gcc = Environment.find_program_in_path ("gnome-control-center") != null;
25+ if (have_ucc && (!have_gcc || Environment.get_variable ("XDG_CURRENT_DESKTOP") == "Unity"))
26+ Process.spawn_command_line_async ("unity-control-center power");
27+ else
28+ Process.spawn_command_line_async ("gnome-control-center power");
29 } catch (SpawnError e) {
30 warning ("%s", e.message);
31 }

Subscribers

People subscribed via source and target branches