예제 #1
0
    def rebuild_rev_file_async(self):

        self.statusLabel.setText("Indexing...")

        self.rebuild_task = MaestralBackgroundTask(self,
                                                   self.mdbx.rebuild_index)
        self.rebuild_task.sig_done.connect(self.on_rebuild_done)
예제 #2
0
    def verify_token_async(self):

        token = self.lineEditAuthCode.text()

        self.auth_task = MaestralBackgroundTask(
            parent=self,
            target=self.auth_session.verify_auth_token,
            args=(token, ))
        self.auth_task.sig_done.connect(self.on_verify_token_finished)
예제 #3
0
    def on_check_for_updates_clicked(self):

        checker = MaestralBackgroundTask(self, self.mdbx.config_name,
                                         "check_for_updates")
        self._progress_dialog = BackgroundTaskProgressDialog(
            "Checking for Updates")
        self._progress_dialog.show()
        self._progress_dialog.rejected.connect(checker.sig_done.disconnect)

        checker.sig_done.connect(self._progress_dialog.accept)
        checker.sig_done.connect(self._notify_updates_user_requested)
예제 #4
0
    def auto_check_for_updates(self):

        last_update_check = self.mdbx.get_conf("app",
                                               "update_notification_last")
        interval = self.mdbx.get_conf("app", "update_notification_interval")
        if interval == 0:  # checks disabled
            return
        elif time.time() - last_update_check > interval:
            checker = MaestralBackgroundTask(self, self.mdbx.config_name,
                                             "check_for_updates")
            checker.sig_done.connect(self._notify_updates_auto)
    def on_link_clicked(self):
        token = self.lineEditAuthCode.text()
        if token == "":
            # this should not occur because link button will be inactivate when there
            # is no text in QLineEdit
            return

        self.set_ui_linking()

        self.auth_task = MaestralBackgroundTask(
            parent=self,
            target=self.auth_session.verify_auth_token,
            args=(token, ))
        self.auth_task.sig_done.connect(self.on_verify_token_finished)
예제 #6
0
    def update_profile_pic(self):

        self.download_task = MaestralBackgroundTask(self, self.mdbx.get_profile_pic)
        self.download_task.sig_done.connect(self.set_profile_pic_from_cache)
    def accept(self):

        self.buttonBox.setEnabled(False)
        self.progressIndicator.startAnimation()
        self.unlink_thread = MaestralBackgroundTask(self, self.mdbx.config_name, "unlink")
        self.unlink_thread.sig_done.connect(self.restart_func)