[d-feet] add dbus type wrappers global scope of methods executed by the exec dialog



commit 78f0c10cc27ec7e52f4adcdb073cfb585a77f547
Author: John (J5) Palmieri <johnp redhat com>
Date:   Tue Jan 4 11:20:22 2011 -0500

    add dbus type wrappers global scope of methods executed by the exec dialog

 dfeet/_ui/executemethoddialog.py |   15 ++++++++++++++-
 1 files changed, 14 insertions(+), 1 deletions(-)
---
diff --git a/dfeet/_ui/executemethoddialog.py b/dfeet/_ui/executemethoddialog.py
index 934460e..8c43c30 100644
--- a/dfeet/_ui/executemethoddialog.py
+++ b/dfeet/_ui/executemethoddialog.py
@@ -1,4 +1,5 @@
 import gtk
+import dbus
 
 from dfeet import _util
 
@@ -61,7 +62,19 @@ class ExecuteMethodDialog:
                                   buf.get_end_iter())
             if params:
                 params = '(' + params + ',)'
-                args = eval(params)
+                args = eval(params, {'Boolean':dbus.Boolean,
+                                     'Byte':dbus.Byte,
+                                     'Int16':dbus.Int16,
+                                     'Int32':dbus.Int32,
+                                     'Int64':dbus.Int64,
+                                     'UInt16':dbus.UInt16,
+                                     'UInt32':dbus.UInt32,
+                                     'UInt64':dbus.UInt64,
+                                     'Double':dbus.Double,
+                                     'ObjectPath':dbus.ObjectPath,
+                                     'Signature':dbus.Signature,
+                                     'String':dbus.String,
+                                     'UTF8String':dbus.UTF8String})
 
             result = self.method.dbus_call(self.busname.get_bus(), 
                               self.busname.get_display_name(),



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