6 """ |
6 """ |
7 Module implementing the Editor Spellchecking configuration page. |
7 Module implementing the Editor Spellchecking configuration page. |
8 """ |
8 """ |
9 |
9 |
10 from PyQt4.QtCore import pyqtSlot |
10 from PyQt4.QtCore import pyqtSlot |
11 from PyQt4.QtGui import QFileDialog |
|
12 |
11 |
13 from E5Gui.E5Completers import E5FileCompleter |
12 from E5Gui.E5Completers import E5FileCompleter |
|
13 from E5Gui import E5FileDialog |
14 |
14 |
15 from .ConfigurationPageBase import ConfigurationPageBase |
15 from .ConfigurationPageBase import ConfigurationPageBase |
16 from .Ui_EditorSpellCheckingPage import Ui_EditorSpellCheckingPage |
16 from .Ui_EditorSpellCheckingPage import Ui_EditorSpellCheckingPage |
17 |
17 |
18 import Preferences |
18 import Preferences |
108 @pyqtSlot() |
108 @pyqtSlot() |
109 def on_pwlButton_clicked(self): |
109 def on_pwlButton_clicked(self): |
110 """ |
110 """ |
111 Private method to select the personal word list file. |
111 Private method to select the personal word list file. |
112 """ |
112 """ |
113 file = QFileDialog.getOpenFileName( |
113 file = E5FileDialog.getOpenFileName( |
114 self, |
114 self, |
115 self.trUtf8("Select personal word list"), |
115 self.trUtf8("Select personal word list"), |
116 self.pwlEdit.text(), |
116 self.pwlEdit.text(), |
117 self.trUtf8("Dictionary File (*.dic);;All Files (*)"), |
117 self.trUtf8("Dictionary File (*.dic);;All Files (*)")) |
118 QFileDialog.DontUseNativeDialog) |
|
119 |
118 |
120 if file: |
119 if file: |
121 self.pwlEdit.setText(Utilities.toNativeSeparators(file)) |
120 self.pwlEdit.setText(Utilities.toNativeSeparators(file)) |
122 |
121 |
123 @pyqtSlot() |
122 @pyqtSlot() |
124 def on_pelButton_clicked(self): |
123 def on_pelButton_clicked(self): |
125 """ |
124 """ |
126 Private method to select the personal exclude list file. |
125 Private method to select the personal exclude list file. |
127 """ |
126 """ |
128 file = QFileDialog.getOpenFileName( |
127 file = E5FileDialog.getOpenFileName( |
129 self, |
128 self, |
130 self.trUtf8("Select personal exclude list"), |
129 self.trUtf8("Select personal exclude list"), |
131 self.pelEdit.text(), |
130 self.pelEdit.text(), |
132 self.trUtf8("Dictionary File (*.dic);;All Files (*)"), |
131 self.trUtf8("Dictionary File (*.dic);;All Files (*)")) |
133 QFileDialog.DontUseNativeDialog) |
|
134 |
132 |
135 if file: |
133 if file: |
136 self.pelEdit.setText(Utilities.toNativeSeparators(file)) |
134 self.pelEdit.setText(Utilities.toNativeSeparators(file)) |
137 |
135 |
138 def create(dlg): |
136 def create(dlg): |