[pitivi] ui/gstwidget.py: Fixe several bugs when using it for rendering configurations



commit 6c23998e4bf38fe458025be96967b99a70a6ef7a
Author: Thibault Saunier <tsaunier gnome org>
Date:   Thu Sep 2 23:35:25 2010 +0200

    ui/gstwidget.py: Fixe several bugs when using it for rendering configurations

 pitivi/ui/gstwidget.py |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/pitivi/ui/gstwidget.py b/pitivi/ui/gstwidget.py
index 80200f0..d4ee244 100644
--- a/pitivi/ui/gstwidget.py
+++ b/pitivi/ui/gstwidget.py
@@ -64,7 +64,8 @@ def make_property_widget(unused_element, prop, value=None):
     else:
         widget = dynamic.DefaultWidget(type_name)
 
-    widget.setWidgetValue(value)
+    if value is not None and type_name != 'GFlags':
+        widget.setWidgetValue(value)
 
     return widget
 
@@ -158,7 +159,8 @@ class GstElementSettingsWidget(gtk.VBox, Loggable):
         """
         d = {}
         for prop, widget in self.properties.iteritems():
-            if not prop.flags & gobject.PARAM_WRITABLE:
+            if not prop.flags & gobject.PARAM_WRITABLE\
+              or isinstance(widget, dynamic.DefaultWidget):
                 continue
             value = widget.getWidgetValue()
             if value != None and (value != prop.default_value or with_default):



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