Ejemplo n.º 1
0
    def on_download(self, item=None, files_filter=None, path=None):
        path = path or self.check_dest_path()
        if not path:
            return

        settings = Settings(self._settings.settings)
        settings.picons_local_path = path + "/"
        self.run_func(
            lambda: download_data(settings=settings,
                                  download_type=DownloadType.PICONS,
                                  callback=self.append_output,
                                  files_filter=files_filter), True)
Ejemplo n.º 2
0
    def on_send(self, item=None, files_filter=None, path=None):
        dest_path = path or self.check_dest_path()
        if not dest_path:
            return

        settings = Settings(self._settings.settings)
        settings.picons_local_path = "{}/".format(dest_path)
        self.show_info_message(get_message("Please, wait..."),
                               Gtk.MessageType.INFO)
        self.run_func(lambda: upload_data(
            settings=settings,
            download_type=DownloadType.PICONS,
            callback=self.append_output,
            done_callback=lambda: self.show_info_message(
                get_message("Done!"), Gtk.MessageType.INFO),
            files_filter=files_filter))