232 |
232 |
233 def __about(self): |
233 def __about(self): |
234 """ |
234 """ |
235 Private slot to show a little About message. |
235 Private slot to show a little About message. |
236 """ |
236 """ |
237 QMessageBox.about(self, self.trUtf8("About eric4 Mini Editor"), |
237 QMessageBox.about(self, self.trUtf8("About eric5 Mini Editor"), |
238 self.trUtf8("The eric4 Mini Editor is an editor component" |
238 self.trUtf8("The eric5 Mini Editor is an editor component" |
239 " based on QScintilla. It may be used for simple" |
239 " based on QScintilla. It may be used for simple" |
240 " editing tasks, that don't need the power of" |
240 " editing tasks, that don't need the power of" |
241 " a full blown editor.")) |
241 " a full blown editor.")) |
242 |
242 |
243 def __aboutQt(self): |
243 def __aboutQt(self): |
244 """ |
244 """ |
245 Private slot to handle the About Qt dialog. |
245 Private slot to handle the About Qt dialog. |
246 """ |
246 """ |
247 QMessageBox.aboutQt(self, "eric4 Mini Editor") |
247 QMessageBox.aboutQt(self, "eric5 Mini Editor") |
248 |
248 |
249 def __whatsThis(self): |
249 def __whatsThis(self): |
250 """ |
250 """ |
251 Private slot called in to enter Whats This mode. |
251 Private slot called in to enter Whats This mode. |
252 """ |
252 """ |
330 self.__createEditActions() |
330 self.__createEditActions() |
331 self.__createHelpActions() |
331 self.__createHelpActions() |
332 self.__createSearchActions() |
332 self.__createSearchActions() |
333 |
333 |
334 # read the keyboard shortcuts and make them identical to the main |
334 # read the keyboard shortcuts and make them identical to the main |
335 # eric4 shortcuts |
335 # eric5 shortcuts |
336 for act in self.helpActions: |
336 for act in self.helpActions: |
337 self.__readShortcut(act, "General") |
337 self.__readShortcut(act, "General") |
338 for act in self.editActions: |
338 for act in self.editActions: |
339 self.__readShortcut(act, "Edit") |
339 self.__readShortcut(act, "Edit") |
340 for act in self.fileActions: |
340 for act in self.fileActions: |
1483 |
1483 |
1484 @return flag indicating, if it is ok to continue (boolean) |
1484 @return flag indicating, if it is ok to continue (boolean) |
1485 """ |
1485 """ |
1486 if self.__textEdit.isModified(): |
1486 if self.__textEdit.isModified(): |
1487 ret = QMessageBox.warning(self, |
1487 ret = QMessageBox.warning(self, |
1488 self.trUtf8("eric4 Mini Editor"), |
1488 self.trUtf8("eric5 Mini Editor"), |
1489 self.trUtf8("The document has been modified.\n" |
1489 self.trUtf8("The document has been modified.\n" |
1490 "Do you want to save your changes?"), |
1490 "Do you want to save your changes?"), |
1491 QMessageBox.StandardButtons(\ |
1491 QMessageBox.StandardButtons(\ |
1492 QMessageBox.Cancel | \ |
1492 QMessageBox.Cancel | \ |
1493 QMessageBox.No | \ |
1493 QMessageBox.No | \ |
1547 @param fileName name of the file to save to (string) |
1547 @param fileName name of the file to save to (string) |
1548 @return flag indicating success (boolean) |
1548 @return flag indicating success (boolean) |
1549 """ |
1549 """ |
1550 file = QFile(fileName) |
1550 file = QFile(fileName) |
1551 if not file.open(QFile.WriteOnly): |
1551 if not file.open(QFile.WriteOnly): |
1552 QMessageBox.warning(self, self.trUtf8("eric4 Mini Editor"), |
1552 QMessageBox.warning(self, self.trUtf8("eric5 Mini Editor"), |
1553 self.trUtf8("Cannot write file {0}:\n{1}.")\ |
1553 self.trUtf8("Cannot write file {0}:\n{1}.")\ |
1554 .format(fileName, file.errorString())) |
1554 .format(fileName, file.errorString())) |
1555 |
1555 |
1556 self.__checkActions() |
1556 self.__checkActions() |
1557 |
1557 |