19 # Start-Of-Header |
19 # Start-Of-Header |
20 name = "Color String Plug-in" |
20 name = "Color String Plug-in" |
21 author = "Detlev Offenbach <detlev@die-offenbachs.de>" |
21 author = "Detlev Offenbach <detlev@die-offenbachs.de>" |
22 autoactivate = True |
22 autoactivate = True |
23 deactivateable = True |
23 deactivateable = True |
24 version = "3.0.0" |
24 version = "3.1.0" |
25 className = "ColorStringPlugin" |
25 className = "ColorStringPlugin" |
26 packageName = "ColorString" |
26 packageName = "ColorString" |
27 shortDescription = "Insert color as string" |
27 shortDescription = "Insert color as string" |
28 longDescription = ( |
28 longDescription = ( |
29 """This plug-in implements a tool to select a color via a""" |
29 """This plug-in implements a tool to select a color via a""" |
313 else: |
313 else: |
314 currColor = "" |
314 currColor = "" |
315 |
315 |
316 from ColorString.ColorSelectionDialog import ColorSelectionDialog |
316 from ColorString.ColorSelectionDialog import ColorSelectionDialog |
317 dlg = ColorSelectionDialog(currColor, self.__ui) |
317 dlg = ColorSelectionDialog(currColor, self.__ui) |
318 if dlg.exec_() == QDialog.Accepted: |
318 if dlg.exec() == QDialog.Accepted: |
319 colorStr = dlg.getColor() |
319 colorStr = dlg.getColor() |
320 editor.beginUndoAction() |
320 editor.beginUndoAction() |
321 if editor.hasSelectedText(): |
321 if editor.hasSelectedText(): |
322 editor.replaceSelectedText(colorStr) |
322 editor.replaceSelectedText(colorStr) |
323 else: |
323 else: |