From f76a1c0fbe57770ea109b45999311117873238f2 Mon Sep 17 00:00:00 2001 From: ingvar1995 Date: Sat, 27 Jan 2018 19:53:07 +0300 Subject: [PATCH 1/7] manifest.in updated --- MANIFEST.in | 1 + docs/smileys_and_stickers.md | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/MANIFEST.in b/MANIFEST.in index dba3ada..6629fb6 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -16,3 +16,4 @@ include toxygen/styles/*.qss include toxygen/translations/*.qm include toxygen/libs/libtox.dll include toxygen/libs/libsodium.a +include toxygen/nodes.json diff --git a/docs/smileys_and_stickers.md b/docs/smileys_and_stickers.md index 91ade33..8705ba8 100644 --- a/docs/smileys_and_stickers.md +++ b/docs/smileys_and_stickers.md @@ -8,6 +8,6 @@ Animated smileys (.gif) are supported too. # Stickers -Sticker is inline image. If you want to create your own smiley pack, create directory in src/stickers/ and place your stickers there. +Sticker is inline image. If you want to create your own sticker pack, create directory in src/stickers/ and place your stickers there. Users can import smileys and stickers using menu: Settings -> Interface From b428bd54c4199843b2111164b5f40adfc5ec9bcb Mon Sep 17 00:00:00 2001 From: ingvar1995 Date: Tue, 30 Jan 2018 18:45:55 +0300 Subject: [PATCH 2/7] export history fixed --- toxygen/mainscreen.py | 19 +++++++++++-------- toxygen/util.py | 2 +- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/toxygen/mainscreen.py b/toxygen/mainscreen.py index c76f19b..e0616b8 100644 --- a/toxygen/mainscreen.py +++ b/toxygen/mainscreen.py @@ -660,15 +660,18 @@ class MainWindow(QtWidgets.QMainWindow, Singleton): def export_history(self, num, as_text=True): s = self.profile.export_history(num, as_text) - directory = QtWidgets.QFileDialog.getExistingDirectory(None, - QtWidgets.QApplication.translate("MainWindow", - 'Choose folder'), - curr_directory(), - QtWidgets.QFileDialog.ShowDirsOnly | QtWidgets.QFileDialog.DontUseNativeDialog) + extension = 'txt' if as_text else 'html' + file_name, _ = QtWidgets.QFileDialog.getSaveFileName(None, + QtWidgets.QApplication.translate("MainWindow", + 'Choose file name'), + curr_directory(), + filter=extension, + options=QtWidgets.QFileDialog.ShowDirsOnly | QtWidgets.QFileDialog.DontUseNativeDialog) - if directory: - name = 'exported_history_{}.{}'.format(convert_time(time.time()), 'txt' if as_text else 'html') - with open(directory + '/' + name, 'wt') as fl: + if file_name: + if not file_name.endswith('.' + extension): + file_name += '.' + extension + with open(file_name, 'wt') as fl: fl.write(s) def set_alias(self, num): diff --git a/toxygen/util.py b/toxygen/util.py index e8d702a..d862d56 100644 --- a/toxygen/util.py +++ b/toxygen/util.py @@ -5,7 +5,7 @@ import sys import re -program_version = '0.4.1' +program_version = '0.4.2' def cached(func): From 762eb89a467c88846b6fbff0144d797880362453 Mon Sep 17 00:00:00 2001 From: ingvar1995 Date: Tue, 30 Jan 2018 20:24:36 +0300 Subject: [PATCH 3/7] clickable links in about dialog --- toxygen/mainscreen.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/toxygen/mainscreen.py b/toxygen/mainscreen.py index e0616b8..7d7b9e7 100644 --- a/toxygen/mainscreen.py +++ b/toxygen/mainscreen.py @@ -418,8 +418,10 @@ class MainWindow(QtWidgets.QMainWindow, Singleton): import util msgBox = QtWidgets.QMessageBox() msgBox.setWindowTitle(QtWidgets.QApplication.translate("MainWindow", "About")) - text = (QtWidgets.QApplication.translate("MainWindow", 'Toxygen is Tox client written on Python.\nVersion: ')) - msgBox.setText(text + util.program_version + '\nGitHub: https://github.com/toxygen-project/toxygen/') + text = (QtWidgets.QApplication.translate("MainWindow", 'Toxygen is Tox client written on Python.
Version: ')) + github = '
Github' + submit_a_bug = '
Submit a bug' + msgBox.setText(text + util.program_version + github + submit_a_bug) msgBox.exec_() def network_settings(self): From 9b5d768819b8eebdb6d5884427866d75365054ff Mon Sep 17 00:00:00 2001 From: ingvar1995 Date: Tue, 30 Jan 2018 20:36:59 +0300 Subject: [PATCH 4/7] reconnect bug fixed --- toxygen/profile.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/toxygen/profile.py b/toxygen/profile.py index 204419a..2107878 100644 --- a/toxygen/profile.py +++ b/toxygen/profile.py @@ -870,8 +870,11 @@ class Profile(basecontact.BaseContact, Singleton): Recreate tox instance :param restart: method which calls restart and returns new tox instance """ - for friend in self._contacts: - self.friend_exit(friend.number) + for contact in self._contacts: + if type(contact) is Friend: + self.friend_exit(contact.number) + else: + self.leave_gc(contact.number) self._call.stop() del self._call del self._tox From 98cc288bcdd38a8bdd00d877dbe0319d641dc09d Mon Sep 17 00:00:00 2001 From: ingvar1995 Date: Mon, 5 Feb 2018 23:32:33 +0300 Subject: [PATCH 5/7] fix for ipv6 setting (#59) --- toxygen/profile.py | 2 ++ toxygen/settings.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/toxygen/profile.py b/toxygen/profile.py index 2107878..16d117d 100644 --- a/toxygen/profile.py +++ b/toxygen/profile.py @@ -1438,6 +1438,8 @@ def tox_factory(data=None, settings=None): if settings is None: settings = Settings.get_default_settings() tox_options = Tox.options_new() + # see lines 393-401 + tox_options.contents.ipv6_enabled = settings['ipv6_enabled'] tox_options.contents.udp_enabled = settings['udp_enabled'] tox_options.contents.proxy_type = settings['proxy_type'] tox_options.contents.proxy_host = bytes(settings['proxy_host'], 'UTF-8') diff --git a/toxygen/settings.py b/toxygen/settings.py index 431688a..101f372 100644 --- a/toxygen/settings.py +++ b/toxygen/settings.py @@ -104,7 +104,7 @@ class Settings(dict, Singleton): """ return { 'theme': 'dark', - 'ipv6_enabled': True, + 'ipv6_enabled': False, 'udp_enabled': True, 'proxy_type': 0, 'proxy_host': '127.0.0.1', From ce84cc526b372b2580e35d11ef1fcc6f865b6b95 Mon Sep 17 00:00:00 2001 From: ingvar1995 Date: Sun, 8 Apr 2018 11:48:40 +0300 Subject: [PATCH 6/7] drag n drop fixes --- toxygen/mainscreen_widgets.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/toxygen/mainscreen_widgets.py b/toxygen/mainscreen_widgets.py index 9955771..0d1c26b 100644 --- a/toxygen/mainscreen_widgets.py +++ b/toxygen/mainscreen_widgets.py @@ -3,6 +3,7 @@ from widgets import RubberBandWindow, create_menu, QRightClickButton, CenteredWi from profile import Profile import smileys import util +import platform class MessageArea(QtWidgets.QPlainTextEdit): @@ -70,10 +71,18 @@ class MessageArea(QtWidgets.QPlainTextEdit): def pasteEvent(self, text=None): text = text or QtWidgets.QApplication.clipboard().text() if text.startswith('file://'): - self.parent.profile.send_file(text[7:]) + file_name = self.parse_file_name(text) + self.parent.profile.send_file(file_name) else: self.insertPlainText(text) + def parse_file_name(self, file_name): + import urllib + if file_name.endswith('\r\n'): + file_name = file_name[:-2] + file_name = urllib.parse.unquote(file_name) + return file_name[8 if platform.system() == 'Windows' else 7:] + class ScreenShotWindow(RubberBandWindow): From 74396834cf51cd9582edc3f461bd4ea3e8833047 Mon Sep 17 00:00:00 2001 From: ingvar1995 Date: Fri, 13 Apr 2018 20:12:27 +0300 Subject: [PATCH 7/7] Calls bug fixes --- toxygen/calls.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/toxygen/calls.py b/toxygen/calls.py index 6477c03..3d02110 100644 --- a/toxygen/calls.py +++ b/toxygen/calls.py @@ -63,7 +63,7 @@ class Call: return self._out_video def set_out_video(self, value): - self._in_video = value + self._out_video = value out_video = property(get_out_video, set_out_video) @@ -144,8 +144,8 @@ class AV: call = self._calls[friend_number] call.is_active = True - call.in_audio = state | TOXAV_FRIEND_CALL_STATE['SENDING_A'] - call.in_video = state | TOXAV_FRIEND_CALL_STATE['SENDING_V'] + call.in_audio = state | TOXAV_FRIEND_CALL_STATE['SENDING_A'] > 0 + call.in_video = state | TOXAV_FRIEND_CALL_STATE['SENDING_V'] > 0 if state | TOXAV_FRIEND_CALL_STATE['ACCEPTING_A'] and call.out_audio: self.start_audio_thread() @@ -154,7 +154,7 @@ class AV: self.start_video_thread() def is_video_call(self, number): - return self._calls[number].in_video + return number in self and self._calls[number].in_video # ----------------------------------------------------------------------------------------------------------------- # Threads