PluginPrintRemover.py

changeset 49
d721d13f5e4e
parent 48
10d34908ad1a
child 51
a18bc7af1151
equal deleted inserted replaced
48:10d34908ad1a 49:d721d13f5e4e
21 # Start-Of-Header 21 # Start-Of-Header
22 name = "Print Remover Plug-in" 22 name = "Print Remover Plug-in"
23 author = "Detlev Offenbach <detlev@die-offenbachs.de>" 23 author = "Detlev Offenbach <detlev@die-offenbachs.de>"
24 autoactivate = True 24 autoactivate = True
25 deactivateable = True 25 deactivateable = True
26 version = "2.1.2" 26 version = "2.2.0"
27 className = "PrintRemoverPlugin" 27 className = "PrintRemoverPlugin"
28 packageName = "PrintRemover" 28 packageName = "PrintRemover"
29 shortDescription = "Remove print() like debug statements." 29 shortDescription = "Remove print() like debug statements."
30 longDescription = \ 30 longDescription = \
31 """This plug-in implements a tool to remove lines starting with""" \ 31 """This plug-in implements a tool to remove lines starting with""" \
61 """ 61 """
62 Module function returning data as required by the configuration dialog. 62 Module function returning data as required by the configuration dialog.
63 63
64 @return dictionary containing the relevant data 64 @return dictionary containing the relevant data
65 """ 65 """
66 try:
67 usesDarkPalette = e5App().usesDarkPalette()
68 except AttributeError:
69 from PyQt5.QtGui import QPalette
70 palette = e5App().palette()
71 lightness = palette.color(QPalette.Window).lightness()
72 usesDarkPalette = lightness <= 128
73 if usesDarkPalette:
74 iconSuffix = "dark"
75 else:
76 iconSuffix = "light"
77
66 return { 78 return {
67 "printRemoverPage": [ 79 "printRemoverPage": [
68 QCoreApplication.translate("PrintRemoverPlugin", 80 QCoreApplication.translate("PrintRemoverPlugin",
69 "Print Remover"), 81 "Print Remover"),
70 os.path.join("PrintRemover", "icons", "printRemover.png"), 82 os.path.join("PrintRemover", "icons",
83 "printRemover-{0}".format(iconSuffix)),
71 createPrintRemoverPage, None, None], 84 createPrintRemoverPage, None, None],
72 } 85 }
73 86
74 87
75 def prepareUninstall(): 88 def prepareUninstall():

eric ide

mercurial