[rygel] gst-renderer: Create widget before connecting signals



commit b357994c009f54a00fe9a1b2b1f8c8a0608a7509
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Sun Oct 4 21:43:17 2009 +0300

    gst-renderer: Create widget before connecting signals
    
    Create the widget before connecting handlers to it's signals.

 .../gst-renderer/rygel-gst-video-window.vala       |   11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)
---
diff --git a/src/plugins/gst-renderer/rygel-gst-video-window.vala b/src/plugins/gst-renderer/rygel-gst-video-window.vala
index 70ec6be..9beed0c 100644
--- a/src/plugins/gst-renderer/rygel-gst-video-window.vala
+++ b/src/plugins/gst-renderer/rygel-gst-video-window.vala
@@ -91,15 +91,14 @@ public class Rygel.GstVideoWindow : Window {
     private GstVideoWindow () {
         this.fullscreen_state = true;
 
-        this.video_widget.eos += this.eos_cb;
-        this.video_widget.notify["duration"] += this.notify_duration_cb;
-        this.video_widget.notify["position"] += this.notify_position_cb;
-
         // Show a video widget
         this.video_widget = new VideoWidget ();
-        this.video_widget.show ();
 
-        this.add (video_widget);
+        this.video_widget.notify["duration"] += this.notify_duration_cb;
+        this.video_widget.notify["position"] += this.notify_position_cb;
+        this.video_widget.eos += this.eos_cb;
+
+        this.add (this.video_widget);
         this.show_all ();
 
         this.key_press_event += this.key_press_callback;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]