From 79b1e6cb8080e5c88754484f5af591ce74714ff0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Mon, 19 Sep 2011 08:20:17 +0200 Subject: [PATCH] systemadm: use colors for id too, remove color from fragment link --- src/systemadm.vala | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/systemadm.vala b/src/systemadm.vala index 11189995..5971ac07 100644 --- a/src/systemadm.vala +++ b/src/systemadm.vala @@ -452,7 +452,7 @@ public class MainWindow : Window { unit_cgroup_label.set_text_or_na(); } - public string format_unit_link(string i) { + public string format_unit_link(string i, bool link) { Unit? u = get_unit(i); if(u == null) return "" + i + "" + i + "(" + u.sub_state + ")" + ""; - return " " + span + ""; + if(link) + return " " + span + ""; + else + return span; } @@ -493,7 +496,7 @@ public class MainWindow : Window { first = false; } - r += format_unit_link(i); + r += format_unit_link(i, true); } return r; @@ -502,7 +505,7 @@ public class MainWindow : Window { public void show_unit(Unit unit) { current_unit_id = unit.id; - string id_display = current_unit_id; + string id_display = format_unit_link(current_unit_id, false); bool has_alias = false; foreach (string i in unit.names) { if (i == current_unit_id) @@ -518,7 +521,7 @@ public class MainWindow : Window { if(has_alias) id_display += ")"; - unit_id_label.set_text_or_na(id_display); + unit_id_label.set_markup_or_na(id_display); string[] requires = unit.requires, @@ -564,7 +567,9 @@ public class MainWindow : Window { string fp = unit.fragment_path; if (fp != "") - unit_fragment_path_label.set_markup_or_na("" + fp + "" ); + unit_fragment_path_label.set_markup_or_na( + "" + + "" + fp + ""); else unit_fragment_path_label.set_text_or_na(); -- 2.39.5