From f11f2268901a2e03eb69d40d511c69239f37d019 Mon Sep 17 00:00:00 2001 From: ingvar1995 Date: Thu, 18 Feb 2016 20:13:55 +0300 Subject: [PATCH] main.py: loginscreen now gets list of profiles --- src/main.py | 13 ++++++++++--- src/settings.py | 2 +- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/main.py b/src/main.py index dfa00f5..c165e96 100644 --- a/src/main.py +++ b/src/main.py @@ -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 diff --git a/src/settings.py b/src/settings.py index a10beb1..0194fd9 100644 --- a/src/settings.py +++ b/src/settings.py @@ -36,7 +36,7 @@ class Settings(dict): 'auto_accept_from_friends': [], 'friends_aliases': [], 'typing_notifications': True, - 'auto_profile': '' + 'auto_profile': None } def save(self):