44 else: |
44 else: |
45 self.__resources = None |
45 self.__resources = None |
46 |
46 |
47 self.__okButton = self.buttonBox.button(QDialogButtonBox.Ok) |
47 self.__okButton = self.buttonBox.button(QDialogButtonBox.Ok) |
48 self.__okButton.setEnabled(False) |
48 self.__okButton.setEnabled(False) |
49 self.__previewButton = self.buttonBox.addButton(\ |
49 self.__previewButton = self.buttonBox.addButton( |
50 self.trUtf8("Preview"), QDialogButtonBox.ActionRole) |
50 self.trUtf8("Preview"), QDialogButtonBox.ActionRole) |
51 self.__previewButton.setDefault(True) |
51 self.__previewButton.setDefault(True) |
52 |
52 |
53 @pyqtSlot(str) |
53 @pyqtSlot(str) |
54 def on_newNameEdit_textChanged(self, text): |
54 def on_newNameEdit_textChanged(self, text): |
96 sline, sindex = aw.lineIndexFromPosition(start) |
96 sline, sindex = aw.lineIndexFromPosition(start) |
97 eline, eindex = aw.lineIndexFromPosition(end) |
97 eline, eindex = aw.lineIndexFromPosition(end) |
98 aw.ensureLineVisible(sline) |
98 aw.ensureLineVisible(sline) |
99 aw.gotoLine(sline) |
99 aw.gotoLine(sline) |
100 aw.setSelection(sline, sindex, eline, eindex) |
100 aw.setSelection(sline, sindex, eline, eindex) |
101 ans = E5MessageBox.yesNo(self, |
101 ans = E5MessageBox.yesNo( |
|
102 self, |
102 self.trUtf8("Rename"), |
103 self.trUtf8("Rename"), |
103 self.trUtf8("""<p>Is the highlighted code a match?</p>"""), |
104 self.trUtf8("""<p>Is the highlighted code a match?</p>"""), |
104 yesDefault=True) |
105 yesDefault=True) |
105 aw.setCursorPosition(cline, cindex) |
106 aw.setCursorPosition(cline, cindex) |
106 aw.ensureCursorVisible() |
107 aw.ensureCursorVisible() |
114 @param handle reference to the task handle |
115 @param handle reference to the task handle |
115 (rope.base.taskhandle.TaskHandle) |
116 (rope.base.taskhandle.TaskHandle) |
116 @return reference to the Changes object (rope.base.change.ChangeSet) |
117 @return reference to the Changes object (rope.base.change.ChangeSet) |
117 """ |
118 """ |
118 try: |
119 try: |
119 changes = self.__renamer.get_changes(self.newNameEdit.text(), |
120 changes = self.__renamer.get_changes( |
|
121 self.newNameEdit.text(), |
120 resources=self.__resources, |
122 resources=self.__resources, |
121 in_hierarchy=self.allCheckBox.isChecked(), |
123 in_hierarchy=self.allCheckBox.isChecked(), |
122 unsure=self.__confirmUnsure, |
124 unsure=self.__confirmUnsure, |
123 docs=self.stringsCheckBox.isChecked(), |
125 docs=self.stringsCheckBox.isChecked(), |
124 task_handle=handle) |
126 task_handle=handle) |