Remove trailing whitespaces.
This commit is contained in:
parent
310e2cc347
commit
27b3592e16
1 changed files with 899 additions and 899 deletions
|
|
@ -41,11 +41,11 @@ class Chat(wx.Frame, QuickChat):
|
|||
|
||||
def __init__(self, target, host, type='one2one'):
|
||||
wx.Frame.__init__(self, None, title=target, pos=(0,0), size=(400,200))
|
||||
QuickChat.__init__(self, target, host, type)
|
||||
QuickChat.__init__(self, target, host, type)
|
||||
|
||||
self.sizer = wx.BoxSizer(wx.VERTICAL)
|
||||
self.SetSizer(self.sizer)
|
||||
|
||||
|
||||
self.splitter = wx.SplitterWindow(self, -1)
|
||||
self.sizer.Add(self.splitter, 1, flag = wx.EXPAND)
|
||||
|
||||
|
|
@ -60,7 +60,7 @@ class Chat(wx.Frame, QuickChat):
|
|||
self.conv_panel.SetSizer(self.conv_panel.sizer)
|
||||
self.splitter.Initialize(self.conv_panel)
|
||||
self.SetMenuBar(wx.MenuBar())
|
||||
|
||||
|
||||
#events
|
||||
self.Bind(wx.EVT_CLOSE, self.onClose, self)
|
||||
self.Bind(wx.EVT_TEXT_ENTER, self.onEnterPressed, self.textBox)
|
||||
|
|
@ -69,14 +69,14 @@ class Chat(wx.Frame, QuickChat):
|
|||
self.font={}
|
||||
self.font["points"] = self.chatWindow.GetFont().GetPointSize()
|
||||
self.font["family"] = self.chatWindow.GetFont().GetFamily()
|
||||
|
||||
|
||||
|
||||
|
||||
#misc
|
||||
self.day_change = time.strptime(time.strftime("%a %b %d 00:00:00 %Y")) #struct_time of day changing time
|
||||
self.setType(self.type)
|
||||
self.textBox.SetFocus()
|
||||
self.Hide() #We hide because of the show toggle
|
||||
|
||||
|
||||
def __createPresents(self):
|
||||
"""Create a list of present people in a group chat"""
|
||||
self.present_panel = wx.Panel(self.splitter)
|
||||
|
|
@ -108,7 +108,7 @@ class Chat(wx.Frame, QuickChat):
|
|||
self.__eraseMenus()
|
||||
self.__createMenus_O2O()
|
||||
self.historyPrint(profile=self.host.profile)
|
||||
|
||||
|
||||
def startGame(self, game_type, referee, players):
|
||||
"""Configure the chat window to start a game"""
|
||||
if game_type=="Tarot":
|
||||
|
|
@ -130,9 +130,9 @@ class Chat(wx.Frame, QuickChat):
|
|||
"""Return class managing the game type"""
|
||||
#TODO: check that the game is launched, and manage errors
|
||||
if game_type=="Tarot":
|
||||
return self.tarot_panel
|
||||
return self.tarot_panel
|
||||
elif game_type=="Quiz":
|
||||
return self.quiz_panel
|
||||
return self.quiz_panel
|
||||
|
||||
def setPresents(self, nicks):
|
||||
"""Set the users presents in the contact list for a group chat
|
||||
|
|
@ -141,7 +141,7 @@ class Chat(wx.Frame, QuickChat):
|
|||
QuickChat.setPresents(self, nicks)
|
||||
for nick in nicks:
|
||||
self.present_panel.presents.replace(nick)
|
||||
|
||||
|
||||
def replaceUser(self, nick, show_info=True):
|
||||
"""Add user if it is not in the group list"""
|
||||
debug (_("Replacing user %s") % nick)
|
||||
|
|
@ -166,7 +166,7 @@ class Chat(wx.Frame, QuickChat):
|
|||
menuBar = self.GetMenuBar()
|
||||
for i in range(menuBar.GetMenuCount()):
|
||||
menuBar.Remove(i)
|
||||
|
||||
|
||||
def __createMenus_O2O(self):
|
||||
"""create menu bar for one 2 one chat"""
|
||||
info("Creating menus")
|
||||
|
|
@ -190,7 +190,7 @@ class Chat(wx.Frame, QuickChat):
|
|||
|
||||
#events
|
||||
wx.EVT_MENU(self, idTAROT, self.onStartTarot)
|
||||
|
||||
|
||||
def __del__(self):
|
||||
wx.Frame.__del__(self)
|
||||
|
||||
|
|
@ -202,7 +202,7 @@ class Chat(wx.Frame, QuickChat):
|
|||
def onEnterPressed(self, event):
|
||||
"""Behaviour when enter pressed in send line."""
|
||||
self.host.sendMessage(self.target.short if self.type=='group' else self.target,
|
||||
event.GetString(),
|
||||
event.GetString(),
|
||||
mess_type = "groupchat" if self.type=='group' else "chat",
|
||||
profile_key=self.host.profile)
|
||||
self.textBox.Clear()
|
||||
|
|
@ -236,7 +236,7 @@ class Chat(wx.Frame, QuickChat):
|
|||
self.chatWindow.AppendText("%s\n" % msg)
|
||||
if not mymess:
|
||||
self.__blink()
|
||||
|
||||
|
||||
def printInfo(self, msg, type='normal'):
|
||||
"""Print general info
|
||||
@param msg: message to print
|
||||
|
|
@ -265,7 +265,7 @@ class Chat(wx.Frame, QuickChat):
|
|||
else:
|
||||
full_jid = self.target
|
||||
id = self.host.bridge.sendFile(full_jid, filename, {}, self.host.profile)
|
||||
self.host.waitProgress(id, _("File Transfer"), _("Copying %s") % os.path.basename(filename), self.host.profile)
|
||||
self.host.waitProgress(id, _("File Transfer"), _("Copying %s") % os.path.basename(filename), self.host.profile)
|
||||
|
||||
def onStartTarot(self, e):
|
||||
debug (_("Starting Tarot game"))
|
||||
|
|
|
|||
Loading…
Reference in a new issue