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

26 Commits

Author SHA1 Message Date
Michael Vetter
569e37f018 Update copyright to 2024 2024-01-22 16:03:48 +01:00
John Hernandez
e1d137f4e6 Change char->free to auto_char char for autocleanup
Replace `gchar` and `g_free` to `auto_gchar`
Correct certain  `char` functions/variables to `gchar`

Related to #1819.

Edited by @jubalh.
2023-07-11 13:26:37 +02:00
Michael Vetter
d17bcf619c Format code with clang-format 16 2023-04-14 21:45:21 +02:00
Michael Vetter
3adc399da0 Update copyright year 2023-01-10 10:37:25 +01:00
Michael Vetter
413b5f9bc9 Work around different clang-format versions
Locally I have clang-format 15.0.2.
Our CI runs ubuntu-20.04 so it has 10.0.

Seems like a default value changed but I can't find it.
When I still had clang-format 14.x everything was fine and checking:
https://releases.llvm.org/15.0.0/tools/clang/docs/ReleaseNotes.html#clang-format

I only see irrelevant things.

Someone on the llvm IRC channel sais "there is no guarantee" and "maybe
a regression or intended change".
But seems like noone knows which setting could be the one we need.

Since I don't have a better solution for now I will just edit this by
hand to apply to the clang-format version we have on the CI.
Will look into updating this one.

But in any case it would be best if the configuration file could have
this setting so formatting works the same for all contributors.
2022-10-26 15:15:37 +02:00
Michael Vetter
a04031cec9 Apply codigng style on new MAM code 2022-10-21 16:55:18 +02:00
Michael Vetter
1330ad4e1e Update copyright year 2022-05-09 15:43:33 +02:00
Michael Vetter
8c08e64f37 Update copyright 2021-01-08 16:36:30 +01:00
Michael Vetter
35aecd425f Declare counter var inside loop
We require c99/gnu99 anyways.
2020-11-09 11:33:33 +01: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
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
802df37926 XEP-0392: get background color from theme
So far we just used -1 (default color). Now we actually check whether
`bkgnd` is set in the theme file and use this if available.

Fix https://github.com/profanity-im/profanity/issues/1255
2020-01-22 10:01:04 +01:00
Michael Vetter
be13e98fe7 Update my Copyright to 2020 2020-01-03 19:52:31 +01:00
Michael Vetter
3258211f27 Improve color blindness handling
Rename some things and use a swtich instead of if.
2019-12-12 14:23:07 +01:00
Michael Vetter
2750194279 Implement Color Vision Deficiencies setting
Implement settings for redgreen and blue blindness.

Regards https://github.com/profanity-im/profanity/issues/1191
2019-12-12 11:07:11 +01:00
Aurelien Aptel
4a672bda22 XEP-0392: color: implement color hashing
* add the HSL values of each of the 256 terminal colors
* add color_pair_cache_hash_str()
* move common code to _color_pair_cache_get() helper func

after hashing a string to a color, return the closest matching
terminal color using euclidian distance of the HSL diff vector (this
method was found empirically and seems to work well enough...)
2019-12-03 21:10:39 +01:00
Michael Vetter
46fd7150e5 Add vim modeline 2019-11-13 12:11:05 +01:00
Michael Vetter
726eee2a66 Make sure memory in color_pair_cache_reset() was allocated.
Just to be on the safe side.

Probably only relevant for unit tests where ncurses vars are not
initialized with real values.
Fix unit tests on all platforms.
2019-08-24 18:04:02 +02:00
Michael Vetter
e408e988a7 color: set capacity in unittest case
Fix https://github.com/profanity-im/profanity/issues/1178
2019-08-23 14:54:55 +02:00
Michael Vetter
c2a565c2ec Notify trying to load 256 colour theme in incapable terminal 2019-08-23 14:24:44 +02:00
Michael Vetter
56c77678f2 color: Include log.h 2019-08-23 14:07:41 +02:00
Michael Vetter
df1b19ecec Reformat color.c 2019-08-23 13:48:42 +02:00
Michael Vetter
0b9880f7a0 Use log_error() instead of g_warning() 2019-08-23 13:46:14 +02:00
Aurelien Aptel
269afa53b4 Add 256 colors support
Themes can now use color names from the xterm color name list [1].

1: https://jonasjacek.github.io/colors/
2019-08-23 13:25:45 +02:00