16 |
16 |
17 from E5Gui import E5FileDialog, E5MessageBox |
17 from E5Gui import E5FileDialog, E5MessageBox |
18 from E5Gui.E5Application import e5App |
18 from E5Gui.E5Application import e5App |
19 from E5Gui.E5Completers import E5FileCompleter |
19 from E5Gui.E5Completers import E5FileCompleter |
20 |
20 |
21 from Ui_MoveDialog import Ui_MoveDialog |
21 from .Ui_MoveDialog import Ui_MoveDialog |
22 from RefactoringDialogBase import RefactoringDialogBase |
22 from .RefactoringDialogBase import RefactoringDialogBase |
23 |
23 |
24 import Utilities |
24 import Utilities |
25 |
25 |
26 |
26 |
27 class MoveDialog(RefactoringDialogBase, Ui_MoveDialog): |
27 class MoveDialog(RefactoringDialogBase, Ui_MoveDialog): |
227 |
227 |
228 def __checkDestination(self): |
228 def __checkDestination(self): |
229 """ |
229 """ |
230 Private method to check the destination entered. |
230 Private method to check the destination entered. |
231 |
231 |
232 @return flag indicating a valid entry (boolean) |
232 @return flag indicating a valid entry |
|
233 @rtype bool |
233 """ |
234 """ |
234 destination = os.path.join( |
235 destination = os.path.join( |
235 self.__project.getProjectPath(), |
236 self.__project.getProjectPath(), |
236 self.destinationEdit.text()) |
237 self.destinationEdit.text()) |
237 if self.__moveType == "move_global_method": |
238 if self.__moveType == "move_global_method": |
261 |
262 |
262 @param button reference to the button pressed |
263 @param button reference to the button pressed |
263 @type QAbstractButton |
264 @type QAbstractButton |
264 """ |
265 """ |
265 if self.__moveType == "move_method" or ( |
266 if self.__moveType == "move_method" or ( |
266 self.__moveType in ["move_global_method", "move_module"] and |
267 self.__moveType in ["move_global_method", "move_module"] and |
267 self.__checkDestination()): |
268 self.__checkDestination()): |
268 if button == self.__previewButton: |
269 if button == self.__previewButton: |
269 self.requestPreview() |
270 self.requestPreview() |
270 elif button == self.__okButton: |
271 elif button == self.__okButton: |
271 self.applyChanges() |
272 self.applyChanges() |