about summary refs log tree commit diff stats
path: root/src/ui/window.c
Commit message (Collapse)AuthorAgeFilesLines
* Remove unanimous MAM displayMichael Vetter2020-04-251-18/+8
| | | | | | For some time users could choose to have the old way "unanimous" where all the MUC history is just grey (or whatever was set). Now it is always just displayed like regular new incoming MUC text.
* ui: fix conditionDmitry Podgorny2020-04-231-0/+3
| | | | | Fix mistake in a condition. Also add sanity check to win_refresh_with_subwin().
* Make compiler happy about win_refresh_without_subwinMichael Vetter2020-04-201-1/+1
|
* win_refresh_with_subwin() fixupMichael Vetter2020-04-201-2/+1
| | | | Fixup for 86af6925d9fc0b2656eac15b0c8c7aba60589ce5
* Simplify win_refresh_with_subwin()Michael Vetter2020-04-201-6/+5
|
* Add to_jid field to ProfMessage structMichael Vetter2020-04-111-8/+8
| | | | | Is usefult in many cases if we want cleaner code. Hope this edit didn't break anything though ;-)
* Retrieve message type from databaseMichael Vetter2020-04-081-3/+2
| | | | So we don't have to check for MUC another way.
* win_print_history() print 'me' on regular chats if we wrote the messageMichael Vetter2020-04-061-1/+9
| | | | Same behaviour like when we used to get it from the text files.
* Adapt win_print_history() to work with muc tooMichael Vetter2020-04-061-5/+23
|
* Fixed memory leak in ProfMucWinDmitry Podgorny2020-04-031-0/+2
| | | | | Profanity remembers last message and its id for the message correction feature. We must free them in window destructor.
* Add setting to not colorize own nick according to xep-0392Michael Vetter2020-03-251-1/+3
| | | | | | | | | | | | | | | | | | Some users might want there nick to always stay white (etc) for easier recognition. Now we can do `/color own off` to not generate the color based on xep-0392. The `me=` color (etc) from the theme will then be used. Once we run this command `theme_load()` is called again. And the theme looks totally wrong. We encountered this at other times already and I think it's nothing wrong with this new code here now but that there seems to be a missing closing attr for the color when drawing. Should be investigated seperately. Fix https://github.com/profanity-im/profanity/issues/1288
* titlebar: allow displaying MUC name and MUC jidMichael Vetter2020-03-241-7/+14
| | | | | | `/titlebar use name|jid` -> `/titlebar show|hide name|jid` Fix https://github.com/profanity-im/profanity/issues/1284
* move titlebar code in correct functionMichael Vetter2020-03-241-1/+9
|
* Rename ProfBufferEntry jid variableMichael Vetter2020-03-091-3/+3
|
* Check for sender of LMC messageMichael Vetter2020-03-091-11/+17
|
* Write from jid in bufferMichael Vetter2020-03-091-10/+13
| | | | Not all cases covered yet.
* Add barejid to buffer structMichael Vetter2020-03-091-11/+11
|
* Remove old commentsMichael Vetter2020-03-091-4/+0
|
* Use correct MUC message timestampMichael Vetter2020-03-091-5/+1
| | | | | | | | win_println_incoming_muc_msg() always used the current time. Now let's use whatever is sent int he message struct (from the delay stanza or the current time that we set now once the message is received). No playing with the time upon display anymore.
* Use ProfMessage as parameter for win_println_incoming_muc_msg()Michael Vetter2020-03-091-5/+4
|
* window.c: Rename variableMichael Vetter2020-03-091-3/+3
|
* Fix memory leak in win_create_muc()Michael Vetter2020-02-271-1/+0
| | | | | | | | | | | | | I suspect this was just a copy paste error. `_win_create_simple_layout()` is called in other creation functions like `win_create_config()` or `win_create_private()`. I suspect when `win_create_muc()` was created it was just copied. But in this function we actually set the layout ourself later. So calling the function isn't needed. Regards https://github.com/profanity-im/profanity/issues/1279
* Only use enc_char in win_print_incoming() when neededMichael Vetter2020-02-251-1/+4
| | | | Fixes potential memory leak too.
* Rename separator to trackbarMichael Vetter2020-02-211-4/+4
|
* Make trackbar color configurableMichael Vetter2020-02-211-0/+6
| | | | Use `main.trackbar` in themes.
* win_print_incoming() strdup the charactarMichael Vetter2020-02-211-1/+1
| | | | | Fix bug introduced in 1f8b1eb740391941e79e1004ad041f8178a2b674. Forgot to strdup() here.
* Allow utf8 symbols as omemo/pgp/otr indicator charMichael Vetter2020-02-201-72/+75
| | | | Fix https://github.com/profanity-im/profanity/issues/1264
* Add define names to commentMichael Vetter2020-02-191-6/+6
|
* Refactor win_print_history()Michael Vetter2020-02-171-11/+3
| | | | We never use the printf like behaviour anyways.
* Refactor win_print_outgoing_muc_msg()Michael Vetter2020-02-171-13/+5
| | | | We never use the printf like behaviour anyways.
* Refactor win_println_incoming_muc_msg()Michael Vetter2020-02-171-13/+5
| | | | We never use the printf like behaviour anyways.
* Refactor win_print_outgoing()Michael Vetter2020-02-171-11/+4
| | | | We never use the printf like behaviour anyways.
* Rename buffer->from to buffer->display_fromMichael Vetter2020-02-141-5/+5
|
* xep-0308: enable correction in outgoing messages with delivery receiptsMichael Vetter2020-02-141-4/+8
|
* Rename win_print_with_receipt() -> win_print_outgoing_with_receipt()Michael Vetter2020-02-141-2/+2
|
* Rename `win_println_them_message()` -> `win_println_incoming_muc_msg()`Michael Vetter2020-02-141-1/+1
| | | | | | | | In aa3693daa211b36c78d136d5a1ee9f3258e21352 I renamed `win_println_me_message()` -> `win_print_outgoing_muc_msg()`. Now: `win_println_them_message()` -> `win_println_incoming_muc_msg()` to be more consistent and descriptive.
* xep-0308: only replace messages if the user enabled the featureMichael Vetter2020-02-141-3/+3
| | | | Outgoing `/correct` will still work.
* xep-0308: Implement LMC for outgoing MUC messagesMichael Vetter2020-02-141-3/+10
| | | | | | Including OMEMO encrypted ones. Also rename `win_println_me_message()` to `win_print_outgoing_muc_msg() as I think it's a more descriptive name.
* xep-0308: Display corrected incoming MUC messages correctlyMichael Vetter2020-02-121-3/+9
|
* Distinguish between _win_print() and _win_printf()Michael Vetter2020-02-121-19/+17
| | | | | | | | | | | | | | | | | | | | _win_print() and _win_printf() sound like they are the same. But actually they are something totally different. I renamed _win_print() to _win_print_internal() for that reason. It's more about actually drawing to the ncurses window. _win_printf() calls _win_print() and also writes the text to the window buffer. Which _win_print() didn't, it was really just the ncurses specific things. In some cases there is _win_print_internal() called after a buffer_append() in those cases it might be more correct to actually call _win_printf(). It was not done so far. But probably is better. But will mean a bit more operations. I'll have to check this later.
* Rename win_correct_incoming to win_correctMichael Vetter2020-02-121-4/+4
| | | | and make it static.
* xep-0308: update the UI upon sending a corrected messageMichael Vetter2020-02-111-3/+10
| | | | | So far we don't do this for encrypted messages. Still needs to be done. And MUC also needs to be done.
* xep-0308: Implement `/correct` to correct the last send messageMichael Vetter2020-02-101-0/+4
| | | | | | | | So far the correction is sent. But the UI in Profanity itself is not updated. Also autocompletion for `/correct` with the last sent message is missing.
* xep-0308: create setting to toggle lmcMichael Vetter2020-02-101-4/+2
| | | | and print settings if only `/correction` is run.
* xep-0308: Initial support for incoming LMCMichael Vetter2020-02-101-7/+50
|
* Clear buffer upon /clearMichael Vetter2020-02-071-0/+2
| | | | | | | | I think both the window and the buffer should also be cleared in case `/clear` is issue and persist_history is off. Otherwise it could happen that win_redraw() redraws the whole content of the buffer again.
* NULL room_name in win_create_muc()Michael Vetter2020-01-231-0/+1
|
* Save MUC room name in ProfMucWinMichael Vetter2020-01-231-0/+1
| | | | We will need this if we want to display the Name instead of the JID.
* separator: Print only one for each chat windowMichael Vetter2019-12-131-3/+19
| | | | | | So far we printed one after the last received message, which doesn't make much sense of course. Now only print one if there is not already one present.
* separator: print trackbar across the whole lineMichael Vetter2019-12-131-13/+19
| | | | | | | | Use the whole line. We do this in win_redraw() so upon terminal size change it still matches. Regards https://github.com/profanity-im/profanity/issues/1238