[gnome-boxes] app-window: Turn current_item into property
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-boxes] app-window: Turn current_item into property
- Date: Thu, 4 Sep 2014 21:51:26 +0000 (UTC)
commit 3a7e28c59ed30dd82b44fce32620dbcc60741851
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Thu Sep 4 14:04:39 2014 +0100
app-window: Turn current_item into property
We need this to be able to (un)hook on current item's state changes. Not
using automatic properties cause we need to do that from setter.
https://bugzilla.gnome.org/show_bug.cgi?id=735045
src/app-window.vala | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/src/app-window.vala b/src/app-window.vala
index bdaaf57..64e3421 100644
--- a/src/app-window.vala
+++ b/src/app-window.vala
@@ -9,7 +9,17 @@ private class Boxes.AppWindow: Gtk.ApplicationWindow, Boxes.UI {
public UIState previous_ui_state { get; protected set; }
public UIState ui_state { get; protected set; }
- public CollectionItem current_item; // current object/vm manipulated
+ // current object/vm manipulated
+ private CollectionItem _current_item;
+ public CollectionItem current_item {
+ get {
+ return _current_item;
+ }
+
+ set {
+ _current_item = value;
+ }
+ }
public signal void item_selected (CollectionItem item);
private GLib.Binding status_bind;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]