Example #1
0
    def closeEvent(self, event):

        if settings.PROMPT_ON_QUIT:

            msg = "Are you sure you want to quit?"

            if not dialog_yes_no(sender=self, msg=msg):
                event.ignore()
                return

        for window in self.child_windows:
            print "closeEvent: closing child window", id(window)
            window.close()

        print "===================================="

        print self.geometry()
        print "------------------------------------"
        self.save_window_position()

        self.core.terminate()

        self.monitor.disconnect(self)
        self.monitor.stop()
        self.save_settings()

        # Get a list of all callbacks.... should be empty
        # This is really just a debugging/sanity check
        callback_list = self.monitor.get_callback_list()
        if len(callback_list):
            msg = "Error: there are still registered callbacks: %s" % callback_list
            dialog_error(self, msg=msg)
Example #2
0
    def closeEvent(self, event):

        print "Popup.closeEvent() called"

        if self._cancel_clicked or self._ok_clicked:
            if not dialog_yes_no(sender=self, msg='Really Close?', title="Setup"):
                event.ignore()
                return

        self.monitor.disconnect(self)
        if self._close_callback:
            self._close_callback(self)

        super(Popup, self).closeEvent(event)
    def closeEvent(self, event):

        print "setup window close event"

        if self.edits_made():
            if not dialog_yes_no(
                    sender=self, msg='Discard Changes?', title="Setup"):
                event.ignore()
                return

        self._close_flag = True
        if self._close_callback:
            self._close_callback(self)

        self.monitor.disconnect(self)
    def closeEvent(self, event):

        print "Popup.closeEvent() called"

        if not dialog_yes_no(sender=self, msg='Confirm Close?', title="Setup"):
            event.ignore()
            return

        self.monitor.disconnect(self)

        self.save_pos_props()

        self.save_settings()

        if self._close_callback:
            self._close_callback(self)

        super(LoadPositions, self).closeEvent(event)