Ejemplo n.º 1
0
    def on_download_folders_to(self, *_args):

        choose_dir(parent=self.frame.MainWindow,
                   title=_("Select Destination Folder"),
                   callback=self.on_download_folders_to_selected,
                   initialdir=config.sections["transfers"]["downloaddir"],
                   multichoice=False)
Ejemplo n.º 2
0
    def on_download_directory_to(self, *args, recurse=False):

        choose_dir(parent=self.frame.MainWindow,
                   callback=self.on_download_directory_to_selected,
                   callback_data=recurse,
                   initialdir=config.sections["transfers"]["downloaddir"],
                   multichoice=False)
Ejemplo n.º 3
0
    def on_add_share(self, *_args):

        choose_dir(
            parent=self.FastConfigureDialog,
            title=_("Add a Shared Folder"),
            callback=self.on_add_share_selected
        )
Ejemplo n.º 4
0
    def on_download_directory_to(self, *_args, recurse=False):

        if recurse:
            str_title = _(
                "Select Destination for Downloading Multiple Folders")
        else:
            str_title = _("Select Destination Folder")

        choose_dir(parent=self.frame.MainWindow,
                   title=str_title,
                   callback=self.on_download_directory_to_selected,
                   callback_data=recurse,
                   initialdir=config.sections["transfers"]["downloaddir"],
                   multichoice=False)
Ejemplo n.º 5
0
    def on_download_files_to(self, *args):

        try:
            _, folder = self.selected_folder.rsplit("\\", 1)
        except ValueError:
            folder = self.selected_folder

        download_folder = config.sections["transfers"]["downloaddir"]
        path = os.path.join(download_folder, folder)

        if not os.path.exists(path) or not os.path.isdir(path):
            path = download_folder

        choose_dir(parent=self.frame.MainWindow,
                   callback=self.on_download_files_to_selected,
                   initialdir=path,
                   multichoice=False)
Ejemplo n.º 6
0
    def on_download_files_to(self, *args):

        choose_dir(parent=self.frame.MainWindow,
                   callback=self.on_download_files_to_selected,
                   initialdir=config.sections["transfers"]["downloaddir"],
                   multichoice=False)