summaryrefslogtreecommitdiff
path: root/src/systemadm.vala
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2011-09-18 17:00:12 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2011-09-20 01:07:28 +0200
commit8f38d5a4c6e627180809db739b2bdaa5ca0c645a (patch)
tree563c06bfe5f7b7f0975a707bdce6450dfaa40d2b /src/systemadm.vala
parent734b60d7961a28adab45ef141807a0f3e0ba11e5 (diff)
systemadm: coalesce id and decription fields
This is just in interest of saving space (e.g. 5 lines for multi-user.target).
Diffstat (limited to 'src/systemadm.vala')
-rw-r--r--src/systemadm.vala24
1 files changed, 11 insertions, 13 deletions
diff --git a/src/systemadm.vala b/src/systemadm.vala
index d4208008fe..4cb5c55ef3 100644
--- a/src/systemadm.vala
+++ b/src/systemadm.vala
@@ -96,7 +96,6 @@ public class MainWindow : Window {
private Manager manager;
private RightLabel unit_id_label;
- private RightLabel unit_aliases_label;
private RightLabel unit_dependency_label;
private RightLabel unit_description_label;
private RightLabel unit_load_state_label;
@@ -220,7 +219,6 @@ public class MainWindow : Window {
job_vbox.pack_start(scroll, true, true, 0);
unit_id_label = new RightLabel();
- unit_aliases_label = new RightLabel();
unit_dependency_label = new RightLabel();
unit_description_label = new RightLabel();
unit_load_state_label = new RightLabel();
@@ -255,8 +253,6 @@ public class MainWindow : Window {
unit_table.attach(new LeftLabel("Id:"), 0, 1, 0, 1, AttachOptions.FILL, AttachOptions.FILL, 0, 0);
unit_table.attach(unit_id_label, 1, 6, 0, 1, AttachOptions.EXPAND|AttachOptions.FILL, AttachOptions.FILL, 0, 0);
- unit_table.attach(new LeftLabel("Aliases:"), 0, 1, 1, 2, AttachOptions.FILL, AttachOptions.FILL, 0, 0);
- unit_table.attach(unit_aliases_label, 1, 6, 1, 2, AttachOptions.EXPAND|AttachOptions.FILL, AttachOptions.FILL, 0, 0);
unit_table.attach(new LeftLabel("Description:"), 0, 1, 2, 3, AttachOptions.FILL, AttachOptions.FILL, 0, 0);
unit_table.attach(unit_description_label, 1, 6, 2, 3, AttachOptions.EXPAND|AttachOptions.FILL, AttachOptions.FILL, 0, 0);
unit_table.attach(new LeftLabel("Dependencies:"), 0, 1, 3, 4, AttachOptions.FILL, AttachOptions.FILL, 0, 0);
@@ -443,7 +439,6 @@ public class MainWindow : Window {
restart_button.set_sensitive(false);
unit_id_label.set_text_or_na();
- unit_aliases_label.set_text_or_na();
unit_description_label.set_text_or_na();
unit_description_label.set_text_or_na();
unit_load_state_label.set_text_or_na();
@@ -507,20 +502,23 @@ public class MainWindow : Window {
public void show_unit(Unit unit) {
current_unit_id = unit.id;
- unit_id_label.set_text_or_na(current_unit_id);
-
- string a = "";
+ string id_display = current_unit_id;
+ bool has_alias = false;
foreach (string i in unit.names) {
if (i == current_unit_id)
continue;
- if (a == "")
- a = i;
- else
- a += "\n" + i;
+ if (!has_alias) {
+ id_display += " (aliases:";
+ has_alias = true;
+ }
+
+ id_display += " " + i;
}
+ if(has_alias)
+ id_display += ")";
- unit_aliases_label.set_text_or_na(a);
+ unit_id_label.set_text_or_na(id_display);
string[]
requires = unit.requires,