PluginRefactoringRope.py

changeset 327
473fd642982e
parent 326
67bcde9c65b9
child 329
e81cfee353e7
equal deleted inserted replaced
326:67bcde9c65b9 327:473fd642982e
21 # Start-Of-Header 21 # Start-Of-Header
22 name = "Refactoring Rope Plugin" 22 name = "Refactoring Rope Plugin"
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 = "6.10.1" 26 version = "6.11.0"
27 className = "RefactoringRopePlugin" 27 className = "RefactoringRopePlugin"
28 packageName = "RefactoringRope" 28 packageName = "RefactoringRope"
29 internalPackages = "rope" 29 internalPackages = "rope"
30 shortDescription = "Refactoring using the Rope library." 30 shortDescription = "Refactoring using the Rope library."
31 longDescription = ( 31 longDescription = (
95 Module function returning data as required by the configuration dialog. 95 Module function returning data as required by the configuration dialog.
96 96
97 @return dictionary containing the relevant data 97 @return dictionary containing the relevant data
98 @rtype dict 98 @rtype dict
99 """ 99 """
100 try:
101 usesDarkPalette = e5App().usesDarkPalette()
102 except AttributeError:
103 from PyQt5.QtGui import QPalette
104 palette = e5App().palette()
105 lightness = palette.color(QPalette.Window).lightness()
106 usesDarkPalette = lightness <= 128
107 if usesDarkPalette:
108 iconSuffix = "dark"
109 else:
110 iconSuffix = "light"
111
100 data = { 112 data = {
101 "ropeAutoCompletionPage": [ 113 "ropeAutoCompletionPage": [
102 QCoreApplication.translate("RefactoringRopePlugin", "Rope"), 114 QCoreApplication.translate("RefactoringRopePlugin", "Rope"),
103 os.path.join("RefactoringRope", "ConfigurationPage", 115 os.path.join("RefactoringRope", "ConfigurationPage",
104 "preferences-refactoring.png"), 116 "preferences-refactoring-{0}".format(iconSuffix)),
105 createAutoCompletionPage, "editorAutocompletionPage", None], 117 createAutoCompletionPage, "editorAutocompletionPage", None],
106 "ropeCallTipsPage": [ 118 "ropeCallTipsPage": [
107 QCoreApplication.translate("RefactoringRopePlugin", "Rope"), 119 QCoreApplication.translate("RefactoringRopePlugin", "Rope"),
108 os.path.join("RefactoringRope", "ConfigurationPage", 120 os.path.join("RefactoringRope", "ConfigurationPage",
109 "preferences-refactoring.png"), 121 "preferences-refactoring-{0}".format(iconSuffix)),
110 createCallTipsPage, "editorCalltipsPage", None], 122 createCallTipsPage, "editorCalltipsPage", None],
111 "ropeMouseClickHandlerPage": [ 123 "ropeMouseClickHandlerPage": [
112 QCoreApplication.translate("RefactoringRopePlugin", "Rope"), 124 QCoreApplication.translate("RefactoringRopePlugin", "Rope"),
113 os.path.join("RefactoringRope", "ConfigurationPage", 125 os.path.join("RefactoringRope", "ConfigurationPage",
114 "preferences-refactoring.png"), 126 "preferences-refactoring-{0}".format(iconSuffix)),
115 createMouseClickHandlerPage, "1editorMouseClickHandlers", None], 127 createMouseClickHandlerPage, "1editorMouseClickHandlers", None],
116 } 128 }
117 129
118 return data 130 return data
119 131

eric ide

mercurial