예제 #1
0
파일: ui.py 프로젝트: amitgcse/calibre
    def confirm_quit(self):
        if self.job_manager.has_jobs():
            msg = _('There are active jobs. Are you sure you want to quit?')
            if self.job_manager.has_device_jobs():
                msg = '<p>'+__appname__ + \
                      _(''' is communicating with the device!<br>
                      Quitting may cause corruption on the device.<br>
                      Are you sure you want to quit?''')+'</p>'

            if not question_dialog(self, _('Active jobs'), msg):
                return False

        if self.proceed_question.questions:
            msg = _('There are library updates waiting. Are you sure you want to quit?')
            if not question_dialog(self, _('Library Updates Waiting'), msg):
                return False

        from calibre.db.delete_service import has_jobs
        if has_jobs():
            msg = _('Some deleted books are still being moved to the Recycle '
                    'Bin, if you quit now, they will be left behind. Are you '
                    'sure you want to quit?')
            if not question_dialog(self, _('Active jobs'), msg):
                return False

        return True
예제 #2
0
파일: ui.py 프로젝트: sportsbite/calibre
    def confirm_quit(self):
        if self.job_manager.has_jobs():
            msg = _('There are active jobs. Are you sure you want to quit?')
            if self.job_manager.has_device_jobs():
                msg = '<p>'+__appname__ + \
                      _(''' is communicating with the device!<br>
                      Quitting may cause corruption on the device.<br>
                      Are you sure you want to quit?''')+'</p>'

            if not question_dialog(self, _('Active jobs'), msg):
                return False

        if self.proceed_question.questions:
            msg = _(
                'There are library updates waiting. Are you sure you want to quit?'
            )
            if not question_dialog(self, _('Library Updates Waiting'), msg):
                return False

        from calibre.db.delete_service import has_jobs
        if has_jobs():
            msg = _('Some deleted books are still being moved to the Recycle '
                    'Bin, if you quit now, they will be left behind. Are you '
                    'sure you want to quit?')
            if not question_dialog(self, _('Active jobs'), msg):
                return False

        return True
예제 #3
0
    def confirm_quit(self):
        if self.job_manager.has_jobs():
            msg = _("There are active jobs. Are you sure you want to quit?")
            if self.job_manager.has_device_jobs():
                msg = (
                    "<p>"
                    + __appname__
                    + _(
                        """ is communicating with the device!<br>
                      Quitting may cause corruption on the device.<br>
                      Are you sure you want to quit?"""
                    )
                    + "</p>"
                )

            if not question_dialog(self, _("Active jobs"), msg):
                return False
        from calibre.db.delete_service import has_jobs

        if has_jobs():
            msg = _(
                "Some deleted books are still being moved to the Recycle "
                "Bin, if you quit now, they will be left behind. Are you "
                "sure you want to quit?"
            )
            if not question_dialog(self, _("Active jobs"), msg):
                return False

        return True