about summary refs log tree commit diff stats
path: root/src/ui
Commit message (Collapse)AuthorAgeFilesLines
...
* xep-0308: Dont allow to correct MUC PMsMichael Vetter2020-02-141-1/+0
| | | | | People could change messages of other people if the nick isn't registered.
* xep-0308: Display corrected incoming MUC messages correctlyMichael Vetter2020-02-123-5/+11
|
* 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-115-17/+26
| | | | | 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-103-0/+23
| | | | | | | | 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-102-5/+10
| | | | and print settings if only `/correction` is run.
* xep-0308: add `correction` autocompletionMichael Vetter2020-02-102-0/+7
|
* 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.
* rosterwin: end correct colorsMichael Vetter2020-02-031-1/+1
| | | | | Actually presence_colour should be stopped there. Thanks to rumin-miller for finding this.
* Add context to autocomplete_with_func and use it for omemo trust commandPaul Fariello2020-01-312-4/+4
| | | | Fix #1068
* Change theme handlingMichael Vetter2020-01-291-1/+1
| | | | | | | | | | | | | | | | So far when loading a theme it also overwrote the preferences the user set. Lengthy discussion can be found at https://github.com/profanity-im/profanity/issues/1077 Now we use `/theme load themename` to load the [colours] part of a themem only. `/theme full-load themename` will load the complete theme including preferences set in there. Regards https://github.com/profanity-im/profanity/issues/1077
* XEP-0092: Add configuration option to choose whether to send OS nameMichael Vetter2020-01-242-0/+11
| | | | | `/os on|off` now let's one choose whether to include the OS name once `/software` (XEP-0092) is ran on us.
* Add myself to copyrightMichael Vetter2020-01-232-0/+2
|
* Refactor rosterwin_roster()Michael Vetter2020-01-231-18/+17
| | | | Use helper function for duplicate code.
* Add option to display MUC name or JID in titlebarMichael Vetter2020-01-232-5/+21
| | | | Add `/titlebar use [name|jid]`.
* Display MUC name in titlebarMichael Vetter2020-01-231-1/+8
|
* Fix spacing in titlebar.cMichael Vetter2020-01-231-2/+0
|
* Print `roster rooms use` in info pageMichael Vetter2020-01-231-0/+4
|
* Respect `/roster room use` setting also when sorted for serviceMichael Vetter2020-01-231-8/+14
|
* NULL room_name in win_create_muc()Michael Vetter2020-01-231-0/+1
|
* Add `/roster room use` commandMichael Vetter2020-01-231-2/+18
| | | | | | | `/roster room use name` to use the name of the MUC in the roster list. `/roster room use jid` to use the jid of the MUC in the roster list. Display it only in case `/roster room by none` is set so far.
* Save MUC room name in ProfMucWinMichael Vetter2020-01-232-0/+2
| | | | We will need this if we want to display the Name instead of the JID.
* rosterwin: remove duplicate ifMichael Vetter2020-01-221-3/+0
|
* Update my Copyright to 2020Michael Vetter2020-01-035-6/+6
|
* Adjust /color configuration outputMichael Vetter2019-12-201-9/+9
| | | | Fix https://github.com/profanity-im/profanity/issues/1243
* Add workaround for stupid compiler warningMichael Vetter2019-12-191-1/+1
| | | | Makes travis builds for TW, Debian and Arch fail.
* Add /occupants color commandMichael Vetter2019-12-192-6/+26
| | | | | | | | `/occupants color on|off` to enable or disable XEP-0392 also for the MUC occupants. Regards https://github.com/profanity-im/profanity/issues/1191
* Add /roster color commandMichael Vetter2019-12-191-0/+6
| | | | | | | `/roster color on|off` to enable or disable XEP-0392 also for the roster. Regards https://github.com/profanity-im/profanity/issues/1191
* xep-0392: colorize rosterMichael Vetter2019-12-191-3/+18
|
* separator: Enable for MUC and PRIVWIN tooMichael Vetter2019-12-133-9/+29
| | | | Fix https://github.com/profanity-im/profanity/issues/1238
* 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-136-0/+59
| | | | | | | | 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
* Dont print error message if a valid setting function is calledMichael Vetter2019-12-121-1/+0
| | | | | | | | This is because the actual command that parses itself (cmd_logging) returns false if it didn't get the expected parameters. Handing the printing however is done by another function. This function is added to the Command struct as setting_function. So if this is set, and the actual command returns false. We should just call the setting_function and not print the error message. Fix https://github.com/profanity-im/profanity/issues/1237
* Handle case where color.nick is not setMichael Vetter2019-12-121-0/+5
| | | | | Fixes a segfault if color.nick was never set but we want to print it's value.
* Implement Color Vision Deficiencies settingMichael Vetter2019-12-122-3/+14
| | | | | | Implement settings for redgreen and blue blindness. Regards https://github.com/profanity-im/profanity/issues/1191
* Add initial support for XEP-0392Michael Vetter2019-12-092-0/+10
| | | | | | | | | | | | | | The last 3 commits added basic support. Thanks @aaptel! This commit adds basic settings interface to use it. See `/color on|off`. We still have to enable settings for color blindness. And maybe another setting to decide whether to color the occupantslist/roster with the same algo. 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.
* Call ncurses resize function before move functionMichael Vetter2019-12-022-2/+3
| | | | | | | | | | | | | | From @xaizek s comment on issue #1235: ``` If the move would cause the window to be off the screen, it is an error and the window is not moved. Resize on the other hand doesn't fail like this according to its documentation. So new size needs to be applied first. ``` Big thanks to @xaizek for taking a look at our code and helping us!! Regards https://github.com/profanity-im/profanity/issues/1235
* _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-1328-0/+28
|
* Merge /chlog and /grlog commands into /loggingMichael Vetter2019-11-122-13/+7
| | | | | | | Instead of `/chlog on` we now have `/logging chat on`. Instead of `/grlog on` we now have `/logging group on`. Fix https://github.com/profanity-im/profanity/issues/1224
* Merge /invite, /invites and /decline commandsMichael Vetter2019-11-051-1/+1
| | | | | | | | | | `/invite <contact>` became `/invite send <contact>. `/invites` became `/invite list`. `/decline` became `/invite decline`. Accept is still done via `/join`. Regards https://github.com/profanity-im/profanity/issues/1116
* Add `/titlebar show presence` commandMichael Vetter2019-11-051-0/+6
| | | | | | | Additionally to `/presence titlebar on` we now allow the setting via /titlebar show|hide presence` since it's about the titlebar. Regards https://github.com/profanity-im/profanity/issues/1116
* Display resource information in `/titlebar`Michael Vetter2019-11-051-0/+6
|
* Move /encwarn command into /titlebarMichael Vetter2019-11-052-17/+13
| | | | | | Instead of `/encwarn on|off` we now have `/titlebar show|hide encwarn`. Regards https://github.com/profanity-im/profanity/issues/1116
* Fix add_history usage in down arrow handlerMichael Vetter2019-11-051-4/+1
| | | | | | | | | | | | | | [Programming with GNU History](http://www.math.utah.edu/docs/info/hist_2.html) mentions using_history(). Chet, maintainer of readline told me about it. (Thanks Chet!) Seems like we need to call this so that the history offset is at the right end of the list. I assume it's called in the linehandler automatically. Fix https://github.com/profanity-im/profanity/issues/200
* Store current input line in historyMichael Vetter2019-11-051-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Regards https://github.com/profanity-im/profanity/issues/200 This doesn't work yet. And I have no idea why. Weird behaviour: - start profanity - type 'ASDF' - ctrl+arrow down -> text vanishes (like intended) - arrow up -> nothing happens (intended is that the last history item [ASDF] appears) - type 'ABC' - press enter - arrow up -> ABC appears - enter - type 'UUU' - ctrl+arrow down - type 'ZZZ' - enter - arrow up - ZZZ appears - arrow up - UUU appears So in the latter case we added to history and deleted from the input line and then immediately entered new text and pressed enter, to add this to the history too. When we do this the not sent text succesfully was stored in history.