'Step 2 in starting the onionshare server. Zipping up files.'

def start_server_step2(self):

    common.log('OnionShareGui', 'start_server_step2')
    self._zip_progress_bar = ZipProgressBar(0)
    self._zip_progress_bar.total_files_size = OnionShareGui._compute_total_size(self.file_selection.file_list.filenames)
    self.status_bar.clearMessage()
    self.status_bar.insertWidget(0, self._zip_progress_bar)
    def finish_starting_server(self):
        def _set_processed_size(x):
            if (self._zip_progress_bar != None):
                self._zip_progress_bar.update_processed_size_signal.emit(x)
        web.set_file_info(self.file_selection.file_list.filenames, processed_size_callback=_set_processed_size)
        self.app.cleanup_filenames.append(web.zip_filename)
        self.starting_server_step3.emit()
        self.start_server_finished.emit()
    t = threading.Thread(target=finish_starting_server, kwargs={'self': self})
    t.daemon = True
    t.start()
