about summary refs log tree commit diff stats
path: root/src/ui
Commit message (Collapse)AuthorAgeFilesLines
* Free GError objectsDmitry Podgorny2020-04-141-2/+3
| | | | | | | | | | glib functions can allocate a GError object that must be freed with g_error_free(). Otherwise a memory leak happens. There are similar unfixed places in omemo, check: grep "&error" src/omemo/omemo.c Fixes #1304.
* Only print chathistory if regular chat messageMichael Vetter2020-04-131-1/+4
| | | | | | | | | | | MUCPMs and regular chat messages get printed with the same code. But we don't save MUC PMs in the sqldb, because another jid could use the same nick the next time. And if we would take the log out we would need a different routine, checking for resourcepart too. Fix https://github.com/profanity-im/profanity/issues/1312
* Add hidden MAM setting and trigger MAM retrievel when opening new windowMichael Vetter2020-04-121-8/+13
| | | | | | | | | | | | Only when we start the conversation. Not yet when we get messaged and a new window is opened. Need to have sorting of messages in the window buffer then, I guess. Also MAM IQ should only be send one time in such a case. If MAM is enabled history from sql backend will not be shown. `mam` in profrc enables experimental MAM. Can change soon again. Don't rely on stuff in this stage ;)
* MAM: Correctly display incoming MAM chat messageMichael Vetter2020-04-111-3/+10
|
* Add to_jid field to ProfMessage structMichael Vetter2020-04-113-14/+14
| | | | | Is usefult in many cases if we want cleaner code. Hope this edit didn't break anything though ;-)
* Quick and dirty display of MAM messagesMichael Vetter2020-04-111-3/+6
|
* Fix memory leaks in cons_roster_setting()Dmitry Podgorny2020-04-101-0/+3
|
* Fix memory leaks in _rosterwin_resources()Dmitry Podgorny2020-04-091-0/+2
|
* Retrieve message type from databaseMichael Vetter2020-04-084-6/+5
| | | | So we don't have to check for MUC another way.
* db: Fix memleaksMichael Vetter2020-04-061-2/+1
|
* 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-064-24/+26
|
* Remove chat_log_get_previous()Michael Vetter2020-04-061-7/+3
| | | | | | | | | | | | We now dont get the log files from the text files via chat_log_get_previous() anymore. We use the sql backend via log_database_get_previous_chat(). So far it just has the same behaviour like chat_log_get_previous(), except that in _chatwin_history() we don't pass the sender to win_print_history() which should be fixed in a commit soon. And log_database_get_previous_chat() can later easily be expanded to fix https://github.com/profanity-im/profanity/issues/205.
* Get regular chat history out of sql backendMichael Vetter2020-04-061-19/+8
|
* Fix multiple memory leaks related to rosterwin_roster()Dmitry Podgorny2020-04-061-0/+1
| | | | | There are multiple paths which lead to rosterwin_roster(). The function doesn't free list returned by wins_get_private_chats().
* Fix memory leak in cons_show_disco_info()Dmitry Podgorny2020-04-061-1/+1
|
* Fix memory leak in _rosterwin_resources()Dmitry Podgorny2020-04-051-0/+1
|
* 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-252-1/+9
| | | | | | | | | | | | | | | | | | 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-242-10/+25
| | | | | | `/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-242-20/+10
|
* Add slashguard featureMichael Vetter2020-03-183-0/+18
| | | | | New command `/slashguard` tries to protect against typing ` /quit` by not allowing a slash in the first 4 characters.
* xep-0084/avatar: add option to open avatar directlyMichael Vetter2020-03-102-0/+11
| | | | | | | | | | | Change: `/avatar me@somewhere.org` -> `/avatar get me@somewhere.org` New: `/avatar cmd feh` `/avatar open me@somewhere.org` Implement https://github.com/profanity-im/profanity/issues/1281
* Make statusbar tab more resilientMichael Vetter2020-03-091-4/+8
| | | | | | | | If users input strange stuff and we can't create a jid from it even the setting is set to 'user' we still should fallback to the regular identifer. For example with `/msg @name%matrix.domain.org@matrix.org hi`.
* Rename ProfBufferEntry jid variableMichael Vetter2020-03-093-7/+7
|
* 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-093-15/+16
|
* 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-093-7/+6
|
* 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
* Stop buffer_remove_entry_by_id() once we found the entryMichael Vetter2020-02-251-0/+1
| | | | No need to continue to loop through the rest.
* Properly free buffer entryMichael Vetter2020-02-251-0/+1
| | | | | | | g_slist_delete_link() is not enough we also need to call _free_entry() on the entry. This fixes a memleak in win_insert_last_read_position_marker()
* 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.
* Dont filter out own MUC messages if muc history is set to 'regular'Michael Vetter2020-02-212-4/+4
| | | | | | | | We use the same incoming function as for regular incoming text here. But don't want to filter out our own messages since we didn't print them during sending. Follow up to 8ee2cdadc88978ea26e6b6eb56f2aaa1fd5a81df
* 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-2013-372/+396
| | | | Fix https://github.com/profanity-im/profanity/issues/1264
* Parse mentions and triggers in muc history if display is 'regular'Michael Vetter2020-02-202-20/+28
| | | | Fix https://github.com/profanity-im/profanity/issues/1261
* Add option to color MUC history like regular messagesMichael Vetter2020-02-202-5/+20
| | | | | | | | | `/logging group color` has: * `unanimous` which will color it with one unanimous color. Like it was done always. * `regular` which colors it like regular incoming messages. Regards https://github.com/profanity-im/profanity/issues/1261
* Refactor mucwin_history()Michael Vetter2020-02-192-7/+8
| | | | Just pass ProfMessage.
* Add define names to commentMichael Vetter2020-02-192-7/+6
|
* Merge pull request #1269 from wstrm/add-sr.ht-ciMichael Vetter2020-02-171-2/+1
|\ | | | | Add builds.sr.ht CI for OpenBSD
| * Add builds.sr.ht CI for OpenBSDWilliam Wennerström2020-02-171-2/+1
| | | | | | | | | | | | | | | | * Add .builds/openbsd.yml for builds.sr.ht * Update travis-build.sh -> ci-build.sh with OpenBSD case * Fix libdl check in configure.ac (OpenBSD has libdl built-in) * Fix some minor issues found when compiling on OpenBSD with GCC (e.g. uninitialized variables)
* | Refactor win_print_history()Michael Vetter2020-02-174-14/+6
| | | | | | | | We never use the printf like behaviour anyways.
* | Refactor win_print_outgoing_muc_msg()Michael Vetter2020-02-173-15/+7
| | | | | | | | We never use the printf like behaviour anyways.
* | Refactor win_println_incoming_muc_msg()Michael Vetter2020-02-173-15/+7
| | | | | | | | We never use the printf like behaviour anyways.