125 if os.path.lexists(self._dirName) and os.path.islink(self._dirName): |
125 if os.path.lexists(self._dirName) and os.path.islink(self._dirName): |
126 self.symlink = True |
126 self.symlink = True |
127 self.icon = UI.PixmapCache.getSymlinkIcon("dirClosed.png") |
127 self.icon = UI.PixmapCache.getSymlinkIcon("dirClosed.png") |
128 else: |
128 else: |
129 self.icon = UI.PixmapCache.getIcon("dirClosed.png") |
129 self.icon = UI.PixmapCache.getIcon("dirClosed.png") |
|
130 |
|
131 def setName(self, dinfo, full = True): |
|
132 """ |
|
133 Public method to set the directory name. |
|
134 |
|
135 @param dinfo dinfo is the string for the directory (string) |
|
136 @param full flag indicating full pathname should be displayed (boolean) |
|
137 """ |
|
138 self._dirName = os.path.abspath(dinfo) |
|
139 self.itemData[0] = os.path.basename(self._dirName) |
130 |
140 |
131 def dirName(self): |
141 def dirName(self): |
132 """ |
142 """ |
133 Public method returning the directory name. |
143 Public method returning the directory name. |
134 |
144 |
651 """ |
661 """ |
652 itm = self.findItem(name) |
662 itm = self.findItem(name) |
653 if itm is None: |
663 if itm is None: |
654 return |
664 return |
655 |
665 |
656 if itm.isLazyPopulated() and not itm.isPopulated(): |
666 if itm.isLazyPopulated(): |
657 # item is not populated yet, nothing to do |
667 if not itm.isPopulated(): |
658 return |
668 # item is not populated yet, nothing to do |
659 |
669 return |
660 if itm.childCount(): |
670 |
661 index = self.createIndex(itm.row(), 0, itm) |
671 if itm.childCount(): |
662 self.beginRemoveRows(index, 0, itm.childCount() - 1) |
672 index = self.createIndex(itm.row(), 0, itm) |
663 itm.removeChildren() |
673 self.beginRemoveRows(index, 0, itm.childCount() - 1) |
664 self.endRemoveRows() |
674 itm.removeChildren() |
665 Utilities.ModuleParser.resetParsedModule(\ |
675 self.endRemoveRows() |
666 os.path.join(self.project.ppath, name)) |
676 Utilities.ModuleParser.resetParsedModule(\ |
667 |
677 os.path.join(self.project.ppath, name)) |
668 self.populateItem(itm, True) |
678 |
|
679 self.populateItem(itm, True) |
669 |
680 |
670 def projectPropertiesChanged(self): |
681 def projectPropertiesChanged(self): |
671 """ |
682 """ |
672 Public method to react on a change of the project properties. |
683 Public method to react on a change of the project properties. |
673 """ |
684 """ |