22 # Start-Of-Header |
20 # Start-Of-Header |
23 name = "Selection Encloser Plug-in" |
21 name = "Selection Encloser Plug-in" |
24 author = "Detlev Offenbach <detlev@die-offenbachs.de>" |
22 author = "Detlev Offenbach <detlev@die-offenbachs.de>" |
25 autoactivate = True |
23 autoactivate = True |
26 deactivateable = True |
24 deactivateable = True |
27 version = "2.2.0" |
25 version = "3.0.0" |
28 className = "SelectionEncloserPlugin" |
26 className = "SelectionEncloserPlugin" |
29 packageName = "SelectionEncloser" |
27 packageName = "SelectionEncloser" |
30 shortDescription = "Enclose the selection with a string." |
28 shortDescription = "Enclose the selection with a string." |
31 longDescription = \ |
29 longDescription = ( |
32 """This plug-in implements a tool to enclose the selection of""" \ |
30 """This plug-in implements a tool to enclose the selection of""" |
33 """ the current editor with a string. The enclosing string is""" \ |
31 """ the current editor with a string. The enclosing string is""" |
34 """ selectable via a configurable menu hierarchy.""" |
32 """ selectable via a configurable menu hierarchy.""" |
|
33 ) |
35 needsRestart = False |
34 needsRestart = False |
36 pyqtApi = 2 |
35 pyqtApi = 2 |
37 python2Compatible = True |
|
38 # End-Of-Header |
36 # End-Of-Header |
39 |
37 |
40 error = "" |
38 error = "" |
41 |
39 |
42 selectionEncloserPluginObject = None |
40 selectionEncloserPluginObject = None |
48 |
46 |
49 @param configDlg reference to the configuration dialog |
47 @param configDlg reference to the configuration dialog |
50 @return reference to the configuration page |
48 @return reference to the configuration page |
51 """ |
49 """ |
52 global selectionEncloserPluginObject |
50 global selectionEncloserPluginObject |
53 from SelectionEncloser.ConfigurationPage.SelectionEncloserPage import \ |
51 from SelectionEncloser.ConfigurationPage.SelectionEncloserPage import ( |
54 SelectionEncloserPage |
52 SelectionEncloserPage |
55 page = SelectionEncloserPage(selectionEncloserPluginObject) |
53 ) |
56 return page |
54 return SelectionEncloserPage(selectionEncloserPluginObject) |
57 |
55 |
58 |
56 |
59 def getConfigData(): |
57 def getConfigData(): |
60 """ |
58 """ |
61 Module function returning data as required by the configuration dialog. |
59 Module function returning data as required by the configuration dialog. |
68 from PyQt5.QtGui import QPalette |
66 from PyQt5.QtGui import QPalette |
69 palette = e5App().palette() |
67 palette = e5App().palette() |
70 lightness = palette.color(QPalette.Window).lightness() |
68 lightness = palette.color(QPalette.Window).lightness() |
71 usesDarkPalette = lightness <= 128 |
69 usesDarkPalette = lightness <= 128 |
72 if usesDarkPalette: |
70 if usesDarkPalette: |
73 iconSuffix = "dark" |
71 iconSuffix = "dark" |
74 else: |
72 else: |
75 iconSuffix = "light" |
73 iconSuffix = "light" |
76 |
74 |
77 return { |
75 return { |
78 "selectionEncloserPage": [ |
76 "selectionEncloserPage": [ |