[gnome-boxes/refactor-thumbs: 4/8] machine, list-view: Drop "info" label
- From: Felipe Borges <felipeborges src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes/refactor-thumbs: 4/8] machine, list-view: Drop "info" label
- Date: Tue, 4 Jan 2022 11:33:25 +0000 (UTC)
commit 361491a7890349431f2e87b79b4af8751a9564c3
Author: Felipe Borges <felipeborges gnome org>
Date: Tue Jan 4 11:45:26 2022 +0100
machine, list-view: Drop "info" label
This label used to contain the "URI" of remote connections, which
we no longer support.
data/ui/list-view-row.ui | 48 ++++++++++--------------------------------------
src/libvirt-machine.vala | 11 -----------
src/list-view-row.vala | 11 -----------
src/machine.vala | 1 -
4 files changed, 10 insertions(+), 61 deletions(-)
---
diff --git a/data/ui/list-view-row.ui b/data/ui/list-view-row.ui
index 9034795f..4170d42f 100644
--- a/data/ui/list-view-row.ui
+++ b/data/ui/list-view-row.ui
@@ -59,47 +59,19 @@
</child>
<child>
- <object class="GtkBox" id="name_and_info_box">
+ <object class="GtkLabel" id="machine_name">
<property name="visible">True</property>
- <property name="orientation">vertical</property>
+ <property name="justify">left</property>
+ <property name="halign">start</property>
+ <property name="hexpand">True</property>
<property name="valign">center</property>
-
- <child>
- <object class="GtkLabel" id="machine_name">
- <property name="visible">True</property>
- <property name="justify">left</property>
- <property name="halign">start</property>
- <property name="hexpand">True</property>
- <property name="valign">center</property>
- <property name="ellipsize">end</property>
- <property name="xalign">0.0</property>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <object class="GtkLabel" id="info_label">
- <property name="visible">False</property> <!-- Only show when non-empty -->
- <property name="max-width-chars">32</property>
- <property name="use-markup">True</property>
- <property name="justify">left</property>
- <property name="hexpand">True</property>
- <property name="halign">start</property>
- <property name="ellipsize">end</property>
- <property name="xalign">0.0</property>
- <style>
- <class name="dim-label"/>
- </style>
- </object>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
+ <property name="ellipsize">end</property>
+ <property name="xalign">0.0</property>
</object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ </packing>
</child>
<child>
diff --git a/src/libvirt-machine.vala b/src/libvirt-machine.vala
index 72897702..fae61071 100644
--- a/src/libvirt-machine.vala
+++ b/src/libvirt-machine.vala
@@ -260,8 +260,6 @@ else if (force_stopped) {
}
update_status ();
- update_info ();
- source.notify["uri"].connect (update_info);
saved_properties = {
BoxConfig.SavedProperty () { name = "run-in-bg", default_value = false },
@@ -701,15 +699,6 @@ else if (VMConfigurator.is_import_config (domain_config))
status = null;
}
- private void update_info () {
- if (!is_local) {
- var uri = Xml.URI.parse (source.uri);
-
- info = _("host: %s").printf (uri.server);
- } else
- info = null;
- }
-
private string? get_mac_address () {
GVirConfig.DomainInterface? iface_config = null;
diff --git a/src/list-view-row.vala b/src/list-view-row.vala
index c47ebf50..9de0e0a9 100644
--- a/src/list-view-row.vala
+++ b/src/list-view-row.vala
@@ -24,8 +24,6 @@
[GtkChild]
private unowned Gtk.Label machine_name;
[GtkChild]
- private unowned Gtk.Label info_label;
- [GtkChild]
private unowned Gtk.Label status_label;
private Boxes.MachineThumbnailer thumbnailer;
@@ -42,13 +40,11 @@ public ListViewRow (CollectionItem item) {
machine.notify["under-construction"].connect (update_thumbnail);
machine.notify["is-stopped"].connect (update_thumbnail);
- machine.notify["info"].connect (update_info);
machine.notify["state"].connect (update_status);
machine.notify["status"].connect (update_status);
thumbnailer.notify["thumbnail"].connect (update_thumbnail);
update_thumbnail ();
- update_info ();
update_status ();
machine.bind_property ("name", machine_name, "label", BindingFlags.SYNC_CREATE);
@@ -80,13 +76,6 @@ else if (machine.is_stopped)
spinner.stop ();
}
- private void update_info () {
- var info = (machine.info != null && machine.info != "")? "<small>" + machine.info + "</small>": "";
- info_label.label = info;
-
- info_label.visible = (info != "");
- }
-
private void update_status () {
update_status_label_style (!machine.is_on);
diff --git a/src/machine.vala b/src/machine.vala
index 0d78148d..f8b81d07 100644
--- a/src/machine.vala
+++ b/src/machine.vala
@@ -9,7 +9,6 @@
public Boxes.BoxConfig config;
public Gdk.Pixbuf? pixbuf { get; set; }
public bool stay_on_display;
- public string? info { get; protected set; }
public string? status { get; set; }
public virtual bool suspend_at_exit { get { return false; } }
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]