misc: a few "cosmetic" changes (PEP 8...)

This commit is contained in:
souliane 2013-09-05 20:57:00 +02:00
commit f9bd9dd9b2
5 changed files with 15 additions and 11 deletions

View file

@ -71,6 +71,7 @@ class ChatText(urwid.FlowWidget):
render_txt.append(self.message)
return urwid.Text(render_txt, align=self.align)
class Chat(urwid.WidgetWrap, QuickChat):
def __init__(self, target, host, type='one2one'):

View file

@ -43,7 +43,6 @@ class Notify(object):
except:
self.freedesktop_int = None
def getFocus(self):
if not self.display:
return 0
@ -73,4 +72,6 @@ class Notify(object):
hints = dbus.Dictionary(signature='sv')
expire_timeout = -1
self.freedesktop_int.Notify(app_name, replaces_id, app_icon, summary, body, actions, hints, expire_timeout)
self.freedesktop_int.Notify(app_name, replaces_id, app_icon,
summary, body, actions,
hints, expire_timeout)

View file

@ -614,4 +614,3 @@ class PrimitivusApp(QuickApp):
sat = PrimitivusApp()
sat.start()

View file

@ -33,7 +33,7 @@ class QuickChatList(dict):
if not self.has_key(target.short):
#we have to create the chat win
self[target.short] = self.createChat(target)
return dict.__getitem__(self,target.short)
return dict.__getitem__(self, target.short)
def createChat(self, target):
raise NotImplementedError

View file

@ -199,10 +199,10 @@ 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(),
mess_type = "groupchat" if self.type=='group' else "chat",
profile_key=self.host.profile)
self.host.sendMessage(self.target.short if self.type == 'group' else self.target,
event.GetString(),
mess_type="groupchat" if self.type == 'group' else "chat",
profile_key=self.host.profile)
self.textBox.Clear()
def __blink(self):