1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-11-03 19:37:16 -05:00
Commit Graph

7118 Commits

Author SHA1 Message Date
Steffen Jaeckel
7da2e6d9f3 Fix logging (this time for real)
... I hope ...

We also need to create the path where the logs are stored.

Fixup of d82f2f293b

Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
2022-04-01 14:56:08 +02:00
Michael Vetter
af6a9df79b
Merge pull request #1672 from profanity-im/fix-logging
fix path where logs are stored
2022-04-01 14:39:10 +02:00
Steffen Jaeckel
d82f2f293b fix path where logs are stored
43e5f15e66 broke the creation of the path
where chatlogs are stored. This is fixed now.

Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
2022-04-01 14:17:44 +02:00
Michael Vetter
ba3d5e8de9
Merge pull request #1664 from paulfertser/tab-completion-cleanup
Tab completion code simplification
2022-04-01 12:52:54 +02:00
Michael Vetter
129886454c
Merge pull request #1667 from paulfertser/fix-screen-arrows-bindings
Add Alt/Ctrl-arrows combinations for GNU Screen
2022-04-01 12:50:47 +02:00
Michael Vetter
eed5e8a652
Merge pull request #1669 from paulfertser/make-rl-functions-bindable
Make all existing input functions bindable from config
2022-04-01 12:50:29 +02:00
Michael Vetter
1bd0e4ddf5
Merge pull request #1670 from profanity-im/moar-cleanup
Even moar cleanup
2022-04-01 12:23:56 +02:00
Michael Vetter
7eab15d2b2
Merge pull request #1668 from paulfertser/document-input-rc
Document custom input configuration in man page
2022-04-01 12:16:09 +02:00
Michael Vetter
56ccbf68a8
Merge pull request #1671 from paulfertser/fix-resize-race
Fix race condition on resize
2022-04-01 12:14:44 +02:00
Steffen Jaeckel
b914929320 fix account set theme help
Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
2022-04-01 11:03:28 +02:00
Paul Fertser
e1323655ee Fix race condition on resize
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.
2022-04-01 10:49:01 +03:00
Steffen Jaeckel
1c7bae4ae9 fix linter warnings
Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
2022-03-31 14:29:56 +02:00
Steffen Jaeckel
f284641710 less duplication
Print error message from `_string_matches_one_of()` instead of forming
an error message manually that contains the same entries that were checked
in `_string_matches_one_of()`.

Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
2022-03-31 14:29:56 +02:00
Steffen Jaeckel
c53b78ea1c use _string_matches_one_of() at more places
I missed them the last time ...

Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
2022-03-31 10:33:14 +02:00
Paul Fertser
54c00e206d Make all existing input functions bindable from config 2022-03-30 23:00:14 +03:00
Paul Fertser
8ffa6f7452 Document custom input configuration in man page 2022-03-30 22:41:49 +03:00
Paul Fertser
4a6f88cc23 Add Alt/Ctrl-arrows combinations for GNU Screen
GNU Screen terminal emulator is modelled after VT100, its key bindings
for "application mode" (which profanity enables on startup) can be
seen with this: info screen "Input Translation".
2022-03-30 21:46:25 +03:00
Michael Vetter
9a4cfa70ef
Merge pull request #1666 from paulfertser/man-page-improvements
Man page improvements
2022-03-30 20:21:40 +02:00
Paul Fertser
66bd041617 Improve manpage formatting a bit 2022-03-30 21:01:40 +03:00
Paul Fertser
3478438df5 Add all missing key bindings to man page 2022-03-30 20:59:21 +03:00
Michael Vetter
14e6b9d227
Merge pull request #1665 from profanity-im/moar-cleanup
More cleanup
2022-03-30 19:35:14 +02:00
Steffen Jaeckel
eae795f478 fix installation of manpages
fixup of 46b9428d92

[0] writes something about "... use ‘man*section*_MANS’ over ‘man_MANS’ ..."
in the context of "fast installation", so I tried that and it worked.

TBH I don't really understand why this fixes the problem.

[0] https://www.gnu.org/software/automake/manual/html_node/Man-Pages.html

Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
2022-03-30 18:26:10 +02:00
Steffen Jaeckel
53a7689a58 update gitignore
Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
2022-03-30 18:26:10 +02:00
Steffen Jaeckel
67fa33ba4e add CI job to check coding style
Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
2022-03-30 18:26:10 +02:00
Steffen Jaeckel
2ca63d1d5f run make format
Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
2022-03-30 18:26:10 +02:00
Steffen Jaeckel
2995fbb953 add _string_matches_one_of() helper function
... instead of copying the same pattern over and over again.

Signed-off-by: Steffen Jaeckel <jaeckel-floss@eyet-services.de>
2022-03-30 18:26:10 +02:00
Steffen Jaeckel
3a03496817 clean-up connection (act I)
* 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>
2022-03-30 18:26:10 +02:00
Paul Fertser
3b40da854d Tab completion code simplification
Factor out common code for Tab and Shift-Tab in a separate function.

No functional change.
2022-03-30 16:36:10 +03:00
Michael Vetter
7301c99676 Start new cycle 2022-03-30 14:08:49 +02:00
Michael Vetter
9214b0a10a Release 0.12.0 2022-03-30 14:08:49 +02:00
Michael Vetter
b5a6074b31
Merge pull request #1660 from paulfertser/fix-invalid-mbrlen-input
Input window: handle invalid multibyte
2022-03-29 13:03:28 +02:00
Paul Fertser
1e81eea899 Input window: handle invalid multibyte
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 0501e49623
where mbrlen is used for the same purposes.
2022-03-29 13:57:07 +03:00
Michael Vetter
3ee3d78af5 changelog: add build requirements info 2022-03-29 12:20:10 +02:00
Michael Vetter
b04a68462c Update Changelog for 0.12.0 2022-03-29 12:13:24 +02:00
Michael Vetter
abfab2aff7
Merge pull request #1659 from paulfertser/add-debug-info
Add debug information to binary
2022-03-29 11:15:29 +02:00
Michael Vetter
92f1ba47df
Merge pull request #1656 from MarcoPolo-PasTonMolo/feature/who-none
Add none option for /who
2022-03-29 01:28:58 +02:00
Paul Fertser
ca782b5385 Add debug information to binary
Option -ggdb3 (same as -g3) doesn't affect code-generation, just adds
to the binary size of an executable. Automake strips installed
binaries automatically when "make install-strip" is run so enabling
this option permanently doesn't affect the end result while allowing
for hassle-free interactive debugging.

If one is running a stripped binary it's still possible to attach GDB
by process PID and then use "file /path/to/unstripped/profanity" to
get all symbols and lines data.
2022-03-28 16:37:07 +03:00
Michael Vetter
b9e811efb3
Merge pull request #1657 from paulfertser/autoconf-fixes
Autoconf fixes
2022-03-28 15:18:08 +02:00
Michael Vetter
d662c1b82e
Merge pull request #1658 from paulfertser/use-editor-env-variable
Use EDITOR environment variable
2022-03-27 21:09:27 +02:00
Paul Fertser
1272543237 Use EDITOR environment variable
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.
2022-03-27 21:48:45 +03:00
Paul Fertser
08212a839a Fix AM_CFLAGS assignments (including libstrophe flags)
Autoconf can pre-populate this variable with essential parameters so
it should be appended to rather than overridden.

While at it, don't miss to append CFLAGS for libstrope which is needed
if it's installed to a non-default location.
2022-03-27 20:49:19 +03:00
Paul Fertser
90ea2fabe6 Fix autoconf warning about AC_CANONICAL_TARGET ordering
AM_INIT_AUTOMAKE requires AC_ARG_PROGRAM so should go after
AC_CANONICAL_TARGET for proper program name mangling.

This fixes "AC_ARG_PROGRAM was called before AC_CANONICAL_TARGET"
warning as emitted by autoconf 2.69.
2022-03-27 20:40:27 +03:00
MarcoPolo-PasTonMolo
03f8db9658 Add none option for /who
Fixes https://github.com/profanity-im/profanity/issues/1425
`/who none` now displays all users in an muc without an affiliation
2022-03-27 16:06:29 +03:00
Michael Vetter
409268e2b6
Merge pull request #1655 from profanity-im/win-autocomplete
Reset url autocompletion after open/save
2022-03-24 20:30:40 +01:00
Michael Vetter
923af3ba38 Reset url autocompletion after open/save
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
2022-03-24 15:39:58 +01:00
Michael Vetter
39b276986b
Merge pull request #1653 from MarcoPolo-PasTonMolo/fix/editor-crash
Fix crash on /editor
2022-03-24 15:37:38 +01:00
MarcoPolo-PasTonMolo
ce152a82b4 Fix crash on /editor 2022-03-24 11:42:49 +02:00
Michael Vetter
2c7f52f81d
Merge pull request #1652 from profanity-im/fix-1624
Fix #1624
2022-03-23 13:02:01 +01:00
Steffen Jaeckel
3a86b8c29b apply tls.policy to cURL calls
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>
2022-03-22 11:44:01 +01:00
Steffen Jaeckel
7f1f9787cb add profanity-specific CAfile
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>
2022-03-22 11:44:01 +01:00