def hidePaste(self, accepted):
     """
     """
     PluginPatch.finish(accepted)
     if self.messageDialog:
         self.messageDialog.reject()
         MessageDialogContainer.instance().unregisterDialog(self.messageDialog)
 def finishVisualDiff():
     self.messageDialog = QMessageDialog('Close', None,
                                         'Close the Visual Difference?',
                                         self)
     self.connect(self.messageDialog,
                  QtCore.SIGNAL('accepted'),
                  self.hideVisualDiff)
     self.messageDialog.show()
     MessageDialogContainer.instance().registerDialog(self.messageDialog)
 def finishPaste():
     PluginPatch.paste()
     self.messageDialog = QMessageDialog('Accept', 'Discard',
                                         'Applied ' + PluginPatch.getReportText() +
                                         ' operation(s).\nAccept the paste?', self)
     self.connect(self.messageDialog,
                  QtCore.SIGNAL('accepted'),
                  self.hidePaste)
     self.messageDialog.show()
     MessageDialogContainer.instance().registerDialog(self.messageDialog)
    def hideVisualDiff(self,accepted=True):
        """ hideVisualDiff(accepted: bool) -> None
        Clean up the visual diff interface.
        """
        self.getVersionView().multiSelectionAbort('Visual Difference')
        CaptureAPI.stopVisualDiff()

        self.messageDialog.reject()
        MessageDialogContainer.instance().unregisterDialog(self.messageDialog)

        controller = self.viewManager.currentWidget().controller
        controller.update_app_with_current_version(0, False)