From 262714d3eef233ae90acdabb0196ebe09e12da8d Mon Sep 17 00:00:00 2001 From: ingvar1995 Date: Thu, 6 Jul 2017 21:39:15 +0300 Subject: [PATCH] fix and cleanup --- setup.py | 3 +-- toxygen/main.py | 9 --------- toxygen/menu.py | 15 +++++++++------ 3 files changed, 10 insertions(+), 17 deletions(-) diff --git a/setup.py b/setup.py index 3ca0f3f..4623952 100644 --- a/setup.py +++ b/setup.py @@ -57,5 +57,4 @@ setup(name='Toxygen', }, cmdclass={ 'install': InstallScript, - }, - ) + }) diff --git a/toxygen/main.py b/toxygen/main.py index ad78407..04bad7f 100644 --- a/toxygen/main.py +++ b/toxygen/main.py @@ -454,15 +454,6 @@ def clean(): remove(d) -def configure(): - """Removes unused libs""" - d = curr_directory() + '/libs/' - if os.path.exists(d + 'libtox.dll'): - os.remove(d + 'libtox.dll') - if os.path.exists(d + 'libsodium.a'): - os.remove(d + 'libsodium.a') - - def reset(): Settings.reset_auto_profile() diff --git a/toxygen/menu.py b/toxygen/menu.py index beea221..bd4e98c 100644 --- a/toxygen/menu.py +++ b/toxygen/menu.py @@ -857,12 +857,15 @@ class VideoSettings(CenteredWidget): self.in_label.setText(QtWidgets.QApplication.translate("videoSettingsForm", "Device:")) def closeEvent(self, event): - settings = Settings.get_instance() - settings.video['device'] = self.devices[self.input.currentIndex()] - text = self.video_size.currentText() - settings.video['width'] = int(text.split(' ')[0]) - settings.video['height'] = int(text.split(' ')[-1]) - settings.save() + try: + settings = Settings.get_instance() + settings.video['device'] = self.devices[self.input.currentIndex()] + text = self.video_size.currentText() + settings.video['width'] = int(text.split(' ')[0]) + settings.video['height'] = int(text.split(' ')[-1]) + settings.save() + except Exception as ex: + print('Saving video settings error: ' + str(ex)) def selectionChanged(self): width, height = self.frame_max_sizes[self.input.currentIndex()]