This commit is contained in:
emdee@spm.plastiras.org 2024-02-06 19:53:28 +00:00
parent ea454e27a1
commit 1c56b5b25a
10 changed files with 23 additions and 13 deletions

View File

@ -177,7 +177,6 @@ def setup_default_video():
return video return video
def main_parser(_=None, iMode=2): def main_parser(_=None, iMode=2):
import cv2
if not os.path.exists('/proc/sys/net/ipv6'): if not os.path.exists('/proc/sys/net/ipv6'):
bIpV6 = 'False' bIpV6 = 'False'
else: else:

View File

@ -410,7 +410,7 @@ class App:
if self._path is not None: if self._path is not None:
# toxygen was started with path to profile # toxygen was started with path to profile
try: 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) self._load_existing_profile(self._path)
except Exception as e: except Exception as e:
LOG.error('_load_existing_profile failed: ' + str(e)) LOG.error('_load_existing_profile failed: ' + str(e))
@ -462,7 +462,8 @@ class App:
if not reply: if not reply:
return False return False
self._settings.set_active_profile() # is self._path right - was pathless
self._settings.set_active_profile(self._path)
return True return True

View File

@ -16,9 +16,10 @@ import common.tox_save
from utils import ui as util_ui from utils import ui as util_ui
import tox_wrapper.tests.support_testing as ts import tox_wrapper.tests.support_testing as ts
from middleware.threads import invoke_in_main_thread from middleware.threads import invoke_in_main_thread
from __main__ import sleep
from middleware.threads import BaseThread from middleware.threads import BaseThread
sleep = time.sleep
global LOG global LOG
import logging import logging
LOG = logging.getLogger('app.'+__name__) LOG = logging.getLogger('app.'+__name__)

View File

@ -25,7 +25,7 @@
from pkg_resources import resource_filename from pkg_resources import resource_filename
from qtpy import QtCore, QtGui, QtWidgets from qtpy import QtCore, QtGui, QtWidgets
from qtpy.QtCore import pyqtSignal from PyQt5.QtCore import pyqtSignal
Signal = pyqtSignal Signal = pyqtSignal
from third_party.qweechat.chat import ChatTextEdit from third_party.qweechat.chat import ChatTextEdit

View File

@ -23,7 +23,7 @@
"""Input line for chat and debug window.""" """Input line for chat and debug window."""
from qtpy import QtCore, QtWidgets from qtpy import QtCore, QtWidgets
from qtpy.QtCore import pyqtSignal from PyQt5.QtCore import pyqtSignal
Signal = pyqtSignal Signal = pyqtSignal
class InputLineEdit(QtWidgets.QLineEdit): class InputLineEdit(QtWidgets.QLineEdit):

View File

@ -27,7 +27,7 @@ import secrets
import struct import struct
from qtpy import QtCore, QtNetwork from qtpy import QtCore, QtNetwork
from qtpy.QtCore import pyqtSignal from PyQt5.QtCore import pyqtSignal
Signal = pyqtSignal Signal = pyqtSignal
from third_party.qweechat import config from third_party.qweechat import config

View File

@ -4,6 +4,7 @@ import urllib
import re import re
from qtpy import QtCore, QtGui, QtWidgets from qtpy import QtCore, QtGui, QtWidgets
from PyQt5.QtCore import pyqtSignal
from ui.widgets import RubberBandWindow, create_menu, QRightClickButton, CenteredWidget, LineEdit from ui.widgets import RubberBandWindow, create_menu, QRightClickButton, CenteredWidget, LineEdit
import utils.util as util import utils.util as util
@ -395,8 +396,8 @@ class MainMenuButton(QtWidgets.QPushButton):
class ClickableLabel(QtWidgets.QLabel): class ClickableLabel(QtWidgets.QLabel):
# FixMe: AttributeError: module 'qtpy.QtCore' has no attribute 'pyqtSignal'
clicked = QtCore.pyqtSignal() clicked = pyqtSignal()
def __init__(self, *args): def __init__(self, *args):
super().__init__(*args) super().__init__(*args)

View File

@ -1,4 +1,6 @@
from qtpy import QtWidgets, QtGui, QtCore from qtpy import QtWidgets, QtGui, QtCore
from PyQt5.QtCore import pyqtSignal
from utils.ui import tr from utils.ui import tr
from utils.util import * from utils.util import *
from ui.password_screen import UnlockAppScreen from ui.password_screen import UnlockAppScreen
@ -6,8 +8,8 @@ import os.path
class SystemTrayIcon(QtWidgets.QSystemTrayIcon): class SystemTrayIcon(QtWidgets.QSystemTrayIcon):
# FixMe: AttributeError: module 'qtpy.QtCore' has no attribute 'pyqtSignal'
leftClicked = QtCore.pyqtSignal() leftClicked = pyqtSignal()
def __init__(self, icon, parent=None): def __init__(self, icon, parent=None):
super().__init__(icon, parent) super().__init__(icon, parent)

View File

@ -1,5 +1,8 @@
# -*- mode: python; indent-tabs-mode: nil; py-indent-offset: 4; coding: utf-8 -*- # -*- mode: python; indent-tabs-mode: nil; py-indent-offset: 4; coding: utf-8 -*-
from qtpy import QtCore, QtGui, QtWidgets from qtpy import QtCore, QtGui, QtWidgets
from PyQt5.QtCore import pyqtSignal
Signal = pyqtSignal
import utils.ui as util_ui import utils.ui as util_ui
import logging import logging
@ -78,8 +81,8 @@ class QRightClickButton(QtWidgets.QPushButton):
""" """
Button with right click support Button with right click support
""" """
# FixMe: AttributeError: module 'qtpy.QtCore' has no attribute 'pyqtSignal'
rightClicked = QtCore.pyqtSignal() rightClicked = pyqtSignal()
def __init__(self, parent=None): def __init__(self, parent=None):
super().__init__(parent) super().__init__(parent)

View File

@ -235,6 +235,9 @@ class Settings(dict):
""" """
Mark current profile as active Mark current profile as active
""" """
if not profile_path:
profile_path = get_auto_profile()
path = profile_path + '.lock' path = profile_path + '.lock'
try: try:
import shutil import shutil