zeitgeist team mailing list archive
-
zeitgeist team
-
Mailing list archive
-
Message #05836
[Merge] lp:~robert-ancell/activity-log-manager/ucc-links into lp:activity-log-manager
Robert Ancell has proposed merging lp:~robert-ancell/activity-log-manager/ucc-links into lp:activity-log-manager.
Commit message:
Open control center links in unity-control-center if appropriate
Requested reviews:
Activity Log Manager (activity-log-manager)
Related bugs:
Bug #1306840 in activity-log-manager (Ubuntu): "There are dead link in System Settings -> Security & Privacy -> Security"
https://bugs.launchpad.net/ubuntu/+source/activity-log-manager/+bug/1306840
For more details, see:
https://code.launchpad.net/~robert-ancell/activity-log-manager/ucc-links/+merge/215790
--
https://code.launchpad.net/~robert-ancell/activity-log-manager/ucc-links/+merge/215790
Your team Activity Log Manager is requested to review the proposed merge of lp:~robert-ancell/activity-log-manager/ucc-links into lp:activity-log-manager.
=== modified file 'src/security-widget.vala'
--- src/security-widget.vala 2014-02-06 16:12:21 +0000
+++ src/security-widget.vala 2014-04-15 02:03:59 +0000
@@ -111,7 +111,12 @@
var link_password = new Gtk.LinkButton (_("Password Settings"));
link_password.activate_link.connect (() => {
try {
- Process.spawn_command_line_async ("gnome-control-center user-accounts");
+ var have_ucc = Environment.find_program_in_path ("unity-control-center") != null;
+ var have_gcc = Environment.find_program_in_path ("gnome-control-center") != null;
+ if (have_ucc && (!have_gcc || Environment.get_variable ("XDG_CURRENT_DESKTOP") == "Unity"))
+ Process.spawn_command_line_async ("unity-control-center user-accounts");
+ else
+ Process.spawn_command_line_async ("gnome-control-center user-accounts");
} catch (SpawnError e) {
warning ("%s", e.message);
}
@@ -124,7 +129,12 @@
var link_power = new Gtk.LinkButton(_("Power Settings"));
link_power.activate_link.connect (() => {
try {
- Process.spawn_command_line_async ("gnome-control-center power");
+ var have_ucc = Environment.find_program_in_path ("unity-control-center") != null;
+ var have_gcc = Environment.find_program_in_path ("gnome-control-center") != null;
+ if (have_ucc && (!have_gcc || Environment.get_variable ("XDG_CURRENT_DESKTOP") == "Unity"))
+ Process.spawn_command_line_async ("unity-control-center power");
+ else
+ Process.spawn_command_line_async ("gnome-control-center power");
} catch (SpawnError e) {
warning ("%s", e.message);
}
References