Mercurial > libervia-backend
diff frontends/primitivus/primitivus @ 125:8d611eb9ae48
primitivus: contact list enhancement
- primitivus: contact list now display groups and sexy name (instead of bare jid)
- primitivus: contact list now show an alert when somebody want to contact you, and its chat window is not on the screen
- primitivus: cursor is now visible when going to chat window (useful to go back in logs)
author | Goffi <goffi@goffi.org> |
---|---|
date | Mon, 12 Jul 2010 17:50:00 +0800 |
parents | 961e0898271f |
children | 55d3ef84f01f |
line wrap: on
line diff
--- a/frontends/primitivus/primitivus Thu Jul 08 19:47:54 2010 +0800 +++ b/frontends/primitivus/primitivus Mon Jul 12 17:50:00 2010 +0800 @@ -60,6 +60,8 @@ ('selected_focus', 'default,bold', 'dark red'), ('default', 'default', 'default'), ('default_focus', 'default,bold', 'default'), + ('alert', 'default,underline', 'default'), + ('alert_focus', 'default,bold,underline', 'default'), ('date', 'light gray', 'default'), ('my_nick', 'dark red,bold', 'default'), ('other_nick', 'dark cyan,bold', 'default'), @@ -125,8 +127,6 @@ #The main widget is not built (probably in Profile Manager) pass - - def __buildMainWidget(self): self.contactList = ContactList(self, self.CM, on_click = self.contactSelected, on_change=lambda w: self.redraw()) #self.center_part = urwid.Columns([('weight',2,self.contactList),('weight',8,Chat('',self))]) @@ -166,6 +166,14 @@ profile_key=self.profile) editBar.set_edit_text('') + def newMessage(self, from_jid, msg, type, to_jid, profile): + if not self.check_profile(profile): + return + QuickApp.newMessage(self, from_jid, msg, type, to_jid, profile) + sender = JID(from_jid) + if JID(self.contactList.selected).short != sender.short: + self.contactList.putAlert(sender) + def onJoinRoom(self, button, edit): self.removePopUp() room_jid = JID(edit.get_edit_text())