Compare commits

..

3 Commits

Author SHA1 Message Date
Patrick
14d3ef51b4
Update win8_provider.cpp 2021-07-16 18:43:02 -05:00
Patrick
bc3eb7f600
Update msys-build.yml 2021-07-16 18:33:53 -05:00
Patrick
d13d2b0e93 Build enchant win8 provider with mingw 2021-07-15 22:02:37 -05:00
69 changed files with 306 additions and 535 deletions

View File

@ -1,7 +1,7 @@
name: Flatpak Build
on: [push, pull_request]
jobs:
flatpak_build:
build:
runs-on: ubuntu-latest
container:
image: bilelmoussaoui/flatpak-github-actions:gnome-40

View File

@ -2,7 +2,7 @@ name: MSYS2 Build
on: [push, pull_request]
jobs:
msys2_build:
build:
runs-on: windows-latest
defaults:
run:
@ -19,7 +19,7 @@ jobs:
mingw-w64-x86_64-python3-cffi
mingw-w64-x86_64-meson
mingw-w64-x86_64-gtk2
mingw-w64-x86_64-gtk-update-icon-cache
mingw-w64-x86_64-enchant
mingw-w64-x86_64-luajit
mingw-w64-x86_64-desktop-file-utils

View File

@ -1,7 +1,7 @@
name: Ubuntu Build
on: [push, pull_request]
jobs:
ubuntu_build:
build:
runs-on: ubuntu-20.04
steps:
@ -10,7 +10,7 @@ jobs:
- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install -y meson libcanberra-dev libdbus-glib-1-dev libglib2.0-dev libgtk2.0-dev libluajit-5.1-dev libpci-dev libperl-dev libssl-dev python3-dev python3-cffi mono-devel desktop-file-utils
sudo apt-get install -y meson libcanberra-dev libdbus-glib-1-dev libglib2.0-dev libgtk2.0-dev libluajit-5.1-dev libpci-dev libperl-dev libproxy-dev libssl-dev python3-dev python3-cffi mono-devel desktop-file-utils
- name: Configure
run: meson build -Dtext=true -Dtheme-manager=true -Dauto_features=enabled

View File

@ -2,7 +2,7 @@ name: Windows Build
on: [push, pull_request]
jobs:
windows_build:
build:
runs-on: windows-2019
strategy:
matrix:
@ -28,7 +28,7 @@ jobs:
Invoke-WebRequest https://dl.hexchat.net/misc/idpsetup-1.5.1.exe -OutFile deps\idpsetup.exe
& deps\idpsetup.exe /VERYSILENT
Invoke-WebRequest https://dl.hexchat.net/gtk/gtk-${{ matrix.platform }}-2018-08-29-openssl1.1.7z -OutFile deps\gtk-${{ matrix.arch }}.7z
Invoke-WebRequest https://dl.hexchat.net/gtk/gtk-${{ matrix.platform }}-2018-08-29.7z -OutFile deps\gtk-${{ matrix.arch }}.7z
& 7z.exe x deps\gtk-${{ matrix.arch }}.7z -oC:\gtk-build\gtk
Invoke-WebRequest https://dl.hexchat.net/gtk-win32/gendef-20111031.7z -OutFile deps\gendef.7z
@ -41,11 +41,11 @@ jobs:
& 7z.exe x deps\perl-${{ matrix.arch }}.7z -oC:\gtk-build\perl-5.20\${{ matrix.platform }}
New-Item -Path "c:\gtk-build" -Name "python-2.7" -ItemType "Directory"
New-Item -Path "c:\gtk-build" -Name "python-3.8" -ItemType "Directory"
New-Item -Path "c:\gtk-build" -Name "python-3.6" -ItemType "Directory"
New-Item -Path "c:\gtk-build\python-2.7" -Name "${{ matrix.platform }}" -ItemType "SymbolicLink" -Value "C:/hostedtoolcache/windows/Python/2.7.18/${{ matrix.arch }}"
New-Item -Path "c:\gtk-build\python-3.8" -Name "${{ matrix.platform }}" -ItemType "SymbolicLink" -Value "C:/hostedtoolcache/windows/Python/3.8.10/${{ matrix.arch }}"
New-Item -Path "c:\gtk-build\python-3.6" -Name "${{ matrix.platform }}" -ItemType "SymbolicLink" -Value "C:/hostedtoolcache/windows/Python/3.6.8/${{ matrix.arch }}"
C:/hostedtoolcache/windows/Python/3.8.10/${{ matrix.arch }}/python.exe -m pip install cffi
C:/hostedtoolcache/windows/Python/3.6.8/${{ matrix.arch }}/python.exe -m pip install cffi
C:/hostedtoolcache/windows/Python/2.7.18/${{ matrix.arch }}/python.exe -m pip install -qq cffi
shell: powershell

View File

@ -1,11 +1,9 @@
icondir = join_paths(get_option('datadir'), 'icons/hicolor')
install_data(
'hexchat.png',
rename: 'io.github.Hexchat.png',
install_dir: join_paths(icondir, '48x48/apps')
)
install_data(
'hexchat.svg',
rename: 'io.github.Hexchat.svg',
install_dir: join_paths(icondir, 'scalable/apps')
)

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<component type="addon">
<id>io.github.Hexchat.Plugin.@NAME@</id>
<extends>io.github.Hexchat</extends>
<extends>io.github.Hexchat.desktop</extends>
<name>@NAME@ Plugin</name>
<summary>@SUMMARY@</summary>
<url type="homepage">https://hexchat.github.io/</url>

View File

@ -1,8 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop-application">
<id>io.github.Hexchat</id>
<component type="desktop">
<id>io.github.Hexchat.desktop</id>
<name>HexChat</name>
<launchable type="desktop-id">io.github.Hexchat.desktop</launchable>
<developer_name>HexChat</developer_name>
<metadata_license>CC0-1.0</metadata_license>
<project_license>GPL-2.0+</project_license>
@ -27,35 +26,6 @@
<id>hexchat.desktop</id>
</provides>
<releases>
<release date="2022-02-12" version="2.16.1">
<description>
<p>This is a minor release with mostly bug-fixes:</p>
<ul>
<li>Add `-NOOVERRIDE` flag to the `GUI COLOR` command</li>
<li>Add `-q` (quiet) flag to the `EXECWRITE` command</li>
<li>Rename installed icon to match app-id (Fixes notification icon)</li>
<li>Fix escaping already escaped URLs when opening them</li>
<li>Fix Python scripts not being opened as UTF-8</li>
<li>Fix `TIMER` command supporting decimals regardless of locale</li>
</ul>
</description>
</release>
<release date="2021-10-01" version="2.16.0">
<description>
<p>This is a feature release:</p>
<ul>
<li>Add support for IRCv3 SETNAME, invite-notify, account-tag, standard replies, and UTF8ONLY</li>
<li>Add support for strikethrough formatting</li>
<li>Fix text clipping issues by respecting font line height</li>
<li>Fix URLs not being escaped when opened</li>
<li>Fix possible hang when showing notifications</li>
<li>Print ChanServ notices in the front tab by default</li>
<li>Update network list</li>
<li>python: Rewrite plugin improving memory usage and compatibility</li>
<li>fishlim: Add support for CBC and other improvements</li>
</ul>
</description>
</release>
<release date="2019-12-20" version="2.14.3">
<description>
<p>This is a bug-fix release:</p>

View File

@ -4,7 +4,7 @@ GenericName=IRC Client
Comment=Chat with other people online
Keywords=IM;Chat;
Exec=@exec_command@
Icon=io.github.Hexchat
Icon=hexchat
Terminal=false
Type=Application
Categories=GTK;Network;IRCClient;

View File

@ -5,6 +5,7 @@
"runtime-version": "40",
"sdk": "org.gnome.Sdk",
"command": "hexchat",
"rename-icon": "hexchat",
"finish-args": [
"--share=ipc",
"--socket=x11",
@ -30,7 +31,7 @@
"modules": [
"shared-modules/gtk2/gtk2.json",
"shared-modules/gtk2/gtk2-common-themes.json",
"shared-modules/dbus-glib/dbus-glib.json",
"shared-modules/dbus-glib/dbus-glib-0.110.json",
"shared-modules/lua5.3/lua-5.3.5.json",
"shared-modules/libcanberra/libcanberra.json",
"python3-cffi.json",

@ -1 +1 @@
Subproject commit 2c2f8fef2e926ff03158c0b3341526cce1b405ac
Subproject commit 45cc381cdb43da1f22bc61baba4e390792eb5f8b

View File

@ -1,5 +1,5 @@
project('hexchat', 'c',
version: '2.16.1',
version: '2.14.3',
meson_version: '>= 0.47.0',
default_options: [
'c_std=gnu89',
@ -22,7 +22,7 @@ dbus_glib_dep = dependency('dbus-glib-1', required: get_option('dbus'))
global_deps = []
if cc.get_id() == 'msvc'
libssl_dep = cc.find_library('libssl')
libssl_dep = cc.find_library('libeay32')
else
libssl_dep = dependency('openssl', version: '>= 0.9.8',
required: get_option('tls'))
@ -34,7 +34,6 @@ config_h.set_quoted('PACKAGE_NAME', meson.project_name())
config_h.set_quoted('GETTEXT_PACKAGE', 'hexchat')
config_h.set_quoted('LOCALEDIR', join_paths(get_option('prefix'),
get_option('datadir'), 'locale'))
config_h.set_quoted('G_LOG_DOMAIN', 'hexchat')
config_h.set10('ENABLE_NLS', true)
# Optional features
@ -86,11 +85,18 @@ configure_file(output: 'config.h', configuration: config_h)
config_h_include = include_directories('.')
if host_machine.system() == 'windows'
add_languages('cpp')
add_project_arguments(
'-DWIN32',
'-DNTDDI_VERSION=NTDDI_WIN7',
'-D_WIN32_WINNT=_WIN32_WINNT_WIN7',
'-DNTDDI_VERSION=NTDDI_WIN8',
'-D_WIN32_WINNT=_WIN32_WINNT_WIN8',
language: 'c')
add_project_arguments(
'-DWIN32',
'-DNTDDI_VERSION=NTDDI_WIN8',
'-D_WIN32_WINNT=_WIN32_WINNT_WIN8',
language: 'cpp')
endif

View File

@ -3,5 +3,4 @@ shared_module('checksum', 'checksum.c',
install: true,
install_dir: plugindir,
name_prefix: '',
vs_module_defs: 'checksum.def',
)

View File

@ -1,6 +1,5 @@
shared_module('exec', 'exec.c',
dependencies: hexchat_plugin_dep,
install: true,
install_dir: plugindir,
vs_module_defs: 'exec.def',
install_dir: plugindir
)

View File

@ -87,54 +87,6 @@ static const signed char fish_unbase64[256] = {
dest |= (uint8_t)*((source)++); \
} while (0);
#if OPENSSL_VERSION_NUMBER >= 0x30000000L
#include <openssl/provider.h>
static OSSL_PROVIDER *legacy_provider;
static OSSL_PROVIDER *default_provider;
static OSSL_LIB_CTX *ossl_ctx;
#endif
int fish_init(void)
{
#if OPENSSL_VERSION_NUMBER >= 0x30000000L
ossl_ctx = OSSL_LIB_CTX_new();
if (!ossl_ctx)
return 0;
legacy_provider = OSSL_PROVIDER_load(ossl_ctx, "legacy");
if (!legacy_provider) {
fish_deinit();
return 0;
}
default_provider = OSSL_PROVIDER_load(ossl_ctx, "default");
if (!default_provider) {
fish_deinit();
return 0;
}
#endif
return 1;
}
void fish_deinit(void)
{
#if OPENSSL_VERSION_NUMBER >= 0x30000000L
if (legacy_provider) {
OSSL_PROVIDER_unload(legacy_provider);
legacy_provider = NULL;
}
if (default_provider) {
OSSL_PROVIDER_unload(default_provider);
default_provider = NULL;
}
if (ossl_ctx) {
OSSL_LIB_CTX_free(ossl_ctx);
ossl_ctx = NULL;
}
#endif
}
/**
* Encode ECB FiSH Base64
@ -276,19 +228,9 @@ char *fish_cipher(const char *plaintext, size_t plaintext_len, const char *key,
plaintext_len -= 8;
}
#if OPENSSL_VERSION_NUMBER >= 0x30000000L
cipher = EVP_CIPHER_fetch(ossl_ctx, "BF-CBC", NULL);
#else
cipher = (EVP_CIPHER *) EVP_bf_cbc();
#endif
} else if (mode == EVP_CIPH_ECB_MODE) {
#if OPENSSL_VERSION_NUMBER >= 0x30000000L
cipher = EVP_CIPHER_fetch(ossl_ctx, "BF-ECB", NULL);
#else
cipher = (EVP_CIPHER *) EVP_bf_ecb();
#endif
}
/* Zero Padding */

View File

@ -35,8 +35,6 @@ enum fish_mode {
FISH_CBC_MODE = 0x2
};
int fish_init(void);
void fish_deinit(void);
char *fish_base64_encode(const char *message, size_t message_len);
char *fish_base64_decode(const char *message, size_t *final_len);
char *fish_encrypt(const char *key, size_t keylen, const char *message, size_t message_len, enum fish_mode mode);

View File

@ -29,7 +29,7 @@
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;FISHLIM_EXPORTS;HAVE_DH_SET0_PQG;HAVE_DH_GET0_KEY;HAVE_DH_SET0_KEY;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;FISHLIM_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(DepsRoot)\include;$(Glib);..\..\src\common;$(HexChatLib);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
@ -40,7 +40,7 @@
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<PreprocessorDefinitions>WIN32;_WIN64;_AMD64_;NDEBUG;_WINDOWS;_USRDLL;FISHLIM_EXPORTS;HAVE_DH_SET0_PQG;HAVE_DH_GET0_KEY;HAVE_DH_SET0_KEY;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;_WIN64;_AMD64_;NDEBUG;_WINDOWS;_USRDLL;FISHLIM_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(DepsRoot)\include;$(Glib);..\..\src\common;$(HexChatLib);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>

View File

@ -19,5 +19,4 @@ shared_module('fishlim', fishlim_sources,
install: true,
install_dir: plugindir,
name_prefix: '',
vs_module_defs: 'fishlim.def',
)

View File

@ -815,9 +815,6 @@ int hexchat_plugin_init(hexchat_plugin *plugin_handle,
hexchat_hook_server_attrs(ph, "TOPIC", HEXCHAT_PRI_NORM, handle_incoming, NULL);
hexchat_hook_server_attrs(ph, "332", HEXCHAT_PRI_NORM, handle_incoming, NULL);
if (!fish_init())
return 0;
if (!dh1080_init())
return 0;
@ -831,7 +828,6 @@ int hexchat_plugin_init(hexchat_plugin *plugin_handle,
int hexchat_plugin_deinit(void) {
g_clear_pointer(&pending_exchanges, g_hash_table_destroy);
dh1080_deinit();
fish_deinit();
hexchat_printf(ph, "%s plugin unloaded\n", plugin_name);
return 1;

View File

@ -12,5 +12,4 @@ fishlim_tests = executable('fishlim_tests', fishlim_test_sources,
test('Fishlim Tests', fishlim_tests,
protocol: 'tap',
timeout: 600,
)

View File

@ -21,7 +21,6 @@
*/
#include <string.h>
#include <glib.h>
#include "fish.h"
@ -130,17 +129,17 @@ static void
test_base64_len (void)
{
char *b64 = NULL;
int i, message_len = 0;
char message[1000];
int message_end = sizeof (message) - 1;
random_string(message, message_end);
for (; message_end >= 0; --message_end) {
message[message_end] = '\0'; /* Truncate instead of generating new strings */
b64 = g_base64_encode((const unsigned char *) message, message_end);
g_assert_nonnull(b64);
g_assert_cmpuint(strlen(b64), == , base64_len(message_end));
g_free(b64);
for (i = 0; i < 10; ++i) {
for (message_len = 1; message_len < 1000; ++message_len) {
random_string(message, message_len);
b64 = g_base64_encode((const unsigned char *) message, message_len);
g_assert_nonnull(b64);
g_assert_cmpuint(strlen(b64), == , base64_len(message_len));
g_free(b64);
}
}
}
@ -151,15 +150,18 @@ static void
test_base64_fish_len (void)
{
char *b64 = NULL;
int message_len = 0;
int i, message_len = 0;
char message[1000];
for (message_len = 1; message_len < 1000; ++message_len) {
random_string(message, message_len);
b64 = fish_base64_encode(message, message_len);
g_assert_nonnull(b64);
g_assert_cmpuint(strlen(b64), == , base64_fish_len(message_len));
g_free(b64);
for (i = 0; i < 10; ++i) {
for (message_len = 1; message_len < 1000; ++message_len) {
random_string(message, message_len);
b64 = fish_base64_encode(message, message_len);
g_assert_nonnull(b64);
g_assert_cmpuint(strlen(b64), == , base64_fish_len(message_len));
g_free(b64);
}
}
}
@ -240,28 +242,30 @@ test_foreach_utf8_data_chunks(void)
{
GRand *rand = NULL;
GString *chunks = NULL;
int max_chunks_len, chunks_len;
int tests, max_chunks_len, chunks_len;
char ascii_message[1001];
char *data_chunk = NULL;
rand = g_rand_new();
max_chunks_len = g_rand_int_range(rand, 2, 301);
random_string(ascii_message, 1000);
data_chunk = ascii_message;
for (tests = 0; tests < 1000; ++tests) {
chunks = g_string_new(NULL);
max_chunks_len = g_rand_int_range(rand, 2, 301);
random_string(ascii_message, 1000);
while (foreach_utf8_data_chunks(data_chunk, max_chunks_len, &chunks_len)) {
g_string_append(chunks, g_strndup(data_chunk, chunks_len));
/* Next chunk */
data_chunk += chunks_len;
data_chunk = ascii_message;
chunks = g_string_new(NULL);
while (foreach_utf8_data_chunks(data_chunk, max_chunks_len, &chunks_len)) {
g_string_append(chunks, g_strndup(data_chunk, chunks_len));
/* Next chunk */
data_chunk += chunks_len;
}
/* Check data loss */
g_assert_cmpstr(chunks->str, == , ascii_message);
g_string_free(chunks, TRUE);
}
/* Check data loss */
g_assert_cmpstr(chunks->str, == , ascii_message);
g_string_free(chunks, TRUE);
g_rand_free (rand);
}
int
@ -278,8 +282,5 @@ main(int argc, char *argv[]) {
g_test_add_func("/fishlim/max_text_command_len", test_max_text_command_len);
g_test_add_func("/fishlim/foreach_utf8_data_chunks", test_foreach_utf8_data_chunks);
fish_init();
int ret = g_test_run();
fish_deinit();
return ret;
return g_test_run();
}

View File

@ -22,8 +22,6 @@
*/
#include <string.h>
#include "utils.h"
#include "fish.h"

View File

@ -957,21 +957,16 @@ static int api_hexchat_pluginprefs_meta_pairs(lua_State *L)
hexchat_plugin *h;
if(!script->name)
return luaL_error(L, "cannot use hexchat.pluginprefs before registering with hexchat.register");
dest = lua_newuserdata(L, 4096);
h = script->handle;
if(!hexchat_pluginpref_list(h, dest))
strcpy(dest, "");
lua_pushlightuserdata(L, dest);
lua_pushlightuserdata(L, dest);
lua_pushcclosure(L, api_hexchat_pluginprefs_meta_pairs_closure, 2);
lua_insert(L, -2); // Return the userdata (second return value from pairs),
// even though it's not used by the closure (first return
// value from pairs), so that Lua knows not to GC it.
return 2;
return 1;
}
static int api_attrs_meta_index(lua_State *L)
@ -1769,3 +1764,4 @@ G_MODULE_EXPORT int hexchat_plugin_deinit(hexchat_plugin *plugin_handle)
g_clear_pointer(&expand_buffer, g_free);
return 1;
}

View File

@ -88,5 +88,4 @@ shared_module('perl',
install_dir: plugindir,
install_rpath: perl_rpath,
name_prefix: '',
vs_module_defs: 'perl.def',
)

View File

@ -28,5 +28,4 @@ shared_module('python', python3_source,
install: true,
install_dir: plugindir,
name_prefix: '',
vs_module_defs: 'python.def'
)

View File

@ -146,8 +146,8 @@ class Plugin:
def loadfile(self, filename):
try:
self.filename = filename
with open(filename, 'rb') as f:
data = f.read().decode('utf-8')
with open(filename) as f:
data = f.read()
compiled = compile_file(data, filename)
exec(compiled, self.globals)
@ -284,7 +284,7 @@ def _on_server_attrs_hook(word, word_eol, attrs, userdata):
@ffi.def_extern()
def _on_timer_hook(userdata):
hook = ffi.from_handle(userdata)
if hook.callback(hook.userdata) == True:
if hook.callback(hook.userdata) is True:
return 1
hook.is_unload = True # Don't unhook

View File

@ -57,5 +57,4 @@ shared_module('sysinfo', sysinfo_sources,
install: true,
install_dir: plugindir,
name_prefix: '',
vs_module_defs: 'sysinfo.def',
)

View File

@ -5,5 +5,4 @@ shared_module('upd', 'upd.c',
install: true,
install_dir: plugindir,
name_prefix: '',
vs_module_defs: 'upd.def',
)

View File

@ -3,5 +3,4 @@ shared_module('winamp', 'winamp.c',
install: true,
install_dir: plugindir,
name_prefix: '',
vs_module_defs: 'winamp.def',
)

View File

@ -18,7 +18,6 @@
# Aleksey <aleksdem@aleksdem.com>, 2016
# Артем Малофеев <79067635919@yandex.ru>, 2019
# Магретов Никита <huku111a@gmail.com>, 2016
# Alexander Popov <iiiypuk@fastmail.fm>, 2023
msgid ""
msgstr ""
"Project-Id-Version: HexChat\n"
@ -283,15 +282,15 @@ msgstr "Диалог"
#: src/common/hexchat.c:948
msgid "WhoIs"
msgstr "WhoIs"
msgstr "Кто "
#: src/common/hexchat.c:949
msgid "Send"
msgstr "Отправить файл"
msgstr "Послать"
#: src/common/hexchat.c:950
msgid "Chat"
msgstr "Чат"
msgstr "Разговор"
#: src/common/hexchat.c:951 src/fe-gtk/banlist.c:847 src/fe-gtk/dccgui.c:889
#: src/fe-gtk/ignoregui.c:387 src/fe-gtk/urlgrab.c:214
@ -3260,7 +3259,7 @@ msgstr "Выберите файл для вывода"
#: src/fe-gtk/chanlist.c:624 src/fe-gtk/chanlist.c:812
msgid "_Join Channel"
msgstr "_Войти на канал"
msgstr "Зайти на канал"
#: src/fe-gtk/chanlist.c:626
msgid "_Copy Channel Name"
@ -3725,7 +3724,7 @@ msgstr "_Ничего, я войду на канал позднее."
#: src/fe-gtk/joind.c:191
msgid "_Join this channel:"
msgstr "Войти на канал:"
msgstr "Зайти на канал:"
#: src/fe-gtk/joind.c:203
msgid "If you know the name of the channel you want to join, enter it here."
@ -3854,11 +3853,11 @@ msgstr "Мерцание _окна"
#: src/fe-gtk/maingui.c:1566 src/fe-gtk/menu.c:2351
msgid "_Detach"
msgstr "Отсо_единить окно"
msgstr "Отсо_единить"
#: src/fe-gtk/maingui.c:1568 src/fe-gtk/menu.c:2352 src/fe-gtk/menu.c:2357
msgid "_Close"
msgstr "_Закрыть"
msgstr "Закрыть"
#: src/fe-gtk/maingui.c:1908 src/fe-gtk/maingui.c:2021
msgid "User limit must be a number!\n"
@ -4193,35 +4192,35 @@ msgstr "He_xChat"
#: src/fe-gtk/menu.c:1758
msgid "Network Li_st"
msgstr "_Список сетей"
msgstr ""
#: src/fe-gtk/menu.c:1761
msgid "_New"
msgstr "_Новое..."
msgstr "Новая..."
#: src/fe-gtk/menu.c:1762
msgid "Server Tab"
msgstr "Вкладка сервера"
msgstr ""
#: src/fe-gtk/menu.c:1763
msgid "Channel Tab"
msgstr "Вкладка канала"
msgstr ""
#: src/fe-gtk/menu.c:1764
msgid "Server Window"
msgstr "Окно сервера"
msgstr ""
#: src/fe-gtk/menu.c:1765
msgid "Channel Window"
msgstr "Окно канала"
msgstr ""
#: src/fe-gtk/menu.c:1769
msgid "_Load Plugin or Script"
msgstr "Загрузить плагин или _скрипт"
msgstr ""
#: src/fe-gtk/menu.c:1776 src/fe-gtk/plugin-tray.c:579
msgid "_Quit"
msgstr "_Выход"
msgstr "Выход"
#. 15
#: src/fe-gtk/menu.c:1778
@ -4234,7 +4233,7 @@ msgstr "Панел_ь меню"
#: src/fe-gtk/menu.c:1781
msgid "_Topic Bar"
msgstr "Т_ема канала"
msgstr "Т_ема"
#: src/fe-gtk/menu.c:1782
msgid "_User List"
@ -4242,7 +4241,7 @@ msgstr "Список _пользователей"
#: src/fe-gtk/menu.c:1783
msgid "U_ser List Buttons"
msgstr "_Кнопки списка пользователей"
msgstr ""
#: src/fe-gtk/menu.c:1784
msgid "M_ode Buttons"
@ -4270,11 +4269,11 @@ msgstr "Выключено"
#: src/fe-gtk/menu.c:1794
msgid "Graph"
msgstr "График"
msgstr "График:"
#: src/fe-gtk/menu.c:1799
msgid "_Fullscreen"
msgstr "_Полноэкранный режим"
msgstr "_Полноэкранка"
#: src/fe-gtk/menu.c:1801
msgid "_Server"
@ -4286,19 +4285,19 @@ msgstr "Отключиться"
#: src/fe-gtk/menu.c:1803
msgid "_Reconnect"
msgstr "_Пересоединиться"
msgstr "Пересоединиться"
#: src/fe-gtk/menu.c:1804
msgid "_Join a Channel"
msgstr "_Войти на канал"
msgstr ""
#: src/fe-gtk/menu.c:1805
msgid "Channel _List"
msgstr "Список каналов"
msgstr ""
#: src/fe-gtk/menu.c:1808
msgid "Marked _Away"
msgstr "Пометить как _Отошёл"
msgstr "Помечен как _Отошёл"
#: src/fe-gtk/menu.c:1810
msgid "_Usermenu"
@ -4311,11 +4310,11 @@ msgstr "Настройка"
#: src/fe-gtk/menu.c:1813 src/fe-gtk/plugin-tray.c:577
msgid "_Preferences"
msgstr "Параметры"
msgstr "Установки"
#: src/fe-gtk/menu.c:1815
msgid "Auto Replace"
msgstr "Автозамена"
msgstr ""
#: src/fe-gtk/menu.c:1816
msgid "CTCP Replies"
@ -4335,7 +4334,7 @@ msgstr ""
#: src/fe-gtk/menu.c:1820
msgid "URL Handlers"
msgstr "Обработчики URL"
msgstr ""
#: src/fe-gtk/menu.c:1821
msgid "User Commands"
@ -4793,7 +4792,7 @@ msgstr "Не показывать список сетей при запуске"
#: src/fe-gtk/servlistgui.c:2130
msgid "Show favorites only"
msgstr "Показывать только избранные"
msgstr "Показывать только фавориты"
#: src/fe-gtk/servlistgui.c:2160
msgid "_Edit..."
@ -4811,7 +4810,7 @@ msgstr ""
#: src/fe-gtk/servlistgui.c:2176
msgid "_Favor"
msgstr "_В избранное"
msgstr "_В фавориты"
#: src/fe-gtk/servlistgui.c:2177
msgid "Mark or unmark this network as a favorite."
@ -5031,7 +5030,7 @@ msgstr "Валлонский"
#: src/fe-gtk/setup.c:149 src/fe-gtk/setup.c:1880
msgid "General"
msgstr "Основные"
msgstr "Главный"
#: src/fe-gtk/setup.c:151
msgid "Language:"
@ -5083,19 +5082,19 @@ msgstr "Настройки прозрачности"
#: src/fe-gtk/setup.c:164
msgid "Window opacity:"
msgstr "Прозрачность окна:"
msgstr ""
#: src/fe-gtk/setup.c:166 src/fe-gtk/setup.c:593
msgid "Timestamps"
msgstr "Временная метка"
msgstr ""
#: src/fe-gtk/setup.c:167
msgid "Enable timestamps"
msgstr "Включить временные метки"
msgstr ""
#: src/fe-gtk/setup.c:168
msgid "Timestamp format:"
msgstr "Формат временной метки:"
msgstr ""
#: src/fe-gtk/setup.c:170 src/fe-gtk/setup.c:597
msgid "See the strftime MSDN article for details."
@ -5107,7 +5106,7 @@ msgstr "См. страницу руководства по strftime."
#: src/fe-gtk/setup.c:175
msgid "Title Bar"
msgstr "Строка заголовка"
msgstr ""
#: src/fe-gtk/setup.c:176
msgid "Show channel modes"
@ -5709,7 +5708,7 @@ msgstr ""
#: src/fe-gtk/setup.c:561
msgid "Automatically include timestamps"
msgstr "Автоматически добавлять временные метки"
msgstr ""
#: src/fe-gtk/setup.c:562
msgid ""
@ -5767,7 +5766,7 @@ msgstr "Задержка авто восстановления соединен
#: src/fe-gtk/setup.c:578
msgid "Auto join delay:"
msgstr "Задержка автоматического входа:"
msgstr ""
#: src/fe-gtk/setup.c:579
msgid "Ban Type:"
@ -6090,7 +6089,7 @@ msgstr "Цвета"
#: src/fe-gtk/setup.c:1879
msgid "Chatting"
msgstr "Чат"
msgstr "Общение"
#: src/fe-gtk/setup.c:1882
msgid "Sounds"

View File

@ -468,7 +468,6 @@ const struct prefs vars[] =
{"gui_win_fullscreen", P_OFFINT (hex_gui_win_fullscreen), TYPE_INT},
{"gui_win_left", P_OFFINT (hex_gui_win_left), TYPE_INT},
{"gui_win_modes", P_OFFINT (hex_gui_win_modes), TYPE_BOOL},
{"gui_win_nick", P_OFFINT (hex_gui_win_nick), TYPE_BOOL},
{"gui_win_save", P_OFFINT (hex_gui_win_save), TYPE_BOOL},
{"gui_win_state", P_OFFINT (hex_gui_win_state), TYPE_INT},
{"gui_win_swap", P_OFFINT (hex_gui_win_swap), TYPE_BOOL},
@ -773,7 +772,6 @@ load_default_config(void)
prefs.hex_gui_ulist_count = 1;
prefs.hex_gui_ulist_icons = 1;
prefs.hex_gui_ulist_style = 1;
prefs.hex_gui_win_nick = 1;
prefs.hex_gui_win_save = 1;
prefs.hex_input_filter_beep = 1;
prefs.hex_input_flash_hilight = 1;

View File

@ -69,16 +69,7 @@ int fe_input_add (int sok, int flags, void *func, void *data);
void fe_input_remove (int tag);
void fe_idle_add (void *func, void *data);
void fe_set_topic (struct session *sess, char *topic, char *stripped_topic);
typedef enum
{
FE_COLOR_NONE = 0,
FE_COLOR_NEW_DATA = 1,
FE_COLOR_NEW_MSG = 2,
FE_COLOR_NEW_HILIGHT = 3,
FE_COLOR_FLAG_NOOVERRIDE = 8,
} tabcolor;
#define FE_COLOR_ALLFLAGS (FE_COLOR_FLAG_NOOVERRIDE)
void fe_set_tab_color (struct session *sess, tabcolor col);
void fe_set_tab_color (struct session *sess, int col);
void fe_flash_window (struct session *sess);
void fe_update_mode_buttons (struct session *sess, char mode, char sign);
void fe_update_channel_key (struct session *sess);
@ -141,7 +132,6 @@ void fe_get_int (char *prompt, int def, void *callback, void *ud);
#define FRF_NOASKOVERWRITE 32 /* don't ask to overwrite existing files */
#define FRF_EXTENSIONS 64 /* specify file extensions to be displayed */
#define FRF_MIMETYPES 128 /* specify file mimetypes to be displayed */
#define FRF_MODAL 256 /* dialog should be modal to parent */
void fe_get_file (const char *title, char *initial,
void (*callback) (void *userdata, char *file), void *userdata,
int flags);

View File

@ -150,7 +150,6 @@ struct hexchatprefs
unsigned int hex_gui_ulist_style;
unsigned int hex_gui_usermenu;
unsigned int hex_gui_win_modes;
unsigned int hex_gui_win_nick;
unsigned int hex_gui_win_save;
unsigned int hex_gui_win_swap;
unsigned int hex_gui_win_ucount;
@ -502,9 +501,9 @@ typedef struct server
int joindelay_tag; /* waiting before we send JOIN */
char hostname[128]; /* real ip number */
char servername[128]; /* what the server says is its name */
char password[1024];
char password[86];
char nick[NICKLEN];
char linebuf[8704]; /* RFC says 512 chars including \r\n, IRCv3 message tags add 8191, plus the NUL byte */
char linebuf[2048]; /* RFC says 512 chars including \r\n */
char *last_away_reason;
int pos; /* current position in linebuf */
int nickcount;

View File

@ -1474,17 +1474,10 @@ inbound_user_info (session *sess, char *chan, char *user, char *host,
for (list = sess_list; list; list = list->next)
{
sess = list->data;
if (sess->server != serv)
continue;
if (sess->type == SESS_CHANNEL)
if (sess->type == SESS_CHANNEL && sess->server == serv)
{
userlist_add_hostname (sess, nick, uhost, realname, servname, account, away);
}
else if (sess->type == SESS_DIALOG && uhost && !serv->p_cmp (sess->channel, nick))
{
set_topic (sess, uhost, uhost);
}
}
}
@ -1735,7 +1728,6 @@ static const char * const supported_caps[] = {
"setname",
"invite-notify",
"account-tag",
"extended-monitor",
/* ZNC */
"znc.in/server-time-iso",
@ -1937,24 +1929,7 @@ inbound_sasl_authenticate (server *serv, char *data)
return;
}
/* long SASL passwords must be split into 400-byte chunks
https://ircv3.net/specs/extensions/sasl-3.1#the-authenticate-command */
size_t pass_len = strlen (pass);
if (pass_len <= 400)
tcp_sendf (serv, "AUTHENTICATE %s\r\n", pass);
else
{
size_t sent = 0;
while (sent < pass_len)
{
char *pass_chunk = g_strndup (pass + sent, 400);
tcp_sendf (serv, "AUTHENTICATE %s\r\n", pass_chunk);
sent += 400;
g_free (pass_chunk);
}
}
if (pass_len % 400 == 0)
tcp_sendf (serv, "AUTHENTICATE +\r\n");
tcp_sendf (serv, "AUTHENTICATE %s\r\n", pass);
g_free (pass);

View File

@ -47,6 +47,7 @@ if host_machine.system() == 'windows'
]
common_sysinfo_deps += [
cc.find_library('wbemuuid'), # sysinfo
cc.find_library('wbemcore'),
]
common_sources += 'sysinfo/win32/backend.c'

View File

@ -67,8 +67,8 @@ send_channel_modes (session *sess, char *tbuf, char *word[], int wpos,
int usable_modes, orig_len, len, wlen, i, max;
server *serv = sess->server;
/* sanity check. IRC RFC says three per line but some servers may support less. */
if (serv->modes_per_line < 1)
/* sanity check. IRC RFC says three per line. */
if (serv->modes_per_line < 3)
serv->modes_per_line = 3;
if (modes_per_line < 1)
modes_per_line = serv->modes_per_line;
@ -880,7 +880,7 @@ inbound_005 (server * serv, char *word[], const message_tags_data *tags_data)
g_free (serv->nick_prefixes);
g_free (serv->nick_modes);
serv->nick_prefixes = g_strdup (pre + 1);
serv->nick_modes = g_strdup (tokvalue + 1);
serv->nick_modes = g_strdup (tokvalue);
} else
{
/* bad! some ircds don't give us the modes. */
@ -918,12 +918,8 @@ inbound_005 (server * serv, char *word[], const message_tags_data *tags_data)
server_set_encoding (serv, "UTF-8");
} else if (g_strcmp0 (tokname, "NAMESX") == 0)
{
if (tokadding && !serv->have_namesx)
{
/* only use protoctl if the server doesn't have the equivalent cap */
tcp_send_len (serv, "PROTOCTL NAMESX\r\n", 17);
serv->have_namesx = TRUE;
}
/* 12345678901234567 */
tcp_send_len (serv, "PROTOCTL NAMESX\r\n", 17);
} else if (g_strcmp0 (tokname, "WHOX") == 0)
{
serv->have_whox = tokadding;

View File

@ -123,11 +123,7 @@ notify_save (void)
{
int fh;
struct notify *notify;
// while reading the notify.conf file, elements are added by prepending to the
// list. reverse the list before writing to disk to keep the original
// order of the list
GSList *list = g_slist_copy(notify_list);
list = g_slist_reverse(list);
GSList *list = notify_list;
fh = hexchat_open_file ("notify.conf", O_TRUNC | O_WRONLY | O_CREAT, 0600, XOF_DOMODE);
if (fh != -1)
@ -146,7 +142,6 @@ notify_save (void)
}
close (fh);
}
g_slist_free(list);
}
void

View File

@ -1579,26 +1579,9 @@ cmd_execw (struct session *sess, char *tbuf, char *word[], char *word_eol[])
EMIT_SIGNAL (XP_TE_NOCHILD, sess, NULL, NULL, NULL, NULL, 0);
return FALSE;
}
if (strcmp (word[2], "--") == 0)
{
len = strlen(word_eol[3]);
temp = g_strconcat (word_eol[3], "\n", NULL);
PrintText(sess, temp);
}
else
{
if (strcmp (word[2], "-q") == 0)
{
len = strlen(word_eol[3]);
temp = g_strconcat (word_eol[3], "\n", NULL);
}
else
{
len = strlen(word_eol[2]);
temp = g_strconcat (word_eol[2], "\n", NULL);
PrintText(sess, temp);
}
}
len = strlen(word_eol[2]);
temp = g_strconcat (word_eol[2], "\n", NULL);
PrintText(sess, temp);
write(sess->running_exec->myfd, temp, len + 1);
g_free(temp);
@ -2169,6 +2152,7 @@ cmd_gui (struct session *sess, char *tbuf, char *word[], char *word_eol[])
{
case 0x058b836e: fe_ctrl_gui (sess, 8, 0); break; /* APPLY */
case 0xac1eee45: fe_ctrl_gui (sess, 7, 2); break; /* ATTACH */
case 0x05a72f63: fe_ctrl_gui (sess, 4, atoi (word[3])); break; /* COLOR */
case 0xb06a1793: fe_ctrl_gui (sess, 7, 1); break; /* DETACH */
case 0x05cfeff0: fe_ctrl_gui (sess, 3, 0); break; /* FLASH */
case 0x05d154d8: fe_ctrl_gui (sess, 2, 0); break; /* FOCUS */
@ -2182,12 +2166,6 @@ cmd_gui (struct session *sess, char *tbuf, char *word[], char *word_eol[])
else
return FALSE;
break;
case 0x05a72f63: /* COLOR */
if (!g_ascii_strcasecmp (word[4], "-NOOVERRIDE"))
fe_ctrl_gui (sess, 4, FE_COLOR_FLAG_NOOVERRIDE | atoi (word[3]));
else
fe_ctrl_gui (sess, 4, atoi (word[3]));
break;
default:
return FALSE;
}
@ -3249,7 +3227,7 @@ cmd_reconnect (struct session *sess, char *tbuf, char *word[], char *word_eol[])
int offset = 0;
#ifdef USE_OPENSSL
int use_ssl = TRUE;
int use_ssl = FALSE;
int use_ssl_noverify = FALSE;
if (g_strcmp0 (word[2], "-ssl") == 0)
{
@ -3261,11 +3239,6 @@ cmd_reconnect (struct session *sess, char *tbuf, char *word[], char *word_eol[])
use_ssl = TRUE;
use_ssl_noverify = TRUE;
offset++; /* args move up by 1 word */
} else if (g_strcmp0 (word[2], "-insecure") == 0)
{
use_ssl = FALSE;
use_ssl_noverify = FALSE;
offset++; /* args move up by 1 word */
}
serv->use_ssl = use_ssl;
serv->accept_invalid_cert = use_ssl_noverify;
@ -3455,10 +3428,8 @@ cmd_server (struct session *sess, char *tbuf, char *word[], char *word_eol[])
char *pass = NULL;
char *channel = NULL;
char *key = NULL;
#ifdef USE_OPENSSL
int use_ssl = TRUE;
int use_ssl = FALSE;
int use_ssl_noverify = FALSE;
#endif
int is_url = TRUE;
server *serv = sess->server;
ircnet *net = NULL;
@ -3476,11 +3447,6 @@ cmd_server (struct session *sess, char *tbuf, char *word[], char *word_eol[])
use_ssl_noverify = TRUE;
offset++; /* args move up by 1 word */
}
else if (g_strcmp0 (word[2], "-insecure") == 0)
{
use_ssl = FALSE;
offset++; /* args move up by 1 word */
}
#endif
if (!parse_irc_url (word[2 + offset], &server_name, &port, &channel, &key, &use_ssl))
@ -3521,13 +3487,6 @@ cmd_server (struct session *sess, char *tbuf, char *word[], char *word_eol[])
use_ssl = TRUE;
#endif
}
else if (port[0] == '-')
{
port++;
#ifdef USE_OPENSSL
use_ssl = FALSE;
#endif
}
if (*pass)
{
@ -3583,7 +3542,7 @@ cmd_servchan (struct session *sess, char *tbuf, char *word[],
int offset = 0;
#ifdef USE_OPENSSL
if (g_strcmp0 (word[2], "-ssl") == 0 || g_strcmp0 (word[2], "-ssl-noverify") == 0 || g_strcmp0 (word[2], "-insecure") == 0)
if (g_strcmp0 (word[2], "-ssl") == 0 || g_strcmp0 (word[2], "-ssl-noverify") == 0)
offset++;
#endif
@ -3917,6 +3876,34 @@ cmd_wallchop (struct session *sess, char *tbuf, char *word[],
return TRUE;
}
static int
cmd_wallchan (struct session *sess, char *tbuf, char *word[],
char *word_eol[])
{
GSList *list;
if (*word_eol[2])
{
list = sess_list;
while (list)
{
sess = list->data;
if (sess->type == SESS_CHANNEL)
{
message_tags_data no_tags = MESSAGE_TAGS_DATA_INIT;
inbound_chanmsg (sess->server, NULL, sess->channel,
sess->server->nick, word_eol[2], TRUE, FALSE,
&no_tags);
sess->server->p_message (sess->server, sess->channel, word_eol[2]);
}
list = list->next;
}
return TRUE;
}
return FALSE;
}
static int
cmd_hop (struct session *sess, char *tbuf, char *word[], char *word_eol[])
{
@ -4013,7 +4000,7 @@ const struct commands xc_cmds[] = {
N_("EXECKILL [-9], kills a running exec in the current session. If -9 is given the process is SIGKILL'ed")},
#ifndef __EMX__
{"EXECSTOP", cmd_execs, 0, 0, 1, N_("EXECSTOP, sends the process SIGSTOP")},
{"EXECWRITE", cmd_execw, 0, 0, 1, N_("EXECWRITE [-q|--], sends data to the processes stdin; use -q flag to quiet/suppress output at text box; use -- flag to stop interpreting arguments as flags, needed if -q itself would occur as data")},
{"EXECWRITE", cmd_execw, 0, 0, 1, N_("EXECWRITE, sends data to the processes stdin")},
#endif
#endif
#if 0
@ -4028,9 +4015,8 @@ const struct commands xc_cmds[] = {
{"GETINT", cmd_getint, 0, 0, 1, "GETINT <default> <command> <prompt>"},
{"GETSTR", cmd_getstr, 0, 0, 1, "GETSTR <default> <command> <prompt>"},
{"GHOST", cmd_ghost, 1, 0, 1, N_("GHOST <nick> [password], Kills a ghosted nickname")},
{"GUI", cmd_gui, 0, 0, 1, "GUI [APPLY|ATTACH|DETACH|SHOW|HIDE|FOCUS|FLASH|ICONIFY]\n"
" GUI [MSGBOX <text>|MENU TOGGLE]\n"
" GUI COLOR <n> [-NOOVERRIDE]"},
{"GUI", cmd_gui, 0, 0, 1, "GUI [APPLY|ATTACH|DETACH|SHOW|HIDE|FOCUS|FLASH|ICONIFY|COLOR <n>]\n"
" GUI [MSGBOX <text>|MENU TOGGLE]"},
{"HELP", cmd_help, 0, 0, 1, 0},
{"HOP", cmd_hop, 1, 1, 1,
N_("HOP <nick>, gives chanhalf-op status to the nick (needs chanop)")},
@ -4117,14 +4103,14 @@ const struct commands xc_cmds[] = {
{"SEND", cmd_send, 0, 0, 1, N_("SEND <nick> [<file>]")},
#ifdef USE_OPENSSL
{"SERVCHAN", cmd_servchan, 0, 0, 1,
N_("SERVCHAN [-insecure|-ssl|-ssl-noverify] <host> <port> <channel>, connects and joins a channel using ssl unless otherwise specified")},
N_("SERVCHAN [-ssl|-ssl-noverify] <host> <port> <channel>, connects and joins a channel")},
#else
{"SERVCHAN", cmd_servchan, 0, 0, 1,
N_("SERVCHAN <host> <port> <channel>, connects and joins a channel")},
#endif
#ifdef USE_OPENSSL
{"SERVER", cmd_server, 0, 0, 1,
N_("SERVER [-insecure|-ssl|-ssl-noverify] <host> [<port>] [<password>], connects to a server using ssl unless otherwise specified, the default port is 6697 for ssl connections and 6667 for insecure connections")},
N_("SERVER [-ssl|-ssl-noverify] <host> [<port>] [<password>], connects to a server, the default port is 6667 for normal connections, and 6697 for ssl connections")},
#else
{"SERVER", cmd_server, 0, 0, 1,
N_("SERVER <host> [<port>] [<password>], connects to a server, the default port is 6667")},
@ -4155,6 +4141,8 @@ const struct commands xc_cmds[] = {
{"USERLIST", cmd_userlist, 1, 1, 1, 0},
{"VOICE", cmd_voice, 1, 1, 1,
N_("VOICE <nick>, gives voice status to someone (needs chanop)")},
{"WALLCHAN", cmd_wallchan, 1, 1, 1,
N_("WALLCHAN <message>, writes the message to all channels")},
{"WALLCHOP", cmd_wallchop, 1, 1, 1,
N_("WALLCHOP <message>, sends the message to all chanops on the current channel")},
{0, 0, 0, 0, 0, 0}

View File

@ -198,7 +198,7 @@ timer_cb (char *word[], char *word_eol[], void *userdata)
offset += 2;
}
timeout = g_ascii_strtod (word[2 + offset], NULL);
timeout = atof (word[2 + offset]);
command = word_eol[3 + offset];
if (timeout < 0.1 || timeout * 1000 > INT_MAX || !command[0])

View File

@ -461,7 +461,7 @@ channel_date (session *sess, char *chan, char *timestr,
}
static int
trailing_index(char *word_eol[])
trailing_index(const char *word_eol[])
{
int param_index;
for (param_index = 3; param_index < PDIWORDS; ++param_index)
@ -503,6 +503,22 @@ process_numeric (session * sess, int n,
goto def;
case 4: /* check the ircd type */
serv->use_listargs = FALSE;
serv->modes_per_line = 3; /* default to IRC RFC */
if (strncmp (word[5], "bahamut", 7) == 0) /* DALNet */
{
serv->use_listargs = TRUE; /* use the /list args */
} else if (strncmp (word[5], "u2.10.", 6) == 0) /* Undernet */
{
serv->use_listargs = TRUE; /* use the /list args */
serv->modes_per_line = 6; /* allow 6 modes per line */
} else if (strncmp (word[5], "glx2", 4) == 0)
{
serv->use_listargs = TRUE; /* use the /list args */
}
goto def;
case 5:
inbound_005 (serv, word, tags_data);
goto def;
@ -627,7 +643,7 @@ process_numeric (session * sess, int n,
case 320: /* :is an identified user */
if (!serv->skip_next_whois)
EMIT_SIGNAL_TIMESTAMP (XP_TE_WHOIS_ID, whois_sess, word[4],
word_eol[5][0] == ':' ? word_eol[5] + 1 : word_eol[5], NULL, NULL, 0,
word_eol[5] + 1, NULL, NULL, 0,
tags_data->timestamp);
break;
@ -920,14 +936,6 @@ process_numeric (session * sess, int n,
notify_set_online (serv, word[4], tags_data);
break;
case 524: // ERR_HELPNOTFOUND
case 704: // RPL_HELPSTART
case 705: // RPL_HELPTXT
case 706: // RPL_ENDOFHELP
EMIT_SIGNAL_TIMESTAMP (XP_TE_SERVTEXT, sess, STRIP_COLON(word, word_eol, 5), NULL, NULL, NULL,
0, tags_data->timestamp);
break;
case 728: /* +q-list entry */
/* NOTE: FREENODE returns these results inconsistent with e.g. +b */
/* Who else has imlemented MODE_QUIET, I wonder? */

View File

@ -362,7 +362,7 @@ server_read (GIOChannel *source, GIOCondition condition, server *serv)
serv->linebuf[serv->pos] = lbuf[i];
if (serv->pos >= (sizeof (serv->linebuf) - 1))
fprintf (stderr,
"*** HEXCHAT WARNING: Buffer overflow - non-compliant server!\n");
"*** HEXCHAT WARNING: Buffer overflow - shit server!\n");
else
serv->pos++;
}
@ -772,7 +772,7 @@ server_connect_success (server *serv)
/* it'll be a memory leak, if connection isn't terminated by
server_cleanup() */
if ((err = _SSL_set_verify (serv->ctx, ssl_cb_verify)))
if ((err = _SSL_set_verify (serv->ctx, ssl_cb_verify, NULL)))
{
EMIT_SIGNAL (XP_TE_CONNFAIL, serv->server_session, err, NULL,
NULL, NULL, 0);
@ -1559,7 +1559,7 @@ server_connect (server *serv, char *hostname, int port, int no_login)
if (!hostname[0])
return;
if (port < 1 || port > 65535)
if (port < 0)
{
/* use default port for this server type */
port = 6667;
@ -1567,8 +1567,8 @@ server_connect (server *serv, char *hostname, int port, int no_login)
if (serv->use_ssl)
port = 6697;
#endif
g_debug ("Attempted to connect to invalid port, assuming default port %d", port);
}
port &= 0xffff; /* wrap around */
if (serv->connected || serv->connecting || serv->recondelay_tag)
server_disconnect (sess, TRUE, -1);
@ -1770,7 +1770,6 @@ server_set_defaults (server *serv)
serv->chanmodes = g_strdup ("beI,k,l");
serv->nick_prefixes = g_strdup ("@%+");
serv->nick_modes = g_strdup ("ohv");
serv->modes_per_line = 3; /* https://datatracker.ietf.org/doc/html/rfc1459#section-4.2.3.1 */
serv->sasl_mech = MECH_PLAIN;
if (!serv->encoding)
@ -1779,7 +1778,6 @@ server_set_defaults (server *serv)
serv->nickcount = 1;
serv->end_of_motd = FALSE;
serv->sent_capend = FALSE;
serv->use_listargs = FALSE;
serv->is_away = FALSE;
serv->supports_watch = FALSE;
serv->supports_monitor = FALSE;

View File

@ -54,6 +54,8 @@ static const struct defaultserver def[] =
/* Invalid hostname in cert */
{0, "irc.2600.net"},
{"ACN", 0, 0, 0, LOGIN_SASL, 0, TRUE},
{0, "global.acn.gr"},
{"AfterNET", 0, 0, 0, LOGIN_SASL, 0, TRUE},
{0, "irc.afternet.org"},
@ -185,12 +187,12 @@ static const struct defaultserver def[] =
{"Interlinked", 0, 0, 0, LOGIN_SASL, 0, TRUE},
{0, "irc.interlinked.me"},
{"Irc-Nerds", 0, 0, 0, LOGIN_SASL, 0, TRUE},
{0, "irc.irc-nerds.net"},
{"IRC4Fun", 0, 0, 0, LOGIN_SASL, 0, TRUE},
{0, "irc.irc4fun.net"},
{"IRCHighWay", 0, 0, 0, 0, 0, TRUE},
{0, "irc.irchighway.net"},
{"IRCNet", 0},
{0, "open.ircnet.net"},
@ -305,9 +307,6 @@ static const struct defaultserver def[] =
{"Techtronix", 0, 0, 0, LOGIN_SASL, 0, TRUE},
{0, "irc.techtronix.net"},
{"TechNet", 0, 0, 0, LOGIN_SASL, 0, TRUE},
{0, "irc.technet.chat"},
{"tilde.chat", 0, 0, 0, LOGIN_SASL, 0, TRUE},
{0, "irc.tilde.chat"},

View File

@ -321,22 +321,23 @@ _SSL_socket (SSL_CTX *ctx, int sd)
char *
_SSL_set_verify (SSL_CTX *ctx, void *verify_callback)
_SSL_set_verify (SSL_CTX *ctx, void *verify_callback, char *cacert)
{
#ifdef DEFAULT_CERT_FILE
if (!SSL_CTX_load_verify_locations (ctx, DEFAULT_CERT_FILE, NULL))
{
__SSL_fill_err_buf ("SSL_CTX_load_verify_locations");
return (err_buf);
}
#else
if (!SSL_CTX_set_default_verify_paths (ctx))
{
__SSL_fill_err_buf ("SSL_CTX_set_default_verify_paths");
return (err_buf);
}
#endif
/*
if (cacert)
{
if (!SSL_CTX_load_verify_locations (ctx, cacert, NULL))
{
__SSL_fill_err_buf ("SSL_CTX_load_verify_locations");
return (err_buf);
}
}
*/
SSL_CTX_set_verify (ctx, SSL_VERIFY_PEER, verify_callback);
return (NULL);

View File

@ -45,7 +45,7 @@ SSL_CTX *_SSL_context_init (void (*info_cb_func));
#define _SSL_context_free(a) SSL_CTX_free(a);
SSL *_SSL_socket (SSL_CTX *ctx, int sd);
char *_SSL_set_verify (SSL_CTX *ctx, void *(verify_callback));
char *_SSL_set_verify (SSL_CTX *ctx, void *(verify_callback), char *cacert);
/*
int SSL_connect(SSL *);
int SSL_accept(SSL *);

View File

@ -84,8 +84,7 @@ sysinfo_get_cpu_arch (void)
GetNativeSystemInfo (&si);
if (si.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64 ||
si.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_ARM64)
if (si.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64)
{
return cpu_arch = 64;
}
@ -107,8 +106,7 @@ sysinfo_get_build_arch (void)
GetSystemInfo (&si);
if (si.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64 ||
si.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_ARM64)
if (si.wProcessorArchitecture == PROCESSOR_ARCHITECTURE_AMD64)
{
return build_arch = 64;
}
@ -356,8 +354,6 @@ static char *read_cpu_info (IWbemClassObject *object)
VariantClear (&max_clock_speed_variant);
g_strchomp (name_utf8);
if (cpu_freq_mhz > 1000)
{
result = g_strdup_printf ("%s (%.2fGHz)", name_utf8, cpu_freq_mhz / 1000.f);

View File

@ -1375,16 +1375,11 @@ str_sha256hash (char *string)
int i;
unsigned char hash[SHA256_DIGEST_LENGTH];
char buf[SHA256_DIGEST_LENGTH * 2 + 1]; /* 64 digit hash + '\0' */
#if OPENSSL_VERSION_NUMBER >= 0x30000000L
SHA256 (string, strlen (string), hash);
#else
SHA256_CTX sha256;
SHA256_Init (&sha256);
SHA256_Update (&sha256, string, strlen (string));
SHA256_Final (hash, &sha256);
#endif
for (i = 0; i < SHA256_DIGEST_LENGTH; i++)
{

View File

@ -512,7 +512,7 @@ chanlist_save (GtkWidget * wid, server *serv)
GtkTreeModel *model = GET_MODEL (serv);
if (gtk_tree_model_get_iter_first (model, &iter))
gtkutil_file_req (NULL, _("Select an output filename"), chanlist_filereq_done,
gtkutil_file_req (_("Select an output filename"), chanlist_filereq_done,
serv, NULL, NULL, FRF_WRITE);
}

View File

@ -146,7 +146,7 @@ fe_dcc_send_filereq (struct session *sess, char *nick, int maxcps, int passive)
mdc->maxcps = maxcps;
mdc->passive = passive;
gtkutil_file_req (NULL, tbuf, dcc_send_filereq_file, mdc, prefs.hex_dcc_dir, NULL, FRF_MULTIPLE|FRF_FILTERISINITIAL);
gtkutil_file_req (tbuf, dcc_send_filereq_file, mdc, prefs.hex_dcc_dir, NULL, FRF_MULTIPLE|FRF_FILTERISINITIAL);
g_free (tbuf);
}

View File

@ -664,13 +664,13 @@ fe_print_text (struct session *sess, char *text, time_t stamp,
return;
if (sess == current_tab)
fe_set_tab_color (sess, FE_COLOR_NONE);
fe_set_tab_color (sess, 0);
else if (sess->tab_state & TAB_STATE_NEW_HILIGHT)
fe_set_tab_color (sess, FE_COLOR_NEW_HILIGHT);
fe_set_tab_color (sess, 3);
else if (sess->tab_state & TAB_STATE_NEW_MSG)
fe_set_tab_color (sess, FE_COLOR_NEW_MSG);
fe_set_tab_color (sess, 2);
else
fe_set_tab_color (sess, FE_COLOR_NEW_DATA);
fe_set_tab_color (sess, 1);
}
void
@ -903,7 +903,7 @@ fe_confirm (const char *message, void (*yesproc)(void *), void (*noproc)(void *)
if (dcc->file)
{
char *filepath = g_build_filename (prefs.hex_dcc_dir, dcc->file, NULL);
gtkutil_file_req (NULL, message, dcc_saveas_cb, ud, filepath, NULL,
gtkutil_file_req (message, dcc_saveas_cb, ud, filepath, NULL,
FRF_WRITE|FRF_NOASKOVERWRITE|FRF_FILTERISINITIAL);
g_free (filepath);
}
@ -1054,45 +1054,6 @@ osx_show_uri (const char *url)
#endif
static inline char *
escape_uri (const char *uri)
{
return g_uri_escape_string(uri, G_URI_RESERVED_CHARS_GENERIC_DELIMITERS G_URI_RESERVED_CHARS_SUBCOMPONENT_DELIMITERS, FALSE);
}
static inline gboolean
uri_contains_forbidden_characters (const char *uri)
{
while (*uri)
{
if (!g_ascii_isalnum (*uri) && !strchr ("-._~:/?#[]@!$&'()*+,;=", *uri))
return TRUE;
uri++;
}
return FALSE;
}
static char *
maybe_escape_uri (const char *uri)
{
/* The only way to know if a string has already been escaped or not
* is by fulling parsing each segement but we can try some more simple heuristics. */
/* If we find characters that should clearly be escaped. */
if (uri_contains_forbidden_characters (uri))
return escape_uri (uri);
/* If it fails to be unescaped then it was not escaped. */
char *unescaped = g_uri_unescape_string (uri, NULL);
if (!unescaped)
return escape_uri (uri);
g_free (unescaped);
/* At this point it is probably safe to pass through as-is. */
return g_strdup (uri);
}
static void
fe_open_url_inner (const char *url)
{
@ -1110,8 +1071,8 @@ fe_open_url_inner (const char *url)
#elif defined(__APPLE__)
osx_show_uri (url);
#else
char *escaped_url = maybe_escape_uri (url);
g_debug ("Opening URL \"%s\" (%s)", escaped_url, url);
char *escaped_url = g_uri_escape_string (url, G_URI_RESERVED_CHARS_GENERIC_DELIMITERS G_URI_RESERVED_CHARS_SUBCOMPONENT_DELIMITERS,
FALSE);
gtk_show_uri (NULL, escaped_url, GDK_CURRENT_TIME, NULL);
g_free (escaped_url);
#endif
@ -1215,7 +1176,7 @@ fe_get_file (const char *title, char *initial,
{
/* OK: Call callback once per file, then once more with file=NULL. */
/* CANCEL: Call callback once with file=NULL. */
gtkutil_file_req (NULL, title, callback, userdata, initial, NULL, flags | FRF_FILTERISINITIAL);
gtkutil_file_req (title, callback, userdata, initial, NULL, flags | FRF_FILTERISINITIAL);
}
void

View File

@ -894,7 +894,7 @@ key_save_kbs (void)
#define STRIP_WHITESPACE \
while (buf[0] == ' ' || buf[0] == '\t') \
buf++; \
len = strlen (buf); \
len = strlen (buf); \
while (buf[len] == ' ' || buf[len] == '\t') \
{ \
buf[len] = 0; \

View File

@ -190,7 +190,7 @@ gtkutil_file_req_response (GtkWidget *dialog, gint res, struct file_req *freq)
}
void
gtkutil_file_req (GtkWindow *parent, const char *title, void *callback, void *userdata, char *filter, char *extensions,
gtkutil_file_req (const char *title, void *callback, void *userdata, char *filter, char *extensions,
int flags)
{
struct file_req *freq;
@ -269,16 +269,6 @@ gtkutil_file_req (GtkWindow *parent, const char *title, void *callback, void *us
G_CALLBACK (gtkutil_file_req_response), freq);
g_signal_connect (G_OBJECT (dialog), "destroy",
G_CALLBACK (gtkutil_file_req_destroy), (gpointer) freq);
if (parent)
gtk_window_set_transient_for (GTK_WINDOW (dialog), parent);
if (flags & FRF_MODAL)
{
g_assert (parent);
gtk_window_set_modal (GTK_WINDOW (dialog), TRUE);
}
gtk_widget_show (dialog);
}

View File

@ -25,7 +25,7 @@
typedef void (*filereqcallback) (void *, char *file);
void gtkutil_file_req (GtkWindow *parent, const char *title, void *callback, void *userdata, char *filter, char *extensions, int flags);
void gtkutil_file_req (const char *title, void *callback, void *userdata, char *filter, char *extensions, int flags);
void gtkutil_destroy (GtkWidget * igad, GtkWidget * dgad);
void gtkutil_destroy_on_esc (GtkWidget *win);
GtkWidget *gtkutil_button (GtkWidget *box, char *stock, char *tip, void *callback,

View File

@ -175,26 +175,20 @@ fe_flash_window (session *sess)
/* set a tab plain, red, light-red, or blue */
void
fe_set_tab_color (struct session *sess, tabcolor col)
fe_set_tab_color (struct session *sess, int col)
{
struct session *server_sess = sess->server->server_session;
int col_noflags = (col & ~FE_COLOR_ALLFLAGS);
int col_shouldoverride = !(col & FE_COLOR_FLAG_NOOVERRIDE);
if (sess->res->tab && sess->gui->is_tab && (col == 0 || sess != current_tab))
{
switch (col_noflags)
switch (col)
{
case 0: /* no particular color (theme default) */
sess->tab_state = TAB_STATE_NONE;
chan_set_color (sess->res->tab, plain_list);
break;
case 1: /* new data has been displayed (dark red) */
if (col_shouldoverride || !((sess->tab_state & TAB_STATE_NEW_MSG)
|| (sess->tab_state & TAB_STATE_NEW_HILIGHT))) {
sess->tab_state = TAB_STATE_NEW_DATA;
chan_set_color (sess->res->tab, newdata_list);
}
sess->tab_state = TAB_STATE_NEW_DATA;
chan_set_color (sess->res->tab, newdata_list);
if (chan_is_collapsed (sess->res->tab)
&& !((server_sess->tab_state & TAB_STATE_NEW_MSG)
@ -207,10 +201,8 @@ fe_set_tab_color (struct session *sess, tabcolor col)
break;
case 2: /* new message arrived in channel (light red) */
if (col_shouldoverride || !(sess->tab_state & TAB_STATE_NEW_HILIGHT)) {
sess->tab_state = TAB_STATE_NEW_MSG;
chan_set_color (sess->res->tab, newmsg_list);
}
sess->tab_state = TAB_STATE_NEW_MSG;
chan_set_color (sess->res->tab, newmsg_list);
if (chan_is_collapsed (sess->res->tab)
&& !(server_sess->tab_state & TAB_STATE_NEW_HILIGHT)
@ -399,22 +391,27 @@ fe_set_title (session *sess)
_(DISPLAY_NAME));
break;
case SESS_SERVER:
g_snprintf (tbuf, sizeof (tbuf), "%s%s%s - %s",
prefs.hex_gui_win_nick ? sess->server->nick : "",
prefs.hex_gui_win_nick ? " @ " : "", server_get_network (sess->server, TRUE),
g_snprintf (tbuf, sizeof (tbuf), "%s @ %s - %s",
sess->server->nick, server_get_network (sess->server, TRUE),
_(DISPLAY_NAME));
break;
case SESS_CHANNEL:
/* don't display keys in the titlebar */
if (prefs.hex_gui_win_modes)
{
g_snprintf (tbuf, sizeof (tbuf),
"%s%s%s / %s%s%s%s - %s",
prefs.hex_gui_win_nick ? sess->server->nick : "",
prefs.hex_gui_win_nick ? " @ " : "",
server_get_network (sess->server, TRUE), sess->channel,
prefs.hex_gui_win_modes && sess->current_modes ? " (" : "",
prefs.hex_gui_win_modes && sess->current_modes ? sess->current_modes : "",
prefs.hex_gui_win_modes && sess->current_modes ? ")" : "",
_(DISPLAY_NAME));
"%s @ %s / %s (%s) - %s",
sess->server->nick, server_get_network (sess->server, TRUE),
sess->channel, sess->current_modes ? sess->current_modes : "",
_(DISPLAY_NAME));
}
else
{
g_snprintf (tbuf, sizeof (tbuf),
"%s @ %s / %s - %s",
sess->server->nick, server_get_network (sess->server, TRUE),
sess->channel, _(DISPLAY_NAME));
}
if (prefs.hex_gui_win_ucount)
{
g_snprintf (tbuf + strlen (tbuf), 9, " (%d)", sess->total);
@ -422,9 +419,8 @@ fe_set_title (session *sess)
break;
case SESS_NOTICES:
case SESS_SNOTICES:
g_snprintf (tbuf, sizeof (tbuf), "%s%s%s (notices) - %s",
prefs.hex_gui_win_nick ? sess->server->nick : "",
prefs.hex_gui_win_nick ? " @ " : "", server_get_network (sess->server, TRUE),
g_snprintf (tbuf, sizeof (tbuf), "%s @ %s (notices) - %s",
sess->server->nick, server_get_network (sess->server, TRUE),
_(DISPLAY_NAME));
break;
default:
@ -544,7 +540,7 @@ mg_focus (session *sess)
/* when called via mg_changui_new, is_tab might be true, but
sess->res->tab is still NULL. */
if (sess->res->tab)
fe_set_tab_color (sess, FE_COLOR_NONE);
fe_set_tab_color (sess, 0);
}
static int

View File

@ -1362,7 +1362,7 @@ savebuffer_req_done (session *sess, char *file)
static void
menu_savebuffer (GtkWidget * wid, gpointer none)
{
gtkutil_file_req (NULL, _("Select an output filename"), savebuffer_req_done,
gtkutil_file_req (_("Select an output filename"), savebuffer_req_done,
current_sess, NULL, NULL, FRF_WRITE);
}

View File

@ -18,7 +18,6 @@
#include "config.h"
#include <string.h>
#include <gio/gio.h>
static GDBusProxy *fdo_notifications;
@ -56,7 +55,7 @@ notification_backend_show (const char *title, const char *text)
g_variant_builder_init (&params, G_VARIANT_TYPE ("(susssasa{sv}i)"));
g_variant_builder_add (&params, "s", "hexchat"); /* App name */
g_variant_builder_add (&params, "u", 0); /* ID, 0 means don't replace */
g_variant_builder_add (&params, "s", "io.github.Hexchat"); /* App icon */
g_variant_builder_add (&params, "s", ""); /* App icon (set from hints instead) */
g_variant_builder_add (&params, "s", title);
g_variant_builder_add (&params, "s", text);
g_variant_builder_add (&params, "as", NULL); /* Actions */

View File

@ -218,7 +218,7 @@ notification_plugin_init (hexchat_plugin *plugin_handle, char **plugin_name, cha
if (!notification_backend_init (&error))
{
if (error)
g_debug("Failed loading notification plugin: %s\n", error);
hexchat_printf(plugin_handle, "Failed loading notification plugin: %s\n", error);
return 0;
}
@ -246,7 +246,7 @@ notification_plugin_init (hexchat_plugin *plugin_handle, char **plugin_name, cha
int
notification_plugin_deinit (void *unused_param)
notification_plugin_deinit (void)
{
notification_backend_deinit ();
return 1;

View File

@ -161,7 +161,7 @@ plugingui_load (void)
{
char *sub_dir = g_build_filename (get_xdir(), "addons", NULL);
gtkutil_file_req (NULL, _("Select a Plugin or Script to load"), plugingui_load_cb, current_sess,
gtkutil_file_req (_("Select a Plugin or Script to load"), plugingui_load_cb, current_sess,
sub_dir, "*."PLUGIN_SUFFIX";*.lua;*.pl;*.py;*.tcl;*.js", FRF_FILTERISINITIAL|FRF_EXTENSIONS);
g_free (sub_dir);

View File

@ -77,7 +77,7 @@ rawlog_clearbutton (GtkWidget * wid, server *serv)
static int
rawlog_savebutton (GtkWidget * wid, server *serv)
{
gtkutil_file_req (NULL, _("Save As..."), rawlog_save, serv, NULL, NULL, FRF_WRITE);
gtkutil_file_req (_("Save As..."), rawlog_save, serv, NULL, NULL, FRF_WRITE);
return FALSE;
}

View File

@ -48,7 +48,6 @@ GtkStyle *create_input_style (GtkStyle *);
#define LABEL_INDENT 12
static GtkWidget *setup_window = NULL;
static int last_selected_page = 0;
static int last_selected_row = 0; /* sound row */
static gboolean color_change;
@ -176,7 +175,6 @@ static const setting appearance_settings[] =
{ST_HEADER, N_("Title Bar"),0,0,0},
{ST_TOGGLE, N_("Show channel modes"), P_OFFINTNL(hex_gui_win_modes),0,0,0},
{ST_TOGGLR, N_("Show number of users"), P_OFFINTNL(hex_gui_win_ucount),0,0,0},
{ST_TOGGLE, N_("Show nickname"), P_OFFINTNL(hex_gui_win_nick),0,0,0},
{ST_END, 0, 0, 0, 0, 0}
};
@ -1107,8 +1105,8 @@ setup_browsefile_cb (GtkWidget *button, GtkWidget *entry)
filter = "image/*";
filter_type = FRF_MIMETYPES;
#endif
gtkutil_file_req (GTK_WINDOW (setup_window), _("Select an Image File"), setup_filereq_cb,
entry, NULL, filter, filter_type|FRF_RECENTLYUSED|FRF_MODAL);
gtkutil_file_req (_("Select an Image File"), setup_filereq_cb,
entry, NULL, filter, filter_type|FRF_RECENTLYUSED);
}
static void
@ -1143,7 +1141,7 @@ setup_fontsel_cancel (GtkWidget *button, GtkFontSelectionDialog *dialog)
static void
setup_browsefolder_cb (GtkWidget *button, GtkEntry *entry)
{
gtkutil_file_req (GTK_WINDOW (setup_window), _("Select Download Folder"), setup_filereq_cb, entry, (char*)gtk_entry_get_text (entry), NULL, FRF_CHOOSEFOLDER|FRF_MODAL);
gtkutil_file_req (_("Select Download Folder"), setup_filereq_cb, entry, (char*)gtk_entry_get_text (entry), NULL, FRF_CHOOSEFOLDER);
}
static void
@ -1156,9 +1154,6 @@ setup_browsefont_cb (GtkWidget *button, GtkWidget *entry)
dialog = (GtkFontSelectionDialog *) gtk_font_selection_dialog_new (_("Select font"));
font_dialog = (GtkWidget *)dialog; /* global var */
gtk_window_set_transient_for (GTK_WINDOW (font_dialog), GTK_WINDOW (setup_window));
gtk_window_set_modal (GTK_WINDOW (font_dialog), TRUE);
sel = (GtkFontSelection *) gtk_font_selection_dialog_get_font_selection (dialog);
if (gtk_entry_get_text (GTK_ENTRY (entry))[0])
@ -1462,8 +1457,6 @@ setup_color_cb (GtkWidget *button, gpointer userdata)
g_object_set_data (G_OBJECT (ok_button), "b", button);
gtk_widget_set_sensitive (help_button, FALSE);
gtk_color_selection_set_current_color (GTK_COLOR_SELECTION (gtk_color_selection_dialog_get_color_selection (cdialog)), color);
gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (setup_window));
gtk_window_set_modal (GTK_WINDOW (dialog), TRUE);
gtk_widget_show (dialog);
g_object_unref (cancel_button);
@ -1718,8 +1711,8 @@ setup_snd_browse_cb (GtkWidget *button, GtkEntry *entry)
filter_type = FRF_MIMETYPES;
#endif
gtkutil_file_req (GTK_WINDOW (setup_window), _("Select a sound file"), setup_snd_filereq_cb, entry,
sounds_dir, filter, FRF_MODAL|FRF_FILTERISINITIAL|filter_type);
gtkutil_file_req (_("Select a sound file"), setup_snd_filereq_cb, entry,
sounds_dir, filter, FRF_FILTERISINITIAL|filter_type);
g_free (sounds_dir);
}
@ -2343,6 +2336,8 @@ setup_close_cb (GtkWidget *win, GtkWidget **swin)
void
setup_open (void)
{
static GtkWidget *setup_window = NULL;
if (setup_window)
{
gtk_window_present (GTK_WINDOW (setup_window));

View File

@ -1255,7 +1255,7 @@ void
sexy_spell_entry_activate_default_languages(SexySpellEntry *entry)
{
GSList *enchant_langs;
char *lang, **i, **langs;
char *lang, *langs;
if (!have_enchant)
return;
@ -1265,21 +1265,21 @@ sexy_spell_entry_activate_default_languages(SexySpellEntry *entry)
enchant_langs = sexy_spell_entry_get_languages(entry);
langs = g_strsplit_set (prefs.hex_text_spell_langs, ", \t", 0);
langs = g_strdup (prefs.hex_text_spell_langs);
for (i = langs; *i; i++)
lang = strtok (langs, ",");
while (lang != NULL)
{
lang = *i;
if (enchant_has_lang (lang, enchant_langs))
{
sexy_spell_entry_activate_language_internal (entry, lang, NULL);
}
lang = strtok (NULL, ",");
}
g_slist_foreach(enchant_langs, (GFunc) g_free, NULL);
g_slist_free(enchant_langs);
g_strfreev (langs);
g_free (langs);
/* If we don't have any languages activated, use "en" */
if (entry->priv->dict_list == NULL)

View File

@ -282,7 +282,7 @@ pevent_save_cb (GtkWidget * wid, void *data)
{
if (data)
{
gtkutil_file_req (NULL, _("Print Texts File"), pevent_save_req_cb, NULL,
gtkutil_file_req (_("Print Texts File"), pevent_save_req_cb, NULL,
NULL, NULL, FRF_WRITE);
return;
}
@ -304,7 +304,7 @@ pevent_load_req_cb (void *arg1, char *file)
static void
pevent_load_cb (GtkWidget * wid, void *data)
{
gtkutil_file_req (NULL, _("Print Texts File"), pevent_load_req_cb, NULL, NULL, NULL, 0);
gtkutil_file_req (_("Print Texts File"), pevent_load_req_cb, NULL, NULL, NULL, 0);
}
static void

View File

@ -145,7 +145,7 @@ url_save_callback (void *arg1, char *file)
static void
url_button_save (void)
{
gtkutil_file_req (NULL, _("Select an output filename"),
gtkutil_file_req (_("Select an output filename"),
url_save_callback, NULL, NULL, NULL, FRF_WRITE);
}

View File

@ -947,7 +947,7 @@ gtk_xtext_find_char (GtkXText * xtext, int x, int y, int *off, int *out_of_bound
textentry *ent;
int line;
int subline;
int outofbounds = FALSE;
int outofbounds;
/* Adjust y value for negative rounding, double to int */
if (y < 0)

View File

@ -623,7 +623,7 @@ fe_cleanup (void)
{
}
void
fe_set_tab_color (struct session *sess, tabcolor col)
fe_set_tab_color (struct session *sess, int col)
{
}
void

View File

@ -0,0 +1,7 @@
shared_module('enchant_win8',
sources: 'win8_provider.cpp',
dependencies: [libgio_dep, dependency('enchant-2')],
include_directories: config_h_include,
install: true,
install_dir: get_option('libdir') / 'enchant-2',
)

View File

@ -22,14 +22,15 @@
#include "config.h"
#include <Spellcheck.h>
#ifdef _MSC_VER
#include "typedef.h" // for ssize_t
#endif
#include <spellcheck.h>
#include <glib.h>
#include "typedef.h" // for ssize_t
#include <enchant-provider.h>
ENCHANT_PLUGIN_DECLARE ("win8")
/* --------- Utils ----------*/
static char *
@ -232,12 +233,6 @@ win8_provider_list_dicts (EnchantProvider *provider, size_t *out_n_dicts)
return enumstring_to_chararray (dicts, out_n_dicts, TRUE);
}
static void
win8_provider_free_string_list (EnchantProvider *provider, char **str_list)
{
g_strfreev (str_list);
}
static void
win8_provider_dispose (EnchantProvider *provider)
{
@ -283,7 +278,6 @@ init_enchant_provider (void)
provider->identify = win8_provider_identify;
provider->describe = win8_provider_describe;
provider->list_dicts = win8_provider_list_dicts;
provider->free_string_list = win8_provider_free_string_list;
provider->user_data = factory;

View File

@ -2,6 +2,10 @@ subdir('common')
if get_option('gtk-frontend')
subdir('fe-gtk')
if host_machine.system() == 'windows'
subdir('libenchant_win8')
endif
endif
if get_option('text-frontend')

View File

@ -40,8 +40,7 @@
<None Include="$(DepsRoot)\bin\gthread-2.0-0.dll" />
<None Include="$(DepsRoot)\bin\gtk-win32-2.0.dll" />
<None Include="$(DepsRoot)\bin\iconv.dll" />
<None Include="$(DepsRoot)\bin\libcrypto*.dll" />
<None Include="$(DepsRoot)\bin\libssl*.dll" />
<None Include="$(DepsRoot)\bin\libeay32.dll" />
<None Include="$(DepsRoot)\bin\libenchant.dll" />
<None Include="$(DepsRoot)\bin\ffi-7.dll" />
<None Include="$(DepsRoot)\bin\intl.dll" />
@ -51,6 +50,7 @@
<None Include="$(DepsRoot)\bin\pangocairo-1.0-0.dll" />
<None Include="$(DepsRoot)\bin\pangoft2-1.0-0.dll" />
<None Include="$(DepsRoot)\bin\pangowin32-1.0-0.dll" />
<None Include="$(DepsRoot)\bin\ssleay32.dll" />
<None Include="$(DepsRoot)\bin\zlib1.dll" />
<None Include="$(WinSparklePath)\WinSparkle.dll" />
<None Include="$(HexChatBin)thememan.exe" />

View File

@ -8,14 +8,14 @@
<YourGendefPath>c:\gtk-build\gendef</YourGendefPath>
<YourPerlPath>c:\gtk-build\perl-5.20</YourPerlPath>
<YourPython2Path>c:\gtk-build\python-2.7</YourPython2Path>
<YourPython3Path>c:\gtk-build\python-3.8</YourPython3Path>
<YourPython3Path>c:\gtk-build\python-3.6</YourPython3Path>
<YourWinSparklePath>c:\gtk-build\WinSparkle</YourWinSparklePath>
<!-- YOU SHOULDN'T TOUCH ANYTHING BELOW -->
<!-- G_DISABLE_DEPRECATED is unfeasible due to g_completion_* -->
<!-- must be buildable with GSEAL_ENABLE in the future, xtext, setup, and chanview-tabs stand in the way -->
<OwnFlags>GTK_DISABLE_DEPRECATED;GDK_PIXBUF_DISABLE_DEPRECATED;G_DISABLE_SINGLE_INCLUDES;GDK_PIXBUF_DISABLE_SINGLE_INCLUDES;GTK_DISABLE_SINGLE_INCLUDES;HAVE_X509_GET_SIGNATURE_NID;HAVE_SSL_CTX_GET_SSL_METHOD;DEFAULT_CERT_FILE="cert.pem";HAVE_STRTOULL;strtoull=_strtoui64;strcasecmp=stricmp;strncasecmp=strnicmp;__inline__=__inline</OwnFlags>
<OwnFlags>GTK_DISABLE_DEPRECATED;GDK_PIXBUF_DISABLE_DEPRECATED;G_DISABLE_SINGLE_INCLUDES;GDK_PIXBUF_DISABLE_SINGLE_INCLUDES;GTK_DISABLE_SINGLE_INCLUDES;HAVE_STRTOULL;strtoull=_strtoui64;strcasecmp=stricmp;strncasecmp=strnicmp;__inline__=__inline</OwnFlags>
<!-- FIXME: Add ability to use debug builds -->
<DepsRoot>$(YourDepsPath)\$(PlatformName)\release</DepsRoot>
<GendefPath>$(YourGendefPath)</GendefPath>
@ -26,14 +26,14 @@
<Python2Lib>python27</Python2Lib>
<Python2Output>hcpython2</Python2Output>
<Python3Path>$(YourPython3Path)\$(PlatformName)</Python3Path>
<Python3Lib>python38</Python3Lib>
<Python3Lib>python36</Python3Lib>
<Python3Output>hcpython3</Python3Output>
<LuaInclude>$(DepsRoot)\include\luajit-2.1</LuaInclude>
<LuaOutput>hclua</LuaOutput>
<LuaLib>lua51</LuaLib>
<Glib>$(DepsRoot)\include\glib-2.0;$(DepsRoot)\lib\glib-2.0\include;$(DepsRoot)\include\libxml2</Glib>
<Gtk>$(DepsRoot)\include\gtk-2.0;$(DepsRoot)\lib\gtk-2.0\include;$(DepsRoot)\include\atk-1.0;$(DepsRoot)\include\cairo;$(DepsRoot)\include\pango-1.0;$(DepsRoot)\include\gdk-pixbuf-2.0</Gtk>
<DepLibs>gtk-win32-2.0.lib;gdk-win32-2.0.lib;atk-1.0.lib;gio-2.0.lib;gdk_pixbuf-2.0.lib;pangowin32-1.0.lib;pangocairo-1.0.lib;pango-1.0.lib;cairo.lib;gobject-2.0.lib;gmodule-2.0.lib;glib-2.0.lib;intl.lib;libxml2.lib;libcrypto.lib;libssl.lib;ssleay32.lib;wininet.lib;winmm.lib;ws2_32.lib</DepLibs>
<DepLibs>gtk-win32-2.0.lib;gdk-win32-2.0.lib;atk-1.0.lib;gio-2.0.lib;gdk_pixbuf-2.0.lib;pangowin32-1.0.lib;pangocairo-1.0.lib;pango-1.0.lib;cairo.lib;gobject-2.0.lib;gmodule-2.0.lib;glib-2.0.lib;intl.lib;libxml2.lib;libeay32.lib;ssleay32.lib;wininet.lib;winmm.lib;ws2_32.lib</DepLibs>
<DataDir>$(SolutionDir)..\data\\</DataDir>
<HexChatBuild>$(SolutionDir)..\..\hexchat-build</HexChatBuild>
<HexChatBin>$(HexChatBuild)\$(PlatformName)\bin\</HexChatBin>

View File

@ -25,7 +25,7 @@ DefaultDirName={pf64}\HexChat
DefaultDirName={pf32}\HexChat
#endif
DefaultGroupName=HexChat
AllowNoIcons=yes
DisableProgramGroupPage=yes
SolidCompression=yes
Compression=lzma2/ultra64
SourceDir=..\rel
@ -60,9 +60,6 @@ Name: "custom"; Description: "Custom Installation"; Flags: iscustom
Name: "libs"; Description: "HexChat"; Types: normal minimal custom; Flags: fixed
Name: "xctext"; Description: "HexChat-Text"; Types: custom; Flags: disablenouninstallwarning
Name: "xtm"; Description: "HexChat Theme Manager"; Types: normal custom; Flags: disablenouninstallwarning
Name: "icons"; Description: "Create Shortcuts"; Types: custom; Flags: disablenouninstallwarning
Name: "icons\desktopicon"; Description: "Create Desktop Shortcut"; Types: custom; Flags: disablenouninstallwarning
Name: "icons\quicklaunchicon"; Description: "Create Quick Launch Shortcut"; Types: custom; Flags: disablenouninstallwarning
Name: "translations"; Description: "Translations"; Types: normal custom; Flags: disablenouninstallwarning
Name: "spell"; Description: "Spelling Dictionaries"; Types: custom; Flags: disablenouninstallwarning
Name: "plugins"; Description: "Plugins"; Types: custom; Flags: disablenouninstallwarning
@ -77,7 +74,7 @@ Name: "langs\lua"; Description: "Lua"; Types: normal custom; Flags: disablenouni
Name: "langs\perl"; Description: "Perl (requires Perl 5.20)"; Types: custom; Flags: disablenouninstallwarning
Name: "langs\python"; Description: "Python Interface"; Types: custom; Flags: disablenouninstallwarning
Name: "langs\python\python2"; Description: "Python (requires Python 2.7)"; Types: custom; Flags: disablenouninstallwarning exclusive
Name: "langs\python\python3"; Description: "Python (requires Python 3.8)"; Types: custom; Flags: disablenouninstallwarning exclusive
Name: "langs\python\python3"; Description: "Python (requires Python 3.6)"; Types: custom; Flags: disablenouninstallwarning exclusive
[Tasks]
Name: portable; Description: "Yes"; GroupDescription: "Portable Mode: Stores configuration files within install directory for portable drives."; Flags: unchecked
@ -141,13 +138,7 @@ Source: "gspawn-win32-helper-console.exe"; DestDir: "{app}"; Flags: ignoreversio
Source: "gthread-2.0-0.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs
Source: "gtk-win32-2.0.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs
Source: "iconv.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs
#if APPARCH == "x64"
Source: "libcrypto-1_1-x64.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs
Source: "libssl-1_1-x64.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs
#else
Source: "libcrypto-1_1.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs
Source: "libssl-1_1.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs
#endif
Source: "libeay32.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs
Source: "libenchant.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs
Source: "ffi-7.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs
Source: "intl.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs
@ -157,6 +148,7 @@ Source: "pango-1.0-0.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: l
Source: "pangocairo-1.0-0.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs
Source: "pangoft2-1.0-0.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs
Source: "pangowin32-1.0-0.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs
Source: "ssleay32.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs
Source: "zlib1.dll"; DestDir: "{app}"; Flags: ignoreversion; Components: libs
Source: "plugins\hcnotifications-winrt.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: libs
@ -199,16 +191,14 @@ Source: "hexchat-text.exe"; DestDir: "{app}"; Flags: ignoreversion; Components:
Source: "thememan.exe"; DestDir: "{app}"; Flags: ignoreversion; Components: xtm
[Icons]
Name: "{group}\HexChat"; Filename: "{app}\hexchat.exe"; AppUserModelID: "HexChat.Desktop.Notify"; Tasks: not portable; Check: not WizardNoIcons
Name: "{group}\HexChat Safe Mode"; Filename: "{app}\hexchat.exe"; Parameters: "--no-auto --no-plugins"; Tasks: not portable; Check: not WizardNoIcons
Name: "{group}\HexChat ChangeLog"; Filename: "{app}\changelog.url"; IconFilename: "{sys}\shell32.dll"; IconIndex: 165; Tasks: not portable; Check: not WizardNoIcons
Name: "{group}\HexChat ReadMe"; Filename: "{app}\readme.url"; IconFilename: "{sys}\shell32.dll"; IconIndex: 23; Tasks: not portable; Check: not WizardNoIcons
Name: "{group}\HexChat Config Folder"; Filename: "%APPDATA%\HexChat\"; Tasks: not portable; Check: not WizardNoIcons
Name: "{group}\HexChat-Text"; Filename: "{app}\hexchat-text.exe"; Components: xctext; Tasks: not portable; Check: not WizardNoIcons
Name: "{group}\HexChat Theme Manager"; Filename: "{app}\thememan.exe"; Components: xtm; Tasks: not portable; Check: not WizardNoIcons
Name: "{group}\Uninstall HexChat"; Filename: "{uninstallexe}"; Tasks: not portable; Check: not WizardNoIcons
Name: "{commondesktop}\HexChat"; Filename: "{app}\hexchat.exe"; AppUserModelID: "HexChat.Desktop.Notify"; Components: icons\desktopicon; Tasks: not portable
Name: "{commonappdata}\Microsoft\Internet Explorer\Quick Launch\HexChat"; Filename: "{app}\hexchat.exe"; Components: icons\quicklaunchicon; Tasks: not portable
Name: "{group}\HexChat"; Filename: "{app}\hexchat.exe"; AppUserModelID: "HexChat.Desktop.Notify"; Tasks: not portable
Name: "{group}\HexChat Safe Mode"; Filename: "{app}\hexchat.exe"; Parameters: "--no-auto --no-plugins"; Tasks: not portable
Name: "{group}\HexChat ChangeLog"; Filename: "{app}\changelog.url"; IconFilename: "{sys}\shell32.dll"; IconIndex: 165; Tasks: not portable
Name: "{group}\HexChat ReadMe"; Filename: "{app}\readme.url"; IconFilename: "{sys}\shell32.dll"; IconIndex: 23; Tasks: not portable
Name: "{group}\HexChat Config Folder"; Filename: "%APPDATA%\HexChat\"; Tasks: not portable
Name: "{group}\HexChat-Text"; Filename: "{app}\hexchat-text.exe"; Components: xctext; Tasks: not portable
Name: "{group}\HexChat Theme Manager"; Filename: "{app}\thememan.exe"; Components: xtm; Tasks: not portable
Name: "{group}\Uninstall HexChat"; Filename: "{uninstallexe}"; Tasks: not portable
[Messages]
BeveledLabel= {#APPNAM}
@ -303,14 +293,14 @@ begin
REDIST := 'https://dl.hexchat.net/misc/vcredist_2015_x64.exe';
REDIST_2013 := 'https://dl.hexchat.net/misc/vcredist_2013_x64.exe';
PERL := 'https://dl.hexchat.net/misc/perl/Perl%205.20.0%20x64.msi';
PY2 := 'https://www.python.org/ftp/python/2.7.18/python-2.7.18.amd64.msi';
PY3 := 'https://www.python.org/ftp/python/3.8.10/python-3.8.10-amd64.exe';
PY2 := 'https://www.python.org/ftp/python/2.7.14/python-2.7.14.amd64.msi';
PY3 := 'https://www.python.org/ftp/python/3.6.4/python-3.6.4-amd64.exe';
#else
REDIST := 'https://dl.hexchat.net/misc/vcredist_2015_x86.exe';
REDIST_2013 := 'https://dl.hexchat.net/misc/vcredist_2013_x86.exe';
PERL := 'https://dl.hexchat.net/misc/perl/Perl%205.20.0%20x86.msi';
PY2 := 'https://www.python.org/ftp/python/2.7.18/python-2.7.18.msi';
PY3 := 'https://www.python.org/ftp/python/3.8.10/python-3.8.10.exe';
PY2 := 'https://www.python.org/ftp/python/2.7.14/python-2.7.14.msi';
PY3 := 'https://www.python.org/ftp/python/3.6.4/python-3.6.4.exe';
#endif
DOTNET := 'https://dl.hexchat.net/misc/dotnet_40.exe';
SPELL := 'https://dl.hexchat.net/hexchat/HexChat%20Spelling%20Dictionaries%20r2.exe';
@ -337,7 +327,7 @@ begin
if IsComponentSelected('langs\python\python2') and not CheckDLL('python27.dll') then
idpAddFile(PY2, ExpandConstant('{tmp}\python.msi'));
if IsComponentSelected('langs\python\python3') and not CheckDLL('python38.dll') then
if IsComponentSelected('langs\python\python3') and not CheckDLL('python36.dll') then
idpAddFile(PY3, ExpandConstant('{tmp}\python.exe'));
end;
end;