bug fixes
This commit is contained in:
parent
4706ef9b44
commit
716abd7b3b
1 changed files with 5 additions and 3 deletions
|
@ -17,16 +17,18 @@ class ProfileHelper(object):
|
||||||
path = Settings.get_default_path()
|
path = Settings.get_default_path()
|
||||||
result = []
|
result = []
|
||||||
# check default path
|
# check default path
|
||||||
|
if not os.path.exists(path):
|
||||||
|
os.makedirs(path)
|
||||||
for fl in os.listdir(path):
|
for fl in os.listdir(path):
|
||||||
if fl.endswith('.tox'):
|
if fl.endswith('.tox'):
|
||||||
name = fl[:-4]
|
name = fl[:-4]
|
||||||
result.append((path, name))
|
result.append((path, name))
|
||||||
path = os.path.dirname(os.path.abspath(__file__))
|
path = curr_directory()
|
||||||
# check current directory
|
# check current directory
|
||||||
for fl in os.listdir(path):
|
for fl in os.listdir(path):
|
||||||
if fl.endswith('.tox'):
|
if fl.endswith('.tox'):
|
||||||
name = fl[:-4]
|
name = fl[:-4]
|
||||||
result.append((path, name))
|
result.append((path + '/', name))
|
||||||
return result
|
return result
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
|
@ -401,7 +403,7 @@ class Profile(Contact, Singleton):
|
||||||
def set_alias(self, num):
|
def set_alias(self, num):
|
||||||
friend = self._friends[num]
|
friend = self._friends[num]
|
||||||
name = friend.name.encode('utf-8')
|
name = friend.name.encode('utf-8')
|
||||||
dialog = "Enter new alias for friend {} or leave empty to use friend's name:".format(name)
|
dialog = "Enter new alias for friend " + name.decode('utf-8') + " or leave empty to use friend's name:"
|
||||||
text, ok = QtGui.QInputDialog.getText(None, 'Set alias', dialog)
|
text, ok = QtGui.QInputDialog.getText(None, 'Set alias', dialog)
|
||||||
if ok:
|
if ok:
|
||||||
settings = Settings.get_instance()
|
settings = Settings.get_instance()
|
||||||
|
|
Loading…
Reference in a new issue