about summary refs log tree commit diff stats
path: root/src/ui/window.c
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* Initial work on last-read-position featureMichael Vetter2019-12-131-0/+33
| | | | | | | | Print dashes on the position we last left off in a chat window. So far the number of dashes is hardcoded, and the feature only works in chat windows. Regards https://github.com/profanity-im/profanity/issues/1238
* Implement Color Vision Deficiencies settingMichael Vetter2019-12-121-1/+3
| | | | | | Implement settings for redgreen and blue blindness. Regards https://github.com/profanity-im/profanity/issues/1191
* XEP-0392: theme, ui: conditionally colorize user nicksAurelien Aptel2019-12-031-0/+4
| | | | | | | | | * add theme_hash_attrs() * when printing a user message check PREF_COLOR_NICK to decide whether to colorize it or not ideally we should hash the jid instead of the nick but this is already a first step.
* _win_print: Guard against time being nullMichael Vetter2019-12-011-1/+1
| | | | | | | | | | | | | | | This is encountered when biboumi is used. Example: `/join #debian-next%irc.oftc.net@biboumi.lebihan.pl` It seems then time can be null. g_date_time_format() will not work in this case although time_pref will not be "off". So let's not call g_date_time_format() in this case. But treat it like time is set to off. However message reflection will not work properly with biboumi. Probably we dont get origin-id. Fix https://github.com/profanity-im/profanity/issues/1230
* Add vim modelineMichael Vetter2019-11-131-0/+1
|
* Move id from DeliveryReceipt to ProfBuffEntry structMichael Vetter2019-11-011-16/+14
| | | | | | | | | | | | | | | | | XEP-0184: Message Delivery Receipts, *requires* the id attribute. Generally this is not the case. For this reason the id was only present in the DeliveryReceipt struct since it was only used for XEP-0184. For https://github.com/profanity-im/profanity/issues/660 XEP-0313 MAM and https://github.com/profanity-im/profanity/issues/805 XEP-0308 Last Message Correction we will also need the id. So in preparation for further work let's move the id to the general ProfBuffEntry. We will need to adapt code so that we actually always write the ID if we receive one.
* Replace sent_messages list with algoMichael Vetter2019-10-311-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | For OMEMO we had a list with our sent messages. It was used so that we don't decrypt our own messages in MUCs that come in via reflection. Recently for https://github.com/profanity-im/profanity/pull/1209 we started to use origin-id and use an algorithm so we can detect our own sent messages via checking origin-id. Profanity uses the same id for the message ID and origin-id. With 06f300a42c4c627b6f1817bd48d92f083ffd9883 we added the message_is_sent_by_us() function. We implemented XEP-0359 this way to fix https://github.com/profanity-im/profanity/issues/1201 so that we don't log our own messages in MUCs twice. We can now check whether the message was sent by us using this function and can get rid of the list. Probably we could also put many parts of the sv_ev_room_message() function inside (else) part of `if (!(g_strcmp0(mynick, message->jid->resourcepart) == 0 && message_is_sent_by_us(message))) {`. Have to look more closely whether any of this needs to be run in case the message actually comes from us.
* Merge pull request #874 from spiridoncha/masterMichael Vetter2019-10-051-1/+9
|\ | | | | Change /clear behaviour. Closes issue #855.
| * Makes /clear behavior configurable.Spiridonov Alexander2016-11-071-0/+5
| |
| * Change /clear behaviour. Closes issue #855.Spiridonov Alexander2016-10-221-1/+4
| |
* | Allow colorization of history messagesMichael Vetter2019-09-101-2/+2
| | | | | | | | | | | | | | | | History was always printed with `THEME_DEFAULT` we now use `THEME_TEXT_HISTORY` which is accesible in theme files via `main.text.history`. Fix https://github.com/profanity-im/profanity/issues/1170
* | Remove dead assignmentsMichael Vetter2019-07-221-1/+1
| |
* | Rename prof_message_t into ProfMessagePaul Fariello2019-06-201-1/+1
| |
* | Set foreground color for untrusted messagesPaul Fariello2019-06-201-6/+5
| |
* | Add prof_message_t to wrap all message attributesPaul Fariello2019-06-201-14/+13
| | | | | | | | | | | | | | Probably missing copy of body to plain in carbon and privmessage. Only covers the incoming message path because goal is OMEMO decryption of untrusted message. Cover some of the log functions but not all.
* | Use flags in xmmp/message.c for encryption and trustPaul Fariello2019-06-201-2/+12
| |
* | Rework MUC reflected message filteringPaul Fariello2019-04-101-0/+1
| | | | | | | | | | | | | | | | | | Reflected messages can't be filtered by nick only otherwise you might ignore messages comming from you on another devices. Consequently we maintain a list of sent messages id in mucwin. To be sure the id will be correctly reflected we use the origin-id stanza.
* | Log and print outgoing encrypted messagePaul Fariello2019-04-101-0/+1
| |
* | Add OMEMO message encryption and decryptionPaul Fariello2019-04-101-0/+2
| |
* | Move OMEMO initialization to profanity intializationPaul Fariello2019-04-101-0/+1
| | | | | | | | Also store identity keys into account
* | Update copyright to include 2019Michael Vetter2019-01-221-1/+1
| |
* | Fix command exec error outputPaul Fariello2018-09-051-1/+1
| |