[rygel] core: Make parent_ref a property
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rygel] core: Make parent_ref a property
- Date: Tue, 13 Apr 2010 13:20:02 +0000 (UTC)
commit a8747893a94118ece76ab6605b3819c2caf7be31
Author: Jens Georg <mail jensge org>
Date: Mon Apr 5 22:05:04 2010 +0200
core: Make parent_ref a property
This automatically sets parent with parent_ref
src/rygel/rygel-media-object.vala | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/src/rygel/rygel-media-object.vala b/src/rygel/rygel-media-object.vala
index 01c5881..a026b92 100644
--- a/src/rygel/rygel-media-object.vala
+++ b/src/rygel/rygel-media-object.vala
@@ -41,7 +41,17 @@ public abstract class Rygel.MediaObject : GLib.Object {
// You must set 'parent' if you set 'parent_ref' but the opposite is not
// mandatory.
public unowned MediaContainer parent;
- public MediaContainer parent_ref;
+ private MediaContainer _parent_ref;
+ public MediaContainer parent_ref {
+ get {
+ return this._parent_ref;
+ }
+
+ set {
+ this.parent = value;
+ this._parent_ref = value;
+ }
+ }
private string _title;
public string title {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]