How to use the maestral.gui.utils.MaestralBackgroundTask function in maestral

To help you get started, we’ve selected a few maestral examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github SamSchott / maestral-dropbox / maestral / gui / rebuild_index_dialog.py View on Github external
def rebuild_rev_file_async(self):

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

        self.rebuild_task = MaestralBackgroundTask(self, "rebuild_index")
        self.rebuild_task.sig_done.connect(self.on_rebuild_done)
github SamSchott / maestral-dropbox / maestral / gui / settings_window.py View on Github external
def accept(self):

        self.buttonBox.setEnabled(False)
        self.progressIndicator.startAnimation()
        self.unlink_thread = MaestralBackgroundTask(self, "unlink")
        self.unlink_thread.sig_done.connect(self.restart_func)
github SamSchott / maestral-dropbox / maestral / gui / main.py View on Github external
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, "check_for_updates")
            checker.sig_done.connect(self._notify_updates_auto)
github SamSchott / maestral-dropbox / maestral / gui / main.py View on Github external
def on_check_for_updates_clicked(self):

        checker = MaestralBackgroundTask(self, "check_for_updates")
        self._progress_dialog = MaestralBackgroundTaskProgressDialog("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)