Start session automatically, login and logout in realtime from the account buffer in the GUI

This commit is contained in:
2015-02-26 15:21:26 -06:00
parent 3a9a49d64c
commit 458d607b9a
6 changed files with 149 additions and 17 deletions

View File

@@ -8,11 +8,28 @@ class accountPanel(wx.Panel):
self.name = name
self.type = "account"
sizer = wx.BoxSizer(wx.VERTICAL)
self.list = widgets.list(self, _(u"Announce"))
sizer.Add(self.list.list, 0, wx.ALL, 5)
self.login = wx.Button(self, -1, _(u"Login"))
sizer.Add(self.login, 0, wx.ALL, 5)
self.autostart_account = wx.CheckBox(self, -1, _(u"Start account automatically"))
sizer.Add(self.autostart_account, 0, wx.ALL, 5)
self.SetSizer(sizer)
class emptyPanel(accountPanel):
def change_login(self, login=True):
if login == True:
self.login.SetLabel(_(u"Login"))
else:
self.login.SetLabel(_(u"Logout"))
def change_autostart(self, autostart=True):
self.autostart_account.SetValue(autostart)
def get_autostart(self):
return self.autostart_account.GetValue()
class emptyPanel(wx.Panel):
def __init__(self, parent, name):
super(emptyPanel, self).__init__(parent=parent, name=name)
self.type = "empty"
self.name = name
self.type = "account"
sizer = wx.BoxSizer(wx.VERTICAL)
self.SetSizer(sizer)