Commit graph

4,573 commits

Author SHA1 Message Date
altffour
a0b770e70e
xdg-suport: fix clang 2021-01-25 09:49:09 +03:00
altf_four
0ffa65348d
xdg-support: fix memory leak using g_strdup_printf 2021-01-25 06:32:10 +00:00
altf_four
6cf5de1fd1
xdg-support: fix inverted if condition 2021-01-20 07:03:21 +00:00
altffour
7ad619858b
xdg: clang-format 2021-01-12 14:16:00 +03:00
altffour
661a681749
xdg: real fix of memory leaks with XDG special dir 2021-01-12 14:13:08 +03:00
altffour
6534086c9d
xdg: clang-format 2021-01-12 08:44:58 +03:00
altffour
7912447ce9
xdg: fix a compile error 2021-01-12 08:43:17 +03:00
altffour
7904d0bbba
xdg: fix memory leaks of special XDG paths variables
use g_strdup_printf() instead of g_build_filename()
2021-01-12 08:38:38 +03:00
altffour
e53fc95659
xdg: check for get_irssi_config() for he firsttimer
This would solve an edge case where the user would specify the config
file and they might not have the config directory, they are marked as
firsttimer, which is not correct.
2021-01-12 08:26:28 +03:00
altffour
9c634657ce
xdg: add get_irssi_config_dir()
- add get_irssi_config_dir()
- supply autorun_startup(void) with user config directory, rather than
data dir
2021-01-11 23:06:47 +03:00
altffour
19aee3096e
xdg: bump ABI version 2021-01-11 16:36:08 +03:00
altffour
b01d0c021d
xdg: use if/else in place of shortened if 2021-01-11 16:31:26 +03:00
altffour
a554e624ff
xdg: fix bug when specifying home directory
When specifying home-dir using --home would skip the part where
irssi_cache_dir & irssi_runtime_dir to be uninitialized. Fix that by
correctly assigning the variables in question, when irssi_dir == NULL.
2021-01-11 16:18:55 +03:00
altffour
059c2a04ea
xdg: apply clang-format patch 2021-01-11 15:58:33 +03:00
altffour
a3ff6baafb
xdg: replace stat() with g_file_test()
- title
- resolve dirp being leaked if XDG directory is found
2021-01-11 15:51:38 +03:00
altffour
0289a149e6
xdg: fix compile errors 2021-01-09 20:07:31 +03:00
altffour
d5bcf150c1
xdg: add helper function to ensure dir exist 2021-01-09 12:13:30 +03:00
altffour
95ae4f1ed4
xdg: init_configfiles() accomodate for new paths
- if xdg is being used, check if the special directories exist, if so,
create them
2021-01-07 14:34:51 +03:00
altffour
4059827741
xdg: implement a better way
Brief about changes:
- add get_irssi_cache_dir()
- add get_irssi_runtime_dir()
- remove is_xdg_supported()

About the proposed implementation:
- use XDG only when the user has the XDG_CONFIG_HOME/irssi directory
- irssi_dir would equal XDG_DATA_HOME/irssi or ~/.irssi, depending on
whether XDG is enabled or not, respectively.
- if xdg is enabled, variables irssi_cache, irssi_runtime, would equal
their respective XDG paths.
- if xdg is *not* enabled, variables irssi_cache, irssi_runtime, would
equal irssi_dir

Notes for future code:
- functions that use the irssi config file would use get_irssi_config()
- functions that use the irssi data directory would use get_irssi_dir()
- functions that use the irssi cache directory would use
get_irssi_cache_dir()
- functions that use the irssi runtime directory would use
get_irssi_runtime_dir()

Stuff that are still missing for complete implementation:
- add checks to ensure the new referenced directories are present
- docs
2021-01-07 13:26:45 +03:00
altffour
9175ee0bc1
attempt to fix scriptassist.pl 2021-01-07 12:35:06 +03:00
altffour
9123c6f178
add logic to default to XDG disabled
- defaults to XDG disabled unless the directory is present
2021-01-06 19:46:52 +03:00
altffour
a7e91f0ef2
add XDG support to log/modules/fe-text
- title
- fixed some comments refering to ~/.irssi
2021-01-06 19:37:33 +03:00
altffour
43e956d16b
fix xdg support missing in one theme file
- fix some missed get_irssi_dir() usages
- fix comment in src/core/settings.c refering to ~/.irssi
2021-01-06 19:28:11 +03:00
altffour
dad31bdfde
add themes XDG support
- fix is_xdg_supported() not being in common.h
- themes are now loaded from $XDG_DATA_HOME, if and only if xdg paths
are being used
2021-01-06 19:20:09 +03:00
altffour
e6b9a07f9a
implement API changes to accomodate for XDG
- add is_xdg_supported() (C and Perl).
- use $XDG_CONFIG_HOME/irssi/ only when it is present.
- fallback mechanism added.
- scripts are run from $XDG_DATA_HOME/irssi/scripts/[autorun], if and
only if xdg is used.
2021-01-06 19:07:18 +03:00
altffour
bfb9ca19f5
fix typos 2021-01-06 18:02:42 +03:00
altffour
f972d05025
add: xdg-support
- config file XDG support inspired from #511
- added support to try loading scripts from XDG_DATA_HOME, if not present try
  loading from XDG_CONFIG_HOME, if not present try loading the usual way.
2021-01-06 17:34:33 +03:00
ailin-nemui
581c43ed1e
Merge pull request #1232 from vague666/fix_1228
Implement priority on the matched lines for /hilight
2020-12-14 15:22:56 +01:00
vague666
69396482be style format change 2020-12-02 14:33:23 +01:00
Ailin Nemui
c9ccf9867f Make a copy of the signal arguments so we don't have to worry about the stack
plug some mem leaks

later copy
2020-11-12 13:00:02 +01:00
vague666
323b60f339 Initialize tmprec 2020-10-27 09:49:54 +01:00
vague666
8f4f0be6d4 Add prio check to hilight_nick_cache also 2020-10-26 11:01:03 +01:00
vague666
4fb10322d1 Optimize execution 2020-10-26 10:57:05 +01:00
vague666
eb4174ee1e Make hilight priority work 2020-10-23 21:49:09 +02:00
ailin-nemui
447e565309 Fix meson capsicum
Fixes #1223
2020-09-26 16:40:18 +02:00
ailin-nemui
f8052b7f57
Merge pull request #1209 from ailin-nemui/perl_line_signal_arg
fix missing wrapping of line in signals
2020-07-26 10:47:13 +02:00
Ailin Nemui
ffe0c71554 up abi 2020-07-23 11:54:18 +02:00
Ailin Nemui
468d8b0c78 fix missing wrapping of line in signals 2020-07-23 00:52:55 +02:00
Ailin Nemui
4e9dab4aeb fix crash when server got disconnected/reconnected before it was properly connected 2020-07-23 00:42:54 +02:00
ailin-nemui
40ed4122b1
Merge pull request #1208 from ailin-nemui/daychange
do not use localtime result after other functions
2020-07-16 12:07:16 +02:00
ailin-nemui
ad30d568d6 do not use localtime result after other functions 2020-07-13 13:25:18 +02:00
aquanight
12685f8074
Merge branch 'master' into selfunload-fix 2020-07-10 18:32:48 -06:00
aquanight
af5987827c ABI version again 2020-07-10 18:31:47 -06:00
aquanight
cc759e1179 Clean up commented out stuff and fix merge issues 2020-07-10 18:27:54 -06:00
ailin-nemui
70626d86ae
Merge pull request #1159 from vague666/fix_cmd_cat_bug
Make sure witem exists in cmd_cat when using -window
2020-07-10 10:24:06 +02:00
ailin-nemui
76802985a4
Merge pull request #1183 from ailin-nemui/glib-2-63
manually handle NUL unicode in g_utf8_get_next_char_validated
2020-07-08 17:43:11 +02:00
ailin-nemui
37cac5a862
Merge pull request #1205 from ailin-nemui/formatflags
properly restore the saved text dest
2020-07-08 10:07:07 +02:00
ailin-nemui
1b5bb8cdd7
Merge pull request #1204 from ailin-nemui/bgcolours
fix extended bg colours
2020-07-07 09:48:42 +02:00
ailin-nemui
357beb91f5 make clang-format happy 2020-07-07 09:28:41 +02:00
vague666
9593be14f5 print to active window when -window is specified 2020-07-06 12:22:16 +02:00