pip3 version

This commit is contained in:
ingvar1995 2016-07-06 16:25:04 +03:00
parent 1c788a73c6
commit 8672c5fb56
1301 changed files with 130 additions and 81 deletions

12
.gitignore vendored
View file

@ -1,23 +1,23 @@
*.pyc *.pyc
*.pyo *.pyo
*.ui *.ui
src/toxcore toxygen/toxcore
tests/tests tests/tests
tests/libs tests/libs
tests/.cache tests/.cache
tests/__pycache__ tests/__pycache__
src/libs toxygen/libs
.idea .idea
*~ *~
*.iml *.iml
*.so *.so
*.log *.log
src/build toxygen/build
src/dist toxygen/dist
*.spec *.spec
dist/ dist/
/src/avatars toxygen/avatars
src/__pycache__ toxygen/__pycache__
/*.egg-info /*.egg-info
/*.egg /*.egg

View file

@ -1,17 +1,18 @@
include src/images/*.png include toxygen/images/*.png
include src/images/*.ico include toxygen/images/*.ico
include src/images/*.gif include toxygen/images/*.gif
include src/sounds/*.wav include toxygen/sounds/*.wav
include src/stickers/tox/*.png include toxygen/stickers/tox/*.png
include src/smileys/default/*.png include toxygen/smileys/default/*.png
include src/smileys/default/config.json include toxygen/smileys/default/config.json
include src/smileys/animated/*.gif include toxygen/smileys/animated/*.gif
include src/smileys/animated/config.json include toxygen/smileys/animated/config.json
include src/smileys/starwars/*.gif include toxygen/smileys/starwars/*.gif
include src/smileys/starwars/*.png include toxygen/smileys/starwars/*.png
include src/smileys/starwars/config.json include toxygen/smileys/starwars/config.json
include src/styles/style.qss include toxygen/styles/style.qss
include src/translations/*.qm include toxygen/translations/*.qm
include src/libs/libtox.dll include toxygen/libs/libtox.dll
include src/libs/libsodium.a include toxygen/libs/libsodium.a
include toxygen/libs/libtox64.dll
include toxygen/libs/libsodium64.a

View file

@ -1,43 +1,50 @@
from setuptools import setup from setuptools import setup
from setuptools.command.install import install from setuptools.command.install import install
from platform import system from platform import system
from ctypes import CDLL from subprocess import call
from toxygen.util import program_version
class DownloadScript(install): version = program_version + '.0'
MODULES = ['PyAudio', 'PySocks']
if system() == 'Windows':
MODULES.append('PySide')
class InstallScript(install):
"""Install all required libs""" """Install all required libs"""
def run(self): def run(self):
OS = system()
if OS == 'Linux': # install libtoxcore
try:
libtoxcore = CDLL('libtoxcore.so')
libtoxencryptsave = CDLL('libtoxencryptsave.so')
libtoxav = CDLL('libtoxav.so')
except: # toxcore is not installed
pass
install.run(self) install.run(self)
OS = system()
if OS == 'Windows':
call(["toxygen", "--configure"])
elif OS == 'Linux':
call(["toxygen", "--clean"])
setup(name='Toxygen', setup(name='Toxygen',
version='0.2.1.50', version=version,
description='Toxygen - Tox client', description='Toxygen - Tox client',
long_description='Toxygen is powerful Tox client written in Python3', long_description='Toxygen is powerful Tox client written in Python3',
url='https://github.com/xveduk/toxygen/', url='https://github.com/xveduk/toxygen/',
keywords='toxygen tox', keywords='toxygen tox',
author='Ingvar', author='Ingvar',
license='GPL3', license='GPL3',
package_dir={'': 'src'}, packages=['toxygen', 'toxygen.plugins', 'toxygen.styles'],
packages=['', 'plugins', 'styles'], install_requires=MODULES,
install_requires=['PyAudio', 'PySide', 'PySocks'],
include_package_data=True, include_package_data=True,
classifiers=[ classifiers=[
'Programming Language :: Python :: 3 :: Only', 'Programming Language :: Python :: 3 :: Only',
'Programming Language :: Python :: 3.2',
'Programming Language :: Python :: 3.3', 'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.4',
], ],
entry_points={ entry_points={
'console_scripts': ['toxygen=main:main'], 'console_scripts': ['toxygen=toxygen.main:main'],
}, },
cmdclass={ cmdclass={
'install': DownloadScript, 'install': InstallScript,
}, },
) )

View file

View file

@ -1,8 +1,8 @@
from src.bootstrap import node_generator from toxygen.bootstrap import node_generator
from src.profile_ import * from toxygen.profile import *
from src.settings import ProfileHelper from toxygen.settings import ProfileHelper
from src.tox_dns import tox_dns from toxygen.tox_dns import tox_dns
import src.toxencryptsave as encr import toxygen.toxencryptsave as encr
class TestProfile: class TestProfile:

8
toxygen/__init__.py Normal file
View file

@ -0,0 +1,8 @@
import os
import sys
path = os.path.dirname(os.path.realpath(__file__)) # curr dir
sys.path.insert(0, os.path.join(path, 'styles'))
sys.path.insert(0, os.path.join(path, 'plugins'))
sys.path.insert(0, path)

View file

@ -3,7 +3,7 @@ try:
except ImportError: except ImportError:
from PyQt4 import QtCore, QtGui from PyQt4 import QtCore, QtGui
import widgets import widgets
import profile_ import profile
import util import util
import pyaudio import pyaudio
import wave import wave
@ -54,7 +54,7 @@ class IncomingCallWidget(widgets.CenteredWidget):
self.setWindowTitle(text) self.setWindowTitle(text)
self.name.setText(name) self.name.setText(name)
self.call_type.setText(text) self.call_type.setText(text)
pr = profile_.Profile.get_instance() pr = profile.Profile.get_instance()
self.accept_audio.clicked.connect(lambda: pr.accept_call(friend_number, True, False) or self.stop()) self.accept_audio.clicked.connect(lambda: pr.accept_call(friend_number, True, False) or self.stop())
# self.accept_video.clicked.connect(lambda: pr.start_call(friend_number, True, True)) # self.accept_video.clicked.connect(lambda: pr.start_call(friend_number, True, True))
self.decline.clicked.connect(lambda: pr.stop_call(friend_number, False) or self.stop()) self.decline.clicked.connect(lambda: pr.stop_call(friend_number, False) or self.stop())

View file

@ -4,7 +4,7 @@ except ImportError:
from PyQt4 import QtCore from PyQt4 import QtCore
from notifications import * from notifications import *
from settings import Settings from settings import Settings
from profile_ import Profile from profile import Profile
from toxcore_enums_and_consts import * from toxcore_enums_and_consts import *
from toxav_enums import * from toxav_enums import *
from tox import bin_to_string from tox import bin_to_string

View file

Before

Width:  |  Height:  |  Size: 114 KiB

After

Width:  |  Height:  |  Size: 114 KiB

View file

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

View file

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

View file

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

View file

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

View file

Before

Width:  |  Height:  |  Size: 329 B

After

Width:  |  Height:  |  Size: 329 B

View file

Before

Width:  |  Height:  |  Size: 609 B

After

Width:  |  Height:  |  Size: 609 B

View file

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

View file

Before

Width:  |  Height:  |  Size: 118 KiB

After

Width:  |  Height:  |  Size: 118 KiB

View file

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View file

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

View file

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

View file

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 41 KiB

View file

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

View file

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

View file

Before

Width:  |  Height:  |  Size: 231 B

After

Width:  |  Height:  |  Size: 231 B

View file

Before

Width:  |  Height:  |  Size: 405 B

After

Width:  |  Height:  |  Size: 405 B

View file

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

View file

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

View file

Before

Width:  |  Height:  |  Size: 159 B

After

Width:  |  Height:  |  Size: 159 B

View file

Before

Width:  |  Height:  |  Size: 445 B

After

Width:  |  Height:  |  Size: 445 B

View file

Before

Width:  |  Height:  |  Size: 201 B

After

Width:  |  Height:  |  Size: 201 B

View file

Before

Width:  |  Height:  |  Size: 351 B

After

Width:  |  Height:  |  Size: 351 B

View file

Before

Width:  |  Height:  |  Size: 306 B

After

Width:  |  Height:  |  Size: 306 B

View file

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

View file

Before

Width:  |  Height:  |  Size: 481 B

After

Width:  |  Height:  |  Size: 481 B

View file

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

View file

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View file

Before

Width:  |  Height:  |  Size: 5.6 KiB

After

Width:  |  Height:  |  Size: 5.6 KiB

View file

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

View file

Before

Width:  |  Height:  |  Size: 94 KiB

After

Width:  |  Height:  |  Size: 94 KiB

View file

Before

Width:  |  Height:  |  Size: 5.6 KiB

After

Width:  |  Height:  |  Size: 5.6 KiB

View file

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

View file

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

View file

@ -3,7 +3,7 @@ try:
from PySide import QtCore, QtGui from PySide import QtCore, QtGui
except ImportError: except ImportError:
from PyQt4 import QtCore, QtGui from PyQt4 import QtCore, QtGui
import profile_ import profile
from file_transfers import TOX_FILE_TRANSFER_STATE, PAUSED_FILE_TRANSFERS, DO_NOT_SHOW_ACCEPT_BUTTON, ACTIVE_FILE_TRANSFERS, SHOW_PROGRESS_BAR from file_transfers import TOX_FILE_TRANSFER_STATE, PAUSED_FILE_TRANSFERS, DO_NOT_SHOW_ACCEPT_BUTTON, ACTIVE_FILE_TRANSFERS, SHOW_PROGRESS_BAR
from util import curr_directory, convert_time, curr_time from util import curr_directory, convert_time, curr_time
from widgets import DataLabel, create_menu from widgets import DataLabel, create_menu
@ -339,7 +339,7 @@ class FileTransferItem(QtGui.QListWidget):
self.paused = False self.paused = False
def cancel_transfer(self, friend_number, file_number): def cancel_transfer(self, friend_number, file_number):
pr = profile_.Profile.get_instance() pr = profile.Profile.get_instance()
pr.cancel_transfer(friend_number, file_number) pr.cancel_transfer(friend_number, file_number)
self.setStyleSheet('QListWidget { border: 1px solid #B40404; }') self.setStyleSheet('QListWidget { border: 1px solid #B40404; }')
self.cancel.setVisible(False) self.cancel.setVisible(False)
@ -354,18 +354,18 @@ class FileTransferItem(QtGui.QListWidget):
QtGui.QFileDialog.ShowDirsOnly | QtGui.QFileDialog.DontUseNativeDialog) QtGui.QFileDialog.ShowDirsOnly | QtGui.QFileDialog.DontUseNativeDialog)
self.pb.setVisible(True) self.pb.setVisible(True)
if directory: if directory:
pr = profile_.Profile.get_instance() pr = profile.Profile.get_instance()
pr.accept_transfer(self, directory + '/' + self.saved_name, friend_number, file_number, size) pr.accept_transfer(self, directory + '/' + self.saved_name, friend_number, file_number, size)
self.button_update('pause') self.button_update('pause')
elif self.state == TOX_FILE_TRANSFER_STATE['PAUSED_BY_USER']: # resume elif self.state == TOX_FILE_TRANSFER_STATE['PAUSED_BY_USER']: # resume
self.paused = False self.paused = False
profile_.Profile.get_instance().resume_transfer(friend_number, file_number) profile.Profile.get_instance().resume_transfer(friend_number, file_number)
self.button_update('pause') self.button_update('pause')
self.state = TOX_FILE_TRANSFER_STATE['RUNNING'] self.state = TOX_FILE_TRANSFER_STATE['RUNNING']
else: # pause else: # pause
self.paused = True self.paused = True
self.state = TOX_FILE_TRANSFER_STATE['PAUSED_BY_USER'] self.state = TOX_FILE_TRANSFER_STATE['PAUSED_BY_USER']
profile_.Profile.get_instance().pause_transfer(friend_number, file_number) profile.Profile.get_instance().pause_transfer(friend_number, file_number)
self.button_update('resume') self.button_update('resume')
self.accept_or_pause.clearFocus() self.accept_or_pause.clearFocus()
@ -435,7 +435,7 @@ class UnsentFileItem(FileTransferItem):
movie.start() movie.start()
def cancel_transfer(self, *args): def cancel_transfer(self, *args):
pr = profile_.Profile.get_instance() pr = profile.Profile.get_instance()
pr.cancel_not_started_transfer(self._time) pr.cancel_not_started_transfer(self._time)

View file

@ -1,6 +1,6 @@
import sys import sys
from loginscreen import LoginScreen from loginscreen import LoginScreen
import profile_ import profile
from settings import * from settings import *
try: try:
from PySide import QtCore, QtGui from PySide import QtCore, QtGui
@ -66,7 +66,7 @@ class Toxygen:
if encrypt_save.is_data_encrypted(data): if encrypt_save.is_data_encrypted(data):
data = self.enter_pass(data) data = self.enter_pass(data)
settings = Settings(name) settings = Settings(name)
self.tox = profile_.tox_factory(data, settings) self.tox = profile.tox_factory(data, settings)
else: else:
auto_profile = Settings.get_auto_profile() auto_profile = Settings.get_auto_profile()
if not auto_profile[0]: if not auto_profile[0]:
@ -94,7 +94,7 @@ class Toxygen:
elif _login.t == 1: # create new profile elif _login.t == 1: # create new profile
_login.name = _login.name.strip() _login.name = _login.name.strip()
name = _login.name if _login.name else 'toxygen_user' name = _login.name if _login.name else 'toxygen_user'
self.tox = profile_.tox_factory() self.tox = profile.tox_factory()
self.tox.self_set_name(bytes(_login.name, 'utf-8') if _login.name else b'Toxygen User') self.tox.self_set_name(bytes(_login.name, 'utf-8') if _login.name else b'Toxygen User')
self.tox.self_set_status_message(b'Toxing on Toxygen') self.tox.self_set_status_message(b'Toxing on Toxygen')
ProfileHelper(Settings.get_default_path(), name).save_profile(self.tox.get_savedata()) ProfileHelper(Settings.get_default_path(), name).save_profile(self.tox.get_savedata())
@ -111,14 +111,14 @@ class Toxygen:
if encrypt_save.is_data_encrypted(data): if encrypt_save.is_data_encrypted(data):
data = self.enter_pass(data) data = self.enter_pass(data)
settings = Settings(name) settings = Settings(name)
self.tox = profile_.tox_factory(data, settings) self.tox = profile.tox_factory(data, settings)
else: else:
path, name = auto_profile path, name = auto_profile
data = ProfileHelper(path, name).open_profile() data = ProfileHelper(path, name).open_profile()
if encrypt_save.is_data_encrypted(data): if encrypt_save.is_data_encrypted(data):
data = self.enter_pass(data) data = self.enter_pass(data)
settings = Settings(name) settings = Settings(name)
self.tox = profile_.tox_factory(data, settings) self.tox = profile.tox_factory(data, settings)
if Settings.is_active_profile(path, name): # profile is in use if Settings.is_active_profile(path, name): # profile is in use
reply = QtGui.QMessageBox.question(None, reply = QtGui.QMessageBox.question(None,
@ -146,12 +146,12 @@ class Toxygen:
class Menu(QtGui.QMenu): class Menu(QtGui.QMenu):
def newStatus(self, status): def newStatus(self, status):
profile_.Profile.get_instance().set_status(status) profile.Profile.get_instance().set_status(status)
self.aboutToShow() self.aboutToShow()
self.hide() self.hide()
def aboutToShow(self): def aboutToShow(self):
status = profile_.Profile.get_instance().status status = profile.Profile.get_instance().status
act = self.act act = self.act
if status is None or Settings.get_instance().locked: if status is None or Settings.get_instance().locked:
self.actions()[1].setVisible(False) self.actions()[1].setVisible(False)
@ -255,7 +255,7 @@ class Toxygen:
ProfileHelper.get_instance().save_profile(data) ProfileHelper.get_instance().save_profile(data)
del self.tox del self.tox
# create new tox instance # create new tox instance
self.tox = profile_.tox_factory(data, Settings.get_instance()) self.tox = profile.tox_factory(data, Settings.get_instance())
# init thread # init thread
self.init = self.InitThread(self.tox, self.ms, self.tray) self.init = self.InitThread(self.tox, self.ms, self.tray)
self.init.start() self.init.start()
@ -354,6 +354,33 @@ class Toxygen:
return self.arr[self.num] return self.arr[self.num]
def clean():
d = curr_directory() + '/libs/'
for fl in ('libtox64.dll', 'libtox.dll', 'libsodium64.a', 'libsodium.a'):
if os.path.exists(d + fl):
os.remove(d + fl)
def configure():
d = curr_directory() + '/libs/'
is_64bits = sys.maxsize > 2 ** 32
if not is_64bits:
if os.path.exists(d + 'libtox64.dll'):
os.remove(d + 'libtox64.dll')
if os.path.exists(d + 'libsodium64.a'):
os.remove(d + 'libsodium64.a')
else:
if os.path.exists(d + 'libtox.dll'):
os.remove(d + 'libtox.dll')
if os.path.exists(d + 'libsodium.a'):
os.remove(d + 'libsodium.a')
try:
os.rename(d + 'libtox64.dll', d + 'libtox.dll')
os.rename(d + 'libsodium64.a', d + 'libsodium.a')
except:
pass
def main(): def main():
if len(sys.argv) == 1: if len(sys.argv) == 1:
toxygen = Toxygen() toxygen = Toxygen()
@ -365,6 +392,12 @@ def main():
elif arg == '--help': elif arg == '--help':
print('Usage:\ntoxygen path_to_profile\ntoxygen tox_id\ntoxygen --version') print('Usage:\ntoxygen path_to_profile\ntoxygen tox_id\ntoxygen --version')
return return
elif arg == '--configure':
configure()
return
elif arg == '--clean':
clean()
return
else: else:
toxygen = Toxygen(arg) toxygen = Toxygen(arg)
toxygen.main() toxygen.main()

View file

@ -1,7 +1,7 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
from menu import * from menu import *
from profile_ import * from profile import *
from list_items import * from list_items import *
from widgets import MultilineEdit, LineEdit from widgets import MultilineEdit, LineEdit
import plugin_support import plugin_support
@ -38,8 +38,8 @@ class MainWindow(QtGui.QMainWindow):
self.actionAdd_friend = QtGui.QAction(MainWindow) self.actionAdd_friend = QtGui.QAction(MainWindow)
self.actionAdd_friend.setObjectName("actionAdd_friend") self.actionAdd_friend.setObjectName("actionAdd_friend")
self.actionProfile_settings = QtGui.QAction(MainWindow) self.actionprofilesettings = QtGui.QAction(MainWindow)
self.actionProfile_settings.setObjectName("actionProfile_settings") self.actionprofilesettings.setObjectName("actionprofilesettings")
self.actionPrivacy_settings = QtGui.QAction(MainWindow) self.actionPrivacy_settings = QtGui.QAction(MainWindow)
self.actionPrivacy_settings.setObjectName("actionPrivacy_settings") self.actionPrivacy_settings.setObjectName("actionPrivacy_settings")
self.actionInterface_settings = QtGui.QAction(MainWindow) self.actionInterface_settings = QtGui.QAction(MainWindow)
@ -73,7 +73,7 @@ class MainWindow(QtGui.QMainWindow):
self.actionAbout_program.triggered.connect(self.about_program) self.actionAbout_program.triggered.connect(self.about_program)
self.actionNetwork.triggered.connect(self.network_settings) self.actionNetwork.triggered.connect(self.network_settings)
self.actionAdd_friend.triggered.connect(self.add_contact) self.actionAdd_friend.triggered.connect(self.add_contact)
self.actionSettings.triggered.connect(self.profile_settings) self.actionSettings.triggered.connect(self.profilesettings)
self.actionPrivacy_settings.triggered.connect(self.privacy_settings) self.actionPrivacy_settings.triggered.connect(self.privacy_settings)
self.actionInterface_settings.triggered.connect(self.interface_settings) self.actionInterface_settings.triggered.connect(self.interface_settings)
self.actionNotifications.triggered.connect(self.notification_settings) self.actionNotifications.triggered.connect(self.notification_settings)
@ -98,7 +98,7 @@ class MainWindow(QtGui.QMainWindow):
self.menuSettings.setTitle(QtGui.QApplication.translate("MainWindow", "Settings", None, QtGui.QApplication.UnicodeUTF8)) self.menuSettings.setTitle(QtGui.QApplication.translate("MainWindow", "Settings", None, QtGui.QApplication.UnicodeUTF8))
self.menuAbout.setTitle(QtGui.QApplication.translate("MainWindow", "About", None, QtGui.QApplication.UnicodeUTF8)) self.menuAbout.setTitle(QtGui.QApplication.translate("MainWindow", "About", None, QtGui.QApplication.UnicodeUTF8))
self.actionAdd_friend.setText(QtGui.QApplication.translate("MainWindow", "Add contact", None, QtGui.QApplication.UnicodeUTF8)) self.actionAdd_friend.setText(QtGui.QApplication.translate("MainWindow", "Add contact", None, QtGui.QApplication.UnicodeUTF8))
self.actionProfile_settings.setText(QtGui.QApplication.translate("MainWindow", "Profile", None, QtGui.QApplication.UnicodeUTF8)) self.actionprofilesettings.setText(QtGui.QApplication.translate("MainWindow", "Profile", None, QtGui.QApplication.UnicodeUTF8))
self.actionPrivacy_settings.setText(QtGui.QApplication.translate("MainWindow", "Privacy", None, QtGui.QApplication.UnicodeUTF8)) self.actionPrivacy_settings.setText(QtGui.QApplication.translate("MainWindow", "Privacy", None, QtGui.QApplication.UnicodeUTF8))
self.actionInterface_settings.setText(QtGui.QApplication.translate("MainWindow", "Interface", None, QtGui.QApplication.UnicodeUTF8)) self.actionInterface_settings.setText(QtGui.QApplication.translate("MainWindow", "Interface", None, QtGui.QApplication.UnicodeUTF8))
self.actionNotifications.setText(QtGui.QApplication.translate("MainWindow", "Notifications", None, QtGui.QApplication.UnicodeUTF8)) self.actionNotifications.setText(QtGui.QApplication.translate("MainWindow", "Notifications", None, QtGui.QApplication.UnicodeUTF8))
@ -189,9 +189,9 @@ class MainWindow(QtGui.QMainWindow):
Form.status_message.setObjectName("status_message") Form.status_message.setObjectName("status_message")
self.connection_status = Form.connection_status = StatusCircle(Form) self.connection_status = Form.connection_status = StatusCircle(Form)
Form.connection_status.setGeometry(QtCore.QRect(230, 35, 32, 32)) Form.connection_status.setGeometry(QtCore.QRect(230, 35, 32, 32))
self.avatar_label.mouseReleaseEvent = self.profile_settings self.avatar_label.mouseReleaseEvent = self.profilesettings
self.status_message.mouseReleaseEvent = self.profile_settings self.status_message.mouseReleaseEvent = self.profilesettings
self.name.mouseReleaseEvent = self.profile_settings self.name.mouseReleaseEvent = self.profilesettings
self.connection_status.raise_() self.connection_status.raise_()
Form.connection_status.setObjectName("connection_status") Form.connection_status.setObjectName("connection_status")
@ -373,7 +373,7 @@ class MainWindow(QtGui.QMainWindow):
self.a_c = AddContact(link) self.a_c = AddContact(link)
self.a_c.show() self.a_c.show()
def profile_settings(self, *args): def profilesettings(self, *args):
self.p_s = ProfileSettings() self.p_s = ProfileSettings()
self.p_s.show() self.p_s.show()

View file

@ -3,7 +3,7 @@ try:
except ImportError: except ImportError:
from PyQt4 import QtCore, QtGui from PyQt4 import QtCore, QtGui
from widgets import RubberBand, create_menu, QRightClickButton, CenteredWidget from widgets import RubberBand, create_menu, QRightClickButton, CenteredWidget
from profile_ import Profile from profile import Profile
import smileys import smileys
import util import util

View file

@ -3,7 +3,7 @@ try:
except ImportError: except ImportError:
from PyQt4 import QtCore, QtGui from PyQt4 import QtCore, QtGui
from settings import * from settings import *
from profile_ import Profile from profile import Profile
from util import curr_directory from util import curr_directory
from widgets import CenteredWidget, DataLabel, LineEdit from widgets import CenteredWidget, DataLabel, LineEdit
import pyaudio import pyaudio
@ -131,10 +131,10 @@ class ProfileSettings(CenteredWidget):
self.delete_avatar.setGeometry(QtCore.QRect(420, 300, 180, 30)) self.delete_avatar.setGeometry(QtCore.QRect(420, 300, 180, 30))
self.delete_avatar.clicked.connect(self.reset_avatar) self.delete_avatar.clicked.connect(self.reset_avatar)
self.new_avatar.clicked.connect(self.set_avatar) self.new_avatar.clicked.connect(self.set_avatar)
self.profile_pass = QtGui.QLabel(self) self.profilepass = QtGui.QLabel(self)
self.profile_pass.setGeometry(QtCore.QRect(40, 340, 300, 30)) self.profilepass.setGeometry(QtCore.QRect(40, 340, 300, 30))
font.setPointSize(18) font.setPointSize(18)
self.profile_pass.setFont(font) self.profilepass.setFont(font)
self.password = LineEdit(self) self.password = LineEdit(self)
self.password.setGeometry(QtCore.QRect(40, 380, 300, 30)) self.password.setGeometry(QtCore.QRect(40, 380, 300, 30))
self.password.setEchoMode(QtGui.QLineEdit.EchoMode.Password) self.password.setEchoMode(QtGui.QLineEdit.EchoMode.Password)
@ -175,7 +175,7 @@ class ProfileSettings(CenteredWidget):
self.new_avatar.setText(QtGui.QApplication.translate("ProfileSettingsForm", "New avatar", None, QtGui.QApplication.UnicodeUTF8)) self.new_avatar.setText(QtGui.QApplication.translate("ProfileSettingsForm", "New avatar", None, QtGui.QApplication.UnicodeUTF8))
self.delete_avatar.setText(QtGui.QApplication.translate("ProfileSettingsForm", "Reset avatar", None, QtGui.QApplication.UnicodeUTF8)) self.delete_avatar.setText(QtGui.QApplication.translate("ProfileSettingsForm", "Reset avatar", None, QtGui.QApplication.UnicodeUTF8))
self.new_nospam.setText(QtGui.QApplication.translate("ProfileSettingsForm", "New NoSpam", None, QtGui.QApplication.UnicodeUTF8)) self.new_nospam.setText(QtGui.QApplication.translate("ProfileSettingsForm", "New NoSpam", None, QtGui.QApplication.UnicodeUTF8))
self.profile_pass.setText(QtGui.QApplication.translate("ProfileSettingsForm", "Profile password", None, QtGui.QApplication.UnicodeUTF8)) self.profilepass.setText(QtGui.QApplication.translate("ProfileSettingsForm", "Profile password", None, QtGui.QApplication.UnicodeUTF8))
self.password.setPlaceholderText(QtGui.QApplication.translate("ProfileSettingsForm", "Password (at least 8 symbols)", None, QtGui.QApplication.UnicodeUTF8)) self.password.setPlaceholderText(QtGui.QApplication.translate("ProfileSettingsForm", "Password (at least 8 symbols)", None, QtGui.QApplication.UnicodeUTF8))
self.confirm_password.setPlaceholderText(QtGui.QApplication.translate("ProfileSettingsForm", "Confirm password", None, QtGui.QApplication.UnicodeUTF8)) self.confirm_password.setPlaceholderText(QtGui.QApplication.translate("ProfileSettingsForm", "Confirm password", None, QtGui.QApplication.UnicodeUTF8))
self.set_password.setText(QtGui.QApplication.translate("ProfileSettingsForm", "Set password", None, QtGui.QApplication.UnicodeUTF8)) self.set_password.setText(QtGui.QApplication.translate("ProfileSettingsForm", "Set password", None, QtGui.QApplication.UnicodeUTF8))

View file

@ -1,5 +1,5 @@
import util import util
import profile_ import profile
import os import os
import importlib import importlib
import inspect import inspect
@ -12,7 +12,7 @@ class PluginLoader(util.Singleton):
def __init__(self, tox, settings): def __init__(self, tox, settings):
super().__init__() super().__init__()
self._profile = profile_.Profile.get_instance() self._profile = profile.Profile.get_instance()
self._settings = settings self._settings = settings
self._plugins = {} # dict. key - plugin unique short name, value - tuple (plugin instance, is active) self._plugins = {} # dict. key - plugin unique short name, value - tuple (plugin instance, is active)
self._tox = tox self._tox = tox

View file

@ -182,8 +182,8 @@ class Settings(dict, Singleton):
app_settings = {} app_settings = {}
if 'active_profile' not in app_settings: if 'active_profile' not in app_settings:
app_settings['active_profile'] = [] app_settings['active_profile'] = []
profile_path = ProfileHelper.get_path() profilepath = ProfileHelper.get_path()
app_settings['active_profile'].append(str(profile_path + str(self.name) + '.tox')) app_settings['active_profile'].append(str(profilepath + str(self.name) + '.tox'))
data = json.dumps(app_settings) data = json.dumps(app_settings)
with open(path, 'w') as fl: with open(path, 'w') as fl:
fl.write(data) fl.write(data)

View file

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

View file

Before

Width:  |  Height:  |  Size: 7.6 KiB

After

Width:  |  Height:  |  Size: 7.6 KiB

View file

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

View file

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 2.1 KiB

View file

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

View file

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

View file

Before

Width:  |  Height:  |  Size: 6.9 KiB

After

Width:  |  Height:  |  Size: 6.9 KiB

View file

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

View file

Before

Width:  |  Height:  |  Size: 6.6 KiB

After

Width:  |  Height:  |  Size: 6.6 KiB

View file

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

View file

Before

Width:  |  Height:  |  Size: 7.6 KiB

After

Width:  |  Height:  |  Size: 7.6 KiB

View file

Before

Width:  |  Height:  |  Size: 7.2 KiB

After

Width:  |  Height:  |  Size: 7.2 KiB

View file

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

View file

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View file

Before

Width:  |  Height:  |  Size: 9.8 KiB

After

Width:  |  Height:  |  Size: 9.8 KiB

View file

Before

Width:  |  Height:  |  Size: 6.9 KiB

After

Width:  |  Height:  |  Size: 6.9 KiB

View file

Before

Width:  |  Height:  |  Size: 6 KiB

After

Width:  |  Height:  |  Size: 6 KiB

View file

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB

View file

Before

Width:  |  Height:  |  Size: 7.7 KiB

After

Width:  |  Height:  |  Size: 7.7 KiB

View file

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

View file

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

View file

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

View file

Before

Width:  |  Height:  |  Size: 7.7 KiB

After

Width:  |  Height:  |  Size: 7.7 KiB

View file

Before

Width:  |  Height:  |  Size: 8.9 KiB

After

Width:  |  Height:  |  Size: 8.9 KiB

View file

Before

Width:  |  Height:  |  Size: 6.7 KiB

After

Width:  |  Height:  |  Size: 6.7 KiB

View file

Before

Width:  |  Height:  |  Size: 4.1 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

View file

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB

View file

Before

Width:  |  Height:  |  Size: 6.6 KiB

After

Width:  |  Height:  |  Size: 6.6 KiB

View file

Before

Width:  |  Height:  |  Size: 868 B

After

Width:  |  Height:  |  Size: 868 B

View file

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View file

Before

Width:  |  Height:  |  Size: 7.8 KiB

After

Width:  |  Height:  |  Size: 7.8 KiB

View file

Before

Width:  |  Height:  |  Size: 1,010 B

After

Width:  |  Height:  |  Size: 1,010 B

View file

Before

Width:  |  Height:  |  Size: 4.9 KiB

After

Width:  |  Height:  |  Size: 4.9 KiB

View file

Before

Width:  |  Height:  |  Size: 6.4 KiB

After

Width:  |  Height:  |  Size: 6.4 KiB

View file

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View file

Before

Width:  |  Height:  |  Size: 5.3 KiB

After

Width:  |  Height:  |  Size: 5.3 KiB

Some files were not shown because too many files have changed in this diff Show more