17 from .ConfigurationPageBase import ConfigurationPageBase |
17 from .ConfigurationPageBase import ConfigurationPageBase |
18 from .Ui_EditorSpellCheckingPage import Ui_EditorSpellCheckingPage |
18 from .Ui_EditorSpellCheckingPage import Ui_EditorSpellCheckingPage |
19 |
19 |
20 import Preferences |
20 import Preferences |
21 import Utilities |
21 import Utilities |
|
22 import UI.PixmapCache |
22 |
23 |
23 |
24 |
24 class EditorSpellCheckingPage(ConfigurationPageBase, |
25 class EditorSpellCheckingPage(ConfigurationPageBase, |
25 Ui_EditorSpellCheckingPage): |
26 Ui_EditorSpellCheckingPage): |
26 """ |
27 """ |
31 Constructor |
32 Constructor |
32 """ |
33 """ |
33 super(EditorSpellCheckingPage, self).__init__() |
34 super(EditorSpellCheckingPage, self).__init__() |
34 self.setupUi(self) |
35 self.setupUi(self) |
35 self.setObjectName("EditorSpellCheckingPage") |
36 self.setObjectName("EditorSpellCheckingPage") |
|
37 |
|
38 self.pwlButton.setIcon(UI.PixmapCache.getIcon("open.png")) |
|
39 self.pelButton.setIcon(UI.PixmapCache.getIcon("open.png")) |
36 |
40 |
37 from QScintilla.SpellChecker import SpellChecker |
41 from QScintilla.SpellChecker import SpellChecker |
38 languages = sorted(SpellChecker.getAvailableLanguages()) |
42 languages = sorted(SpellChecker.getAvailableLanguages()) |
39 self.defaultLanguageCombo.addItems(languages) |
43 self.defaultLanguageCombo.addItems(languages) |
40 if languages: |
44 if languages: |
108 """ |
112 """ |
109 Private method to select the personal word list file. |
113 Private method to select the personal word list file. |
110 """ |
114 """ |
111 file = E5FileDialog.getOpenFileName( |
115 file = E5FileDialog.getOpenFileName( |
112 self, |
116 self, |
113 self.trUtf8("Select personal word list"), |
117 self.tr("Select personal word list"), |
114 self.pwlEdit.text(), |
118 self.pwlEdit.text(), |
115 self.trUtf8("Dictionary File (*.dic);;All Files (*)")) |
119 self.tr("Dictionary File (*.dic);;All Files (*)")) |
116 |
120 |
117 if file: |
121 if file: |
118 self.pwlEdit.setText(Utilities.toNativeSeparators(file)) |
122 self.pwlEdit.setText(Utilities.toNativeSeparators(file)) |
119 |
123 |
120 @pyqtSlot() |
124 @pyqtSlot() |
122 """ |
126 """ |
123 Private method to select the personal exclude list file. |
127 Private method to select the personal exclude list file. |
124 """ |
128 """ |
125 file = E5FileDialog.getOpenFileName( |
129 file = E5FileDialog.getOpenFileName( |
126 self, |
130 self, |
127 self.trUtf8("Select personal exclude list"), |
131 self.tr("Select personal exclude list"), |
128 self.pelEdit.text(), |
132 self.pelEdit.text(), |
129 self.trUtf8("Dictionary File (*.dic);;All Files (*)")) |
133 self.tr("Dictionary File (*.dic);;All Files (*)")) |
130 |
134 |
131 if file: |
135 if file: |
132 self.pelEdit.setText(Utilities.toNativeSeparators(file)) |
136 self.pelEdit.setText(Utilities.toNativeSeparators(file)) |
133 |
137 |
134 |
138 |