William Wennerström
4711fc62a3
Run make format on rebase
2020-11-16 21:58:09 +01:00
William Wennerström
9499df6585
Add http_download tool
2020-11-16 21:58:09 +01:00
Michael Vetter
35aecd425f
Declare counter var inside loop
...
We require c99/gnu99 anyways.
2020-11-09 11:33:33 +01:00
nia
ce67753423
Avoid passing NULL pointers to curses functions.
...
This allows profanity to work without segfaulting from NULL
pointer dereferences when used with NetBSD libcurses.
Basic functionality was tested, there may be more NULL pointer
issues hiding.
2020-09-04 12:59:20 +02:00
nia
52e9be4abc
Basic support for building on NetBSD.
...
- Add NetBSD as a recognized platform without -ldl.
- Allow building with NetBSD libcurses instead of ncurses.
- Portability to NetBSD sh - use POSIX '=' instead of '=='.
2020-09-04 12:55:20 +02:00
Michael Vetter
5db840e0cc
Fix memleak in win_print_outgoing_with_receipt()
...
We should actually process the receipts also in LMC I think.
Regards https://github.com/profanity-im/profanity/issues/805
2020-07-23 10:06:49 +02:00
Michael Vetter
a2726b6a7d
Apply coding style
2020-07-07 14:18:57 +02:00
Michael Vetter
a4cadf78fa
Revert "Apply coding style"
...
This reverts commit 9b55f2dec0 .
Sorting the includes creates some problems.
2020-07-07 13:53:30 +02:00
Michael Vetter
9b55f2dec0
Apply coding style
...
Regards https://github.com/profanity-im/profanity/issues/1396
2020-07-07 09:43:28 +02:00
Michael Vetter
e5ac12afa6
Remove prefs_free_string()
...
It just does a free.
Related to b580b9ef11
2020-07-02 11:34:12 +02:00
Stefan Kropp
7d6ef8f4c8
Initialize is_ox in win_create_chat()
...
Fixes an issue where messages are displayed as OX when they are not.
2020-07-01 09:23:23 +02:00
DebXWoody
2c94ee5a88
Feature request - XEP-0373: OpenPGP for XMPP (OX)
...
Basic implementation of XEP-0373: OpenPGP for XMPP.
https://xmpp.org/extensions/xep-0373.html
Command /ox
Issue: #1331
2020-06-29 19:05:41 +02:00
Michael Vetter
85520ecdc5
Remove unanimous MAM display
...
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.
2020-04-25 17:19:02 +02:00
Dmitry Podgorny
4672d0ca19
ui: fix condition
...
Fix mistake in a condition. Also add sanity check to
win_refresh_with_subwin().
2020-04-23 14:30:49 +03:00
Michael Vetter
f27bd92731
Make compiler happy about win_refresh_without_subwin
2020-04-20 16:44:47 +02:00
Michael Vetter
b1d71236fe
win_refresh_with_subwin() fixup
...
Fixup for 86af6925d9
2020-04-20 16:35:13 +02:00
Michael Vetter
86af6925d9
Simplify win_refresh_with_subwin()
2020-04-20 16:09:40 +02:00
Michael Vetter
180ec2b474
Add to_jid field to ProfMessage struct
...
Is usefult in many cases if we want cleaner code.
Hope this edit didn't break anything though ;-)
2020-04-11 17:11:53 +02:00
Michael Vetter
f42f856d37
Retrieve message type from database
...
So we don't have to check for MUC another way.
2020-04-08 12:50:23 +02:00
Michael Vetter
bd116e6ad9
win_print_history() print 'me' on regular chats if we wrote the message
...
Same behaviour like when we used to get it from the text files.
2020-04-06 15:48:23 +02:00
Michael Vetter
067bc690f2
Adapt win_print_history() to work with muc too
2020-04-06 15:33:01 +02:00
Dmitry Podgorny
37c200571f
Fixed memory leak in ProfMucWin
...
Profanity remembers last message and its id for the message correction
feature. We must free them in window destructor.
2020-04-03 01:47:38 +03:00
Michael Vetter
4fc938d804
Add setting to not colorize own nick according to xep-0392
...
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
2020-03-25 12:54:25 +01:00
Michael Vetter
f131680055
titlebar: allow displaying MUC name and MUC jid
...
`/titlebar use name|jid` -> `/titlebar show|hide name|jid`
Fix https://github.com/profanity-im/profanity/issues/1284
2020-03-24 22:22:16 +01:00
Michael Vetter
fd090d384d
move titlebar code in correct function
2020-03-24 21:46:40 +01:00
Michael Vetter
a3889c94bc
Rename ProfBufferEntry jid variable
2020-03-09 13:33:48 +01:00
Michael Vetter
f3d9de133e
Check for sender of LMC message
2020-03-09 13:31:49 +01:00
Michael Vetter
f7fe87dd4e
Write from jid in buffer
...
Not all cases covered yet.
2020-03-09 12:52:47 +01:00
Michael Vetter
95a16c2486
Add barejid to buffer struct
2020-03-09 12:47:43 +01:00
Michael Vetter
441e31984e
Remove old comments
2020-03-09 12:31:49 +01:00
Michael Vetter
56836fb72d
Use correct MUC message timestamp
...
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.
2020-03-09 12:22:36 +01:00
Michael Vetter
3d7e6fae7c
Use ProfMessage as parameter for win_println_incoming_muc_msg()
2020-03-09 12:00:15 +01:00
Michael Vetter
0801623018
window.c: Rename variable
2020-03-09 11:51:32 +01:00
Michael Vetter
ca14f3a1a2
Fix memory leak in win_create_muc()
...
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
2020-02-27 16:14:54 +01:00
Michael Vetter
1a87d7be3e
Only use enc_char in win_print_incoming() when needed
...
Fixes potential memory leak too.
2020-02-25 14:52:38 +01:00
Michael Vetter
99dc1c9494
Rename separator to trackbar
2020-02-21 19:17:12 +01:00
Michael Vetter
6dbbbe11e5
Make trackbar color configurable
...
Use `main.trackbar` in themes.
2020-02-21 19:12:16 +01:00
Michael Vetter
7fdc4ed7f6
win_print_incoming() strdup the charactar
...
Fix bug introduced in 1f8b1eb740 .
Forgot to strdup() here.
2020-02-21 08:02:11 +01:00
Michael Vetter
1f8b1eb740
Allow utf8 symbols as omemo/pgp/otr indicator char
...
Fix https://github.com/profanity-im/profanity/issues/1264
2020-02-20 23:36:10 +01:00
Michael Vetter
cf36a92dcb
Add define names to comment
2020-02-19 16:36:54 +01:00
Michael Vetter
ea5a947f52
Refactor win_print_history()
...
We never use the printf like behaviour anyways.
2020-02-17 12:05:58 +01:00
Michael Vetter
6e68f1812b
Refactor win_print_outgoing_muc_msg()
...
We never use the printf like behaviour anyways.
2020-02-17 12:03:23 +01:00
Michael Vetter
f13ea11f95
Refactor win_println_incoming_muc_msg()
...
We never use the printf like behaviour anyways.
2020-02-17 11:58:36 +01:00
Michael Vetter
69d474b3a7
Refactor win_print_outgoing()
...
We never use the printf like behaviour anyways.
2020-02-17 11:48:50 +01:00
Michael Vetter
fcfb493dfb
Rename buffer->from to buffer->display_from
2020-02-14 10:17:07 +01:00
Michael Vetter
9b3593bdf9
xep-0308: enable correction in outgoing messages with delivery receipts
2020-02-14 10:17:07 +01:00
Michael Vetter
3e901aee99
Rename win_print_with_receipt() -> win_print_outgoing_with_receipt()
2020-02-14 10:17:07 +01:00
Michael Vetter
2900bf4aef
Rename win_println_them_message() -> win_println_incoming_muc_msg()
...
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.
2020-02-14 10:17:07 +01:00
Michael Vetter
743ec6afd0
xep-0308: only replace messages if the user enabled the feature
...
Outgoing `/correct` will still work.
2020-02-14 10:17:07 +01:00
Michael Vetter
4ec005e4c3
xep-0308: Implement LMC for outgoing MUC messages
...
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.
2020-02-14 10:17:07 +01:00