示例#1
0
 def __getitem__(self, key):
   view_dirs = self.gconf_client.all_dirs(GCONF_PLUGINVIEWS)
   for dir in view_dirs:
     if key == gconf.unescape_key(dir.split('/')[-1], 
                                  len(dir.split('/')[-1])):
       return GConfListWrapper(dir+'/layout')
   raise KeyError, key
示例#2
0
 def __iter__(self):
   view_dirs = self.gconf_client.all_dirs(GCONF_PLUGINVIEWS)
   for dir in view_dirs:
     yield gconf.unescape_key(dir.split('/')[-1], len(dir.split('/')[-1]))