Commit graph

48 commits

Author SHA1 Message Date
mathieui
697e311ce7 Fix the repr() of messages for logging 2013-07-01 22:10:30 +02:00
mathieui
785b21ff02 Fix #2229 (prevent correction if the 2 fulljid differ)
(Except in MUC, where we check the User object for that)
2013-05-15 19:04:56 +02:00
mathieui
e8fae6f24c Fix #2275, ref #2229
- Refactor the message handlers to be more readable
- Add a group_corrections tab-specific option (#2229)
- Fix issues with /correct in private tabs and conversation tabs
2013-03-31 16:33:10 +02:00
mathieui
57ce4b6fdf Fix #2265
also:
- fix Message.__str__/repr
- fix a traceback with user gaming
2013-03-13 22:49:19 +01:00
mathieui
de11a00a8e Improve XEP-0308 support
- Prevent correction of delayed messages
- Prevent correction of messages by someone else in a MUC (and in a
  private tab)
- Messages with unauthorized corrections (above) or wrong message id
  will be displayed as normal messages

TODO: restrict the corrections to the same fullJID (only in direct
"normal" conversations, because we can know in private an muc tabs, via
the User object)
2013-02-27 22:09:14 +01:00
mathieui
68c6c06095 Prevent a RuntimeError when there are too many revisions on a message
Python recursion sucks, and namedtuple.repr() uses that, so I rewrote
__str__ and __repr__ in order to make it the iterative way instead.
2013-01-02 20:36:38 +01:00
mathieui
ea1851e00d Iterate over the messages from the end, not from the start
(the corrected message is way more likely to be recent)
2013-01-02 19:32:32 +01:00
mathieui
0f9b37b8a8 Do not rebuild everything in order to modify a message
(should fix the “leak” on /correct, and make it faster)
2012-12-30 14:54:54 +01:00
Emmanuel Gil Peyrot
65e097f410 Display the number of revisions of a corrected message. 2012-12-29 13:14:50 +01:00
Emmanuel Gil Peyrot
590afbd4bc Fix /correct and /me highlights, and handle /correct a bit better. 2012-12-29 13:14:50 +01:00
Florent Le Coz
786f0e7222 Introduce a special "reverse" value for the COLOR_HIGHLIGHT_NICK theme option.
If COLOR_HIGHLIGHT_NICK = "reverse", the highlight nick will be in reverse
mode.
fix #2165
2012-12-15 02:42:30 +01:00
Florent Le Coz
e2592f5cdf Add a new show_timestamps option to hide/show timestamps in text buffers. 2012-12-07 23:39:49 +01:00
mathieui
ac806cbb41 Fix the history numbers when re-joining a room
the <history/> element had a xmlns="" instead of the proper namespace.
2012-11-17 19:17:02 +01:00
mathieui
6781f67e80 Preload history into discussion windows (à la mcabber)
- New option load_log defaulting to 200 to indicate the number of lines
  to be loaded
- It’s still very raw, and the format of the message does not match the
  format of the normal room history, for example
- Works in the Private chat, MUC, and Conversation tabs

Thanks to labedz <github@labedz.org> for the original code
2012-11-11 16:01:53 +01:00
Emmanuel Gil Peyrot
88da6869b4 When a message is corrected, display it correctly in place of the previous one. 2012-10-12 15:29:45 +00:00
mathieui
fb450a7138 Use a different theme variable for the /me message 2012-05-17 17:28:53 +02:00
mathieui
0f7bda20b8 Add a way to review room highlights - Fixes #1673
This new features is available with M-p and M-n (previous/next).
It saves the last highlight viewed, meaning that if you scroll in the
buffer, M-n or M-p will take you to the next or previous hl compared to
the one before you started scrolling.

For convenience, going to the previous highlight of the first highlight
will take you to the bottom of the buffer, and going to the next
highlight of the last highlight will do *the same*.

If there are several highlights in one message, only the first line will
be considered a highlight.
2012-05-17 01:00:35 +02:00
Florent Le Coz
7512001612 Make the color for information messages themable 2012-01-26 10:05:37 +01:00
Florent Le Coz
e17b70e285 Display colors for /me messages in a better way. 2012-01-26 10:05:36 +01:00
Florent Le Coz
587bd44f9b Fix something with /me etc. 2011-11-25 12:02:03 +01:00
Florent Le Coz
06156c3b77 Use the nick color for the “*” char in /me messages. 2011-11-25 11:42:50 +01:00
Florent Le Coz
bb22b39d55 /me now works in all chatabs
fixes #2302
2011-11-25 11:42:50 +01:00
Florent Le Coz
7bf63c51e2 Fix a remaining crash from the Room class deletion. 2011-11-06 15:57:03 +01:00
Florent Le Coz
e3477d7db8 Remove the Room class. fixes #2122 2011-11-06 03:31:47 +01:00
Florent Le Coz
700b11e42d Handles 256 colors, easier theming and more flexible way to define colors
Doesn’t run yet if term doesn’t support 256 colors, I know
(thus the branch "256")
2011-09-21 00:52:03 +02:00
Florent Le Coz
fa0939622b Fix an issue that breaks the message display if it contains \t 2011-09-11 19:29:14 +02:00
Florent Le Coz
96794a4e49 Change license to zlib (MIT sucks :() 2011-09-11 17:10:05 +02:00
Florent Le Coz
fa5b5fc45d Make it work. MAY segfault. Need intensive testing.
Should be A. LOT. FASTER. though.
2011-09-09 18:43:20 +02:00
Florent Le Coz
2e04c5c77e c code that doesn’t work 2011-09-08 17:05:02 +02:00
Florent Le Coz
d0231331fa Fixed a stupid crash caused by mathieui. Shame on him. 2011-06-25 15:57:07 +02:00
Florent Le Coz
9889baf0ce Make the information messages "pop" the information buffer temporarly 2011-04-16 18:07:14 +02:00
Florent Le Coz
63e4833b09 Fix a crash on normal messages, and add colors to information messages 2011-03-31 00:36:15 +02:00
Florent Le Coz
25162f0a06 Messages in text_buffer should not be colored when they
have no nickname
2011-03-29 14:39:51 +02:00
Florent Le Coz
38cffe43b6 Message and complete words can now be colored even if the
take more than one line to be displayed.
2011-03-29 14:35:59 +02:00
Florent Le Coz
dcd29c636f Change how colors are handled. With \x19x etc
Should work like before and be a little lighter on the RA
2011-03-29 12:44:19 +02:00
Florent Le Coz
dca88cadbd Use namedtuples instead of dict, this should GREATELY lower the memory footprint 2011-03-21 03:18:12 +01:00
Florent Le Coz
a519b90cba Avoid stupid traceback on normal message 2011-03-09 18:15:01 +01:00
Florent Le Coz
a516e78bcf Some optimizations in build_new_message. Also cleaned up. Added an optimized way to do "wcswidth(string) > n": wcsislonger. And should use less memory because the dict replacing Message and Lines object stores ONLY the needed attributes. 2011-03-09 04:56:53 +01:00
Florent Le Coz
4b31e5acf1 Make the number of lines and messages kept in memory configurable
and lower (a lot) the number of lines kept in the info_win buffers
This lower the memory usage.
2011-02-14 14:54:26 +01:00
Florent Le Coz
ac99467965 Make the tab collectable by remove self references when closing
them.
2011-02-13 22:28:35 +01:00
louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13
1f2959d96e correctly displays a message in ConversationTabs when a resource goes offline 2011-01-05 01:41:19 +00:00
louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13
d712d2e1c9 update copyright date 2011-01-01 13:27:07 +00:00
louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13
3b2d28e6ee remote nickname is colored in ConversationTab 2010-12-31 10:52:15 +00:00
louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13
ff24960b6a fix the ---- that I just broke 2010-12-15 16:10:53 +00:00
louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13
0db8bf7d46 HUGE performance improvement on refresh. fixed #1855 2010-12-15 15:40:43 +00:00
louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13
f4d4a205f1 a few renamings, and some other stuff 2010-11-15 11:59:09 +00:00
louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13
d4e3e51c1f update e-mail address and README 2010-10-04 01:45:16 +00:00
louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13
33f197b4ab complete refactoring of the ui. Everything is now very modulable. Little info win added at the bottom. Roster is ready to be implemented. 2010-09-14 02:11:07 +00:00