menu update, test update
This commit is contained in:
parent
98aa10b7e0
commit
4957d7ce09
2 changed files with 11 additions and 3 deletions
|
@ -1,5 +1,6 @@
|
||||||
from PySide import QtCore, QtGui
|
from PySide import QtCore, QtGui
|
||||||
from settings import Settings
|
from settings import Settings
|
||||||
|
from util import bin_to_string
|
||||||
|
|
||||||
|
|
||||||
class AddContact(QtGui.QWidget):
|
class AddContact(QtGui.QWidget):
|
||||||
|
@ -102,8 +103,7 @@ class ProfileSettings(QtGui.QWidget):
|
||||||
font.setBold(True)
|
font.setBold(True)
|
||||||
self.tox_id.setFont(font)
|
self.tox_id.setFont(font)
|
||||||
self.tox_id.setObjectName("tox_id")
|
self.tox_id.setObjectName("tox_id")
|
||||||
# TODO: copy TOX ID to self.tox_id
|
s = bin_to_string(self.tox.self_get_address().value)
|
||||||
s = 'ID'
|
|
||||||
self.tox_id.setText(s)
|
self.tox_id.setText(s)
|
||||||
self.copyId = QtGui.QPushButton(self)
|
self.copyId = QtGui.QPushButton(self)
|
||||||
self.copyId.setGeometry(QtCore.QRect(40, 250, 98, 31))
|
self.copyId.setGeometry(QtCore.QRect(40, 250, 98, 31))
|
||||||
|
@ -133,7 +133,7 @@ class ProfileSettings(QtGui.QWidget):
|
||||||
|
|
||||||
def copy(self):
|
def copy(self):
|
||||||
clipboard = QtGui.QApplication.clipboard()
|
clipboard = QtGui.QApplication.clipboard()
|
||||||
id = unicode(self.tox.self_get_public_key())
|
id = bin_to_string(self.tox.self_get_address().value)
|
||||||
clipboard.setText(id)
|
clipboard.setText(id)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -66,3 +66,11 @@ class TestTox():
|
||||||
for data in node_generator():
|
for data in node_generator():
|
||||||
tox.bootstrap(*data)
|
tox.bootstrap(*data)
|
||||||
del tox
|
del tox
|
||||||
|
|
||||||
|
def test_friend_list(self):
|
||||||
|
data = Profile.open_profile(Settings.get_default_path(), 'tox_save')
|
||||||
|
settings = Settings.get_default_settings()
|
||||||
|
tox = tox_factory(data, settings)
|
||||||
|
s = tox.self_get_friend_list()
|
||||||
|
assert s
|
||||||
|
del tox
|
||||||
|
|
Loading…
Reference in a new issue