[Ocfs2-tools-commits] manish commits r752 - trunk/ocfs2console/ocfs2interface

svn-commits at oss.oracle.com svn-commits at oss.oracle.com
Mon Mar 28 16:59:43 CST 2005


Author: manish
Date: 2005-03-28 16:59:41 -0600 (Mon, 28 Mar 2005)
New Revision: 752

Modified:
   trunk/ocfs2console/ocfs2interface/clconfig.py
Log:
Workaround ancient pygtks not handling bool as a ListStore type


Modified: trunk/ocfs2console/ocfs2interface/clconfig.py
===================================================================
--- trunk/ocfs2console/ocfs2interface/clconfig.py	2005-03-28 22:38:04 UTC (rev 751)
+++ trunk/ocfs2console/ocfs2interface/clconfig.py	2005-03-28 22:59:41 UTC (rev 752)
@@ -19,6 +19,7 @@
 import types
 
 import gtk
+import gobject
 import pango
 
 from cStringIO import StringIO
@@ -55,6 +56,8 @@
     (COLUMN_IP_PORT,  'IP Port',    gtk.SpinButton, str)
 )
 
+typemap = { bool: gobject.TYPE_BOOLEAN }
+
 class ConfigError(Exception):
     pass
 
@@ -126,7 +129,7 @@
         if not success:
             raise ConfError, output
 
-        self.store = gtk.ListStore(*[f[3] for f in fields])
+        self.store = gtk.ListStore(*[typemap.get(f[3], f[3]) for f in fields])
 
         def node_compare(store, a, b):
             n1 = store[a][COLUMN_NODE]



More information about the Ocfs2-tools-commits mailing list