7 Module implementing the editor highlighter keywords configuration page. |
7 Module implementing the editor highlighter keywords configuration page. |
8 """ |
8 """ |
9 |
9 |
10 from PyQt6.QtCore import pyqtSlot |
10 from PyQt6.QtCore import pyqtSlot |
11 |
11 |
12 from E5Gui import E5MessageBox |
12 from E5Gui import EricMessageBox |
13 |
13 |
14 from .ConfigurationPageBase import ConfigurationPageBase |
14 from .ConfigurationPageBase import ConfigurationPageBase |
15 from .Ui_EditorKeywordsPage import Ui_EditorKeywordsPage |
15 from .Ui_EditorKeywordsPage import Ui_EditorKeywordsPage |
16 |
16 |
17 import Preferences |
17 import Preferences |
169 def on_defaultButton_clicked(self): |
169 def on_defaultButton_clicked(self): |
170 """ |
170 """ |
171 Private slot to set the current keyword set to default values. |
171 Private slot to set the current keyword set to default values. |
172 """ |
172 """ |
173 ok = ( |
173 ok = ( |
174 E5MessageBox.yesNo( |
174 EricMessageBox.yesNo( |
175 self, |
175 self, |
176 self.tr("Reset to Default"), |
176 self.tr("Reset to Default"), |
177 self.tr("Shall the current keyword set really be reset to" |
177 self.tr("Shall the current keyword set really be reset to" |
178 " default values?")) |
178 " default values?")) |
179 if bool(self.keywordsEdit.toPlainText()) else |
179 if bool(self.keywordsEdit.toPlainText()) else |
192 def on_allDefaultButton_clicked(self): |
192 def on_allDefaultButton_clicked(self): |
193 """ |
193 """ |
194 Private slot to set all keyword sets of the current language to default |
194 Private slot to set all keyword sets of the current language to default |
195 values. |
195 values. |
196 """ |
196 """ |
197 ok = E5MessageBox.yesNo( |
197 ok = EricMessageBox.yesNo( |
198 self, |
198 self, |
199 self.tr("Reset All to Default"), |
199 self.tr("Reset All to Default"), |
200 self.tr("Shall all keyword sets of the current language really be" |
200 self.tr("Shall all keyword sets of the current language really be" |
201 " reset to default values?")) |
201 " reset to default values?")) |
202 if ok: |
202 if ok: |