View friends and send chats to them with a button in the buffer

This commit is contained in:
2016-05-25 11:33:57 -05:00
parent 2b44c72999
commit 1252b7feac
6 changed files with 68 additions and 33 deletions

View File

@@ -50,7 +50,7 @@ class mainWindow(wx.Frame):
self.tb.AddPage(buffer, name)
def insert_buffer(self, buffer, name, pos):
self.tb.InsertSubPage(pos, buffer, name)
return self.tb.InsertSubPage(pos, buffer, name)
def search(self, name_):
for i in xrange(0, self.tb.GetPageCount()):

View File

@@ -139,3 +139,19 @@ class chatTab(wx.Panel):
box.Add(self.text, 0, wx.ALL, 5)
return box
class peopleTab(homeTab):
def create_list(self):
self.lbl = wx.StaticText(self, wx.NewId(), _(u"Friends"))
self.list = widgetUtils.list(self, *[_(u"Name"), _(u"Last seen")], style=wx.LC_REPORT)
self.list.set_windows_size(0, 190)
self.list.set_windows_size(1, 100)
self.list.set_size()
self.list.list.Bind(wx.EVT_LIST_ITEM_ACTIVATED, self.OnKeyDown)
def create_post_buttons(self):
self.post = wx.Button(self, -1, _(u"&Post"))
self.new_chat = wx.Button(self, wx.NewId(), _(u"Send message"))
self.postBox = wx.BoxSizer(wx.HORIZONTAL)
self.postBox.Add(self.post, 0, wx.ALL, 5)
self.postBox.Add(self.new_chat, 0, wx.ALL, 5)