[rygel] renderer: Prevent signalling the same state
- From: Jens Georg <jensgeorg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rygel] renderer: Prevent signalling the same state
- Date: Thu, 22 Nov 2012 22:56:47 +0000 (UTC)
commit 5f7d6ea0f0e602317aee2f31783beab9f38a6007
Author: Jens Georg <jensg openismus com>
Date: Thu Nov 22 21:47:58 2012 +0100
renderer: Prevent signalling the same state
src/librygel-renderer/rygel-player-controller.vala | 13 ++++++++++++-
1 files changed, 12 insertions(+), 1 deletions(-)
---
diff --git a/src/librygel-renderer/rygel-player-controller.vala b/src/librygel-renderer/rygel-player-controller.vala
index d1d0a25..ab19403 100644
--- a/src/librygel-renderer/rygel-player-controller.vala
+++ b/src/librygel-renderer/rygel-player-controller.vala
@@ -51,7 +51,17 @@ internal class Rygel.PlayerController : Object {
public string protocol_info { construct; private get; }
/* public properties */
- public string playback_state { get; set; default = "NO_MEDIA_PRESENT"; }
+ [CCode (notify = false)]
+ public string playback_state {
+ get { return this._playback_state; }
+ set {
+ if (this._playback_state != value) {
+ this._playback_state = value;
+ this.notify_property ("playback-state");
+ }
+ }
+ default = "NO_MEDIA_PRESENT";
+ }
public uint n_tracks { get; set; default = 0; }
public uint track {
get { return this._track; }
@@ -74,6 +84,7 @@ internal class Rygel.PlayerController : Object {
// Private property variables
private string _metadata;
private uint _track;
+ private string _playback_state;
public PlayerController (MediaPlayer player, string protocol_info) {
Object (player : player, protocol_info : protocol_info);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]