main.py: loginscreen now gets list of profiles

This commit is contained in:
ingvar1995 2016-02-18 20:13:55 +03:00
parent 23969b7e2a
commit f11f226890
2 changed files with 11 additions and 4 deletions

View file

@ -1,5 +1,6 @@
from loginscreen import LoginScreen
from settings import Settings
from profile import Profile
import sys
from PySide import QtCore, QtGui
@ -12,9 +13,15 @@ if __name__ == '__main__':
ls = LoginScreen()
win = QtGui.QMainWindow()
ls.setupUi(win)
ls.update_select(['tox_save'])
profiles = Profile.find_profiles()
ls.update_select(map(lambda x: x[1], profiles))
win.show()
app.connect(app, QtCore.SIGNAL("lastWindowClosed()"), app, QtCore.SLOT("quit()"))
app.exec_()
# TODO: get result from loginscreen and open mainscreen
# TODO: get result from loginscreen
# add new default profile (if needed)
# save selected profile to open
# create new profile?
else:
path, name = settings['auto_profile']
# TODO: open mainscreen

View file

@ -36,7 +36,7 @@ class Settings(dict):
'auto_accept_from_friends': [],
'friends_aliases': [],
'typing_notifications': True,
'auto_profile': ''
'auto_profile': None
}
def save(self):