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