From 1c56b5b25af6f57f1b8524ffdfc1ab32036f0a3e Mon Sep 17 00:00:00 2001 From: "emdee@spm.plastiras.org" Date: Tue, 6 Feb 2024 19:53:28 +0000 Subject: [PATCH] update --- toxygen/__main__.py | 1 - toxygen/app.py | 5 +++-- toxygen/av/calls.py | 3 ++- toxygen/third_party/qweechat/buffer.py | 2 +- toxygen/third_party/qweechat/input.py | 2 +- toxygen/third_party/qweechat/network.py | 2 +- toxygen/ui/main_screen_widgets.py | 5 +++-- toxygen/ui/tray.py | 6 ++++-- toxygen/ui/widgets.py | 7 +++++-- toxygen/user_data/settings.py | 3 +++ 10 files changed, 23 insertions(+), 13 deletions(-) diff --git a/toxygen/__main__.py b/toxygen/__main__.py index 3b4f3ce..7e80621 100644 --- a/toxygen/__main__.py +++ b/toxygen/__main__.py @@ -177,7 +177,6 @@ def setup_default_video(): return video def main_parser(_=None, iMode=2): - import cv2 if not os.path.exists('/proc/sys/net/ipv6'): bIpV6 = 'False' else: diff --git a/toxygen/app.py b/toxygen/app.py index 55a007c..271c43e 100644 --- a/toxygen/app.py +++ b/toxygen/app.py @@ -410,7 +410,7 @@ class App: if self._path is not None: # toxygen was started with path to profile try: - assert os.path.exists(self._path), self._path + assert os.path.exists(self._path), f"FNF {self._path}" self._load_existing_profile(self._path) except Exception as e: LOG.error('_load_existing_profile failed: ' + str(e)) @@ -462,7 +462,8 @@ class App: if not reply: return False - self._settings.set_active_profile() + # is self._path right - was pathless + self._settings.set_active_profile(self._path) return True diff --git a/toxygen/av/calls.py b/toxygen/av/calls.py index 6a1e793..5d8eac0 100644 --- a/toxygen/av/calls.py +++ b/toxygen/av/calls.py @@ -16,9 +16,10 @@ import common.tox_save from utils import ui as util_ui import tox_wrapper.tests.support_testing as ts from middleware.threads import invoke_in_main_thread -from __main__ import sleep from middleware.threads import BaseThread +sleep = time.sleep + global LOG import logging LOG = logging.getLogger('app.'+__name__) diff --git a/toxygen/third_party/qweechat/buffer.py b/toxygen/third_party/qweechat/buffer.py index 2a7fc3c..1cea215 100644 --- a/toxygen/third_party/qweechat/buffer.py +++ b/toxygen/third_party/qweechat/buffer.py @@ -25,7 +25,7 @@ from pkg_resources import resource_filename from qtpy import QtCore, QtGui, QtWidgets -from qtpy.QtCore import pyqtSignal +from PyQt5.QtCore import pyqtSignal Signal = pyqtSignal from third_party.qweechat.chat import ChatTextEdit diff --git a/toxygen/third_party/qweechat/input.py b/toxygen/third_party/qweechat/input.py index 0055275..4a34566 100644 --- a/toxygen/third_party/qweechat/input.py +++ b/toxygen/third_party/qweechat/input.py @@ -23,7 +23,7 @@ """Input line for chat and debug window.""" from qtpy import QtCore, QtWidgets -from qtpy.QtCore import pyqtSignal +from PyQt5.QtCore import pyqtSignal Signal = pyqtSignal class InputLineEdit(QtWidgets.QLineEdit): diff --git a/toxygen/third_party/qweechat/network.py b/toxygen/third_party/qweechat/network.py index a26daed..c11194a 100644 --- a/toxygen/third_party/qweechat/network.py +++ b/toxygen/third_party/qweechat/network.py @@ -27,7 +27,7 @@ import secrets import struct from qtpy import QtCore, QtNetwork -from qtpy.QtCore import pyqtSignal +from PyQt5.QtCore import pyqtSignal Signal = pyqtSignal from third_party.qweechat import config diff --git a/toxygen/ui/main_screen_widgets.py b/toxygen/ui/main_screen_widgets.py index c64cc8c..a6a0847 100644 --- a/toxygen/ui/main_screen_widgets.py +++ b/toxygen/ui/main_screen_widgets.py @@ -4,6 +4,7 @@ import urllib import re from qtpy import QtCore, QtGui, QtWidgets +from PyQt5.QtCore import pyqtSignal from ui.widgets import RubberBandWindow, create_menu, QRightClickButton, CenteredWidget, LineEdit import utils.util as util @@ -395,8 +396,8 @@ class MainMenuButton(QtWidgets.QPushButton): class ClickableLabel(QtWidgets.QLabel): - - clicked = QtCore.pyqtSignal() + # FixMe: AttributeError: module 'qtpy.QtCore' has no attribute 'pyqtSignal' + clicked = pyqtSignal() def __init__(self, *args): super().__init__(*args) diff --git a/toxygen/ui/tray.py b/toxygen/ui/tray.py index cbd4c5a..90b3f78 100644 --- a/toxygen/ui/tray.py +++ b/toxygen/ui/tray.py @@ -1,4 +1,6 @@ from qtpy import QtWidgets, QtGui, QtCore +from PyQt5.QtCore import pyqtSignal + from utils.ui import tr from utils.util import * from ui.password_screen import UnlockAppScreen @@ -6,8 +8,8 @@ import os.path class SystemTrayIcon(QtWidgets.QSystemTrayIcon): - - leftClicked = QtCore.pyqtSignal() + # FixMe: AttributeError: module 'qtpy.QtCore' has no attribute 'pyqtSignal' + leftClicked = pyqtSignal() def __init__(self, icon, parent=None): super().__init__(icon, parent) diff --git a/toxygen/ui/widgets.py b/toxygen/ui/widgets.py index 7b788b3..ddb3994 100644 --- a/toxygen/ui/widgets.py +++ b/toxygen/ui/widgets.py @@ -1,5 +1,8 @@ # -*- mode: python; indent-tabs-mode: nil; py-indent-offset: 4; coding: utf-8 -*- from qtpy import QtCore, QtGui, QtWidgets +from PyQt5.QtCore import pyqtSignal +Signal = pyqtSignal + import utils.ui as util_ui import logging @@ -78,8 +81,8 @@ class QRightClickButton(QtWidgets.QPushButton): """ Button with right click support """ - - rightClicked = QtCore.pyqtSignal() + # FixMe: AttributeError: module 'qtpy.QtCore' has no attribute 'pyqtSignal' + rightClicked = pyqtSignal() def __init__(self, parent=None): super().__init__(parent) diff --git a/toxygen/user_data/settings.py b/toxygen/user_data/settings.py index eccfa2c..9ba26b9 100644 --- a/toxygen/user_data/settings.py +++ b/toxygen/user_data/settings.py @@ -235,6 +235,9 @@ class Settings(dict): """ Mark current profile as active """ + if not profile_path: + profile_path = get_auto_profile() + path = profile_path + '.lock' try: import shutil