isort
This commit is contained in:
parent
1b8b26eafc
commit
1e5618060a
1
.gitignore
vendored
1
.gitignore
vendored
@ -26,3 +26,4 @@ Toxygen.egg-info
|
|||||||
.cache
|
.cache
|
||||||
*.db
|
*.db
|
||||||
|
|
||||||
|
*.junk
|
||||||
|
@ -1,18 +1,19 @@
|
|||||||
# -*- 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 -*-
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
import threading
|
||||||
import traceback
|
import traceback
|
||||||
from random import shuffle
|
from random import shuffle
|
||||||
import threading
|
|
||||||
from time import sleep
|
from time import sleep
|
||||||
|
|
||||||
from gevent import monkey; monkey.patch_all(); del monkey # noqa
|
|
||||||
import gevent
|
import gevent
|
||||||
|
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||||
from PyQt5 import QtWidgets, QtGui, QtCore
|
|
||||||
from qtpy.QtCore import QTimer
|
from qtpy.QtCore import QTimer
|
||||||
from qtpy.QtWidgets import QApplication
|
from qtpy.QtWidgets import QApplication
|
||||||
|
|
||||||
|
from gevent import monkey; monkey.patch_all(); del monkey # noqa
|
||||||
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
import coloredlogs
|
import coloredlogs
|
||||||
if 'COLOREDLOGS_LEVEL_STYLES' not in os.environ:
|
if 'COLOREDLOGS_LEVEL_STYLES' not in os.environ:
|
||||||
@ -32,26 +33,16 @@ try:
|
|||||||
except ImportError:
|
except ImportError:
|
||||||
qdarkstyle = None
|
qdarkstyle = None
|
||||||
|
|
||||||
from middleware import threads
|
import wrapper_tests.support_testing as ts
|
||||||
|
|
||||||
import middleware.callbacks as callbacks
|
import middleware.callbacks as callbacks
|
||||||
import updater.updater as updater
|
import styles.style # TODO: dynamic loading
|
||||||
from middleware.tox_factory import tox_factory
|
|
||||||
import wrapper.toxencryptsave as tox_encrypt_save
|
|
||||||
import user_data.toxes
|
|
||||||
from user_data import settings
|
|
||||||
from user_data.settings import get_user_config_path, merge_args_into_settings
|
|
||||||
from user_data.settings import Settings
|
|
||||||
from user_data.profile_manager import ProfileManager
|
|
||||||
|
|
||||||
from plugin_support.plugin_support import PluginLoader
|
|
||||||
|
|
||||||
import ui.password_screen as password_screen
|
import ui.password_screen as password_screen
|
||||||
from ui.login_screen import LoginScreen
|
import updater.updater as updater
|
||||||
from ui.main_screen import MainWindow
|
import user_data.toxes
|
||||||
from ui import tray
|
|
||||||
|
|
||||||
import utils.ui as util_ui
|
import utils.ui as util_ui
|
||||||
import utils.util as util
|
import utils.util as util
|
||||||
|
import wrapper.toxencryptsave as tox_encrypt_save
|
||||||
from av.calls_manager import CallsManager
|
from av.calls_manager import CallsManager
|
||||||
from common.provider import Provider
|
from common.provider import Provider
|
||||||
from contacts.contact_provider import ContactProvider
|
from contacts.contact_provider import ContactProvider
|
||||||
@ -61,23 +52,32 @@ from contacts.group_factory import GroupFactory
|
|||||||
from contacts.group_peer_factory import GroupPeerFactory
|
from contacts.group_peer_factory import GroupPeerFactory
|
||||||
from contacts.profile import Profile
|
from contacts.profile import Profile
|
||||||
from file_transfers.file_transfers_handler import FileTransfersHandler
|
from file_transfers.file_transfers_handler import FileTransfersHandler
|
||||||
from file_transfers.file_transfers_messages_service import FileTransfersMessagesService
|
from file_transfers.file_transfers_messages_service import \
|
||||||
|
FileTransfersMessagesService
|
||||||
from groups.groups_service import GroupsService
|
from groups.groups_service import GroupsService
|
||||||
from history.database import Database
|
from history.database import Database
|
||||||
from history.history import History
|
from history.history import History
|
||||||
from messenger.messenger import Messenger
|
from messenger.messenger import Messenger
|
||||||
|
from middleware import threads
|
||||||
|
from middleware.tox_factory import tox_factory
|
||||||
from network.tox_dns import ToxDns
|
from network.tox_dns import ToxDns
|
||||||
|
from plugin_support.plugin_support import PluginLoader
|
||||||
from smileys.smileys import SmileyLoader
|
from smileys.smileys import SmileyLoader
|
||||||
|
from ui import tray
|
||||||
from ui.create_profile_screen import CreateProfileScreen
|
from ui.create_profile_screen import CreateProfileScreen
|
||||||
from ui.items_factories import MessagesItemsFactory, ContactItemsFactory
|
from ui.items_factories import ContactItemsFactory, MessagesItemsFactory
|
||||||
|
from ui.login_screen import LoginScreen
|
||||||
|
from ui.main_screen import MainWindow
|
||||||
from ui.widgets_factory import WidgetsFactory
|
from ui.widgets_factory import WidgetsFactory
|
||||||
|
from user_data import settings
|
||||||
from user_data.backup_service import BackupService
|
from user_data.backup_service import BackupService
|
||||||
import styles.style # TODO: dynamic loading
|
from user_data.profile_manager import ProfileManager
|
||||||
|
from user_data.settings import (Settings, get_user_config_path,
|
||||||
import wrapper_tests.support_testing as ts
|
merge_args_into_settings)
|
||||||
|
|
||||||
global LOG
|
global LOG
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
LOG = logging.getLogger('app')
|
LOG = logging.getLogger('app')
|
||||||
|
|
||||||
IDLE_PERIOD = 0.10
|
IDLE_PERIOD = 0.10
|
||||||
@ -148,6 +148,8 @@ sSTYLE = """
|
|||||||
.QToolBar { font-weight: bold; }
|
.QToolBar { font-weight: bold; }
|
||||||
"""
|
"""
|
||||||
from copy import deepcopy
|
from copy import deepcopy
|
||||||
|
|
||||||
|
|
||||||
class App:
|
class App:
|
||||||
|
|
||||||
def __init__(self, version, oArgs):
|
def __init__(self, version, oArgs):
|
||||||
|
@ -1,22 +1,22 @@
|
|||||||
# -*- 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 -*-
|
||||||
import pyaudio
|
|
||||||
import time
|
|
||||||
import threading
|
|
||||||
import itertools
|
import itertools
|
||||||
|
import threading
|
||||||
|
import time
|
||||||
|
|
||||||
from wrapper.toxav_enums import *
|
import pyaudio
|
||||||
|
import wrapper_tests.support_testing as ts
|
||||||
|
|
||||||
|
import common.tox_save
|
||||||
from av import screen_sharing
|
from av import screen_sharing
|
||||||
from av.call import Call
|
from av.call import Call
|
||||||
import common.tox_save
|
|
||||||
|
|
||||||
from utils import ui as util_ui
|
|
||||||
import wrapper_tests.support_testing as ts
|
|
||||||
from middleware.threads import invoke_in_main_thread
|
|
||||||
from main import sleep
|
from main import sleep
|
||||||
from middleware.threads import BaseThread
|
from middleware.threads import BaseThread, invoke_in_main_thread
|
||||||
|
from utils import ui as util_ui
|
||||||
|
from wrapper.toxav_enums import *
|
||||||
|
|
||||||
global LOG
|
global LOG
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
LOG = logging.getLogger('app.'+__name__)
|
LOG = logging.getLogger('app.'+__name__)
|
||||||
# callbacks can be called in any thread so were being careful
|
# callbacks can be called in any thread so were being careful
|
||||||
def LOG_ERROR(l): print('EROR< '+l)
|
def LOG_ERROR(l): print('EROR< '+l)
|
||||||
|
@ -4,13 +4,14 @@ import sys
|
|||||||
import threading
|
import threading
|
||||||
|
|
||||||
import av.calls
|
import av.calls
|
||||||
from messenger.messages import *
|
|
||||||
from ui import av_widgets
|
|
||||||
import common.event as event
|
import common.event as event
|
||||||
import utils.ui as util_ui
|
import utils.ui as util_ui
|
||||||
|
from messenger.messages import *
|
||||||
|
from ui import av_widgets
|
||||||
|
|
||||||
global LOG
|
global LOG
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
LOG = logging.getLogger('app.'+__name__)
|
LOG = logging.getLogger('app.'+__name__)
|
||||||
|
|
||||||
class CallsManager:
|
class CallsManager:
|
||||||
|
@ -1,22 +1,27 @@
|
|||||||
# -*- 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 -*-
|
||||||
import random
|
import random
|
||||||
import urllib.request
|
import urllib.request
|
||||||
|
|
||||||
|
from PyQt5 import QtCore, QtNetwork
|
||||||
|
|
||||||
from utils.util import *
|
from utils.util import *
|
||||||
from PyQt5 import QtNetwork
|
|
||||||
from PyQt5 import QtCore
|
|
||||||
try:
|
try:
|
||||||
import certifi
|
|
||||||
from io import BytesIO
|
from io import BytesIO
|
||||||
|
|
||||||
|
import certifi
|
||||||
except ImportError:
|
except ImportError:
|
||||||
certifi = None
|
certifi = None
|
||||||
|
|
||||||
from user_data.settings import get_user_config_path
|
|
||||||
from wrapper_tests.support_testing import _get_nodes_path
|
|
||||||
from wrapper_tests.support_http import download_url
|
|
||||||
import wrapper_tests.support_testing as ts
|
import wrapper_tests.support_testing as ts
|
||||||
|
from wrapper_tests.support_http import download_url
|
||||||
|
from wrapper_tests.support_testing import _get_nodes_path
|
||||||
|
|
||||||
|
from user_data.settings import get_user_config_path
|
||||||
|
|
||||||
global LOG
|
global LOG
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
LOG = logging.getLogger('app.'+'bootstrap')
|
LOG = logging.getLogger('app.'+'bootstrap')
|
||||||
|
|
||||||
def download_nodes_list(settings, oArgs):
|
def download_nodes_list(settings, oArgs):
|
||||||
|
@ -1,10 +1,11 @@
|
|||||||
# -*- 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 user_data.settings import *
|
|
||||||
from PyQt5 import QtCore, QtGui
|
from PyQt5 import QtCore, QtGui
|
||||||
from wrapper.toxcore_enums_and_consts import TOX_PUBLIC_KEY_SIZE
|
|
||||||
import utils.util as util
|
|
||||||
import common.event as event
|
import common.event as event
|
||||||
import contacts.common as common
|
import contacts.common as common
|
||||||
|
import utils.util as util
|
||||||
|
from user_data.settings import *
|
||||||
|
from wrapper.toxcore_enums_and_consts import TOX_PUBLIC_KEY_SIZE
|
||||||
|
|
||||||
|
|
||||||
class BaseContact:
|
class BaseContact:
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
from pydenticon import Generator
|
|
||||||
import hashlib
|
import hashlib
|
||||||
|
|
||||||
|
from pydenticon import Generator
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------------------------------------------
|
||||||
# Typing notifications
|
# Typing notifications
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
# -*- 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 history.database import TIMEOUT, \
|
import re
|
||||||
SAVE_MESSAGES, MESSAGE_AUTHOR
|
|
||||||
|
|
||||||
from contacts import basecontact, common
|
from contacts import basecontact, common
|
||||||
from messenger.messages import *
|
|
||||||
from contacts.contact_menu import *
|
from contacts.contact_menu import *
|
||||||
from file_transfers import file_transfers as ft
|
from file_transfers import file_transfers as ft
|
||||||
import re
|
from history.database import MESSAGE_AUTHOR, SAVE_MESSAGES, TIMEOUT
|
||||||
|
from messenger.messages import *
|
||||||
|
|
||||||
# LOG=util.log
|
# LOG=util.log
|
||||||
global LOG
|
global LOG
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
LOG = logging.getLogger('app.'+__name__)
|
LOG = logging.getLogger('app.'+__name__)
|
||||||
|
|
||||||
class Contact(basecontact.BaseContact):
|
class Contact(basecontact.BaseContact):
|
||||||
|
@ -6,6 +6,7 @@ from wrapper.toxcore_enums_and_consts import *
|
|||||||
|
|
||||||
global LOG
|
global LOG
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
LOG = logging.getLogger('app')
|
LOG = logging.getLogger('app')
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------------------------------------------
|
||||||
|
@ -4,6 +4,7 @@ import common.tox_save as tox_save
|
|||||||
|
|
||||||
global LOG
|
global LOG
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
|
|
||||||
# callbacks can be called in any thread so were being careful
|
# callbacks can be called in any thread so were being careful
|
||||||
|
@ -2,16 +2,17 @@
|
|||||||
|
|
||||||
import traceback
|
import traceback
|
||||||
|
|
||||||
|
from common.tox_save import ToxSave
|
||||||
from contacts.friend import Friend
|
from contacts.friend import Friend
|
||||||
from contacts.group_chat import GroupChat
|
from contacts.group_chat import GroupChat
|
||||||
from messenger.messages import *
|
|
||||||
from common.tox_save import ToxSave
|
|
||||||
from contacts.group_peer_contact import GroupPeerContact
|
from contacts.group_peer_contact import GroupPeerContact
|
||||||
from groups.group_peer import GroupChatPeer
|
from groups.group_peer import GroupChatPeer
|
||||||
|
from messenger.messages import *
|
||||||
|
|
||||||
# LOG=util.log
|
# LOG=util.log
|
||||||
global LOG
|
global LOG
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
LOG = logging.getLogger('app.'+__name__)
|
LOG = logging.getLogger('app.'+__name__)
|
||||||
|
|
||||||
def LOG_ERROR(l): print('ERROR_: '+l)
|
def LOG_ERROR(l): print('ERROR_: '+l)
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
from contacts import contact, common
|
|
||||||
from messenger.messages import *
|
|
||||||
import os
|
import os
|
||||||
|
|
||||||
|
from contacts import common, contact
|
||||||
from contacts.contact_menu import *
|
from contacts.contact_menu import *
|
||||||
|
from messenger.messages import *
|
||||||
|
|
||||||
|
|
||||||
class Friend(contact.Contact):
|
class Friend(contact.Contact):
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
from contacts.friend import Friend
|
|
||||||
from common.tox_save import ToxSave
|
from common.tox_save import ToxSave
|
||||||
|
from contacts.friend import Friend
|
||||||
|
|
||||||
|
|
||||||
class FriendFactory(ToxSave):
|
class FriendFactory(ToxSave):
|
||||||
|
@ -1,15 +1,16 @@
|
|||||||
# -*- 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 -*-
|
||||||
|
|
||||||
|
import utils.util as util
|
||||||
|
from common.tox_save import ToxSave
|
||||||
from contacts import contact
|
from contacts import contact
|
||||||
from contacts.contact_menu import GroupMenuGenerator
|
from contacts.contact_menu import GroupMenuGenerator
|
||||||
import utils.util as util
|
from groups.group_ban import GroupBan
|
||||||
from groups.group_peer import GroupChatPeer
|
from groups.group_peer import GroupChatPeer
|
||||||
from wrapper import toxcore_enums_and_consts as constants
|
from wrapper import toxcore_enums_and_consts as constants
|
||||||
from common.tox_save import ToxSave
|
|
||||||
from groups.group_ban import GroupBan
|
|
||||||
|
|
||||||
global LOG
|
global LOG
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
def LOG_ERROR(l): print('ERROR_: '+l)
|
def LOG_ERROR(l): print('ERROR_: '+l)
|
||||||
def LOG_WARN(l): print('WARN_: '+l)
|
def LOG_WARN(l): print('WARN_: '+l)
|
||||||
|
@ -1,11 +1,12 @@
|
|||||||
# -*- 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 contacts.group_chat import GroupChat
|
|
||||||
from common.tox_save import ToxSave
|
|
||||||
import wrapper.toxcore_enums_and_consts as constants
|
import wrapper.toxcore_enums_and_consts as constants
|
||||||
|
from common.tox_save import ToxSave
|
||||||
|
from contacts.group_chat import GroupChat
|
||||||
|
|
||||||
global LOG
|
global LOG
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
|
|
||||||
class GroupFactory(ToxSave):
|
class GroupFactory(ToxSave):
|
||||||
|
@ -1,14 +1,16 @@
|
|||||||
# -*- 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 contacts import basecontact
|
|
||||||
import random
|
import random
|
||||||
import threading
|
import threading
|
||||||
|
|
||||||
import common.tox_save as tox_save
|
import common.tox_save as tox_save
|
||||||
|
from contacts import basecontact
|
||||||
from middleware.threads import invoke_in_main_thread
|
from middleware.threads import invoke_in_main_thread
|
||||||
|
|
||||||
iUMAXINT = 4294967295
|
iUMAXINT = 4294967295
|
||||||
|
|
||||||
global LOG
|
global LOG
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
LOG = logging.getLogger('app.'+__name__)
|
LOG = logging.getLogger('app.'+__name__)
|
||||||
|
|
||||||
class Profile(basecontact.BaseContact, tox_save.ToxSave):
|
class Profile(basecontact.BaseContact, tox_save.ToxSave):
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
from wrapper.toxcore_enums_and_consts import TOX_FILE_KIND, TOX_FILE_CONTROL
|
from os import chdir, remove, rename
|
||||||
from os.path import basename, getsize, exists, dirname
|
from os.path import basename, dirname, exists, getsize
|
||||||
from os import remove, rename, chdir
|
|
||||||
from time import time
|
from time import time
|
||||||
from wrapper.tox import Tox
|
|
||||||
from common.event import Event
|
from common.event import Event
|
||||||
from middleware.threads import invoke_in_main_thread
|
from middleware.threads import invoke_in_main_thread
|
||||||
|
from wrapper.tox import Tox
|
||||||
|
from wrapper.toxcore_enums_and_consts import TOX_FILE_CONTROL, TOX_FILE_KIND
|
||||||
|
|
||||||
FILE_TRANSFER_STATE = {
|
FILE_TRANSFER_STATE = {
|
||||||
'RUNNING': 0,
|
'RUNNING': 0,
|
||||||
|
@ -1,14 +1,17 @@
|
|||||||
# -*- 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 messenger.messages import *
|
from copy import deepcopy
|
||||||
from ui.contact_items import *
|
|
||||||
|
from wrapper_tests.support_testing import assert_main_thread
|
||||||
|
|
||||||
import utils.util as util
|
import utils.util as util
|
||||||
from common.tox_save import ToxSave
|
from common.tox_save import ToxSave
|
||||||
from wrapper_tests.support_testing import assert_main_thread
|
from messenger.messages import *
|
||||||
from copy import deepcopy
|
from ui.contact_items import *
|
||||||
|
|
||||||
# LOG=util.log
|
# LOG=util.log
|
||||||
global LOG
|
global LOG
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
LOG = logging.getLogger('app.'+__name__)
|
LOG = logging.getLogger('app.'+__name__)
|
||||||
log = lambda x: LOG.info(x)
|
log = lambda x: LOG.info(x)
|
||||||
|
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
from messenger.messenger import *
|
|
||||||
import utils.util as util
|
import utils.util as util
|
||||||
from file_transfers.file_transfers import *
|
from file_transfers.file_transfers import *
|
||||||
|
from messenger.messenger import *
|
||||||
|
|
||||||
global LOG
|
global LOG
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
LOG = logging.getLogger('app.'+__name__)
|
LOG = logging.getLogger('app.'+__name__)
|
||||||
|
|
||||||
def LOG_ERROR(l): print('ERROR_: '+l)
|
def LOG_ERROR(l): print('ERROR_: '+l)
|
||||||
|
@ -2,14 +2,15 @@
|
|||||||
|
|
||||||
import common.tox_save as tox_save
|
import common.tox_save as tox_save
|
||||||
import utils.ui as util_ui
|
import utils.ui as util_ui
|
||||||
from groups.peers_list import PeersListGenerator
|
|
||||||
from groups.group_invite import GroupInvite
|
|
||||||
import wrapper.toxcore_enums_and_consts as constants
|
import wrapper.toxcore_enums_and_consts as constants
|
||||||
from wrapper.toxcore_enums_and_consts import *
|
from groups.group_invite import GroupInvite
|
||||||
|
from groups.peers_list import PeersListGenerator
|
||||||
from wrapper.tox import UINT32_MAX
|
from wrapper.tox import UINT32_MAX
|
||||||
|
from wrapper.toxcore_enums_and_consts import *
|
||||||
|
|
||||||
global LOG
|
global LOG
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
LOG = logging.getLogger('app.'+'gs')
|
LOG = logging.getLogger('app.'+'gs')
|
||||||
|
|
||||||
class GroupsService(tox_save.ToxSave):
|
class GroupsService(tox_save.ToxSave):
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
from ui.group_peers_list import PeerItem, PeerTypeItem
|
from ui.group_peers_list import PeerItem, PeerTypeItem
|
||||||
from wrapper.toxcore_enums_and_consts import *
|
|
||||||
from ui.widgets import *
|
from ui.widgets import *
|
||||||
|
from wrapper.toxcore_enums_and_consts import *
|
||||||
|
|
||||||
# -----------------------------------------------------------------------------------------------------------------
|
# -----------------------------------------------------------------------------------------------------------------
|
||||||
# Builder
|
# Builder
|
||||||
|
@ -1,10 +1,12 @@
|
|||||||
# -*- 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 sqlite3 import connect
|
|
||||||
import os.path
|
import os.path
|
||||||
|
from sqlite3 import connect
|
||||||
|
|
||||||
import utils.util as util
|
import utils.util as util
|
||||||
|
|
||||||
global LOG
|
global LOG
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
LOG = logging.getLogger('app.db')
|
LOG = logging.getLogger('app.db')
|
||||||
|
|
||||||
TIMEOUT = 11
|
TIMEOUT = 11
|
||||||
|
@ -3,6 +3,7 @@ from history.history_logs_generators import *
|
|||||||
|
|
||||||
global LOG
|
global LOG
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
LOG = logging.getLogger('app.db')
|
LOG = logging.getLogger('app.db')
|
||||||
|
|
||||||
class History:
|
class History:
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
from messenger.messages import *
|
|
||||||
import utils.util as util
|
import utils.util as util
|
||||||
|
from messenger.messages import *
|
||||||
|
|
||||||
|
|
||||||
class HistoryLogsGenerator:
|
class HistoryLogsGenerator:
|
||||||
|
@ -1,21 +1,24 @@
|
|||||||
# -*- 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 -*-
|
||||||
import sys
|
|
||||||
import os
|
|
||||||
import app
|
|
||||||
import argparse
|
import argparse
|
||||||
import logging
|
|
||||||
import signal
|
|
||||||
|
|
||||||
import faulthandler
|
import faulthandler
|
||||||
|
import logging
|
||||||
|
import os
|
||||||
|
import signal
|
||||||
|
import sys
|
||||||
|
|
||||||
|
import app
|
||||||
|
|
||||||
faulthandler.enable()
|
faulthandler.enable()
|
||||||
|
|
||||||
import warnings
|
import warnings
|
||||||
|
|
||||||
warnings.filterwarnings('ignore')
|
warnings.filterwarnings('ignore')
|
||||||
|
|
||||||
import wrapper_tests.support_testing as ts
|
import wrapper_tests.support_testing as ts
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from trepan.interfaces import server as Mserver
|
|
||||||
from trepan.api import debug
|
from trepan.api import debug
|
||||||
|
from trepan.interfaces import server as Mserver
|
||||||
except:
|
except:
|
||||||
print('trepan3 TCP server NOT enabled.')
|
print('trepan3 TCP server NOT enabled.')
|
||||||
else:
|
else:
|
||||||
@ -25,10 +28,11 @@ else:
|
|||||||
print('trepan3 TCP server enabled on port 6666.')
|
print('trepan3 TCP server enabled on port 6666.')
|
||||||
except: pass
|
except: pass
|
||||||
|
|
||||||
|
import utils.util as util
|
||||||
|
from user_data import settings
|
||||||
from user_data.settings import *
|
from user_data.settings import *
|
||||||
from user_data.settings import Settings
|
from user_data.settings import Settings
|
||||||
from user_data import settings
|
|
||||||
import utils.util as util
|
|
||||||
with ts.ignoreStderr():
|
with ts.ignoreStderr():
|
||||||
import pyaudio
|
import pyaudio
|
||||||
|
|
||||||
@ -36,6 +40,7 @@ __maintainer__ = 'Ingvar'
|
|||||||
__version__ = '0.5.0+'
|
__version__ = '0.5.0+'
|
||||||
|
|
||||||
import time
|
import time
|
||||||
|
|
||||||
sleep = time.sleep
|
sleep = time.sleep
|
||||||
|
|
||||||
def reset():
|
def reset():
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
from history.database import MESSAGE_AUTHOR
|
|
||||||
import os.path
|
import os.path
|
||||||
from ui.messages_widgets import *
|
|
||||||
|
|
||||||
|
from history.database import MESSAGE_AUTHOR
|
||||||
|
from ui.messages_widgets import *
|
||||||
|
|
||||||
MESSAGE_TYPE = {
|
MESSAGE_TYPE = {
|
||||||
'TEXT': 0,
|
'TEXT': 0,
|
||||||
|
@ -1,13 +1,14 @@
|
|||||||
# -*- 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 wrapper_tests.support_testing import assert_main_thread
|
||||||
|
|
||||||
import common.tox_save as tox_save
|
import common.tox_save as tox_save
|
||||||
import utils.ui as util_ui
|
import utils.ui as util_ui
|
||||||
|
|
||||||
from messenger.messages import *
|
from messenger.messages import *
|
||||||
from wrapper_tests.support_testing import assert_main_thread
|
|
||||||
from wrapper.toxcore_enums_and_consts import TOX_MAX_MESSAGE_LENGTH
|
from wrapper.toxcore_enums_and_consts import TOX_MAX_MESSAGE_LENGTH
|
||||||
|
|
||||||
global LOG
|
global LOG
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
LOG = logging.getLogger('app.'+__name__)
|
LOG = logging.getLogger('app.'+__name__)
|
||||||
log = lambda x: LOG.info(x)
|
log = lambda x: LOG.info(x)
|
||||||
|
|
||||||
|
@ -1,17 +1,19 @@
|
|||||||
# -*- 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 -*-
|
||||||
import sys
|
|
||||||
import os
|
import os
|
||||||
|
import sys
|
||||||
import threading
|
import threading
|
||||||
|
from datetime import datetime
|
||||||
|
|
||||||
from PyQt5 import QtGui
|
from PyQt5 import QtGui
|
||||||
from wrapper.toxcore_enums_and_consts import *
|
|
||||||
from wrapper.toxav_enums import *
|
|
||||||
from wrapper.tox import bin_to_string
|
|
||||||
import utils.ui as util_ui
|
import utils.ui as util_ui
|
||||||
import utils.util as util
|
import utils.util as util
|
||||||
from middleware.threads import invoke_in_main_thread, execute
|
from middleware.threads import execute, invoke_in_main_thread
|
||||||
from notifications.tray import tray_notification
|
|
||||||
from notifications.sound import *
|
from notifications.sound import *
|
||||||
from datetime import datetime
|
from notifications.tray import tray_notification
|
||||||
|
from wrapper.tox import bin_to_string
|
||||||
|
from wrapper.toxav_enums import *
|
||||||
|
from wrapper.toxcore_enums_and_consts import *
|
||||||
|
|
||||||
iMAX_INT32 = 4294967295
|
iMAX_INT32 = 4294967295
|
||||||
# callbacks can be called in any thread so were being careful
|
# callbacks can be called in any thread so were being careful
|
||||||
|
@ -1,21 +1,23 @@
|
|||||||
# -*- 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 -*-
|
||||||
|
import queue
|
||||||
import sys
|
import sys
|
||||||
import threading
|
import threading
|
||||||
import queue
|
import time
|
||||||
|
|
||||||
|
import wrapper_tests.support_testing as ts
|
||||||
from PyQt5 import QtCore
|
from PyQt5 import QtCore
|
||||||
|
|
||||||
from bootstrap.bootstrap import *
|
from bootstrap.bootstrap import *
|
||||||
from bootstrap.bootstrap import download_nodes_list
|
from bootstrap.bootstrap import download_nodes_list
|
||||||
from wrapper.toxcore_enums_and_consts import TOX_USER_STATUS, TOX_CONNECTION
|
|
||||||
import wrapper_tests.support_testing as ts
|
|
||||||
from utils import util
|
from utils import util
|
||||||
|
from wrapper.toxcore_enums_and_consts import TOX_CONNECTION, TOX_USER_STATUS
|
||||||
|
|
||||||
import time
|
|
||||||
sleep = time.sleep
|
sleep = time.sleep
|
||||||
|
|
||||||
# LOG=util.log
|
# LOG=util.log
|
||||||
global LOG
|
global LOG
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
LOG = logging.getLogger('app.'+'threads')
|
LOG = logging.getLogger('app.'+'threads')
|
||||||
# log = lambda x: LOG.info(x)
|
# log = lambda x: LOG.info(x)
|
||||||
|
|
||||||
|
@ -1,18 +1,22 @@
|
|||||||
# -*- 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 -*-
|
||||||
|
import ctypes
|
||||||
|
import os
|
||||||
|
import traceback
|
||||||
|
|
||||||
import user_data.settings
|
import user_data.settings
|
||||||
import wrapper.tox
|
import wrapper.tox
|
||||||
import wrapper.toxcore_enums_and_consts as enums
|
import wrapper.toxcore_enums_and_consts as enums
|
||||||
import ctypes
|
|
||||||
import traceback
|
|
||||||
import os
|
|
||||||
|
|
||||||
global LOG
|
global LOG
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
LOG = logging.getLogger('app.'+'tox_factory')
|
LOG = logging.getLogger('app.'+'tox_factory')
|
||||||
|
|
||||||
from ctypes import *
|
from ctypes import *
|
||||||
from utils import util
|
|
||||||
from utils import ui as util_ui
|
from utils import ui as util_ui
|
||||||
|
from utils import util
|
||||||
|
|
||||||
|
|
||||||
# callbacks can be called in any thread so were being careful
|
# callbacks can be called in any thread so were being careful
|
||||||
# tox.py can be called by callbacks
|
# tox.py can be called by callbacks
|
||||||
|
@ -1,8 +1,11 @@
|
|||||||
# -*- 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 -*-
|
||||||
import json
|
import json
|
||||||
import urllib.request
|
import urllib.request
|
||||||
|
|
||||||
|
from PyQt5 import QtCore, QtNetwork
|
||||||
|
|
||||||
import utils.util as util
|
import utils.util as util
|
||||||
from PyQt5 import QtNetwork, QtCore
|
|
||||||
try:
|
try:
|
||||||
import requests
|
import requests
|
||||||
except ImportError:
|
except ImportError:
|
||||||
@ -10,6 +13,7 @@ except ImportError:
|
|||||||
|
|
||||||
global LOG
|
global LOG
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
LOG = logging.getLogger('app.'+__name__)
|
LOG = logging.getLogger('app.'+__name__)
|
||||||
|
|
||||||
class ToxDns:
|
class ToxDns:
|
||||||
|
@ -1,10 +1,13 @@
|
|||||||
import utils.util
|
|
||||||
import wave
|
|
||||||
import pyaudio
|
|
||||||
import os.path
|
import os.path
|
||||||
|
import wave
|
||||||
|
|
||||||
|
import pyaudio
|
||||||
|
|
||||||
|
import utils.util
|
||||||
|
|
||||||
global LOG
|
global LOG
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
LOG = logging.getLogger('app.'+__name__)
|
LOG = logging.getLogger('app.'+__name__)
|
||||||
|
|
||||||
SOUND_NOTIFICATION = {
|
SOUND_NOTIFICATION = {
|
||||||
|
@ -1,14 +1,16 @@
|
|||||||
# -*- 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 -*-
|
||||||
import utils.util as util
|
|
||||||
import os
|
|
||||||
import importlib
|
import importlib
|
||||||
import inspect
|
import inspect
|
||||||
import plugins.plugin_super_class as pl
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
import plugins.plugin_super_class as pl
|
||||||
|
import utils.util as util
|
||||||
|
|
||||||
# LOG=util.log
|
# LOG=util.log
|
||||||
global LOG
|
global LOG
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
LOG = logging.getLogger('plugin_support')
|
LOG = logging.getLogger('plugin_support')
|
||||||
def trace(msg, *args, **kwargs): LOG._log(0, msg, [])
|
def trace(msg, *args, **kwargs): LOG._log(0, msg, [])
|
||||||
LOG.trace = trace
|
LOG.trace = trace
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
import os
|
import os
|
||||||
from PyQt5 import QtCore, QtWidgets
|
|
||||||
import utils.ui as util_ui
|
|
||||||
import common.tox_save as tox_save
|
|
||||||
|
|
||||||
|
from PyQt5 import QtCore, QtWidgets
|
||||||
|
|
||||||
|
import common.tox_save as tox_save
|
||||||
|
import utils.ui as util_ui
|
||||||
|
|
||||||
MAX_SHORT_NAME_LENGTH = 5
|
MAX_SHORT_NAME_LENGTH = 5
|
||||||
|
|
||||||
|
@ -1,12 +1,15 @@
|
|||||||
from utils import util
|
|
||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
|
|
||||||
from PyQt5 import QtCore
|
from PyQt5 import QtCore
|
||||||
|
|
||||||
|
from utils import util
|
||||||
|
|
||||||
# LOG=util.log
|
# LOG=util.log
|
||||||
global LOG
|
global LOG
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
LOG = logging.getLogger('app.'+__name__)
|
LOG = logging.getLogger('app.'+__name__)
|
||||||
log = lambda x: LOG.info(x)
|
log = lambda x: LOG.info(x)
|
||||||
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
import utils.util as util
|
import utils.util as util
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,15 +1,16 @@
|
|||||||
import threading
|
import threading
|
||||||
|
|
||||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
|
||||||
import pyaudio
|
|
||||||
import wave
|
import wave
|
||||||
|
|
||||||
from ui import widgets
|
import pyaudio
|
||||||
import utils.util as util
|
|
||||||
import wrapper_tests.support_testing as ts
|
import wrapper_tests.support_testing as ts
|
||||||
|
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||||
|
|
||||||
|
import utils.util as util
|
||||||
|
from ui import widgets
|
||||||
|
|
||||||
global LOG
|
global LOG
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
LOG = logging.getLogger('app.'+__name__)
|
LOG = logging.getLogger('app.'+__name__)
|
||||||
|
|
||||||
class IncomingCallWidget(widgets.CenteredWidget):
|
class IncomingCallWidget(widgets.CenteredWidget):
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
from wrapper.toxcore_enums_and_consts import *
|
|
||||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||||
from utils.util import *
|
|
||||||
from ui.widgets import DataLabel
|
from ui.widgets import DataLabel
|
||||||
|
from utils.util import *
|
||||||
|
from wrapper.toxcore_enums_and_consts import *
|
||||||
|
|
||||||
|
|
||||||
class ContactItem(QtWidgets.QWidget):
|
class ContactItem(QtWidgets.QWidget):
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
from ui.widgets import *
|
|
||||||
from PyQt5 import uic
|
from PyQt5 import uic
|
||||||
import utils.util as util
|
|
||||||
import utils.ui as util_ui
|
import utils.ui as util_ui
|
||||||
|
import utils.util as util
|
||||||
|
from ui.widgets import *
|
||||||
|
|
||||||
|
|
||||||
class CreateProfileScreenResult:
|
class CreateProfileScreenResult:
|
||||||
|
@ -1,7 +1,8 @@
|
|||||||
from ui.widgets import CenteredWidget
|
from PyQt5 import QtCore, QtWidgets, uic
|
||||||
from PyQt5 import uic, QtWidgets, QtCore
|
|
||||||
import utils.util as util
|
|
||||||
import utils.ui as util_ui
|
import utils.ui as util_ui
|
||||||
|
import utils.util as util
|
||||||
|
from ui.widgets import CenteredWidget
|
||||||
|
|
||||||
|
|
||||||
class GroupBanItem(QtWidgets.QWidget):
|
class GroupBanItem(QtWidgets.QWidget):
|
||||||
|
@ -1,9 +1,11 @@
|
|||||||
from PyQt5 import uic, QtWidgets
|
from PyQt5 import QtWidgets, uic
|
||||||
|
|
||||||
import utils.util as util
|
import utils.util as util
|
||||||
from ui.widgets import *
|
from ui.widgets import *
|
||||||
|
|
||||||
global LOG
|
global LOG
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
LOG = logging.getLogger('app')
|
LOG = logging.getLogger('app')
|
||||||
|
|
||||||
class GroupInviteItem(QtWidgets.QWidget):
|
class GroupInviteItem(QtWidgets.QWidget):
|
||||||
|
@ -1,7 +1,9 @@
|
|||||||
from ui.widgets import CenteredWidget
|
|
||||||
from PyQt5 import uic
|
from PyQt5 import uic
|
||||||
import utils.util as util
|
|
||||||
import utils.ui as util_ui
|
import utils.ui as util_ui
|
||||||
|
import utils.util as util
|
||||||
|
from ui.widgets import CenteredWidget
|
||||||
|
|
||||||
|
|
||||||
class GroupManagementScreen(CenteredWidget):
|
class GroupManagementScreen(CenteredWidget):
|
||||||
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
from PyQt5 import uic
|
from PyQt5 import uic
|
||||||
|
|
||||||
import utils.util as util
|
import utils.util as util
|
||||||
from ui.widgets import *
|
from ui.widgets import *
|
||||||
from wrapper.toxcore_enums_and_consts import *
|
from wrapper.toxcore_enums_and_consts import *
|
||||||
|
@ -1,9 +1,11 @@
|
|||||||
from ui.widgets import *
|
|
||||||
from PyQt5 import uic
|
|
||||||
import utils.util as util
|
|
||||||
import utils.ui as util_ui
|
|
||||||
import os.path
|
import os.path
|
||||||
|
|
||||||
|
from PyQt5 import uic
|
||||||
|
|
||||||
|
import utils.ui as util_ui
|
||||||
|
import utils.util as util
|
||||||
|
from ui.widgets import *
|
||||||
|
|
||||||
|
|
||||||
class LoginScreenResult:
|
class LoginScreenResult:
|
||||||
|
|
||||||
|
@ -1,16 +1,15 @@
|
|||||||
# -*- 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 -*-
|
||||||
import os
|
|
||||||
import logging
|
import logging
|
||||||
|
import os
|
||||||
|
|
||||||
from PyQt5 import uic
|
from PyQt5 import QtGui, QtWidgets, uic
|
||||||
from PyQt5 import QtWidgets, QtGui
|
from qtpy.QtGui import QColor, QFont, QSyntaxHighlighter, QTextCharFormat
|
||||||
from qtpy.QtGui import (QColor, QTextCharFormat, QFont, QSyntaxHighlighter)
|
|
||||||
|
|
||||||
from ui.contact_items import *
|
|
||||||
from ui.widgets import MultilineEdit
|
|
||||||
from ui.main_screen_widgets import *
|
|
||||||
import utils.util as util
|
|
||||||
import utils.ui as util_ui
|
import utils.ui as util_ui
|
||||||
|
import utils.util as util
|
||||||
|
from ui.contact_items import *
|
||||||
|
from ui.main_screen_widgets import *
|
||||||
|
from ui.widgets import MultilineEdit
|
||||||
from user_data.settings import Settings
|
from user_data.settings import Settings
|
||||||
|
|
||||||
global LOG
|
global LOG
|
||||||
@ -20,8 +19,8 @@ iMAX = 70
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
# https://github.com/pyqtconsole/pyqtconsole
|
# https://github.com/pyqtconsole/pyqtconsole
|
||||||
from pyqtconsole.console import PythonConsole
|
|
||||||
import pyqtconsole.highlighter as hl
|
import pyqtconsole.highlighter as hl
|
||||||
|
from pyqtconsole.console import PythonConsole
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
LOG.warn(e)
|
LOG.warn(e)
|
||||||
PythonConsole = None
|
PythonConsole = None
|
||||||
|
@ -1,14 +1,15 @@
|
|||||||
# -*- 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 -*-
|
||||||
|
|
||||||
import urllib
|
|
||||||
import re
|
import re
|
||||||
|
import urllib
|
||||||
|
|
||||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||||
|
|
||||||
from ui.widgets import RubberBandWindow, create_menu, QRightClickButton, CenteredWidget, LineEdit
|
|
||||||
import utils.util as util
|
|
||||||
import utils.ui as util_ui
|
import utils.ui as util_ui
|
||||||
|
import utils.util as util
|
||||||
from stickers.stickers import load_stickers
|
from stickers.stickers import load_stickers
|
||||||
|
from ui.widgets import (CenteredWidget, LineEdit, QRightClickButton,
|
||||||
|
RubberBandWindow, create_menu)
|
||||||
|
|
||||||
|
|
||||||
class MessageArea(QtWidgets.QPlainTextEdit):
|
class MessageArea(QtWidgets.QPlainTextEdit):
|
||||||
|
@ -1,17 +1,18 @@
|
|||||||
# -*- 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 PyQt5 import QtCore, QtGui, QtWidgets, uic
|
|
||||||
import pyaudio
|
import pyaudio
|
||||||
|
import wrapper_tests.support_testing as ts
|
||||||
|
from PyQt5 import QtCore, QtGui, QtWidgets, uic
|
||||||
|
|
||||||
from user_data.settings import *
|
|
||||||
from utils.util import *
|
|
||||||
from ui.widgets import CenteredWidget, DataLabel, LineEdit, RubberBandWindow
|
|
||||||
import updater.updater as updater
|
import updater.updater as updater
|
||||||
import utils.ui as util_ui
|
import utils.ui as util_ui
|
||||||
import wrapper_tests.support_testing as ts
|
from ui.widgets import CenteredWidget, DataLabel, LineEdit, RubberBandWindow
|
||||||
from user_data import settings
|
from user_data import settings
|
||||||
|
from user_data.settings import *
|
||||||
|
from utils.util import *
|
||||||
|
|
||||||
global LOG
|
global LOG
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
LOG = logging.getLogger('app.'+__name__)
|
LOG = logging.getLogger('app.'+__name__)
|
||||||
|
|
||||||
global oPYA
|
global oPYA
|
||||||
|
@ -1,12 +1,13 @@
|
|||||||
from wrapper.toxcore_enums_and_consts import *
|
|
||||||
import ui.widgets as widgets
|
|
||||||
import utils.util as util
|
|
||||||
import ui.menu as menu
|
|
||||||
import html as h
|
import html as h
|
||||||
import re
|
import re
|
||||||
from ui.widgets import *
|
|
||||||
from messenger.messages import MESSAGE_AUTHOR
|
import ui.menu as menu
|
||||||
|
import ui.widgets as widgets
|
||||||
|
import utils.util as util
|
||||||
from file_transfers.file_transfers import *
|
from file_transfers.file_transfers import *
|
||||||
|
from messenger.messages import MESSAGE_AUTHOR
|
||||||
|
from ui.widgets import *
|
||||||
|
from wrapper.toxcore_enums_and_consts import *
|
||||||
|
|
||||||
|
|
||||||
class MessageBrowser(QtWidgets.QTextBrowser):
|
class MessageBrowser(QtWidgets.QTextBrowser):
|
||||||
|
@ -1,9 +1,11 @@
|
|||||||
from ui.widgets import CenteredWidget, LineEdit, DialogWithResult
|
|
||||||
from PyQt5 import QtCore, QtWidgets
|
from PyQt5 import QtCore, QtWidgets
|
||||||
|
|
||||||
import utils.ui as util_ui
|
import utils.ui as util_ui
|
||||||
|
from ui.widgets import CenteredWidget, DialogWithResult, LineEdit
|
||||||
|
|
||||||
global LOG
|
global LOG
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
LOG = logging.getLogger('app.'+__name__)
|
LOG = logging.getLogger('app.'+__name__)
|
||||||
|
|
||||||
class PasswordArea(LineEdit):
|
class PasswordArea(LineEdit):
|
||||||
|
@ -1,9 +1,10 @@
|
|||||||
from ui.widgets import CenteredWidget
|
|
||||||
from PyQt5 import uic
|
from PyQt5 import uic
|
||||||
import utils.util as util
|
|
||||||
import utils.ui as util_ui
|
import utils.ui as util_ui
|
||||||
from ui.contact_items import *
|
import utils.util as util
|
||||||
import wrapper.toxcore_enums_and_consts as consts
|
import wrapper.toxcore_enums_and_consts as consts
|
||||||
|
from ui.contact_items import *
|
||||||
|
from ui.widgets import CenteredWidget
|
||||||
|
|
||||||
|
|
||||||
class PeerScreen(CenteredWidget):
|
class PeerScreen(CenteredWidget):
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
from ui.widgets import CenteredWidget
|
from PyQt5 import QtCore, QtGui, uic
|
||||||
|
|
||||||
import utils.ui as util_ui
|
import utils.ui as util_ui
|
||||||
from utils.util import join_path, get_images_directory, get_views_path
|
from ui.widgets import CenteredWidget
|
||||||
from user_data.settings import Settings
|
from user_data.settings import Settings
|
||||||
from PyQt5 import QtGui, QtCore, uic
|
from utils.util import get_images_directory, get_views_path, join_path
|
||||||
|
|
||||||
|
|
||||||
class ProfileSettings(CenteredWidget):
|
class ProfileSettings(CenteredWidget):
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
from ui.widgets import CenteredWidget, LineEdit
|
|
||||||
from PyQt5 import uic
|
from PyQt5 import uic
|
||||||
import utils.util as util
|
|
||||||
import utils.ui as util_ui
|
import utils.ui as util_ui
|
||||||
|
import utils.util as util
|
||||||
from ui.contact_items import *
|
from ui.contact_items import *
|
||||||
|
from ui.widgets import CenteredWidget, LineEdit
|
||||||
|
|
||||||
|
|
||||||
class SelfPeerScreen(CenteredWidget):
|
class SelfPeerScreen(CenteredWidget):
|
||||||
|
@ -1,8 +1,10 @@
|
|||||||
from PyQt5 import QtWidgets, QtGui, QtCore
|
import os.path
|
||||||
|
|
||||||
|
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||||
|
|
||||||
|
from ui.password_screen import UnlockAppScreen
|
||||||
from utils.ui import tr
|
from utils.ui import tr
|
||||||
from utils.util import *
|
from utils.util import *
|
||||||
from ui.password_screen import UnlockAppScreen
|
|
||||||
import os.path
|
|
||||||
|
|
||||||
|
|
||||||
class SystemTrayIcon(QtWidgets.QSystemTrayIcon):
|
class SystemTrayIcon(QtWidgets.QSystemTrayIcon):
|
||||||
|
@ -1,8 +1,10 @@
|
|||||||
# -*- 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 PyQt5 import QtCore, QtGui, QtWidgets
|
|
||||||
import utils.ui as util_ui
|
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
|
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||||
|
|
||||||
|
import utils.ui as util_ui
|
||||||
|
|
||||||
global LOG
|
global LOG
|
||||||
LOG = logging.getLogger('app')
|
LOG = logging.getLogger('app')
|
||||||
|
|
||||||
|
@ -1,13 +1,14 @@
|
|||||||
# -*- 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 ui.main_screen_widgets import *
|
from ui.group_bans_widgets import *
|
||||||
from ui.menu import *
|
|
||||||
from ui.groups_widgets import *
|
|
||||||
from ui.peer_screen import *
|
|
||||||
from ui.self_peer_screen import *
|
|
||||||
from ui.group_invites_widgets import *
|
from ui.group_invites_widgets import *
|
||||||
from ui.group_settings_widgets import *
|
from ui.group_settings_widgets import *
|
||||||
from ui.group_bans_widgets import *
|
from ui.groups_widgets import *
|
||||||
|
from ui.main_screen_widgets import *
|
||||||
|
from ui.menu import *
|
||||||
|
from ui.peer_screen import *
|
||||||
from ui.profile_settings_screen import ProfileSettings
|
from ui.profile_settings_screen import ProfileSettings
|
||||||
|
from ui.self_peer_screen import *
|
||||||
|
|
||||||
|
|
||||||
class WidgetsFactory:
|
class WidgetsFactory:
|
||||||
|
|
||||||
|
@ -1,14 +1,17 @@
|
|||||||
# -*- 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 -*-
|
||||||
import utils.util as util
|
|
||||||
import utils.ui as util_ui
|
|
||||||
import os
|
import os
|
||||||
import platform
|
import platform
|
||||||
import urllib
|
|
||||||
from PyQt5 import QtNetwork, QtCore
|
|
||||||
import subprocess
|
import subprocess
|
||||||
|
import urllib
|
||||||
|
|
||||||
|
from PyQt5 import QtCore, QtNetwork
|
||||||
|
|
||||||
|
import utils.ui as util_ui
|
||||||
|
import utils.util as util
|
||||||
|
|
||||||
global LOG
|
global LOG
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
LOG = logging.getLogger('app.'+__name__)
|
LOG = logging.getLogger('app.'+__name__)
|
||||||
log = lambda x: LOG.info(x)
|
log = lambda x: LOG.info(x)
|
||||||
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import os.path
|
import os.path
|
||||||
|
|
||||||
from utils.util import get_profile_name_from_path, join_path
|
from utils.util import get_profile_name_from_path, join_path
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
# -*- 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 -*-
|
||||||
import utils.util as util
|
|
||||||
import os
|
import os
|
||||||
|
|
||||||
from user_data.settings import Settings
|
import utils.util as util
|
||||||
from common.event import Event
|
from common.event import Event
|
||||||
from user_data.settings import get_user_config_path
|
from user_data.settings import Settings, get_user_config_path
|
||||||
|
|
||||||
global LOG
|
global LOG
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
LOG = logging.getLogger('app.'+__name__)
|
LOG = logging.getLogger('app.'+__name__)
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,20 +1,22 @@
|
|||||||
# -*- 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 -*-
|
||||||
|
|
||||||
|
import json
|
||||||
import os
|
import os
|
||||||
from platform import system
|
from platform import system
|
||||||
import json
|
|
||||||
from pprint import pprint
|
from pprint import pprint
|
||||||
|
|
||||||
from utils.util import *
|
import wrapper_tests.support_testing as ts
|
||||||
from utils.util import log, join_path
|
|
||||||
from common.event import Event
|
import user_data
|
||||||
import utils.ui as util_ui
|
import utils.ui as util_ui
|
||||||
import utils.util as util_utils
|
import utils.util as util_utils
|
||||||
import user_data
|
from common.event import Event
|
||||||
import wrapper_tests.support_testing as ts
|
from utils.util import *
|
||||||
|
from utils.util import join_path, log
|
||||||
|
|
||||||
global LOG
|
global LOG
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
LOG = logging.getLogger('settings')
|
LOG = logging.getLogger('settings')
|
||||||
|
|
||||||
def merge_args_into_settings(args, settings):
|
def merge_args_into_settings(args, settings):
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
from PyQt5 import QtWidgets
|
from PyQt5 import QtWidgets
|
||||||
|
|
||||||
import utils.util as util
|
import utils.util as util
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
# -*- 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 -*-
|
||||||
|
import datetime
|
||||||
import os
|
import os
|
||||||
import time
|
import platform
|
||||||
|
import re
|
||||||
import shutil
|
import shutil
|
||||||
import sys
|
import sys
|
||||||
import re
|
import time
|
||||||
import platform
|
|
||||||
import datetime
|
|
||||||
|
|
||||||
|
|
||||||
def cached(func):
|
def cached(func):
|
||||||
|
@ -3,13 +3,13 @@ from ctypes import *
|
|||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from wrapper.toxcore_enums_and_consts import *
|
|
||||||
from wrapper.toxav import ToxAV
|
|
||||||
from wrapper.libtox import LibToxCore
|
from wrapper.libtox import LibToxCore
|
||||||
|
from wrapper.toxav import ToxAV
|
||||||
|
from wrapper.toxcore_enums_and_consts import *
|
||||||
except:
|
except:
|
||||||
from toxcore_enums_and_consts import *
|
|
||||||
from toxav import ToxAV
|
|
||||||
from libtox import LibToxCore
|
from libtox import LibToxCore
|
||||||
|
from toxav import ToxAV
|
||||||
|
from toxcore_enums_and_consts import *
|
||||||
|
|
||||||
def LOG_ERROR(a): print('EROR> '+a)
|
def LOG_ERROR(a): print('EROR> '+a)
|
||||||
def LOG_WARN(a): print('WARN> '+a)
|
def LOG_WARN(a): print('WARN> '+a)
|
||||||
|
@ -1,11 +1,13 @@
|
|||||||
# -*- 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 ctypes import c_int, POINTER, c_void_p, byref, ArgumentError, c_uint32, CFUNCTYPE, c_size_t, c_uint8, c_uint16
|
from ctypes import (CFUNCTYPE, POINTER, ArgumentError, byref, c_bool, c_char_p,
|
||||||
from ctypes import c_char_p, c_int32, c_bool, cast
|
c_int, c_int32, c_size_t, c_uint8, c_uint16, c_uint32,
|
||||||
|
c_void_p, cast)
|
||||||
|
|
||||||
from wrapper.libtox import LibToxAV
|
from wrapper.libtox import LibToxAV
|
||||||
from wrapper.toxav_enums import *
|
from wrapper.toxav_enums import *
|
||||||
|
|
||||||
|
|
||||||
def LOG_ERROR(a): print('EROR> '+a)
|
def LOG_ERROR(a): print('EROR> '+a)
|
||||||
def LOG_WARN(a): print('WARN> '+a)
|
def LOG_WARN(a): print('WARN> '+a)
|
||||||
def LOG_INFO(a): print('INFO> '+a)
|
def LOG_INFO(a): print('INFO> '+a)
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
# -*- 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 ctypes import c_size_t, create_string_buffer, byref, c_int, ArgumentError, c_char_p, c_bool
|
from ctypes import (ArgumentError, byref, c_bool, c_char_p, c_int, c_size_t,
|
||||||
|
create_string_buffer)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from wrapper import libtox
|
from wrapper import libtox
|
||||||
|
Loading…
Reference in New Issue
Block a user