Sat, 06 Feb 2010 17:40:24 +0000
Added code to indicate directories and files being symbolic links.
--- a/APIs/Python3/eric5.api Sat Feb 06 11:14:30 2010 +0000 +++ b/APIs/Python3/eric5.api Sat Feb 06 17:40:24 2010 +0000 @@ -306,7 +306,7 @@ eric5.DebugClients.Python3.DebugClientBase.DebugClientBase.getCoding?4() eric5.DebugClients.Python3.DebugClientBase.DebugClientBase.getRunning?4() eric5.DebugClients.Python3.DebugClientBase.DebugClientBase.handleLine?4(line) -eric5.DebugClients.Python3.DebugClientBase.DebugClientBase.input?4(prompt) +eric5.DebugClients.Python3.DebugClientBase.DebugClientBase.input?4(prompt, echo = True) eric5.DebugClients.Python3.DebugClientBase.DebugClientBase.main?4() eric5.DebugClients.Python3.DebugClientBase.DebugClientBase.progTerminated?4(status) eric5.DebugClients.Python3.DebugClientBase.DebugClientBase.run_call?4(scriptname, func, *args) @@ -318,7 +318,7 @@ eric5.DebugClients.Python3.DebugClientBase.DebugClientBase?1() eric5.DebugClients.Python3.DebugClientBase.DebugClientClose?4(fd) eric5.DebugClients.Python3.DebugClientBase.DebugClientFork?4() -eric5.DebugClients.Python3.DebugClientBase.DebugClientInput?4(prompt = "") +eric5.DebugClients.Python3.DebugClientBase.DebugClientInput?4(prompt = "", echo = True) eric5.DebugClients.Python3.DebugClientBase.DebugClientInstance?7 eric5.DebugClients.Python3.DebugClientBase.DebugClientSetRecursionLimit?4(limit) eric5.DebugClients.Python3.DebugClientCapabilities.HasAll?7 @@ -4879,6 +4879,7 @@ eric5.UI.BrowserModel.BrowserItem.isLazyPopulated?4() eric5.UI.BrowserModel.BrowserItem.isPopulated?4() eric5.UI.BrowserModel.BrowserItem.isPublic?4() +eric5.UI.BrowserModel.BrowserItem.isSymlink?4() eric5.UI.BrowserModel.BrowserItem.lessThan?4(other, column, order) eric5.UI.BrowserModel.BrowserItem.parent?4() eric5.UI.BrowserModel.BrowserItem.removeChild?4(child) @@ -5019,6 +5020,7 @@ eric5.UI.PixmapCache.addSearchPath?4(path, cache = pixCache) eric5.UI.PixmapCache.getIcon?4(key, cache = pixCache) eric5.UI.PixmapCache.getPixmap?4(key, cache = pixCache) +eric5.UI.PixmapCache.getSymlinkIcon?4(key, cache = pixCache) eric5.UI.PixmapCache.pixCache?7 eric5.UI.SplashScreen.NoneSplashScreen.clearMessage?4() eric5.UI.SplashScreen.NoneSplashScreen.finish?4(widget)
--- a/Documentation/Help/source.qhp Sat Feb 06 11:14:30 2010 +0000 +++ b/Documentation/Help/source.qhp Sat Feb 06 17:40:24 2010 +0000 @@ -2890,7 +2890,6 @@ <keyword name="DownloadDialog (Constructor)" id="DownloadDialog (Constructor)" ref="eric5.Helpviewer.DownloadDialog.html#DownloadDialog.__init__" /> <keyword name="DownloadDialog.__dataString" id="DownloadDialog.__dataString" ref="eric5.Helpviewer.DownloadDialog.html#DownloadDialog.__dataString" /> <keyword name="DownloadDialog.__downloadProgress" id="DownloadDialog.__downloadProgress" ref="eric5.Helpviewer.DownloadDialog.html#DownloadDialog.__downloadProgress" /> - <keyword name="DownloadDialog.__downloadedSuccessfully" id="DownloadDialog.__downloadedSuccessfully" ref="eric5.Helpviewer.DownloadDialog.html#DownloadDialog.__downloadedSuccessfully" /> <keyword name="DownloadDialog.__downloading" id="DownloadDialog.__downloading" ref="eric5.Helpviewer.DownloadDialog.html#DownloadDialog.__downloading" /> <keyword name="DownloadDialog.__finished" id="DownloadDialog.__finished" ref="eric5.Helpviewer.DownloadDialog.html#DownloadDialog.__finished" /> <keyword name="DownloadDialog.__getFileName" id="DownloadDialog.__getFileName" ref="eric5.Helpviewer.DownloadDialog.html#DownloadDialog.__getFileName" /> @@ -3609,6 +3608,7 @@ <keyword name="addSearchPath" id="addSearchPath" ref="eric5.UI.PixmapCache.html#addSearchPath" /> <keyword name="getIcon" id="getIcon" ref="eric5.UI.PixmapCache.html#getIcon" /> <keyword name="getPixmap" id="getPixmap" ref="eric5.UI.PixmapCache.html#getPixmap" /> + <keyword name="getSymlinkIcon" id="getSymlinkIcon" ref="eric5.UI.PixmapCache.html#getSymlinkIcon" /> <keyword name="PixmapCache (Constructor)" id="PixmapCache (Constructor)" ref="eric5.UI.PixmapCache.html#PixmapCache.__init__" /> <keyword name="PixmapCache.addSearchPath" id="PixmapCache.addSearchPath" ref="eric5.UI.PixmapCache.html#PixmapCache.addSearchPath" /> <keyword name="PixmapCache.getPixmap" id="PixmapCache.getPixmap" ref="eric5.UI.PixmapCache.html#PixmapCache.getPixmap" /> @@ -3707,6 +3707,7 @@ <keyword name="BrowserItem.isLazyPopulated" id="BrowserItem.isLazyPopulated" ref="eric5.UI.BrowserModel.html#BrowserItem.isLazyPopulated" /> <keyword name="BrowserItem.isPopulated" id="BrowserItem.isPopulated" ref="eric5.UI.BrowserModel.html#BrowserItem.isPopulated" /> <keyword name="BrowserItem.isPublic" id="BrowserItem.isPublic" ref="eric5.UI.BrowserModel.html#BrowserItem.isPublic" /> + <keyword name="BrowserItem.isSymlink" id="BrowserItem.isSymlink" ref="eric5.UI.BrowserModel.html#BrowserItem.isSymlink" /> <keyword name="BrowserItem.lessThan" id="BrowserItem.lessThan" ref="eric5.UI.BrowserModel.html#BrowserItem.lessThan" /> <keyword name="BrowserItem.parent" id="BrowserItem.parent" ref="eric5.UI.BrowserModel.html#BrowserItem.parent" /> <keyword name="BrowserItem.removeChild" id="BrowserItem.removeChild" ref="eric5.UI.BrowserModel.html#BrowserItem.removeChild" /> @@ -5832,7 +5833,6 @@ <keyword name="QtHelpGenerator (Module)" id="QtHelpGenerator (Module)" ref="eric5.DocumentationTools.QtHelpGenerator.html" /> <keyword name="QtHelpGenerator" id="QtHelpGenerator" ref="eric5.DocumentationTools.QtHelpGenerator.html#QtHelpGenerator" /> <keyword name="QtHelpGenerator (Constructor)" id="QtHelpGenerator (Constructor)" ref="eric5.DocumentationTools.QtHelpGenerator.html#QtHelpGenerator.__init__" /> - <keyword name="QtHelpGenerator.__generateKeywords" id="QtHelpGenerator.__generateKeywords" ref="eric5.DocumentationTools.QtHelpGenerator.html#QtHelpGenerator.__generateKeywords" /> <keyword name="QtHelpGenerator.__generateSections" id="QtHelpGenerator.__generateSections" ref="eric5.DocumentationTools.QtHelpGenerator.html#QtHelpGenerator.__generateSections" /> <keyword name="QtHelpGenerator.generateFiles" id="QtHelpGenerator.generateFiles" ref="eric5.DocumentationTools.QtHelpGenerator.html#QtHelpGenerator.generateFiles" /> <keyword name="QtHelpGenerator.remember" id="QtHelpGenerator.remember" ref="eric5.DocumentationTools.QtHelpGenerator.html#QtHelpGenerator.remember" />
--- a/Documentation/Source/eric5.DebugClients.Python3.DebugClientBase.html Sat Feb 06 11:14:30 2010 +0000 +++ b/Documentation/Source/eric5.DebugClients.Python3.DebugClientBase.html Sat Feb 06 17:40:24 2010 +0000 @@ -559,13 +559,16 @@ </dd> </dl><a NAME="DebugClientBase.input" ID="DebugClientBase.input"></a> <h4>DebugClientBase.input</h4> -<b>input</b>(<i>prompt</i>) +<b>input</b>(<i>prompt, echo = True</i>) <p> Public method to implement input() using the event loop. </p><dl> <dt><i>prompt</i></dt> <dd> the prompt to be shown (string) +</dd><dt><i>echo</i></dt> +<dd> +Flag indicating echoing of the input (boolean) </dd> </dl><dl> <dt>Returns:</dt> @@ -726,7 +729,7 @@ <hr /><hr /> <a NAME="DebugClientInput" ID="DebugClientInput"></a> <h2>DebugClientInput</h2> -<b>DebugClientInput</b>(<i>prompt = ""</i>) +<b>DebugClientInput</b>(<i>prompt = "", echo = True</i>) <p> Replacement for the standard input builtin. </p><p>
--- a/Documentation/Source/eric5.DocumentationTools.QtHelpGenerator.html Sat Feb 06 11:14:30 2010 +0000 +++ b/Documentation/Source/eric5.DocumentationTools.QtHelpGenerator.html Sat Feb 06 17:40:24 2010 +0000 @@ -57,9 +57,6 @@ <td><a href="#QtHelpGenerator.__init__">QtHelpGenerator</a></td> <td>Constructor</td> </tr><tr> -<td><a href="#QtHelpGenerator.__generateKeywords">__generateKeywords</a></td> -<td>Private method to generate the keywords section.</td> -</tr><tr> <td><a href="#QtHelpGenerator.__generateSections">__generateSections</a></td> <td>Private method to generate the sections part.</td> </tr><tr> @@ -102,16 +99,6 @@ flag indicating the generation of the collection files (boolean) </dd> -</dl><a NAME="QtHelpGenerator.__generateKeywords" ID="QtHelpGenerator.__generateKeywords"></a> -<h4>QtHelpGenerator.__generateKeywords</h4> -<b>__generateKeywords</b>(<i></i>) -<p> - Private method to generate the keywords section. -</p><dl> -<dt>Returns:</dt> -<dd> -keywords section (string) -</dd> </dl><a NAME="QtHelpGenerator.__generateSections" ID="QtHelpGenerator.__generateSections"></a> <h4>QtHelpGenerator.__generateSections</h4> <b>__generateSections</b>(<i>package, level</i>)
--- a/Documentation/Source/eric5.Helpviewer.DownloadDialog.html Sat Feb 06 11:14:30 2010 +0000 +++ b/Documentation/Source/eric5.Helpviewer.DownloadDialog.html Sat Feb 06 17:40:24 2010 +0000 @@ -69,9 +69,6 @@ <td><a href="#DownloadDialog.__downloadProgress">__downloadProgress</a></td> <td>Private method show the download progress.</td> </tr><tr> -<td><a href="#DownloadDialog.__downloadedSuccessfully">__downloadedSuccessfully</a></td> -<td>Private method to determine the download status.</td> -</tr><tr> <td><a href="#DownloadDialog.__downloading">__downloading</a></td> <td>Private method to determine, if a download is in progress.</td> </tr><tr> @@ -166,16 +163,6 @@ <dd> number of total bytes (integer) </dd> -</dl><a NAME="DownloadDialog.__downloadedSuccessfully" ID="DownloadDialog.__downloadedSuccessfully"></a> -<h4>DownloadDialog.__downloadedSuccessfully</h4> -<b>__downloadedSuccessfully</b>(<i></i>) -<p> - Private method to determine the download status. -</p><dl> -<dt>Returns:</dt> -<dd> -download status (boolean) -</dd> </dl><a NAME="DownloadDialog.__downloading" ID="DownloadDialog.__downloading"></a> <h4>DownloadDialog.__downloading</h4> <b>__downloading</b>(<i></i>)
--- a/Documentation/Source/eric5.UI.BrowserModel.html Sat Feb 06 11:14:30 2010 +0000 +++ b/Documentation/Source/eric5.UI.BrowserModel.html Sat Feb 06 17:40:24 2010 +0000 @@ -841,6 +841,9 @@ <td><a href="#BrowserItem.isPublic">isPublic</a></td> <td>Public method returning the public visibility status.</td> </tr><tr> +<td><a href="#BrowserItem.isSymlink">isSymlink</a></td> +<td>Public method to check, if the items is a symbolic link.</td> +</tr><tr> <td><a href="#BrowserItem.lessThan">lessThan</a></td> <td>Public method to check, if the item is less than the other one.</td> </tr><tr> @@ -979,6 +982,16 @@ <dd> flag indicating public visibility (boolean) </dd> +</dl><a NAME="BrowserItem.isSymlink" ID="BrowserItem.isSymlink"></a> +<h4>BrowserItem.isSymlink</h4> +<b>isSymlink</b>(<i></i>) +<p> + Public method to check, if the items is a symbolic link. +</p><dl> +<dt>Returns:</dt> +<dd> +flag indicating a symbolic link (boolean) +</dd> </dl><a NAME="BrowserItem.lessThan" ID="BrowserItem.lessThan"></a> <h4>BrowserItem.lessThan</h4> <b>lessThan</b>(<i>other, column, order</i>)
--- a/Documentation/Source/eric5.UI.PixmapCache.html Sat Feb 06 11:14:30 2010 +0000 +++ b/Documentation/Source/eric5.UI.PixmapCache.html Sat Feb 06 17:40:24 2010 +0000 @@ -46,6 +46,9 @@ </tr><tr> <td><a href="#getPixmap">getPixmap</a></td> <td>Module function to retrieve a pixmap.</td> +</tr><tr> +<td><a href="#getSymlinkIcon">getSymlinkIcon</a></td> +<td>Module function to retrieve a symbolic link icon.</td> </tr> </table> <hr /><hr /> @@ -154,5 +157,23 @@ </dd> </dl> <div align="right"><a href="#top">Up</a></div> +<hr /><hr /> +<a NAME="getSymlinkIcon" ID="getSymlinkIcon"></a> +<h2>getSymlinkIcon</h2> +<b>getSymlinkIcon</b>(<i>key, cache = pixCache</i>) +<p> + Module function to retrieve a symbolic link icon. +</p><dl> +<dt><i>key</i></dt> +<dd> +name of the wanted icon (string) +</dd> +</dl><dl> +<dt>Returns:</dt> +<dd> +the requested icon (QIcon) +</dd> +</dl> +<div align="right"><a href="#top">Up</a></div> <hr /> </body></html> \ No newline at end of file
--- a/Documentation/Source/eric5.Utilities.Startup.html Sat Feb 06 11:14:30 2010 +0000 +++ b/Documentation/Source/eric5.Utilities.Startup.html Sat Feb 06 17:40:24 2010 +0000 @@ -78,7 +78,7 @@ <dt>Returns:</dt> <dd> index of the '--' option (integer). This is used to tell - the application, that all additional option don't belong to + the application, that all additional options don't belong to the application. </dd> </dl>
--- a/Project/ProjectBrowserModel.py Sat Feb 06 11:14:30 2010 +0000 +++ b/Project/ProjectBrowserModel.py Sat Feb 06 17:40:24 2010 +0000 @@ -122,7 +122,11 @@ self._dirName = os.path.dirname(self._dirName) self.type_ = ProjectBrowserItemSimpleDirectory - self.icon = UI.PixmapCache.getIcon("dirClosed.png") + if os.path.lexists(self._dirName) and os.path.islink(self._dirName): + self.symlink = True + self.icon = UI.PixmapCache.getSymlinkIcon("dirClosed.png") + else: + self.icon = UI.PixmapCache.getIcon("dirClosed.png") def dirName(self): """
--- a/UI/BrowserModel.py Sat Feb 06 11:14:30 2010 +0000 +++ b/UI/BrowserModel.py Sat Feb 06 17:40:24 2010 +0000 @@ -86,6 +86,12 @@ elif role == Qt.DecorationRole: if index.column() == 0: return index.internalPointer().getIcon() + elif role == Qt.FontRole: + item = index.internalPointer() + if item.isSymlink(): + font = QFont(QApplication.font("QTreeView")) + font.setItalic(True) + return font return None @@ -567,6 +573,7 @@ self.icon = UI.PixmapCache.getIcon("empty.png") self._populated = True self._lazyPopulation = False + self.symlink = False def appendChild(self, child): """ @@ -705,6 +712,14 @@ return self.itemData[column] < other.itemData[column] except IndexError: return False + + def isSymlink(self): + """ + Public method to check, if the items is a symbolic link. + + @return flag indicating a symbolic link (boolean) + """ + return self.symlink class BrowserDirectoryItem(BrowserItem): """ @@ -728,10 +743,14 @@ BrowserItem.__init__(self, parent, dn) self.type_ = BrowserItemDirectory - self.icon = UI.PixmapCache.getIcon("dirClosed.png") + if os.path.lexists(self._dirName) and os.path.islink(self._dirName): + self.symlink = True + self.icon = UI.PixmapCache.getSymlinkIcon("dirClosed.png") + else: + self.icon = UI.PixmapCache.getIcon("dirClosed.png") self._populated = False self._lazyPopulation = True - + def setName(self, dinfo, full = True): """ Public method to set the directory name. @@ -810,50 +829,57 @@ self._moduleName = '' + pixName = "" if self.isPythonFile(): if self.fileext == '.py': - self.icon = UI.PixmapCache.getIcon("filePython.png") + pixName = "filePython.png" else: - self.icon = UI.PixmapCache.getIcon("filePython2.png") + pixName = "filePython2.png" self._populated = False self._lazyPopulation = True self._moduleName = os.path.basename(finfo) elif self.isPython3File(): - self.icon = UI.PixmapCache.getIcon("filePython.png") + pixName = "filePython.png" self._populated = False self._lazyPopulation = True self._moduleName = os.path.basename(finfo) elif self.isRubyFile(): - self.icon = UI.PixmapCache.getIcon("fileRuby.png") + pixName = "fileRuby.png" self._populated = False self._lazyPopulation = True self._moduleName = os.path.basename(finfo) elif self.isDesignerFile(): - self.icon = UI.PixmapCache.getIcon("fileDesigner.png") + pixName = "fileDesigner.png" elif self.isLinguistFile(): if self.fileext == '.ts': - self.icon = UI.PixmapCache.getIcon("fileLinguist.png") + pixName = "fileLinguist.png" else: - self.icon = UI.PixmapCache.getIcon("fileLinguist2.png") + pixName = "fileLinguist2.png" elif self.isResourcesFile(): - self.icon = UI.PixmapCache.getIcon("fileResource.png") + pixName = "fileResource.png" elif self.isProjectFile(): - self.icon = UI.PixmapCache.getIcon("fileProject.png") + pixName = "fileProject.png" elif self.isMultiProjectFile(): - self.icon = UI.PixmapCache.getIcon("fileMultiProject.png") + pixName = "fileMultiProject.png" elif self.isIdlFile(): - self.icon = UI.PixmapCache.getIcon("fileIDL.png") + pixName = "fileIDL.png" self._populated = False self._lazyPopulation = True self._moduleName = os.path.basename(finfo) elif self.isPixmapFile(): - self.icon = UI.PixmapCache.getIcon("filePixmap.png") + pixName = "filePixmap.png" elif self.isSvgFile(): - self.icon = UI.PixmapCache.getIcon("fileSvg.png") + pixName = "fileSvg.png" elif self.isDFile(): - self.icon = UI.PixmapCache.getIcon("fileD.png") + pixName = "fileD.png" else: - self.icon = UI.PixmapCache.getIcon("fileMisc.png") + pixName = "fileMisc.png" + + if os.path.lexists(self._filename) and os.path.islink(self._filename): + self.symlink = True + self.icon = UI.PixmapCache.getSymlinkIcon(pixName) + else: + self.icon = UI.PixmapCache.getIcon(pixName) def setName(self, finfo, full = True): """
--- a/UI/PixmapCache.py Sat Feb 06 11:14:30 2010 +0000 +++ b/UI/PixmapCache.py Sat Feb 06 17:40:24 2010 +0000 @@ -9,7 +9,7 @@ import os -from PyQt4.QtGui import QPixmap, QIcon +from PyQt4.QtGui import QPixmap, QIcon, QPainter class PixmapCache(object): """ @@ -75,6 +75,20 @@ """ return QIcon(cache.getPixmap(key)) +def getSymlinkIcon(key, cache = pixCache): + """ + Module function to retrieve a symbolic link icon. + + @param key name of the wanted icon (string) + @return the requested icon (QIcon) + """ + pix1 = QPixmap(cache.getPixmap(key)) + pix2 = cache.getPixmap("symlink.png") + painter = QPainter(pix1) + painter.drawPixmap(0, 10, pix2) + painter.end() + return QIcon(pix1) + def addSearchPath(path, cache = pixCache): """ Module function to add a path to the search path.