1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-09-22 19:45:54 -04:00
Commit Graph

1589 Commits

Author SHA1 Message Date
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
95ab7ee062 Setting: only write in console upon muc mention
`/console muc mention` additionally to `first|none|all`.

Fix https://github.com/profanity-im/profanity/issues/1371
2020-07-10 15:16:34 +02:00
Michael Vetter
7b49fbdf45 Pass window to functions so we dont have to call twice 2020-07-09 16:11:50 +02:00
Michael Vetter
11d849aa7f Dont hilight console once all messages have been read
If we receive a message we get:
<< room message: eagle@conference.anoxinon.me (win 2)

Same for private chats and regular chats.
And several other kinds of notifications.

If we only receive notifications from a chat window it would be nice to
also clear the hilight on the console window since we already catched up
by reading the actual message in the chat window.

Probably not the best description :-) I hope you get it..

Regards https://github.com/profanity-im/profanity/issues/1399
2020-07-09 15:44:35 +02:00
Michael Vetter
8a2026ccbe Make _show_roster_contacts static 2020-07-09 08:48:10 +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
Michael Vetter
9774b0c550
Merge pull request #1374 from profanity-im/revampUrlopen
Rework /url and /executable for filetypes
2020-07-02 11:26:18 +02:00
Michael Vetter
86cd33405e Add note that /executable needs more work 2020-07-02 11:18:37 +02:00
Michael Vetter
59f5b81b85 cmd_url_*(): use gchar instead of char 2020-07-02 10:58:31 +02:00
Michael Vetter
8be1e44cea Adjust /executable test to be more precise 2020-07-01 15:42:26 +02:00
Michael Vetter
2b5160a351 console.c: Use prefs_free_string()
f9961677aa  replaces prefs_free_string()
with g_free(). Both is correct but lets still use this.
2020-07-01 14:50:07 +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
Pierre Mazière
f9961677aa Display default value for /url associated commands
The display of commands associated with specific file
types and protocols will need to be implemented later,
but this requires to use private data of the GKeyFile
structure, which can be a maintainability issue on the
long term.

Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
2020-06-25 15:03:20 +02:00
Pierre Mazière
64eb11fbaf Add aesgcm to urls grabber
Signed-off-by: Pierre Mazière <pierre.maziere@gmx.com>
2020-06-25 15:02:56 +02:00
Dmitry Podgorny
09e12a826f Fix gcc warnings for cygwin
strncpy(3) is not so safe function and can lead to mistakes. For
example, strncpy(dest, "Profanity", 10); is redundant and leads to
problems when someone changes the source string.

Different example is when 3rd argument equals to length of the
destination buffer. strncpy(3) doesn't terminate string with '\0' when
it truncates. Therefore, the destination string becomes corrupted.

Zeroize storage for 'nid', so the last byte remains '\0' in case of
truncate.
2020-06-24 16:29:19 +03:00
Michael Vetter
74e061165a Define POSIX macro to have strdup
98c38dc6d6
sets C99 as standard.

strdup() is not part of C99.

For now set `-D_POSIX_C_SOURCE=200809L` macro to have strdup() in C99.
Using `gnu99` instead would be another option.

We should take more care to use glib functions whenever possible.

Regards https://github.com/profanity-im/profanity/issues/1357
2020-06-12 16:12:21 +02:00
Dmitry Podgorny
ac410445af Add option for legacy authentication
New options:
  /connect <account> [auth default|legacy]
  /account <account> set auth default|legacy

Fixes #1236.
2020-06-05 11:37:51 +03:00
Michael Vetter
bfaf737efa urlopen: get last URL first
Fix https://github.com/profanity-im/profanity/issues/1348
2020-05-29 11:26:18 +02:00
Michael Vetter
d251b56166 Fix titlebar write position
Mistake introduced in 86f0e0ea70
The functions later on dont set an explitic position when writing their
strings.

Fix https://github.com/profanity-im/profanity/issues/1346
2020-05-27 08:59:00 +02:00
Michael Vetter
1cfab017a4 Handle listing ignored bookmarks when none are ignored 2020-05-25 13:38:47 +02:00
Michael Vetter
de8975c008 Add and use connection_get_barejid()
Instead of connection_get_fulljid() and then creating a Jid from it.
2020-05-25 13:04:19 +02:00
Michael Vetter
f121554088 List ignored bookmarks
`/bookmarl ignore` lists the ignored bookmarks.

Regards https://github.com/profanity-im/profanity/issues/1115
2020-05-24 17:55:08 +02:00
Michael Vetter
090732ed96 Fix invalid read in titlebar 2020-05-24 13:47:21 +02:00
Michael Vetter
86f0e0ea70 Dont show resource in titlebar if it is too long
Fix https://github.com/profanity-im/profanity/issues/715
2020-05-22 20:42:44 +02:00
Michael Vetter
fad296b79e Display bookmark name
Have field in struct and display the name in `/bookmark list`.

Regards https://github.com/profanity-im/profanity/issues/697
2020-05-22 13:56:00 +02:00
Michael Vetter
cb78ee4665 Make option to allow hiding windows with no messages in statusbar
`statusbar.show.read` can be set to false in the config.
`/statusbar show|hide read`.

Implement https://github.com/profanity-im/profanity/issues/1285
2020-05-21 16:15:14 +02:00
Michael Vetter
fcd69532ad Make 'scrolled' themeable 2020-05-21 09:16:18 +02:00
Michael Vetter
469fa8f863 Display when scrolled up
Display [SCROLLED] in titlebar if a chat/muc/private win is scrolled up.

Implement https://github.com/profanity-im/profanity/issues/1289
2020-05-21 09:14:45 +02:00
Michael Vetter
7b541d0a6d Add /executable command
This is used to set the openers for various commands.
So far for /avatar and /urlopen.
2020-05-20 14:14:49 +02:00
Michael Vetter
aef74f90ec Only save max 20 urls 2020-05-20 10:54:58 +02:00
Michael Vetter
ce32d874e0 Build URL ac upon printing of message in window 2020-05-20 10:54:54 +02:00
Michael Vetter
22ca81e0b6 Look for URLs via regex 2020-05-20 10:47:46 +02:00
Michael Vetter
083bf34a77 Start urlopen feature
Start https://github.com/profanity-im/profanity/issues/1340
2020-05-20 10:47:40 +02:00
Michael Vetter
5cf6ee1bc6 Fix /correction char display
1f8b1eb740 made it possible to have utf8 chars as correction chars. So since then prefs_get_correction_char() doesn't return a regular char but a char*.
Seems like there was an oversight that we need to use %s then.
2020-05-06 13:46:40 +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
4a712fcc7b Fixup for bad56b5062
sorry.. doing too many things at once..
2020-04-22 17:01:27 +02:00
Michael Vetter
bad56b5062 wins_show_subwin(): Add windows type test
Fix https://github.com/profanity-im/profanity/issues/1321
2020-04-22 14:03:29 +02:00
Michael Vetter
813fd637a1 inp_readline() Correct slashguard feature
Protect against invalid reads by checking the length.
2020-04-21 16:47:18 +02: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
fb85cec129 Remove unused func wins_close_current() 2020-04-20 16:16:18 +02:00
Michael Vetter
9e73782f72 _destroy_tab() dont set tab to NULL
Setting the local pointer to NULL has no effect.

_destroy_tab() is used for g_hash_table_new_full() so we cant use a **
and set tab to NULL.
2020-04-20 16:10:24 +02:00
Michael Vetter
86af6925d9 Simplify win_refresh_with_subwin() 2020-04-20 16:09:40 +02:00
Michael Vetter
70683c07ab _mucwin_print_mention(): No need to assign pos 2020-04-20 16:02:19 +02:00
Michael Vetter
b2ec6ba4ce ui_room_join() dont get nick twice 2020-04-20 16:01:05 +02:00