ViewManager/ViewManager.py

branch
Py2 comp.
changeset 3080
6c0a430b19df
parent 3060
5883ce99ee12
parent 3069
8a9579bbf583
child 3142
55030c09e142
equal deleted inserted replaced
3079:0233bbe9a9c4 3080:6c0a430b19df
5180 (jump back to text). 5180 (jump back to text).
5181 """ 5181 """
5182 if self.quickFindtextCombo.lastActive: 5182 if self.quickFindtextCombo.lastActive:
5183 self.quickFindtextCombo.lastActive.setFocus() 5183 self.quickFindtextCombo.lastActive.setFocus()
5184 aw = self.activeWindow() 5184 aw = self.activeWindow()
5185 if aw and self.quickFindtextCombo.lastCursorPos: 5185 if aw:
5186 aw.setCursorPosition(self.quickFindtextCombo.lastCursorPos[0], 5186 aw.hideFindIndicator()
5187 self.quickFindtextCombo.lastCursorPos[1]) 5187 if self.quickFindtextCombo.lastCursorPos:
5188 aw.setCursorPosition(
5189 self.quickFindtextCombo.lastCursorPos[0],
5190 self.quickFindtextCombo.lastCursorPos[1])
5191
5188 if self.__quickSearchToolbarVisibility is not None: 5192 if self.__quickSearchToolbarVisibility is not None:
5189 self.__quickSearchToolbar.setVisible( 5193 self.__quickSearchToolbar.setVisible(
5190 self.__quickSearchToolbarVisibility) 5194 self.__quickSearchToolbarVisibility)
5191 self.__quickSearchToolbarVisibility = None 5195 self.__quickSearchToolbarVisibility = None
5192 5196
5253 """ 5257 """
5254 aw = self.activeWindow() 5258 aw = self.activeWindow()
5255 if not aw: 5259 if not aw:
5256 return 5260 return
5257 5261
5262 aw.hideFindIndicator()
5263
5258 text = self.quickFindtextCombo.lineEdit().text() 5264 text = self.quickFindtextCombo.lineEdit().text()
5259 if not text and again: 5265 if not text and again:
5260 text = self.quickFindtextCombo.lastSearchText 5266 text = self.quickFindtextCombo.lastSearchText
5261 if not text: 5267 if not text:
5262 if Preferences.getEditor("QuickSearchMarkersEnabled"): 5268 if Preferences.getEditor("QuickSearchMarkersEnabled"):
5286 ok = aw.findFirst(text, False, False, False, True, not back, 5292 ok = aw.findFirst(text, False, False, False, True, not back,
5287 cline, cindex) 5293 cline, cindex)
5288 else: 5294 else:
5289 ok = aw.findFirst(text, False, False, False, True, not back, 5295 ok = aw.findFirst(text, False, False, False, True, not back,
5290 lineFrom, indexFrom) 5296 lineFrom, indexFrom)
5297 if ok:
5298 sline, sindex, eline, eindex = aw.getSelection()
5299 aw.showFindIndicator(sline, sindex, eline, eindex)
5291 self.__quickSearchSetEditColors(not ok) 5300 self.__quickSearchSetEditColors(not ok)
5292 5301
5293 def __quickSearchSetEditColors(self, error): 5302 def __quickSearchSetEditColors(self, error):
5294 """ 5303 """
5295 Private method to set the quick search edit colors. 5304 Private method to set the quick search edit colors.
5731 self.syntaxErrorGotoAct.setEnabled(True) 5740 self.syntaxErrorGotoAct.setEnabled(True)
5732 self.syntaxErrorClearAct.setEnabled(True) 5741 self.syntaxErrorClearAct.setEnabled(True)
5733 else: 5742 else:
5734 self.syntaxErrorGotoAct.setEnabled(False) 5743 self.syntaxErrorGotoAct.setEnabled(False)
5735 self.syntaxErrorClearAct.setEnabled(False) 5744 self.syntaxErrorClearAct.setEnabled(False)
5736 if editor.hasFlakesWarnings(): 5745 if editor.hasWarnings():
5737 self.warningsNextAct.setEnabled(True) 5746 self.warningsNextAct.setEnabled(True)
5738 self.warningsPreviousAct.setEnabled(True) 5747 self.warningsPreviousAct.setEnabled(True)
5739 self.warningsClearAct.setEnabled(True) 5748 self.warningsClearAct.setEnabled(True)
5740 else: 5749 else:
5741 self.warningsNextAct.setEnabled(False) 5750 self.warningsNextAct.setEnabled(False)
5745 5754
5746 def __nextWarning(self): 5755 def __nextWarning(self):
5747 """ 5756 """
5748 Private method to handle the next warning action. 5757 Private method to handle the next warning action.
5749 """ 5758 """
5750 self.activeWindow().nextFlakesWarning() 5759 self.activeWindow().nextWarning()
5751 5760
5752 def __previousWarning(self): 5761 def __previousWarning(self):
5753 """ 5762 """
5754 Private method to handle the previous warning action. 5763 Private method to handle the previous warning action.
5755 """ 5764 """
5756 self.activeWindow().previousFlakesWarning() 5765 self.activeWindow().previousWarning()
5757 5766
5758 def __clearAllWarnings(self): 5767 def __clearAllWarnings(self):
5759 """ 5768 """
5760 Private method to handle the clear all warnings action. 5769 Private method to handle the clear all warnings action.
5761 """ 5770 """
5762 for editor in self.editors: 5771 for editor in self.editors:
5763 editor.clearFlakesWarnings() 5772 editor.clearWarnings()
5764 5773
5765 def __nextUncovered(self): 5774 def __nextUncovered(self):
5766 """ 5775 """
5767 Private method to handle the next uncovered action. 5776 Private method to handle the next uncovered action.
5768 """ 5777 """
6139 self.syntaxErrorClearAct.setEnabled(True) 6148 self.syntaxErrorClearAct.setEnabled(True)
6140 else: 6149 else:
6141 self.syntaxErrorGotoAct.setEnabled(False) 6150 self.syntaxErrorGotoAct.setEnabled(False)
6142 self.syntaxErrorClearAct.setEnabled(False) 6151 self.syntaxErrorClearAct.setEnabled(False)
6143 6152
6144 if editor.hasFlakesWarnings(): 6153 if editor.hasWarnings():
6145 self.warningsNextAct.setEnabled(True) 6154 self.warningsNextAct.setEnabled(True)
6146 self.warningsPreviousAct.setEnabled(True) 6155 self.warningsPreviousAct.setEnabled(True)
6147 self.warningsClearAct.setEnabled(True) 6156 self.warningsClearAct.setEnabled(True)
6148 else: 6157 else:
6149 self.warningsNextAct.setEnabled(False) 6158 self.warningsNextAct.setEnabled(False)

eric ide

mercurial