Sat, 28 Dec 2013 19:40:52 +0100
Changed code to always add the entry to the tools menu and disable it, if prerequisites are not fulfilled.
ChangeLog | file | annotate | diff | comparison | revisions | |
PluginPrintRemover.py | file | annotate | diff | comparison | revisions | |
PluginPrintRemover.zip | file | annotate | diff | comparison | revisions |
--- a/ChangeLog Mon Dec 23 19:53:09 2013 +0100 +++ b/ChangeLog Sat Dec 28 19:40:52 2013 +0100 @@ -1,5 +1,9 @@ ChangeLog --------- +Version 0.4.0: +- always add the entry to the tools menu and disable it, if prerequisites + are not fulfilled + Version 0.3.0: - added support for the editor Tools context menu (as of eric5 5.4.0)
--- a/PluginPrintRemover.py Mon Dec 23 19:53:09 2013 +0100 +++ b/PluginPrintRemover.py Sat Dec 28 19:40:52 2013 +0100 @@ -23,7 +23,7 @@ author = "Detlev Offenbach <detlev@die-offenbachs.de>" autoactivate = True deactivateable = True -version = "0.3.0" +version = "0.4.0" className = "PrintRemoverPlugin" packageName = "PrintRemover" shortDescription = "Remove print() like debug statements." @@ -204,8 +204,6 @@ return editor = e5App().getObject("ViewManager").activeWindow() - if editor is None: - return if not menu.isEmpty(): menu.addSeparator() @@ -215,6 +213,7 @@ self.tr("Remove '{0}'").format(string), self.__removeLine) act.setData(string) + act.setEnabled(editor is not None) def __editorOpened(self, editor): """