def add_folder_task(self, dir_name=None):
folder_dialog = Gtk.FileChooserDialog(_('<STR_LIT>'),<EOL>self.app.window, Gtk.FileChooserAction.SELECT_FOLDER,<EOL>(Gtk.STOCK_CANCEL, Gtk.ResponseType.CANCEL,<EOL>Gtk.STOCK_OK, Gtk.ResponseType.OK))<EOL>folder_dialog.set_modal(True)<EOL>folder_dialog.set_select_multiple(True)<EOL>folder_dialog.set_default_response(Gtk.ResponseType.OK)<EOL>folder_dialog.set_current_folder(Config.HOME_DIR)<EOL>response = folder_dialog.run()<EOL>if response != Gtk.ResponseType.OK:<EOL><INDENT>folder_dialog.destroy()<EOL>return<EOL><DEDENT>source_paths = folder_dialog.get_filenames()<EOL>folder_dialog.destroy()<EOL>if source_paths:<EOL><INDENT>self.upload_files(source_paths, dir_name)<EOL><DEDENT>
添加上传任务, 会弹出一个选择文件夹的对话框