1461 self.deselectAllAct.triggered.connect(self.__editDeselectAll) |
1461 self.deselectAllAct.triggered.connect(self.__editDeselectAll) |
1462 self.editActions.append(self.deselectAllAct) |
1462 self.editActions.append(self.deselectAllAct) |
1463 |
1463 |
1464 self.convertEOLAct = EricAction( |
1464 self.convertEOLAct = EricAction( |
1465 QCoreApplication.translate("ViewManager", "Convert Line End Characters"), |
1465 QCoreApplication.translate("ViewManager", "Convert Line End Characters"), |
1466 QCoreApplication.translate("ViewManager", "Convert &Line End Characters"), |
1466 QCoreApplication.translate("ViewManager", "Convert Line End Characters"), |
1467 0, |
1467 0, |
1468 0, |
1468 0, |
1469 self.editActGrp, |
1469 self.editActGrp, |
1470 "vm_edit_convert_eol", |
1470 "vm_edit_convert_eol", |
1471 ) |
1471 ) |
1480 """ type.</p>""", |
1480 """ type.</p>""", |
1481 ) |
1481 ) |
1482 ) |
1482 ) |
1483 self.convertEOLAct.triggered.connect(self.__convertEOL) |
1483 self.convertEOLAct.triggered.connect(self.__convertEOL) |
1484 self.editActions.append(self.convertEOLAct) |
1484 self.editActions.append(self.convertEOLAct) |
|
1485 |
|
1486 self.convertTabsAct = EricAction( |
|
1487 QCoreApplication.translate("ViewManager", "Convert Tabs to Spaces"), |
|
1488 QCoreApplication.translate("ViewManager", "Convert Tabs to Spaces"), |
|
1489 0, |
|
1490 0, |
|
1491 self.editActGrp, |
|
1492 "vm_edit_convert_tabs", |
|
1493 ) |
|
1494 self.convertTabsAct.setStatusTip( |
|
1495 QCoreApplication.translate("ViewManager", "Convert Tabs to Spaces") |
|
1496 ) |
|
1497 self.convertTabsAct.setWhatsThis( |
|
1498 QCoreApplication.translate( |
|
1499 "ViewManager", |
|
1500 """<b>Convert Tabs to Spaces</b>""" |
|
1501 """<p>Convert tabulators to the configured amount of space""" |
|
1502 """ characters.</p>""", |
|
1503 ) |
|
1504 ) |
|
1505 self.convertTabsAct.triggered.connect(self.__convertTabs) |
|
1506 self.editActions.append(self.convertTabsAct) |
1485 |
1507 |
1486 self.shortenEmptyAct = EricAction( |
1508 self.shortenEmptyAct = EricAction( |
1487 QCoreApplication.translate("ViewManager", "Shorten empty lines"), |
1509 QCoreApplication.translate("ViewManager", "Shorten empty lines"), |
1488 QCoreApplication.translate("ViewManager", "Shorten empty lines"), |
1510 QCoreApplication.translate("ViewManager", "Shorten empty lines"), |
1489 0, |
1511 0, |
3429 menu.addAction(self.selectAllAct) |
3451 menu.addAction(self.selectAllAct) |
3430 menu.addAction(self.deselectAllAct) |
3452 menu.addAction(self.deselectAllAct) |
3431 menu.addSeparator() |
3453 menu.addSeparator() |
3432 menu.addAction(self.shortenEmptyAct) |
3454 menu.addAction(self.shortenEmptyAct) |
3433 menu.addAction(self.convertEOLAct) |
3455 menu.addAction(self.convertEOLAct) |
|
3456 menu.addAction(self.convertTabsAct) |
3434 |
3457 |
3435 return menu |
3458 return menu |
3436 |
3459 |
3437 def initEditToolbar(self, toolbarManager): |
3460 def initEditToolbar(self, toolbarManager): |
3438 """ |
3461 """ |
6670 def __shortenEmptyLines(self): |
6693 def __shortenEmptyLines(self): |
6671 """ |
6694 """ |
6672 Private method to handle the shorten empty lines action. |
6695 Private method to handle the shorten empty lines action. |
6673 """ |
6696 """ |
6674 self.activeWindow().shortenEmptyLines() |
6697 self.activeWindow().shortenEmptyLines() |
|
6698 |
|
6699 def __convertTabs(self): |
|
6700 """ |
|
6701 Private method to handle the convert tabs to spaces action. |
|
6702 """ |
|
6703 self.activeWindow().expandTabs() |
6675 |
6704 |
6676 def __editAutoComplete(self): |
6705 def __editAutoComplete(self): |
6677 """ |
6706 """ |
6678 Private method to handle the autocomplete action. |
6707 Private method to handle the autocomplete action. |
6679 """ |
6708 """ |