Index: gst/extend/pygobject.py
===================================================================
--- gst/extend/pygobject.py	(revision 307)
+++ gst/extend/pygobject.py	(working copy)
@@ -25,6 +25,8 @@
 
 import sys
 
+import types
+
 import gobject
 
 def gobject_set_property(object, property, value):
@@ -39,38 +41,34 @@
         if pspec.name == property:
             break
     else:
-        raise errors.PropertyError(
+        raise TypeError(
             "Property '%s' in element '%s' does not exist" % (
                 property, object.get_property('name')))
-        
+
     if pspec.value_type in (gobject.TYPE_INT, gobject.TYPE_UINT,
+                            gobject.TYPE_LONG, gobject.TYPE_ULONG,
                             gobject.TYPE_INT64, gobject.TYPE_UINT64):
         try:
             value = int(value)
         except ValueError:
             msg = "Invalid value given for property '%s' in element '%s'" % (
                 property, object.get_property('name'))
-            raise errors.PropertyError(msg)
-        
+            raise ValueError(msg)
+
     elif pspec.value_type == gobject.TYPE_BOOLEAN:
         if value == 'False':
             value = False
         elif value == 'True':
             value = True
+        elif isinstance(value, types.StringType):
+            if value.lower() in ['f', 'false', 'no', '0', 'off']:
+                value = False
         else:
             value = bool(value)
     elif pspec.value_type in (gobject.TYPE_DOUBLE, gobject.TYPE_FLOAT):
         value = float(value)
     elif pspec.value_type == gobject.TYPE_STRING:
         value = str(value)
-    # FIXME: this is superevil ! we really need to find a better way
-    # of checking if this property is a param enum  
-    # also, we only allow int for now
-    elif repr(pspec.__gtype__).startswith("<GType GParamEnum"):
-        value = int(value)
-    else:
-        raise errors.PropertyError('Unknown property type: %s' %
-            pspec.value_type)
 
     object.set_property(property, value)
 
