From: Zbigniew Jędrzejewski-Szmek Date: Thu, 3 Mar 2011 21:20:19 +0000 (+0100) Subject: systemadm: use color for dependency links X-Git-Tag: v38~206^2~6 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=23b51f17b1cf473bff3ae5332477e2028a5c5f53;p=systemd systemadm: use color for dependency links --- diff --git a/src/systemadm.vala b/src/systemadm.vala index 088ba26b..eed46b57 100644 --- a/src/systemadm.vala +++ b/src/systemadm.vala @@ -457,6 +457,25 @@ public class MainWindow : Window { unit_cgroup_label.set_text_or_na(); } + public string format_unit_link(string i) { + Unit? u = get_unit(i); + if(u == null) + return "" + i + "" + + i + "(" + + u.sub_state + ")" + ""; + return " " + span + ""; + } + + public string make_dependency_string(string? prefix, string word, string[] dependencies) { Gee.Collection sorted = new Gee.TreeSet(); foreach (string i in dependencies) @@ -479,7 +498,7 @@ public class MainWindow : Window { first = false; } - r += " " + i + ""; + r += format_unit_link(i); } return r;