Mercurial > libervia-backend
diff frontends/primitivus/primitivus @ 124:961e0898271f
primitivus chat window
- management of one 2 one / group chat
- timestamp displayed
- added shortcuts for showing/hiding panels
- color used
- fixed vcard bug (contact displayed even if not from current profile if vcard changed/not in cache)
- added VerticalSeparator widget
- *List widgets can now use an other widget than SelectableText
- new UnselectableText widget
author | Goffi <goffi@goffi.org> |
---|---|
date | Thu, 08 Jul 2010 19:47:54 +0800 |
parents | 1ca5f254ce41 |
children | 8d611eb9ae48 |
line wrap: on
line diff
--- a/frontends/primitivus/primitivus Thu Jul 08 18:29:44 2010 +0800 +++ b/frontends/primitivus/primitivus Thu Jul 08 19:47:54 2010 +0800 @@ -60,6 +60,9 @@ ('selected_focus', 'default,bold', 'dark red'), ('default', 'default', 'default'), ('default_focus', 'default,bold', 'default'), + ('date', 'light gray', 'default'), + ('my_nick', 'dark red,bold', 'default'), + ('other_nick', 'dark cyan,bold', 'default'), ] class ChatList(QuickChatList): @@ -108,6 +111,21 @@ elif input == 'meta j': #user wants to join a room pop_up_widget = InputDialog(_("Entering a MUC room"), _("Please enter MUC's JID"), default_txt = 'test@conference.necton2.int', cancel_cb=self.removePopUp, ok_cb=self.onJoinRoom) self.showPopUp(pop_up_widget) + elif input == 'f2': #user wants to (un)hide the contact_list + try: + center_widgets = self.center_part.widget_list + if self.contactList in center_widgets: + self.center_part.set_focus(0) #necessary as the focus change to the next object, we can go out of range if we are on the last object of self.center_part + center_widgets.remove(self.contactList) + del self.center_part.column_types[0] + else: + center_widgets.insert(0, self.contactList) + self.center_part.column_types.insert(0, ('weight', 2)) + except AttributeError: + #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())