Пример #1
0
 def __prepareDirectory__(self, directory, iter, glock=True):
     """
     @summary: Checks if a directory has some directory. 
         In truth case, add a temporal subitem.
     @param directory: Directory to prepare.
     @param iter: TreeIter of the directory.
     @param glock: True to lock gtk-loop.  
     """
     sSubDirs = self.__ioUtils__.getDirectories(directory)
     if (sSubDirs != None) and (len(sSubDirs) > 0):
             UIUtils.addIter(self.__model__,
                             iter,
                             (FactoryControls.getPixbufFromStock(gtk.STOCK_EXECUTE) ,
                              _("Loading..."),
                              self.__TEMP_NODE__
                             ),
                             glock
                         )
Пример #2
0
 def addDirectory (self, dirname, fullpath, icon, iter=None, glock=True):
     """
     @summary: Add a directory on navigator.
     @param dirname: Directory name.
     @param fullpath: Full path of the directory.
     @param icon: Icon associated with the directory.
     @param iter: Parent TreeIter. None to add directory as a root TreeIter,
     @param glock: True to lock gtk-loop.     
     """
     newIter = None
     if (iter != None):
         newIter = UIUtils.insertIter(self.__model__, iter, (icon, dirname, fullpath),
                                      self.__PATH_COLUMN__, self.__directoryNameComparer__, doGObject=glock)
     else:
         newIter = UIUtils.addIter(self.__model__, None, (icon, dirname, fullpath), glock)
         
     if (newIter != None):
         self.__prepareDirectory__(fullpath, newIter, glock=glock)