about summary refs log tree commit diff stats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
| | * | | use `_string_matches_one_of()` at more placesSteffen Jaeckel2022-03-311-16/+7
| | |/ / | | | | | | | | | | | | | | | | | | | | I missed them the last time ... Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
| * / / Fix race condition on resizePaul Fertser2022-04-011-3/+1
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current code is inherently racy: if screen update takes considerable time (e.g. when working over network) and a user performed a series of resizes the final event might get ignored and the display will be left in inconsistent state. Fix the race by unsetting the flag first so if the next WINCH signal is received while display is resizing it'll be processed on the next iteration.
| * | run `make format`Steffen Jaeckel2022-03-302-3/+4
| | | | | | | | | | | | Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
| * | add `_string_matches_one_of()` helper functionSteffen Jaeckel2022-03-301-21/+39
| | | | | | | | | | | | | | | | | | ... instead of copying the same pattern over and over again. Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
| * | clean-up connection (act I)Steffen Jaeckel2022-03-301-152/+63
| |/ | | | | | | | | | | | | | | | | * use custom memory descriptor that `abort()`s on `malloc()` failure * use static log descriptor * don't always re-create all contexts * de-duplicate code of `.._connect()` and `.._register()` Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
| * Input window: handle invalid multibytePaul Fertser2022-03-291-0/+4
| | | | | | | | | | | | | | | | | | | | The current code enters an infinite loop if the input string happens to get an invalid utf-8 sequence somehow. For me it was reproducible by running profanity in a Screen session and pressing Alt-т (cyrillic letter). Fix it the way borrowed from 0501e49623f68aa39508e4e622924c1dd8147588 where mbrlen is used for the same purposes.
* | use more standard replies when setting stampMichael Vetter2022-04-281-3/+3
| |
* | Rename stamp preference variableMichael Vetter2022-04-285-16/+16
| | | | | | | | | | PREF_INCOMING_STR -> PREF_INCOMING_STAMP PREF_OUTGOING_STR -> PREF_OUTGOING_STAMP
* | Rewrite stamp helpMichael Vetter2022-04-281-12/+10
| |
* | add /stamp commandArtjom Vejsel2022-04-027-2/+97
|/ | | | command allow override standard stamps of incoming and outgoing messages
* Merge pull request #1656 from MarcoPolo-PasTonMolo/feature/who-noneMichael Vetter2022-03-294-3/+14
|\ | | | | Add none option for /who
| * Add none option for /whoMarcoPolo-PasTonMolo2022-03-274-3/+14
| | | | | | | | | | Fixes https://github.com/profanity-im/profanity/issues/1425 `/who none` now displays all users in an muc without an affiliation
* | Use EDITOR environment variablePaul Fertser2022-03-271-2/+4
|/ | | | | | | When preferences do not specify a program to be used for /editor command, try getting it from EDITOR (which POSIX.1-2017 calls one of "variables that are frequently exported by widely used command interpreters and applications"), fall back to "vim" if not set.
* Merge pull request #1655 from profanity-im/win-autocompleteMichael Vetter2022-03-241-0/+4
|\ | | | | Reset url autocompletion after open/save
| * Reset url autocompletion after open/saveMichael Vetter2022-03-241-0/+4
| | | | | | | | | | | | | | I guess we should reset the position after we ran `/url open|save`. So that next time `/url open <tab>` starts with the latest entry. Fix https://github.com/profanity-im/profanity/issues/1654
* | Fix crash on /editorMarcoPolo-PasTonMolo2022-03-241-1/+5
| |
* | Merge pull request #1652 from profanity-im/fix-1624Michael Vetter2022-03-2313-46/+204
|\ \ | |/ |/| Fix #1624
| * apply `tls.policy` to cURL callsSteffen Jaeckel2022-03-222-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | In case the user decides to ignore the validity-state of certificates we also have to configure libcurl accordingly. `tls.policy` can be set via ``` /account set <account> tls trust ``` Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
| * add profanity-specific CAfileSteffen Jaeckel2022-03-227-0/+169
| | | | | | | | | | | | | | | | The profanity-internal mechanism to allow connecting to a server isn't easily portable to cURL. Therefor introduce a profanity-specific CAfile which is managed individually and will be configured in libcurl calls. Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
| * a tad more `const`-correctnessSteffen Jaeckel2022-03-226-8/+8
| | | | | | | | Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
| * also store PEM in `TLSCertificate`Steffen Jaeckel2022-03-223-5/+12
| | | | | | | | Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
| * simplify codeSteffen Jaeckel2022-03-211-33/+1
| | | | | | | | Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
* | Use funcs available in all glib versions to replace \n in quotesMarcoPolo-PasTonMolo2022-03-211-2/+7
| |
* | Add quote autocompletion for previous messagesMarcoPolo-PasTonMolo2022-03-219-1/+86
|/ | | | | | | | | | Fixes https://github.com/profanity-im/profanity/issues/1649 Type `>` then press tab or shift tab to autocomplete previous messages, then type your reply and send message. Newlines are replaced with newline followed by `> `. A newline is added at the end so that the user can immediately type a message without manually adding a new line.
* Add adhoc cmd autocompletionMichael Vetter2022-03-211-0/+19
| | | | | | | | | | Add tab completion for `/cmd`. Complete the `list` and `exec` subcommands. Didn't complete the `<jid>` part since I think it's usually used for components and etc. Things that might not be in the roster. Fix https://github.com/profanity-im/profanity/issues/1650
* Merge pull request #1644 from profanity-im/ox-polishMichael Vetter2022-03-214-102/+97
|\ | | | | Improve OX user experience
| * Remove strange block from ox autocompleteMichael Vetter2022-02-251-18/+0
| | | | | | | | | | | | Not sure what this should do. Can't see what kind of key we want to complete here. `/ox help` also doesn't list anything that needs a key.
| * Remove useless commentMichael Vetter2022-02-251-5/+0
| |
| * Fix memleak in cmd_exportMichael Vetter2022-02-241-0/+1
| |
| * ox: expand file and check for existance before trying to announceMichael Vetter2022-02-241-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Output before: ``` 11:00:00 - Annonuce OpenPGP Key for OX ~/test/testuser.pub.gpg ... ``` After: ``` 11:00:00 - Annonuce OpenPGP Key for OX /home/user/test/testuser.pub.gpg ... ``` Now we expand the path so that we can check for `~` properly. And test if the file is actually a normal file.
| * ox: remove else caseMichael Vetter2022-02-241-43/+44
| |
| * ox: add autocomplete for /ox announceMichael Vetter2022-02-241-0/+4
| |
| * ox: adjust formattingMichael Vetter2022-02-241-4/+0
| |
| * ox: standardize log outputMichael Vetter2022-02-241-33/+34
| |
* | Merge pull request #1646 from MarcoPolo-PasTonMolo/fix/nick-autocompleteMichael Vetter2022-03-211-12/+19
|\ \ | | | | | | Fix not autocompleting nicks with '/'
| * | Reverse priority for nick vs cmd autocompleteMarcoPolo-PasTonMolo2022-03-211-12/+15
| | |
| * | Fix not autocompleting nicks with '/'MarcoPolo-PasTonMolo2022-03-031-4/+8
| | | | | | | | | | | | | | | | | | | | | Remove check for '/' at the beginning of the line before autocompleting and make it fallback to command autocompletion if no nicks found. Fixes https://github.com/profanity-im/profanity/issues/1474
* | | re-factor `get_message_from_editor()`Steffen Jaeckel2022-03-141-62/+50
| | | | | | | | | | | | | | | | | | | | | * use GLib functions to write&read compose file * trim trailing new-line characters from compose file Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
* | | replace `GString` usage where a simple `strdup` worksSteffen Jaeckel2022-03-141-20/+6
| | | | | | | | | | | | Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
* | | refactor logfile-name creationSteffen Jaeckel2022-03-141-66/+10
| | | | | | | | | | | | Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
* | | use `g_mkdir_with_parents()` instead of home-baked solutionSteffen Jaeckel2022-03-144-43/+13
| | | | | | | | | | | | Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
* | | add `files_file_in_account_data_path()`Steffen Jaeckel2022-03-136-71/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As all parts of the code invoking the `files_get_account_data_path()` function did the same afterwards, a function has been added with the same behavior. 1. create path 2. `mkdir` of that path 3. return final path Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
* | | prevent segfaultSteffen Jaeckel2022-03-132-4/+11
| | | | | | | | | | | | | | | | | | | | | In case we're not connected yet and press Alt+c a segfault occurred since `conn.xmpp_conn` is dereferenced while it's still `NULL`. Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
* | | Alt+e is already bound, use Alt+cSteffen Jaeckel2022-03-131-1/+1
| | | | | | | | | | | | Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
* | | Add stat.h to editorMichael Vetter2022-03-041-0/+1
| | | | | | | | | | | | | | | | | | Fix on openbsd: `src/tools/editor.c:55:36: error: 'S_IRWXU' undeclared (first use in this function)`
* | | Include errno header in editor.cMichael Vetter2022-03-041-1/+2
| | |
* | | Move get_message_from_editor to appropriate file and change its keybindingMarcoPolo-PasTonMolo2022-03-035-88/+181
| | |
* | | Add hotkey for sending readline text to editorMarcoPolo-PasTonMolo2022-03-033-5/+31
|/ /
* / Add `/subject editor` commandMichael Vetter2022-02-263-5/+21
|/ | | | | | | | Allow editing the MUC subject using external editor. Use `/subject editor`. Fix https://github.com/profanity-im/profanity/issues/1638
* Set libstrophe log verbosityMichael Vetter2022-02-211-0/+1
| | | | | | | | | | | | | | | Set this to 0. We might want to have this configurable later. For now we fix the valgrind report: ``` Conditional jump or move depends on uninitialised value xmpp_debug_verbose() ``` Which will be fixed in libstrophe > 0.11.0 by commit https://github.com/strophe/libstrophe/commit/28f3ce19b803b3c2628c37545e3f5b88e7ea1a55