[gnome-boxes] machine: Bind name directly to topbar status
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes] machine: Bind name directly to topbar status
- Date: Tue, 15 Sep 2015 23:10:02 +0000 (UTC)
commit b194ac301b92ca696e0ac41da5d28b083e19257a
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Tue Sep 15 18:01:56 2015 +0100
machine: Bind name directly to topbar status
The name has nothing to do with status anyway and going through
Machine.status property makes it appear in collection views as well and
that is just redundant and looks wrong and ugly.
So let's just bind the name directly to the topbar status.
https://bugzilla.gnome.org/show_bug.cgi?id=754419
src/machine.vala | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/machine.vala b/src/machine.vala
index 8863e71..c1547bb 100644
--- a/src/machine.vala
+++ b/src/machine.vala
@@ -563,9 +563,10 @@ private abstract class Boxes.Machine: Boxes.CollectionItem, Boxes.IPropertiesPro
private void ui_state_changed () {
if (name_status_bind != null) {
+ var topbar = name_status_bind.target as Topbar;
+ topbar.status = null;
name_status_bind.unbind ();
name_status_bind = null;
- status = null;
}
switch (ui_state) {
@@ -578,7 +579,7 @@ private abstract class Boxes.Machine: Boxes.CollectionItem, Boxes.IPropertiesPro
if (previous_ui_state == UIState.PROPERTIES)
window.below_bin.set_visible_child_name ("display-page");
if (window.current_item == this)
- name_status_bind = bind_property ("name", this, "status", BindingFlags.SYNC_CREATE);
+ name_status_bind = bind_property ("name", window.topbar, "status", BindingFlags.SYNC_CREATE);
break;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]