mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-06-24 14:59:26 +00:00
Compare commits
14 Commits
flatpak-fl
...
2622e4f7d6
| Author | SHA1 | Date | |
|---|---|---|---|
| 2622e4f7d6 | |||
|
|
fb491a6bb2 | ||
| 3da7c89b66 | |||
|
|
e842cf3a57 | ||
| 85b0e8f1a6 | |||
|
|
b8e03ff6c1 | ||
| 54b1703d67 | |||
| 15d647a0ec | |||
|
|
353558ddb3 | ||
|
|
9f58d30050 | ||
|
|
4f0632cdf1 | ||
|
|
ff8ba71948 | ||
|
|
a367591327 | ||
|
|
c91925fbc2 |
4
.github/workflows/appimage-build.yml
vendored
4
.github/workflows/appimage-build.yml
vendored
@@ -261,8 +261,8 @@ jobs:
|
|||||||
|
|
||||||
./linuxdeploy-x86_64.AppImage \
|
./linuxdeploy-x86_64.AppImage \
|
||||||
--appdir AppDir \
|
--appdir AppDir \
|
||||||
--desktop-file AppDir/usr/share/applications/org.zoitechat.ZoiteChat.desktop \
|
--desktop-file AppDir/usr/share/applications/net.zoite.Zoitechat.desktop \
|
||||||
--icon-file AppDir/usr/share/icons/hicolor/48x48/apps/org.zoitechat.ZoiteChat.png \
|
--icon-file AppDir/usr/share/icons/hicolor/48x48/apps/net.zoite.Zoitechat.png \
|
||||||
--custom-apprun ./AppRun \
|
--custom-apprun ./AppRun \
|
||||||
--plugin gtk \
|
--plugin gtk \
|
||||||
--output appimage
|
--output appimage
|
||||||
|
|||||||
2
.github/workflows/flatpak-build.yml
vendored
2
.github/workflows/flatpak-build.yml
vendored
@@ -33,7 +33,7 @@ jobs:
|
|||||||
uses: flatpak/flatpak-github-actions/flatpak-builder@v6
|
uses: flatpak/flatpak-github-actions/flatpak-builder@v6
|
||||||
with:
|
with:
|
||||||
bundle: zoitechat.flatpak
|
bundle: zoitechat.flatpak
|
||||||
manifest-path: flatpak/org.zoitechat.ZoiteChat.json
|
manifest-path: flatpak/net.zoite.Zoitechat.json
|
||||||
cache: false
|
cache: false
|
||||||
restore-cache: false
|
restore-cache: false
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
icondir = join_paths(get_option('datadir'), 'icons/hicolor')
|
icondir = join_paths(get_option('datadir'), 'icons/hicolor')
|
||||||
install_data(
|
install_data(
|
||||||
'zoitechat.png',
|
'zoitechat.png',
|
||||||
rename: 'org.zoitechat.ZoiteChat.png',
|
rename: 'net.zoite.Zoitechat.png',
|
||||||
install_dir: join_paths(icondir, '48x48/apps')
|
install_dir: join_paths(icondir, '48x48/apps')
|
||||||
)
|
)
|
||||||
install_data(
|
install_data(
|
||||||
'zoitechat.svg',
|
'zoitechat.svg',
|
||||||
rename: 'org.zoitechat.ZoiteChat.svg',
|
rename: 'net.zoite.Zoitechat.svg',
|
||||||
install_dir: join_paths(icondir, 'scalable/apps')
|
install_dir: join_paths(icondir, 'scalable/apps')
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -6,8 +6,8 @@ desktop_utils = find_program('desktop-file-validate', required: false)
|
|||||||
if get_option('gtk-frontend')
|
if get_option('gtk-frontend')
|
||||||
if get_option('install-appdata')
|
if get_option('install-appdata')
|
||||||
zoitechat_appdata = i18n.merge_file(
|
zoitechat_appdata = i18n.merge_file(
|
||||||
input: 'org.zoitechat.ZoiteChat.metainfo.xml.in',
|
input: 'net.zoite.Zoitechat.appdata.xml.in',
|
||||||
output: 'org.zoitechat.ZoiteChat.metainfo.xml',
|
output: 'net.zoite.Zoitechat.appdata.xml',
|
||||||
po_dir: '../../po',
|
po_dir: '../../po',
|
||||||
install: true,
|
install: true,
|
||||||
install_dir: metainfodir
|
install_dir: metainfodir
|
||||||
@@ -15,7 +15,7 @@ if get_option('gtk-frontend')
|
|||||||
|
|
||||||
appstreamcli = find_program('appstreamcli', required: false)
|
appstreamcli = find_program('appstreamcli', required: false)
|
||||||
if appstreamcli.found()
|
if appstreamcli.found()
|
||||||
test('Validate org.zoitechat.ZoiteChat.metainfo.xml', appstreamcli,
|
test('Validate net.zoite.Zoitechat.appdata.xml', appstreamcli,
|
||||||
args: ['validate', zoitechat_appdata]
|
args: ['validate', zoitechat_appdata]
|
||||||
)
|
)
|
||||||
endif
|
endif
|
||||||
@@ -29,14 +29,14 @@ if get_option('gtk-frontend')
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
desktop_file = configure_file(
|
desktop_file = configure_file(
|
||||||
input: 'org.zoitechat.ZoiteChat.desktop.in.in',
|
input: 'net.zoite.Zoitechat.desktop.in.in',
|
||||||
output: 'org.zoitechat.ZoiteChat.desktop.in',
|
output: 'net.zoite.Zoitechat.desktop.in',
|
||||||
configuration: desktop_conf
|
configuration: desktop_conf
|
||||||
)
|
)
|
||||||
|
|
||||||
zoitechat_desktop = i18n.merge_file(
|
zoitechat_desktop = i18n.merge_file(
|
||||||
input: desktop_file,
|
input: desktop_file,
|
||||||
output: 'org.zoitechat.ZoiteChat.desktop',
|
output: 'net.zoite.Zoitechat.desktop',
|
||||||
po_dir: '../../po',
|
po_dir: '../../po',
|
||||||
type: 'desktop',
|
type: 'desktop',
|
||||||
install: true,
|
install: true,
|
||||||
@@ -44,7 +44,7 @@ if get_option('gtk-frontend')
|
|||||||
)
|
)
|
||||||
|
|
||||||
if desktop_utils.found()
|
if desktop_utils.found()
|
||||||
test('Validate org.zoitechat.ZoiteChat.desktop', desktop_utils,
|
test('Validate net.zoite.Zoitechat.desktop', desktop_utils,
|
||||||
args: [zoitechat_desktop]
|
args: [zoitechat_desktop]
|
||||||
)
|
)
|
||||||
endif
|
endif
|
||||||
@@ -98,14 +98,14 @@ if get_option('plugin')
|
|||||||
conf.set('LICENSE', metainfo[2])
|
conf.set('LICENSE', metainfo[2])
|
||||||
|
|
||||||
plugin_appdata = configure_file(
|
plugin_appdata = configure_file(
|
||||||
input: 'org.zoitechat.ZoiteChat.Plugin.metainfo.xml.in',
|
input: 'net.zoite.Zoitechat.Plugin.metainfo.xml.in',
|
||||||
output: 'org.zoitechat.ZoiteChat.Plugin.@0@.metainfo.xml'.format(name),
|
output: 'net.zoite.Zoitechat.Plugin.@0@.metainfo.xml'.format(name),
|
||||||
configuration: conf,
|
configuration: conf,
|
||||||
install_dir: get_option('install-plugin-metainfo') ? metainfodir : '',
|
install_dir: get_option('install-plugin-metainfo') ? metainfodir : '',
|
||||||
)
|
)
|
||||||
|
|
||||||
if appstreamcli.found()
|
if appstreamcli.found()
|
||||||
test('Validate org.zoitechat.ZoiteChat.Plugin.@0@.metainfo.xml'.format(name), appstreamcli,
|
test('Validate net.zoite.Zoitechat.Plugin.@0@.metainfo.xml'.format(name), appstreamcli,
|
||||||
args: ['validate', plugin_appdata]
|
args: ['validate', plugin_appdata]
|
||||||
)
|
)
|
||||||
endif
|
endif
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<component type="addon">
|
<component type="addon">
|
||||||
<id>org.zoitechat.ZoiteChat.Plugin.@NAME@</id>
|
<id>net.zoite.Zoitechat.Plugin.@NAME@</id>
|
||||||
<extends>org.zoitechat.ZoiteChat</extends>
|
<extends>net.zoite.Zoitechat</extends>
|
||||||
<name>@NAME@ Plugin</name>
|
<name>@NAME@ Plugin</name>
|
||||||
<summary>@SUMMARY@</summary>
|
<summary>@SUMMARY@</summary>
|
||||||
<url type="homepage">https://zoitechat.org/</url>
|
<url type="homepage">https://zoitechat.org/</url>
|
||||||
@@ -1,10 +1,10 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<component type="desktop-application">
|
<component type="desktop-application">
|
||||||
<id>org.zoitechat.ZoiteChat</id>
|
<id>net.zoite.Zoitechat</id>
|
||||||
<name>ZoiteChat</name>
|
<name>ZoiteChat</name>
|
||||||
<launchable type="desktop-id">org.zoitechat.ZoiteChat.desktop</launchable>
|
<launchable type="desktop-id">net.zoite.Zoitechat.desktop</launchable>
|
||||||
|
|
||||||
<developer id="org.zoitechat">
|
<developer id="net.zoite">
|
||||||
<name translate="no">ZoiteChat</name>
|
<name translate="no">ZoiteChat</name>
|
||||||
</developer>
|
</developer>
|
||||||
|
|
||||||
@@ -26,7 +26,7 @@
|
|||||||
</screenshot>
|
</screenshot>
|
||||||
</screenshots>
|
</screenshots>
|
||||||
<provides>
|
<provides>
|
||||||
<id>org.zoitechat.ZoiteChat.desktop</id>
|
<id>zoitechat.desktop</id>
|
||||||
</provides>
|
</provides>
|
||||||
<releases>
|
<releases>
|
||||||
<release date="2026-05-21" version="2.18.1">
|
<release date="2026-05-21" version="2.18.1">
|
||||||
@@ -339,7 +339,7 @@
|
|||||||
<description>
|
<description>
|
||||||
<p>This is largely a bug fix release though it has some large behind the scenes changes:</p>
|
<p>This is largely a bug fix release though it has some large behind the scenes changes:</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li>Rename data files to use *org.zoitechat.ZoiteChat* name</li>
|
<li>Rename data files to use *net.zoite.Zoitechat* name</li>
|
||||||
<li>Add option (irc_reconnect_rejoin) to disable auto-rejoin on reconnect</li>
|
<li>Add option (irc_reconnect_rejoin) to disable auto-rejoin on reconnect</li>
|
||||||
<li>Add ability to set custom tray icon separate of app icon</li>
|
<li>Add ability to set custom tray icon separate of app icon</li>
|
||||||
<li>Fix Enchant 2.0+ support</li>
|
<li>Fix Enchant 2.0+ support</li>
|
||||||
@@ -4,12 +4,12 @@ GenericName=IRC Client
|
|||||||
Comment=Chat with other people online
|
Comment=Chat with other people online
|
||||||
Keywords=IM;Chat;
|
Keywords=IM;Chat;
|
||||||
Exec=@exec_command@
|
Exec=@exec_command@
|
||||||
Icon=org.zoitechat.ZoiteChat
|
Icon=net.zoite.Zoitechat
|
||||||
Terminal=false
|
Terminal=false
|
||||||
Type=Application
|
Type=Application
|
||||||
Categories=GTK;Network;IRCClient;
|
Categories=GTK;Network;IRCClient;
|
||||||
StartupNotify=true
|
StartupNotify=true
|
||||||
StartupWMClass=org.zoitechat.ZoiteChat
|
StartupWMClass=net.zoite.Zoitechat
|
||||||
X-GNOME-UsesNotifications=true
|
X-GNOME-UsesNotifications=true
|
||||||
MimeType=x-scheme-handler/irc;x-scheme-handler/ircs;
|
MimeType=x-scheme-handler/irc;x-scheme-handler/ircs;
|
||||||
Actions=SafeMode;
|
Actions=SafeMode;
|
||||||
@@ -1,17 +1,25 @@
|
|||||||
|
From 918503d57c6740d20be68a6717158673a2a8b25f Mon Sep 17 00:00:00 2001
|
||||||
|
From: Patrick Griffis <tingping@tingping.se>
|
||||||
|
Date: Sat, 17 Mar 2018 05:57:49 -0400
|
||||||
|
Subject: [PATCH] Support loading Flatpak extensions
|
||||||
|
|
||||||
|
---
|
||||||
|
src/common/plugin.c | 2 ++
|
||||||
|
1 file changed, 2 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/src/common/plugin.c b/src/common/plugin.c
|
||||||
|
index 3ad3c558..6addf962 100644
|
||||||
--- a/src/common/plugin.c
|
--- a/src/common/plugin.c
|
||||||
+++ b/src/common/plugin.c
|
+++ b/src/common/plugin.c
|
||||||
@@ -470,7 +470,14 @@
|
@@ -450,6 +450,8 @@ plugin_auto_load (session *sess)
|
||||||
if (libdir && *libdir)
|
lib_dir = plugin_get_libdir ();
|
||||||
return libdir;
|
sub_dir = g_build_filename (get_xdir (), "addons", NULL);
|
||||||
else
|
|
||||||
+ {
|
|
||||||
+ if (g_file_test ("/app/extensions/lib/zoitechat/plugins", G_FILE_TEST_IS_DIR))
|
|
||||||
+ {
|
|
||||||
+ return "/app/extensions/lib/zoitechat/plugins";
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
return ZOITECHATLIBDIR;
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
+ for_files ("/app/extensions/lib/zoitechat/plugins", "*.so", plugin_auto_load_cb);
|
||||||
|
+
|
||||||
|
#ifdef WIN32
|
||||||
|
/* a long list of bundled plugins that should be loaded automatically,
|
||||||
|
* user plugins should go to <config>, leave Program Files alone! */
|
||||||
|
--
|
||||||
|
2.14.3
|
||||||
|
|
||||||
|
|||||||
82
flatpak/net.zoite.Zoitechat.json
Normal file
82
flatpak/net.zoite.Zoitechat.json
Normal file
@@ -0,0 +1,82 @@
|
|||||||
|
{
|
||||||
|
"app-id": "net.zoite.Zoitechat",
|
||||||
|
"branch": "master",
|
||||||
|
"runtime": "org.gnome.Platform",
|
||||||
|
"runtime-version": "49",
|
||||||
|
"sdk": "org.gnome.Sdk",
|
||||||
|
"command": "zoitechat",
|
||||||
|
"finish-args": [
|
||||||
|
"--share=ipc",
|
||||||
|
"--socket=wayland",
|
||||||
|
"--socket=fallback-x11",
|
||||||
|
"--share=network",
|
||||||
|
"--socket=pulseaudio",
|
||||||
|
"--filesystem=xdg-download",
|
||||||
|
"--filesystem=xdg-data/themes:ro",
|
||||||
|
"--filesystem=xdg-data/icons:ro",
|
||||||
|
"--filesystem=xdg-run/tray-icon:create",
|
||||||
|
"--env=GTK_CSD=1",
|
||||||
|
"--talk-name=org.freedesktop.Notifications",
|
||||||
|
"--talk-name=org.kde.StatusNotifierWatcher",
|
||||||
|
"--talk-name=com.canonical.AppMenu.Registrar",
|
||||||
|
"--talk-name=org.mpris.MediaPlayer2.*"
|
||||||
|
],
|
||||||
|
"add-extensions": {
|
||||||
|
"net.zoite.Zoitechat.Plugin": {
|
||||||
|
"version": "49",
|
||||||
|
"directory": "extensions",
|
||||||
|
"add-ld-path": "lib",
|
||||||
|
"merge-dirs": "lib/zoitechat/plugins",
|
||||||
|
"subdirectories": true,
|
||||||
|
"no-autodownload": true,
|
||||||
|
"autodelete": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"modules": [
|
||||||
|
"shared-modules/lua5.4/lua-5.4.json",
|
||||||
|
"shared-modules/libcanberra/libcanberra.json",
|
||||||
|
"shared-modules/libayatana-appindicator/libayatana-appindicator-gtk3.json",
|
||||||
|
"python3-cffi.json",
|
||||||
|
"perl.json",
|
||||||
|
{
|
||||||
|
"name": "lgi",
|
||||||
|
"buildsystem": "meson",
|
||||||
|
"sources": [
|
||||||
|
{
|
||||||
|
"type": "archive",
|
||||||
|
"url": "https://github.com/pavouk/lgi/archive/c9b8e4473c6421f2a215d8c06c0d94b86eb0b26a.tar.gz",
|
||||||
|
"sha256": "db67b2b7ee89fa566f783486d56be7203552a997bc55f35020b57dd2776b9943"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "zoitechat",
|
||||||
|
"buildsystem": "meson",
|
||||||
|
"config-opts": [
|
||||||
|
"-Ddbus-service-use-appid=true",
|
||||||
|
"-Dwith-perl=perl",
|
||||||
|
"-Dwith-python=python3",
|
||||||
|
"-Dwith-lua=lua"
|
||||||
|
],
|
||||||
|
"build-options": {
|
||||||
|
"cflags": "-Wno-error=missing-include-dirs"
|
||||||
|
},
|
||||||
|
"cleanup": [
|
||||||
|
"/share/man"
|
||||||
|
],
|
||||||
|
"post-install": [
|
||||||
|
"install -d /app/extensions"
|
||||||
|
],
|
||||||
|
"sources": [
|
||||||
|
{
|
||||||
|
"type": "dir",
|
||||||
|
"path": ".."
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "patch",
|
||||||
|
"path": "Load-plugins-from-Flatpak-extensions.patch"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -1,127 +0,0 @@
|
|||||||
{
|
|
||||||
"app-id": "org.zoitechat.ZoiteChat",
|
|
||||||
"runtime": "org.gnome.Platform",
|
|
||||||
"runtime-version": "50",
|
|
||||||
"sdk": "org.gnome.Sdk",
|
|
||||||
"command": "zoitechat",
|
|
||||||
"finish-args": [
|
|
||||||
"--share=ipc",
|
|
||||||
"--socket=wayland",
|
|
||||||
"--socket=fallback-x11",
|
|
||||||
"--share=network",
|
|
||||||
"--socket=pulseaudio",
|
|
||||||
"--filesystem=xdg-download",
|
|
||||||
"--filesystem=xdg-run/tray-icon:create",
|
|
||||||
"--env=GTK_CSD=1",
|
|
||||||
"--talk-name=org.freedesktop.Notifications",
|
|
||||||
"--talk-name=org.kde.StatusNotifierWatcher",
|
|
||||||
"--talk-name=com.canonical.AppMenu.Registrar"
|
|
||||||
],
|
|
||||||
"add-extensions": {
|
|
||||||
"org.zoitechat.ZoiteChat.Plugin": {
|
|
||||||
"version": "50",
|
|
||||||
"directory": "extensions",
|
|
||||||
"add-ld-path": "lib",
|
|
||||||
"merge-dirs": "lib/zoitechat/plugins",
|
|
||||||
"subdirectories": true,
|
|
||||||
"no-autodownload": true,
|
|
||||||
"autodelete": true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"modules": [
|
|
||||||
"shared-modules/lua5.4/lua-5.4.json",
|
|
||||||
"shared-modules/libcanberra/libcanberra.json",
|
|
||||||
"shared-modules/libayatana-appindicator/libayatana-appindicator-gtk3.json",
|
|
||||||
{
|
|
||||||
"name": "python3-cffi",
|
|
||||||
"buildsystem": "simple",
|
|
||||||
"build-commands": [
|
|
||||||
"pip3 install --verbose --exists-action=i --no-index --find-links=\"file://${PWD}\" --prefix=${FLATPAK_DEST} \"cffi\" --no-build-isolation"
|
|
||||||
],
|
|
||||||
"sources": [
|
|
||||||
{
|
|
||||||
"type": "file",
|
|
||||||
"url": "https://files.pythonhosted.org/packages/1d/b2/31537cf4b1ca988837256c910a668b553fceb8f069bedc4b1c826024b52c/pycparser-2.22.tar.gz",
|
|
||||||
"sha256": "491c8be9c040f5390f5bf44a5b07752bd07f56edf992381b05c701439eec10f6"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "file",
|
|
||||||
"url": "https://files.pythonhosted.org/packages/fc/97/c783634659c2920c3fc70419e3af40972dbaf758daa229a7d6ea6135c90d/cffi-1.17.1.tar.gz",
|
|
||||||
"sha256": "1c39c6016c32bc48dd54561950ebd6836e1670f2ae46128f67cf49e789c52824"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "perl",
|
|
||||||
"buildsystem": "simple",
|
|
||||||
"build-options": {
|
|
||||||
"no-debuginfo": true
|
|
||||||
},
|
|
||||||
"build-commands": [
|
|
||||||
"./Configure -des -Dprefix=/app -Dvendorprefix=/app -Duseshrplib -Dman1dir=none -Dman3dir=none",
|
|
||||||
"make -j${FLATPAK_BUILDER_N_JOBS}",
|
|
||||||
"make install"
|
|
||||||
],
|
|
||||||
"cleanup": [
|
|
||||||
"/share/man",
|
|
||||||
"/lib/perl5/*/*/CORE/*.a"
|
|
||||||
],
|
|
||||||
"sources": [
|
|
||||||
{
|
|
||||||
"type": "archive",
|
|
||||||
"url": "https://www.cpan.org/src/5.0/perl-5.42.2.tar.xz",
|
|
||||||
"sha256": "0a585eeb9e363c0f80482ddb3571625250c2c86aeb408853e8ea50805cfb14bb"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "lgi",
|
|
||||||
"buildsystem": "meson",
|
|
||||||
"sources": [
|
|
||||||
{
|
|
||||||
"type": "archive",
|
|
||||||
"url": "https://github.com/pavouk/lgi/archive/c9b8e4473c6421f2a215d8c06c0d94b86eb0b26a.tar.gz",
|
|
||||||
"sha256": "db67b2b7ee89fa566f783486d56be7203552a997bc55f35020b57dd2776b9943"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "zoitechat",
|
|
||||||
"buildsystem": "meson",
|
|
||||||
"config-opts": [
|
|
||||||
"-Ddbus-service-use-appid=true",
|
|
||||||
"-Dwith-perl=perl",
|
|
||||||
"-Dwith-python=python3",
|
|
||||||
"-Dwith-lua=lua"
|
|
||||||
],
|
|
||||||
"build-options": {
|
|
||||||
"cflags": "-Wno-error=missing-include-dirs"
|
|
||||||
},
|
|
||||||
"cleanup": [
|
|
||||||
"/share/man"
|
|
||||||
],
|
|
||||||
"post-install": [
|
|
||||||
"install -d /app/extensions"
|
|
||||||
],
|
|
||||||
"sources": [
|
|
||||||
{
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/ZoiteChat/zoitechat.git",
|
|
||||||
"tag": "zoitechat-2.18.1",
|
|
||||||
"commit": "479f1649efa0e5b166a7c7c9d86214b42ec9f794"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "file",
|
|
||||||
"url": "https://publicsuffix.org/list/public_suffix_list.dat",
|
|
||||||
"sha256": "6f7f7d9e8c68447f1c74095a12574b7fee46b0cd759c518a659aee0615d8e118",
|
|
||||||
"dest": "src/common",
|
|
||||||
"dest-filename": "public_suffix_list.dat"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"type": "patch",
|
|
||||||
"path": "Load-plugins-from-Flatpak-extensions.patch"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
20
flatpak/perl.json
Normal file
20
flatpak/perl.json
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
{
|
||||||
|
"name": "perl",
|
||||||
|
"buildsystem": "simple",
|
||||||
|
"build-commands": [
|
||||||
|
"./Configure -des -Dprefix=/app -Dvendorprefix=/app -Duseshrplib -Dman1dir=none -Dman3dir=none",
|
||||||
|
"make -j${FLATPAK_BUILDER_N_JOBS}",
|
||||||
|
"make install"
|
||||||
|
],
|
||||||
|
"cleanup": [
|
||||||
|
"/share/man",
|
||||||
|
"/lib/perl5/*/*/CORE/*.a"
|
||||||
|
],
|
||||||
|
"sources": [
|
||||||
|
{
|
||||||
|
"type": "archive",
|
||||||
|
"url": "https://www.cpan.org/src/5.0/perl-5.42.2.tar.xz",
|
||||||
|
"sha256": "0a585eeb9e363c0f80482ddb3571625250c2c86aeb408853e8ea50805cfb14bb"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
19
flatpak/python3-cffi.json
Normal file
19
flatpak/python3-cffi.json
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
{
|
||||||
|
"name": "python3-cffi",
|
||||||
|
"buildsystem": "simple",
|
||||||
|
"build-commands": [
|
||||||
|
"pip3 install --verbose --exists-action=i --no-index --find-links=\"file://${PWD}\" --prefix=${FLATPAK_DEST} \"cffi\" --no-build-isolation"
|
||||||
|
],
|
||||||
|
"sources": [
|
||||||
|
{
|
||||||
|
"type": "file",
|
||||||
|
"url": "https://files.pythonhosted.org/packages/1d/b2/31537cf4b1ca988837256c910a668b553fceb8f069bedc4b1c826024b52c/pycparser-2.22.tar.gz",
|
||||||
|
"sha256": "491c8be9c040f5390f5bf44a5b07752bd07f56edf992381b05c701439eec10f6"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "file",
|
||||||
|
"url": "https://files.pythonhosted.org/packages/fc/97/c783634659c2920c3fc70419e3af40972dbaf758daa229a7d6ea6135c90d/cffi-1.17.1.tar.gz",
|
||||||
|
"sha256": "1c39c6016c32bc48dd54561950ebd6836e1670f2ae46128f67cf49e789c52824"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -91,27 +91,13 @@ static const signed char fish_unbase64[256] = {
|
|||||||
#include <openssl/provider.h>
|
#include <openssl/provider.h>
|
||||||
static OSSL_PROVIDER *legacy_provider;
|
static OSSL_PROVIDER *legacy_provider;
|
||||||
static OSSL_PROVIDER *default_provider;
|
static OSSL_PROVIDER *default_provider;
|
||||||
static OSSL_LIB_CTX *ossl_ctx;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int fish_init(void)
|
int fish_init(void)
|
||||||
{
|
{
|
||||||
#if OPENSSL_VERSION_NUMBER >= 0x30000000L
|
#if OPENSSL_VERSION_NUMBER >= 0x30000000L
|
||||||
ossl_ctx = OSSL_LIB_CTX_new();
|
legacy_provider = OSSL_PROVIDER_load(NULL, "legacy");
|
||||||
if (!ossl_ctx)
|
default_provider = OSSL_PROVIDER_load(NULL, "default");
|
||||||
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
|
#endif
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@@ -129,10 +115,6 @@ void fish_deinit(void)
|
|||||||
default_provider = NULL;
|
default_provider = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ossl_ctx) {
|
|
||||||
OSSL_LIB_CTX_free(ossl_ctx);
|
|
||||||
ossl_ctx = NULL;
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -278,7 +260,9 @@ char *fish_cipher(const char *plaintext, size_t plaintext_len, const char *key,
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if OPENSSL_VERSION_NUMBER >= 0x30000000L
|
#if OPENSSL_VERSION_NUMBER >= 0x30000000L
|
||||||
cipher = EVP_CIPHER_fetch(ossl_ctx, "BF-CBC", NULL);
|
cipher = EVP_CIPHER_fetch(NULL, "BF-CBC", NULL);
|
||||||
|
if (!cipher)
|
||||||
|
cipher = (EVP_CIPHER *) EVP_bf_cbc();
|
||||||
#else
|
#else
|
||||||
cipher = (EVP_CIPHER *) EVP_bf_cbc();
|
cipher = (EVP_CIPHER *) EVP_bf_cbc();
|
||||||
#endif
|
#endif
|
||||||
@@ -286,7 +270,9 @@ char *fish_cipher(const char *plaintext, size_t plaintext_len, const char *key,
|
|||||||
} else if (mode == EVP_CIPH_ECB_MODE) {
|
} else if (mode == EVP_CIPH_ECB_MODE) {
|
||||||
|
|
||||||
#if OPENSSL_VERSION_NUMBER >= 0x30000000L
|
#if OPENSSL_VERSION_NUMBER >= 0x30000000L
|
||||||
cipher = EVP_CIPHER_fetch(ossl_ctx, "BF-ECB", NULL);
|
cipher = EVP_CIPHER_fetch(NULL, "BF-ECB", NULL);
|
||||||
|
if (!cipher)
|
||||||
|
cipher = (EVP_CIPHER *) EVP_bf_ecb();
|
||||||
#else
|
#else
|
||||||
cipher = (EVP_CIPHER *) EVP_bf_ecb();
|
cipher = (EVP_CIPHER *) EVP_bf_ecb();
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -421,7 +421,7 @@ static int handle_keyx_notice(char *word[], char *word_eol[], void *userdata) {
|
|||||||
zoitechat_commandf(ph, "quote NOTICE %s :DH1080_FINISH %s%s", sender, pub_key, (mode == FISH_CBC_MODE) ? " CBC" : "");
|
zoitechat_commandf(ph, "quote NOTICE %s :DH1080_FINISH %s%s", sender, pub_key, (mode == FISH_CBC_MODE) ? " CBC" : "");
|
||||||
g_free(pub_key);
|
g_free(pub_key);
|
||||||
} else {
|
} else {
|
||||||
zoitechat_print(ph, "Failed to generate keys");
|
zoitechat_printf(ph, "Failed to generate keys");
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
} else if (!strcmp (dh_message, "DH1080_FINISH")) {
|
} else if (!strcmp (dh_message, "DH1080_FINISH")) {
|
||||||
@@ -446,7 +446,7 @@ static int handle_keyx_notice(char *word[], char *word_eol[], void *userdata) {
|
|||||||
zoitechat_printf(ph, "Stored new key for %s (%s)", sender, fish_modes[mode]);
|
zoitechat_printf(ph, "Stored new key for %s (%s)", sender, fish_modes[mode]);
|
||||||
g_free(secret_key);
|
g_free(secret_key);
|
||||||
} else {
|
} else {
|
||||||
zoitechat_print(ph, "Failed to create secret key!");
|
zoitechat_printf(ph, "Failed to create secret key!");
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
@@ -548,7 +548,7 @@ static int handle_keyx(char *word[], char *word_eol[], void *userdata) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ((query_ctx && ctx_type != 3) || (!query_ctx && !irc_is_query(target))) {
|
if ((query_ctx && ctx_type != 3) || (!query_ctx && !irc_is_query(target))) {
|
||||||
zoitechat_print(ph, "You can only exchange keys with individuals");
|
zoitechat_printf(ph, "You can only exchange keys with individuals");
|
||||||
return ZOITECHAT_EAT_ALL;
|
return ZOITECHAT_EAT_ALL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -560,7 +560,7 @@ static int handle_keyx(char *word[], char *word_eol[], void *userdata) {
|
|||||||
|
|
||||||
g_free(pub_key);
|
g_free(pub_key);
|
||||||
} else {
|
} else {
|
||||||
zoitechat_print(ph, "Failed to generate keys");
|
zoitechat_printf(ph, "Failed to generate keys");
|
||||||
}
|
}
|
||||||
|
|
||||||
return ZOITECHAT_EAT_ALL;
|
return ZOITECHAT_EAT_ALL;
|
||||||
@@ -577,7 +577,7 @@ static int handle_crypt_topic(char *word[], char *word_eol[], void *userdata) {
|
|||||||
GSList *encrypted_list;
|
GSList *encrypted_list;
|
||||||
|
|
||||||
if (!*topic) {
|
if (!*topic) {
|
||||||
zoitechat_print(ph, usage_topic);
|
zoitechat_printf(ph, "%s", usage_topic);
|
||||||
return ZOITECHAT_EAT_ALL;
|
return ZOITECHAT_EAT_ALL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -624,7 +624,7 @@ static int handle_crypt_notice(char *word[], char *word_eol[], void *userdata) {
|
|||||||
GSList *encrypted_list, *encrypted_item;
|
GSList *encrypted_list, *encrypted_item;
|
||||||
|
|
||||||
if (!*target || !*notice) {
|
if (!*target || !*notice) {
|
||||||
zoitechat_print(ph, usage_notice);
|
zoitechat_printf(ph, "%s", usage_notice);
|
||||||
return ZOITECHAT_EAT_ALL;
|
return ZOITECHAT_EAT_ALL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -676,7 +676,7 @@ static int handle_crypt_msg(char *word[], char *word_eol[], void *userdata) {
|
|||||||
GSList *encrypted_list, *encrypted_item;
|
GSList *encrypted_list, *encrypted_item;
|
||||||
|
|
||||||
if (!*target || !*message) {
|
if (!*target || !*message) {
|
||||||
zoitechat_print(ph, usage_msg);
|
zoitechat_printf(ph, "%s", usage_msg);
|
||||||
return ZOITECHAT_EAT_ALL;
|
return ZOITECHAT_EAT_ALL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -805,11 +805,15 @@ int zoitechat_plugin_init(zoitechat_plugin *plugin_handle,
|
|||||||
zoitechat_hook_server_attrs(ph, "TOPIC", ZOITECHAT_PRI_NORM, handle_incoming, NULL);
|
zoitechat_hook_server_attrs(ph, "TOPIC", ZOITECHAT_PRI_NORM, handle_incoming, NULL);
|
||||||
zoitechat_hook_server_attrs(ph, "332", ZOITECHAT_PRI_NORM, handle_incoming, NULL);
|
zoitechat_hook_server_attrs(ph, "332", ZOITECHAT_PRI_NORM, handle_incoming, NULL);
|
||||||
|
|
||||||
if (!fish_init())
|
if (!fish_init()) {
|
||||||
|
zoitechat_printf(ph, "FiSHLiM failed to initialize crypto backend");
|
||||||
return 0;
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (!dh1080_init())
|
if (!dh1080_init()) {
|
||||||
|
zoitechat_printf(ph, "FiSHLiM failed to initialize DH1080");
|
||||||
return 0;
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
pending_exchanges = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, g_free);
|
pending_exchanges = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, g_free);
|
||||||
|
|
||||||
|
|||||||
17
readme.md
17
readme.md
@@ -31,12 +31,19 @@
|
|||||||
<br />
|
<br />
|
||||||
|
|
||||||
|
|
||||||
ZoiteChat is an HexChat based IRC client for Windows and UNIX-like operating systems.
|
ZoiteChat is a GTK3 IRC client based on HexChat, available for Windows and UNIX-like operating systems.
|
||||||
See [IRCHelp.org](http://irchelp.org) for information about IRC in general.
|
|
||||||
For more information on ZoiteChat please read our [documentation](https://docs.zoitechat.org/):
|
|
||||||
- [Downloads](https://zoitechat.org/download)
|
|
||||||
|
|
||||||
- [Troubleshooting](troubleshooting.md)
|
Features include HexChat-compatible Python, Perl and Lua scripting support, a plugin API,
|
||||||
|
multiple server/channel windows, spell checking, multiple authentication methods including SASL,
|
||||||
|
and customizable notifications.
|
||||||
|
|
||||||
|
See [IRCHelp.org](http://irchelp.org) for information about IRC in general.
|
||||||
|
|
||||||
|
For more information on ZoiteChat:
|
||||||
|
|
||||||
|
- [Main Documentation](https://docs.zoitechat.org/) and [FAQ](https://docs.zoitechat.org/en/latest/faq.html)
|
||||||
|
|
||||||
|
- [Downloads](https://zoitechat.org/download.php)
|
||||||
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|||||||
@@ -390,6 +390,9 @@ const struct prefs vars[] =
|
|||||||
{"dcc_permissions", P_OFFINT (hex_dcc_permissions), TYPE_INT},
|
{"dcc_permissions", P_OFFINT (hex_dcc_permissions), TYPE_INT},
|
||||||
{"dcc_port_first", P_OFFINT (hex_dcc_port_first), TYPE_INT},
|
{"dcc_port_first", P_OFFINT (hex_dcc_port_first), TYPE_INT},
|
||||||
{"dcc_port_last", P_OFFINT (hex_dcc_port_last), TYPE_INT},
|
{"dcc_port_last", P_OFFINT (hex_dcc_port_last), TYPE_INT},
|
||||||
|
{"dcc_nat_lease", P_OFFINT (hex_dcc_nat_lease), TYPE_INT},
|
||||||
|
{"dcc_nat_map", P_OFFINT (hex_dcc_nat_map), TYPE_BOOL},
|
||||||
|
{"dcc_passive_prefer", P_OFFINT (hex_dcc_passive_prefer), TYPE_BOOL},
|
||||||
{"dcc_remove", P_OFFINT (hex_dcc_remove), TYPE_BOOL},
|
{"dcc_remove", P_OFFINT (hex_dcc_remove), TYPE_BOOL},
|
||||||
{"dcc_save_nick", P_OFFINT (hex_dcc_save_nick), TYPE_BOOL},
|
{"dcc_save_nick", P_OFFINT (hex_dcc_save_nick), TYPE_BOOL},
|
||||||
{"dcc_send_fillspaces", P_OFFINT (hex_dcc_send_fillspaces), TYPE_BOOL},
|
{"dcc_send_fillspaces", P_OFFINT (hex_dcc_send_fillspaces), TYPE_BOOL},
|
||||||
@@ -447,6 +450,7 @@ const struct prefs vars[] =
|
|||||||
{"gui_tab_layout", P_OFFINT (hex_gui_tab_layout), TYPE_INT},
|
{"gui_tab_layout", P_OFFINT (hex_gui_tab_layout), TYPE_INT},
|
||||||
{"gui_tab_closebuttons", P_OFFINT (hex_gui_tab_closebuttons), TYPE_BOOL},
|
{"gui_tab_closebuttons", P_OFFINT (hex_gui_tab_closebuttons), TYPE_BOOL},
|
||||||
{"gui_tab_middleclose", P_OFFINT (hex_gui_tab_middleclose), TYPE_BOOL},
|
{"gui_tab_middleclose", P_OFFINT (hex_gui_tab_middleclose), TYPE_BOOL},
|
||||||
|
{"gui_mouse_scroll_speed", P_OFFINT (hex_gui_mouse_scroll_speed), TYPE_INT},
|
||||||
{"gui_tab_newtofront", P_OFFINT (hex_gui_tab_newtofront), TYPE_INT},
|
{"gui_tab_newtofront", P_OFFINT (hex_gui_tab_newtofront), TYPE_INT},
|
||||||
{"gui_tab_pos", P_OFFINT (hex_gui_tab_pos), TYPE_INT},
|
{"gui_tab_pos", P_OFFINT (hex_gui_tab_pos), TYPE_INT},
|
||||||
{"gui_tab_scrollchans", P_OFFINT (hex_gui_tab_scrollchans), TYPE_BOOL},
|
{"gui_tab_scrollchans", P_OFFINT (hex_gui_tab_scrollchans), TYPE_BOOL},
|
||||||
@@ -548,6 +552,10 @@ const struct prefs vars[] =
|
|||||||
#endif
|
#endif
|
||||||
{"net_bind_host", P_OFFSET (hex_net_bind_host), TYPE_STR},
|
{"net_bind_host", P_OFFSET (hex_net_bind_host), TYPE_STR},
|
||||||
{"net_ping_timeout", P_OFFINT (hex_net_ping_timeout), TYPE_INT, zoitechat_reinit_timers},
|
{"net_ping_timeout", P_OFFINT (hex_net_ping_timeout), TYPE_INT, zoitechat_reinit_timers},
|
||||||
|
{"net_lag_check", P_OFFINT (hex_net_lag_check), TYPE_INT, zoitechat_reinit_timers},
|
||||||
|
{"net_keepalive_idle", P_OFFINT (hex_net_keepalive_idle), TYPE_INT},
|
||||||
|
{"net_keepalive_interval", P_OFFINT (hex_net_keepalive_interval), TYPE_INT},
|
||||||
|
{"net_keepalive_count", P_OFFINT (hex_net_keepalive_count), TYPE_INT},
|
||||||
{"net_proxy_auth", P_OFFINT (hex_net_proxy_auth), TYPE_BOOL},
|
{"net_proxy_auth", P_OFFINT (hex_net_proxy_auth), TYPE_BOOL},
|
||||||
{"net_proxy_host", P_OFFSET (hex_net_proxy_host), TYPE_STR},
|
{"net_proxy_host", P_OFFSET (hex_net_proxy_host), TYPE_STR},
|
||||||
{"net_proxy_pass", P_OFFSET (hex_net_proxy_pass), TYPE_STR},
|
{"net_proxy_pass", P_OFFSET (hex_net_proxy_pass), TYPE_STR},
|
||||||
@@ -757,6 +765,7 @@ load_default_config(void)
|
|||||||
prefs.hex_away_show_once = 1;
|
prefs.hex_away_show_once = 1;
|
||||||
prefs.hex_away_track = 1;
|
prefs.hex_away_track = 1;
|
||||||
prefs.hex_dcc_auto_resume = 1;
|
prefs.hex_dcc_auto_resume = 1;
|
||||||
|
prefs.hex_dcc_passive_prefer = 1;
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
prefs.hex_dcc_fast_send = 1;
|
prefs.hex_dcc_fast_send = 1;
|
||||||
#endif
|
#endif
|
||||||
@@ -783,6 +792,7 @@ load_default_config(void)
|
|||||||
prefs.hex_gui_tab_server = 1;
|
prefs.hex_gui_tab_server = 1;
|
||||||
prefs.hex_gui_tab_sort = 1;
|
prefs.hex_gui_tab_sort = 1;
|
||||||
prefs.hex_gui_tab_scrollchans = 1;
|
prefs.hex_gui_tab_scrollchans = 1;
|
||||||
|
prefs.hex_gui_mouse_scroll_speed = 10;
|
||||||
prefs.hex_gui_topicbar = 1;
|
prefs.hex_gui_topicbar = 1;
|
||||||
prefs.hex_gui_transparency = 255;
|
prefs.hex_gui_transparency = 255;
|
||||||
prefs.hex_gui_tray = 1;
|
prefs.hex_gui_tray = 1;
|
||||||
@@ -829,6 +839,7 @@ load_default_config(void)
|
|||||||
prefs.hex_dcc_permissions = 0600;
|
prefs.hex_dcc_permissions = 0600;
|
||||||
prefs.hex_dcc_stall_timeout = 60;
|
prefs.hex_dcc_stall_timeout = 60;
|
||||||
prefs.hex_dcc_timeout = 180;
|
prefs.hex_dcc_timeout = 180;
|
||||||
|
prefs.hex_dcc_nat_lease = 1800;
|
||||||
prefs.hex_flood_ctcp_num = 5;
|
prefs.hex_flood_ctcp_num = 5;
|
||||||
prefs.hex_flood_ctcp_time = 30;
|
prefs.hex_flood_ctcp_time = 30;
|
||||||
prefs.hex_flood_msg_num = 5;
|
prefs.hex_flood_msg_num = 5;
|
||||||
@@ -858,6 +869,10 @@ load_default_config(void)
|
|||||||
prefs.hex_irc_ban_type = 1;
|
prefs.hex_irc_ban_type = 1;
|
||||||
prefs.hex_irc_join_delay = 5;
|
prefs.hex_irc_join_delay = 5;
|
||||||
prefs.hex_net_ping_timeout = 60;
|
prefs.hex_net_ping_timeout = 60;
|
||||||
|
prefs.hex_net_lag_check = 60;
|
||||||
|
prefs.hex_net_keepalive_idle = 60;
|
||||||
|
prefs.hex_net_keepalive_interval = 20;
|
||||||
|
prefs.hex_net_keepalive_count = 3;
|
||||||
prefs.hex_net_reconnect_delay = 10;
|
prefs.hex_net_reconnect_delay = 10;
|
||||||
prefs.hex_notify_timeout = 15;
|
prefs.hex_notify_timeout = 15;
|
||||||
prefs.hex_text_max_indent = 256;
|
prefs.hex_text_max_indent = 256;
|
||||||
|
|||||||
@@ -87,6 +87,41 @@ static gboolean dcc_read (GIOChannel *, GIOCondition, struct DCC *);
|
|||||||
static gboolean dcc_read_ack (GIOChannel *source, GIOCondition condition, struct DCC *dcc);
|
static gboolean dcc_read_ack (GIOChannel *source, GIOCondition condition, struct DCC *dcc);
|
||||||
static int dcc_check_timeouts (void);
|
static int dcc_check_timeouts (void);
|
||||||
|
|
||||||
|
|
||||||
|
static int
|
||||||
|
nat_map_run (int add, int port, int proto, int lease)
|
||||||
|
{
|
||||||
|
char cmd[512];
|
||||||
|
int status = 0;
|
||||||
|
if (add)
|
||||||
|
g_snprintf (cmd, sizeof (cmd), "upnpc -a 127.0.0.1 %d %d TCP %d >/dev/null 2>&1", port, port, lease);
|
||||||
|
else
|
||||||
|
g_snprintf (cmd, sizeof (cmd), "upnpc -d %d TCP >/dev/null 2>&1", port);
|
||||||
|
if (!g_spawn_command_line_sync (cmd, NULL, NULL, &status, NULL))
|
||||||
|
return FALSE;
|
||||||
|
return status == 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
dcc_nat_unmap (struct DCC *dcc)
|
||||||
|
{
|
||||||
|
if (!dcc->map_port)
|
||||||
|
return;
|
||||||
|
nat_map_run (0, dcc->map_port, dcc->type, 0);
|
||||||
|
dcc->map_port = 0;
|
||||||
|
dcc->map_next_refresh = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
dcc_nat_refresh (struct DCC *dcc)
|
||||||
|
{
|
||||||
|
if (!dcc->map_port || prefs.hex_dcc_nat_lease <= 0)
|
||||||
|
return;
|
||||||
|
if (time (0) < dcc->map_next_refresh)
|
||||||
|
return;
|
||||||
|
if (nat_map_run (1, dcc->map_port, dcc->type, prefs.hex_dcc_nat_lease))
|
||||||
|
dcc->map_next_refresh = time (0) + prefs.hex_dcc_nat_lease / 2;
|
||||||
|
}
|
||||||
static int new_id(void)
|
static int new_id(void)
|
||||||
{
|
{
|
||||||
static int id = 0;
|
static int id = 0;
|
||||||
@@ -254,7 +289,8 @@ dcc_check_timeouts (void)
|
|||||||
switch (dcc->dccstat)
|
switch (dcc->dccstat)
|
||||||
{
|
{
|
||||||
case STAT_ACTIVE:
|
case STAT_ACTIVE:
|
||||||
dcc_calc_cps (dcc);
|
dcc_calc_cps (dcc);
|
||||||
|
dcc_nat_refresh (dcc);
|
||||||
fe_dcc_update (dcc);
|
fe_dcc_update (dcc);
|
||||||
|
|
||||||
if (dcc->type == TYPE_SEND || dcc->type == TYPE_RECV)
|
if (dcc->type == TYPE_SEND || dcc->type == TYPE_RECV)
|
||||||
@@ -390,6 +426,7 @@ dcc_close (struct DCC *dcc, enum dcc_state dccstat, int destroy)
|
|||||||
}
|
}
|
||||||
|
|
||||||
dcc_remove_from_sum (dcc);
|
dcc_remove_from_sum (dcc);
|
||||||
|
dcc_nat_unmap (dcc);
|
||||||
|
|
||||||
if (dcc->fp != -1)
|
if (dcc->fp != -1)
|
||||||
{
|
{
|
||||||
@@ -1698,6 +1735,11 @@ dcc_listen_init (struct DCC *dcc, session *sess)
|
|||||||
getsockname (dcc->sok, (struct sockaddr *) &SAddr, &len);
|
getsockname (dcc->sok, (struct sockaddr *) &SAddr, &len);
|
||||||
|
|
||||||
dcc->port = ntohs (SAddr.sin_port);
|
dcc->port = ntohs (SAddr.sin_port);
|
||||||
|
if (prefs.hex_dcc_nat_map && nat_map_run (1, dcc->port, dcc->type, prefs.hex_dcc_nat_lease))
|
||||||
|
{
|
||||||
|
dcc->map_port = dcc->port;
|
||||||
|
dcc->map_next_refresh = time (0) + prefs.hex_dcc_nat_lease / 2;
|
||||||
|
}
|
||||||
|
|
||||||
dcc->addr = dcc_get_my_address (sess);
|
dcc->addr = dcc_get_my_address (sess);
|
||||||
|
|
||||||
@@ -1846,8 +1888,19 @@ dcc_send (struct session *sess, char *to, char *filename, gint64 maxcps, int pas
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (passive || dcc_listen_init (dcc, sess))
|
if ((passive || prefs.hex_dcc_passive_prefer) || dcc_listen_init (dcc, sess))
|
||||||
{
|
{
|
||||||
|
if (passive || prefs.hex_dcc_passive_prefer)
|
||||||
|
{
|
||||||
|
guint32 offer_addr = dcc_get_my_address (sess);
|
||||||
|
struct sockaddr_in saddr;
|
||||||
|
socklen_t slen = sizeof (saddr);
|
||||||
|
memset (&saddr, 0, sizeof (saddr));
|
||||||
|
getsockname (dcc->serv->sok, (struct sockaddr *) &saddr, &slen);
|
||||||
|
if (offer_addr == 0)
|
||||||
|
offer_addr = prefs.local_ip != 0xffffffff ? prefs.local_ip : saddr.sin_addr.s_addr;
|
||||||
|
dcc->addr = ntohl (offer_addr);
|
||||||
|
}
|
||||||
char havespaces = 0;
|
char havespaces = 0;
|
||||||
while (*filename)
|
while (*filename)
|
||||||
{
|
{
|
||||||
@@ -1868,13 +1921,13 @@ dcc_send (struct session *sess, char *to, char *filename, gint64 maxcps, int pas
|
|||||||
} else
|
} else
|
||||||
fe_dcc_add (dcc);
|
fe_dcc_add (dcc);
|
||||||
|
|
||||||
if (passive)
|
if (passive || prefs.hex_dcc_passive_prefer)
|
||||||
{
|
{
|
||||||
dcc->pasvid = new_id();
|
dcc->pasvid = new_id();
|
||||||
g_snprintf (outbuf, sizeof (outbuf), (havespaces) ?
|
g_snprintf (outbuf, sizeof (outbuf), (havespaces) ?
|
||||||
"DCC SEND \"%s\" 199 0 %" G_GUINT64_FORMAT " %d" :
|
"DCC SEND \"%s\" %u 0 %" G_GUINT64_FORMAT " %d" :
|
||||||
"DCC SEND %s 199 0 %" G_GUINT64_FORMAT " %d",
|
"DCC SEND %s %u 0 %" G_GUINT64_FORMAT " %d",
|
||||||
file_part (dcc->file),
|
file_part (dcc->file), dcc->addr,
|
||||||
dcc->size, dcc->pasvid);
|
dcc->size, dcc->pasvid);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -2292,8 +2345,19 @@ dcc_chat (struct session *sess, char *nick, int passive)
|
|||||||
dcc->dccstat = STAT_QUEUED;
|
dcc->dccstat = STAT_QUEUED;
|
||||||
dcc->type = TYPE_CHATSEND;
|
dcc->type = TYPE_CHATSEND;
|
||||||
dcc->nick = g_strdup (nick);
|
dcc->nick = g_strdup (nick);
|
||||||
if (passive || dcc_listen_init (dcc, sess))
|
if ((passive || prefs.hex_dcc_passive_prefer) || dcc_listen_init (dcc, sess))
|
||||||
{
|
{
|
||||||
|
if (passive || prefs.hex_dcc_passive_prefer)
|
||||||
|
{
|
||||||
|
guint32 offer_addr = dcc_get_my_address (sess);
|
||||||
|
struct sockaddr_in saddr;
|
||||||
|
socklen_t slen = sizeof (saddr);
|
||||||
|
memset (&saddr, 0, sizeof (saddr));
|
||||||
|
getsockname (dcc->serv->sok, (struct sockaddr *) &saddr, &slen);
|
||||||
|
if (offer_addr == 0)
|
||||||
|
offer_addr = prefs.local_ip != 0xffffffff ? prefs.local_ip : saddr.sin_addr.s_addr;
|
||||||
|
dcc->addr = ntohl (offer_addr);
|
||||||
|
}
|
||||||
if (prefs.hex_gui_autoopen_chat)
|
if (prefs.hex_gui_autoopen_chat)
|
||||||
{
|
{
|
||||||
if (fe_dcc_open_chat_win (TRUE)) /* already open? add only */
|
if (fe_dcc_open_chat_win (TRUE)) /* already open? add only */
|
||||||
@@ -2301,11 +2365,11 @@ dcc_chat (struct session *sess, char *nick, int passive)
|
|||||||
} else
|
} else
|
||||||
fe_dcc_add (dcc);
|
fe_dcc_add (dcc);
|
||||||
|
|
||||||
if (passive)
|
if (passive || prefs.hex_dcc_passive_prefer)
|
||||||
{
|
{
|
||||||
dcc->pasvid = new_id ();
|
dcc->pasvid = new_id ();
|
||||||
g_snprintf (outbuf, sizeof (outbuf), "DCC CHAT chat 199 %d %d",
|
g_snprintf (outbuf, sizeof (outbuf), "DCC CHAT chat %u 0 %d",
|
||||||
dcc->port, dcc->pasvid);
|
dcc->addr, dcc->pasvid);
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
g_snprintf (outbuf, sizeof (outbuf), "DCC CHAT chat %u %d",
|
g_snprintf (outbuf, sizeof (outbuf), "DCC CHAT chat %u %d",
|
||||||
|
|||||||
@@ -55,6 +55,9 @@ struct DCC
|
|||||||
int wiotag; /* writing/sending io tag */
|
int wiotag; /* writing/sending io tag */
|
||||||
int port;
|
int port;
|
||||||
int pasvid; /* mIRC's passive DCC id */
|
int pasvid; /* mIRC's passive DCC id */
|
||||||
|
int map_port;
|
||||||
|
int map_proto;
|
||||||
|
int map_next_refresh;
|
||||||
gint64 cps;
|
gint64 cps;
|
||||||
int resume_error;
|
int resume_error;
|
||||||
int resume_errno;
|
int resume_errno;
|
||||||
|
|||||||
@@ -34,6 +34,9 @@
|
|||||||
|
|
||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
#ifdef HAVE_NETINET_TCP_H
|
||||||
|
#include <netinet/tcp.h>
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define WANTSOCKET
|
#define WANTSOCKET
|
||||||
@@ -43,6 +46,9 @@
|
|||||||
|
|
||||||
#define NETWORK_PRIVATE
|
#define NETWORK_PRIVATE
|
||||||
#include "network.h"
|
#include "network.h"
|
||||||
|
#include "zoitechat.h"
|
||||||
|
|
||||||
|
extern struct zoitechatprefs prefs;
|
||||||
|
|
||||||
#define RAND_INT(n) ((int)(rand() / (RAND_MAX + 1.0) * (n)))
|
#define RAND_INT(n) ((int)(rand() / (RAND_MAX + 1.0) * (n)))
|
||||||
|
|
||||||
@@ -58,6 +64,27 @@ net_set_socket_options (int sok)
|
|||||||
setsockopt (sok, SOL_SOCKET, SO_REUSEADDR, (char *) &sw, sizeof (sw));
|
setsockopt (sok, SOL_SOCKET, SO_REUSEADDR, (char *) &sw, sizeof (sw));
|
||||||
sw = 1;
|
sw = 1;
|
||||||
setsockopt (sok, SOL_SOCKET, SO_KEEPALIVE, (char *) &sw, sizeof (sw));
|
setsockopt (sok, SOL_SOCKET, SO_KEEPALIVE, (char *) &sw, sizeof (sw));
|
||||||
|
#ifdef TCP_KEEPIDLE
|
||||||
|
{
|
||||||
|
int keepidle = prefs.hex_net_keepalive_idle;
|
||||||
|
if (keepidle > 0)
|
||||||
|
setsockopt (sok, IPPROTO_TCP, TCP_KEEPIDLE, (char *) &keepidle, sizeof (keepidle));
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#ifdef TCP_KEEPINTVL
|
||||||
|
{
|
||||||
|
int keepintvl = prefs.hex_net_keepalive_interval;
|
||||||
|
if (keepintvl > 0)
|
||||||
|
setsockopt (sok, IPPROTO_TCP, TCP_KEEPINTVL, (char *) &keepintvl, sizeof (keepintvl));
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#ifdef TCP_KEEPCNT
|
||||||
|
{
|
||||||
|
int keepcnt = prefs.hex_net_keepalive_count;
|
||||||
|
if (keepcnt > 0)
|
||||||
|
setsockopt (sok, IPPROTO_TCP, TCP_KEEPCNT, (char *) &keepcnt, sizeof (keepcnt));
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
char *
|
char *
|
||||||
|
|||||||
@@ -379,6 +379,7 @@ lag_check (void)
|
|||||||
char tbuf[128];
|
char tbuf[128];
|
||||||
time_t now = time (0);
|
time_t now = time (0);
|
||||||
time_t lag;
|
time_t lag;
|
||||||
|
time_t ping_age;
|
||||||
|
|
||||||
tim = make_ping_time ();
|
tim = make_ping_time ();
|
||||||
|
|
||||||
@@ -388,7 +389,7 @@ lag_check (void)
|
|||||||
if (serv->connected && serv->end_of_motd)
|
if (serv->connected && serv->end_of_motd)
|
||||||
{
|
{
|
||||||
lag = now - serv->ping_recv;
|
lag = now - serv->ping_recv;
|
||||||
if (prefs.hex_net_ping_timeout != 0 && lag > prefs.hex_net_ping_timeout && lag > 0)
|
if (serv->lag_sent && prefs.hex_net_ping_timeout != 0 && lag > prefs.hex_net_ping_timeout && lag > 0)
|
||||||
{
|
{
|
||||||
sprintf (tbuf, "%" G_GINT64_FORMAT, (gint64) lag);
|
sprintf (tbuf, "%" G_GINT64_FORMAT, (gint64) lag);
|
||||||
EMIT_SIGNAL (XP_TE_PINGTIMEOUT, serv->server_session, tbuf, NULL,
|
EMIT_SIGNAL (XP_TE_PINGTIMEOUT, serv->server_session, tbuf, NULL,
|
||||||
@@ -398,11 +399,11 @@ lag_check (void)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
g_snprintf (tbuf, sizeof (tbuf), "LAG%lu", tim);
|
ping_age = now - serv->ping_recv;
|
||||||
serv->p_ping (serv, "", tbuf);
|
if (!serv->lag_sent && prefs.hex_net_lag_check > 0 && ping_age >= prefs.hex_net_lag_check)
|
||||||
|
|
||||||
if (!serv->lag_sent)
|
|
||||||
{
|
{
|
||||||
|
g_snprintf (tbuf, sizeof (tbuf), "LAG%lu", tim);
|
||||||
|
serv->p_ping (serv, "", tbuf);
|
||||||
serv->lag_sent = tim;
|
serv->lag_sent = tim;
|
||||||
fe_set_lag (serv, -1);
|
fe_set_lag (serv, -1);
|
||||||
}
|
}
|
||||||
@@ -525,7 +526,7 @@ zoitechat_reinit_timers (void)
|
|||||||
if ((prefs.hex_net_ping_timeout != 0 || prefs.hex_gui_lagometer)
|
if ((prefs.hex_net_ping_timeout != 0 || prefs.hex_gui_lagometer)
|
||||||
&& lag_check_tag == 0)
|
&& lag_check_tag == 0)
|
||||||
{
|
{
|
||||||
lag_check_tag = fe_timeout_add_seconds (30, zoitechat_lag_check, NULL);
|
lag_check_tag = fe_timeout_add_seconds (1, zoitechat_lag_check, NULL);
|
||||||
}
|
}
|
||||||
else if ((!prefs.hex_net_ping_timeout && !prefs.hex_gui_lagometer)
|
else if ((!prefs.hex_net_ping_timeout && !prefs.hex_gui_lagometer)
|
||||||
&& lag_check_tag != 0)
|
&& lag_check_tag != 0)
|
||||||
|
|||||||
@@ -117,6 +117,8 @@ struct zoitechatprefs
|
|||||||
unsigned int hex_dcc_remove;
|
unsigned int hex_dcc_remove;
|
||||||
unsigned int hex_dcc_save_nick;
|
unsigned int hex_dcc_save_nick;
|
||||||
unsigned int hex_dcc_send_fillspaces;
|
unsigned int hex_dcc_send_fillspaces;
|
||||||
|
unsigned int hex_dcc_passive_prefer;
|
||||||
|
unsigned int hex_dcc_nat_map;
|
||||||
unsigned int hex_gui_autoopen_chat;
|
unsigned int hex_gui_autoopen_chat;
|
||||||
unsigned int hex_gui_autoopen_dialog;
|
unsigned int hex_gui_autoopen_dialog;
|
||||||
unsigned int hex_gui_autoopen_recv;
|
unsigned int hex_gui_autoopen_recv;
|
||||||
@@ -241,6 +243,7 @@ struct zoitechatprefs
|
|||||||
int hex_dcc_permissions;
|
int hex_dcc_permissions;
|
||||||
int hex_dcc_port_first;
|
int hex_dcc_port_first;
|
||||||
int hex_dcc_port_last;
|
int hex_dcc_port_last;
|
||||||
|
int hex_dcc_nat_lease;
|
||||||
int hex_dcc_stall_timeout;
|
int hex_dcc_stall_timeout;
|
||||||
int hex_dcc_timeout;
|
int hex_dcc_timeout;
|
||||||
int hex_flood_ctcp_num; /* flood */
|
int hex_flood_ctcp_num; /* flood */
|
||||||
@@ -267,6 +270,7 @@ struct zoitechatprefs
|
|||||||
int hex_gui_tab_layout;
|
int hex_gui_tab_layout;
|
||||||
int hex_gui_tab_closebuttons;
|
int hex_gui_tab_closebuttons;
|
||||||
int hex_gui_tab_middleclose;
|
int hex_gui_tab_middleclose;
|
||||||
|
int hex_gui_mouse_scroll_speed;
|
||||||
int hex_gui_tab_newtofront;
|
int hex_gui_tab_newtofront;
|
||||||
int hex_gui_tab_pos;
|
int hex_gui_tab_pos;
|
||||||
int hex_gui_tab_small;
|
int hex_gui_tab_small;
|
||||||
@@ -289,6 +293,10 @@ struct zoitechatprefs
|
|||||||
int hex_irc_join_delay;
|
int hex_irc_join_delay;
|
||||||
int hex_irc_notice_pos;
|
int hex_irc_notice_pos;
|
||||||
int hex_net_ping_timeout;
|
int hex_net_ping_timeout;
|
||||||
|
int hex_net_lag_check;
|
||||||
|
int hex_net_keepalive_idle;
|
||||||
|
int hex_net_keepalive_interval;
|
||||||
|
int hex_net_keepalive_count;
|
||||||
int hex_net_proxy_port;
|
int hex_net_proxy_port;
|
||||||
int hex_net_proxy_type; /* 0=disabled, 1=wingate 2=socks4, 3=socks5, 4=http */
|
int hex_net_proxy_type; /* 0=disabled, 1=wingate 2=socks4, 3=socks5, 4=http */
|
||||||
int hex_net_proxy_use; /* 0=all 1=IRC_ONLY 2=DCC_ONLY */
|
int hex_net_proxy_use; /* 0=all 1=IRC_ONLY 2=DCC_ONLY */
|
||||||
|
|||||||
@@ -305,12 +305,14 @@ static gboolean
|
|||||||
tab_scroll_cb (GtkWidget *widget, GdkEventScroll *event, gpointer cv)
|
tab_scroll_cb (GtkWidget *widget, GdkEventScroll *event, gpointer cv)
|
||||||
{
|
{
|
||||||
int direction = cv_scroll_direction (event);
|
int direction = cv_scroll_direction (event);
|
||||||
|
int i;
|
||||||
|
|
||||||
if (prefs.hex_gui_tab_scrollchans)
|
if (prefs.hex_gui_tab_scrollchans)
|
||||||
{
|
{
|
||||||
if (direction != 0)
|
if (direction != 0)
|
||||||
{
|
{
|
||||||
mg_switch_page (1, direction);
|
for (i = 0; i < cv_scroll_step_count (); i++)
|
||||||
|
mg_switch_page (1, direction);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -318,12 +320,14 @@ tab_scroll_cb (GtkWidget *widget, GdkEventScroll *event, gpointer cv)
|
|||||||
{
|
{
|
||||||
if (direction < 0)
|
if (direction < 0)
|
||||||
{
|
{
|
||||||
tab_scroll_left_up_clicked (widget, cv);
|
for (i = 0; i < cv_scroll_step_count (); i++)
|
||||||
|
tab_scroll_left_up_clicked (widget, cv);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
else if (direction > 0)
|
else if (direction > 0)
|
||||||
{
|
{
|
||||||
tab_scroll_right_down_clicked (widget, cv);
|
for (i = 0; i < cv_scroll_step_count (); i++)
|
||||||
|
tab_scroll_right_down_clicked (widget, cv);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -112,9 +112,11 @@ cv_tree_scroll_event_cb (GtkWidget *widget, GdkEventScroll *event, gpointer user
|
|||||||
if (prefs.hex_gui_tab_scrollchans)
|
if (prefs.hex_gui_tab_scrollchans)
|
||||||
{
|
{
|
||||||
int direction = cv_scroll_direction (event);
|
int direction = cv_scroll_direction (event);
|
||||||
|
int i;
|
||||||
|
|
||||||
if (direction != 0)
|
if (direction != 0)
|
||||||
mg_switch_page (1, direction);
|
for (i = 0; i < cv_scroll_step_count (); i++)
|
||||||
|
mg_switch_page (1, direction);
|
||||||
|
|
||||||
return direction != 0;
|
return direction != 0;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -126,6 +126,15 @@ cv_scroll_direction (GdkEventScroll *event)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
cv_scroll_step_count (void)
|
||||||
|
{
|
||||||
|
int speed = prefs.hex_gui_mouse_scroll_speed;
|
||||||
|
if (speed < 1)
|
||||||
|
speed = 1;
|
||||||
|
return (speed + 9) / 10;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* ======= TABS ======= */
|
/* ======= TABS ======= */
|
||||||
|
|
||||||
|
|||||||
@@ -320,7 +320,7 @@ fe_args (int argc, char *argv[])
|
|||||||
GError *error = NULL;
|
GError *error = NULL;
|
||||||
GOptionContext *context;
|
GOptionContext *context;
|
||||||
char *buffer;
|
char *buffer;
|
||||||
const char *desktop_id = "org.zoitechat.ZoiteChat";
|
const char *desktop_id = "net.zoite.Zoitechat";
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
char *base_path = NULL;
|
char *base_path = NULL;
|
||||||
char *locale_path = NULL;
|
char *locale_path = NULL;
|
||||||
|
|||||||
@@ -2705,7 +2705,6 @@ mg_changui_destroy (session *sess)
|
|||||||
/* it fixes: Gdk-CRITICAL **: gdk_colormap_get_screen: */
|
/* it fixes: Gdk-CRITICAL **: gdk_colormap_get_screen: */
|
||||||
/* assertion `GDK_IS_COLORMAP (cmap)' failed */
|
/* assertion `GDK_IS_COLORMAP (cmap)' failed */
|
||||||
ret = sess->gui->window;
|
ret = sess->gui->window;
|
||||||
g_free (sess->gui);
|
|
||||||
sess->gui = NULL;
|
sess->gui = NULL;
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
@@ -2727,13 +2726,17 @@ mg_link_irctab (session *sess, int focus)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
session_gui *old_gui;
|
||||||
|
|
||||||
mg_unpopulate (sess);
|
mg_unpopulate (sess);
|
||||||
|
old_gui = sess->gui;
|
||||||
win = mg_changui_destroy (sess);
|
win = mg_changui_destroy (sess);
|
||||||
mg_changui_new (sess, sess->res, 1, focus);
|
mg_changui_new (sess, sess->res, 1, focus);
|
||||||
/* the buffer is now attached to a different widget */
|
/* the buffer is now attached to a different widget */
|
||||||
((xtext_buffer *)sess->res->buffer)->xtext = (GtkXText *)sess->gui->xtext;
|
((xtext_buffer *)sess->res->buffer)->xtext = (GtkXText *)sess->gui->xtext;
|
||||||
if (win)
|
if (win)
|
||||||
gtk_widget_destroy (win);
|
gtk_widget_destroy (win);
|
||||||
|
g_free (old_gui);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ notification_backend_show (const char *title, const char *text)
|
|||||||
g_variant_builder_init (¶ms, G_VARIANT_TYPE ("(susssasa{sv}i)"));
|
g_variant_builder_init (¶ms, G_VARIANT_TYPE ("(susssasa{sv}i)"));
|
||||||
g_variant_builder_add (¶ms, "s", "zoitechat"); /* App name */
|
g_variant_builder_add (¶ms, "s", "zoitechat"); /* App name */
|
||||||
g_variant_builder_add (¶ms, "u", 0); /* ID, 0 means don't replace */
|
g_variant_builder_add (¶ms, "u", 0); /* ID, 0 means don't replace */
|
||||||
g_variant_builder_add (¶ms, "s", "org.zoitechat.ZoiteChat"); /* App icon */
|
g_variant_builder_add (¶ms, "s", "net.zoite.Zoitechat"); /* App icon */
|
||||||
g_variant_builder_add (¶ms, "s", title);
|
g_variant_builder_add (¶ms, "s", title);
|
||||||
g_variant_builder_add (¶ms, "s", text);
|
g_variant_builder_add (¶ms, "s", text);
|
||||||
g_variant_builder_add (¶ms, "as", NULL); /* Actions */
|
g_variant_builder_add (¶ms, "as", NULL); /* Actions */
|
||||||
@@ -65,7 +65,7 @@ notification_backend_show (const char *title, const char *text)
|
|||||||
g_variant_builder_open (¶ms, G_VARIANT_TYPE ("a{sv}"));
|
g_variant_builder_open (¶ms, G_VARIANT_TYPE ("a{sv}"));
|
||||||
g_variant_builder_open (¶ms, G_VARIANT_TYPE ("{sv}"));
|
g_variant_builder_open (¶ms, G_VARIANT_TYPE ("{sv}"));
|
||||||
g_variant_builder_add (¶ms, "s", "desktop-entry");
|
g_variant_builder_add (¶ms, "s", "desktop-entry");
|
||||||
g_variant_builder_add (¶ms, "v", g_variant_new_string ("org.zoitechat.ZoiteChat"));
|
g_variant_builder_add (¶ms, "v", g_variant_new_string ("net.zoite.Zoitechat"));
|
||||||
g_variant_builder_close (¶ms);
|
g_variant_builder_close (¶ms);
|
||||||
g_variant_builder_close (¶ms);
|
g_variant_builder_close (¶ms);
|
||||||
|
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ typedef GIcon *TrayIcon;
|
|||||||
typedef GIcon *TrayCustomIcon;
|
typedef GIcon *TrayCustomIcon;
|
||||||
#define tray_icon_free(i) g_object_unref(i)
|
#define tray_icon_free(i) g_object_unref(i)
|
||||||
|
|
||||||
#define ICON_NORMAL_NAME "org.zoitechat.ZoiteChat"
|
#define ICON_NORMAL_NAME "net.zoite.Zoitechat"
|
||||||
#define ICON_MSG_NAME "mail-unread"
|
#define ICON_MSG_NAME "mail-unread"
|
||||||
#define ICON_HILIGHT_NAME "dialog-warning"
|
#define ICON_HILIGHT_NAME "dialog-warning"
|
||||||
#define ICON_FILE_NAME "folder-download"
|
#define ICON_FILE_NAME "folder-download"
|
||||||
|
|||||||
@@ -193,6 +193,7 @@ static const setting appearance_advanced_settings[] =
|
|||||||
{ST_HEADER, N_("Advanced"),0,0,0},
|
{ST_HEADER, N_("Advanced"),0,0,0},
|
||||||
{ST_EFILE, N_ ("Background image:"), P_OFFSETNL (hex_text_background), 0, 0, sizeof prefs.hex_text_background},
|
{ST_EFILE, N_ ("Background image:"), P_OFFSETNL (hex_text_background), 0, 0, sizeof prefs.hex_text_background},
|
||||||
{ST_HSCALE, N_("Window opacity:"), P_OFFINTNL(hex_gui_transparency),0,0,0},
|
{ST_HSCALE, N_("Window opacity:"), P_OFFINTNL(hex_gui_transparency),0,0,0},
|
||||||
|
{ST_HSCALE, N_("Mouse wheel scroll speed (Slower ← → Faster):"), P_OFFINTNL(hex_gui_mouse_scroll_speed), 0, 0, 100},
|
||||||
|
|
||||||
{ST_END, 0, 0, 0, 0, 0}
|
{ST_END, 0, 0, 0, 0, 0}
|
||||||
};
|
};
|
||||||
@@ -582,6 +583,7 @@ static const setting advanced_settings[] =
|
|||||||
{ST_TOGGLE, N_("Display lists in compact mode"), P_OFFINTNL(hex_gui_compact), N_("Use less spacing between user list/channel tree rows."), 0, 0},
|
{ST_TOGGLE, N_("Display lists in compact mode"), P_OFFINTNL(hex_gui_compact), N_("Use less spacing between user list/channel tree rows."), 0, 0},
|
||||||
{ST_TOGGLE, N_("Use server time if supported"), P_OFFINTNL(hex_irc_cap_server_time), N_("Display timestamps obtained from server if it supports the time-server extension."), 0, 0},
|
{ST_TOGGLE, N_("Use server time if supported"), P_OFFINTNL(hex_irc_cap_server_time), N_("Display timestamps obtained from server if it supports the time-server extension."), 0, 0},
|
||||||
{ST_TOGGLE, N_("Automatically reconnect to servers on disconnect"), P_OFFINTNL(hex_net_auto_reconnect), 0, 0, 1},
|
{ST_TOGGLE, N_("Automatically reconnect to servers on disconnect"), P_OFFINTNL(hex_net_auto_reconnect), 0, 0, 1},
|
||||||
|
{ST_NUMBER, N_("Lag check interval:"), P_OFFINTNL(hex_net_lag_check), 0, (const char **)N_("seconds."), 9999},
|
||||||
{ST_NUMBER, N_("Auto reconnect delay:"), P_OFFINTNL(hex_net_reconnect_delay), 0, 0, 9999},
|
{ST_NUMBER, N_("Auto reconnect delay:"), P_OFFINTNL(hex_net_reconnect_delay), 0, 0, 9999},
|
||||||
{ST_NUMBER, N_("Auto join delay:"), P_OFFINTNL(hex_irc_join_delay), 0, 0, 9999},
|
{ST_NUMBER, N_("Auto join delay:"), P_OFFINTNL(hex_irc_join_delay), 0, 0, 9999},
|
||||||
{ST_MENU, N_("Ban Type:"), P_OFFINTNL(hex_irc_ban_type), N_("Attempt to use this banmask when banning or quieting. (requires irc_who_join)"), bantypemenu, 0},
|
{ST_MENU, N_("Ban Type:"), P_OFFINTNL(hex_irc_ban_type), N_("Attempt to use this banmask when banning or quieting. (requires irc_who_join)"), bantypemenu, 0},
|
||||||
@@ -648,6 +650,9 @@ static const setting network_settings[] =
|
|||||||
{ST_NUMBER, N_("First DCC listen port:"), P_OFFINTNL(hex_dcc_port_first), 0, 0, 65535},
|
{ST_NUMBER, N_("First DCC listen port:"), P_OFFINTNL(hex_dcc_port_first), 0, 0, 65535},
|
||||||
{ST_NUMBER, N_("Last DCC listen port:"), P_OFFINTNL(hex_dcc_port_last), 0,
|
{ST_NUMBER, N_("Last DCC listen port:"), P_OFFINTNL(hex_dcc_port_last), 0,
|
||||||
(const char **)N_("!Leave ports at zero for full range."), 65535},
|
(const char **)N_("!Leave ports at zero for full range."), 65535},
|
||||||
|
{ST_TOGGLE, N_("Prefer passive DCC"), P_OFFINTNL(hex_dcc_passive_prefer), 0, 0, 0},
|
||||||
|
{ST_TOGGLE, N_("Try UPnP/NAT-PMP/PCP mapping"), P_OFFINTNL(hex_dcc_nat_map), 0, 0, 0},
|
||||||
|
{ST_NUMBER, N_("NAT mapping lease (sec):"), P_OFFINTNL(hex_dcc_nat_lease), 0, 0, 86400},
|
||||||
|
|
||||||
{ST_HEADER, N_("Proxy Server"), 0, 0, 0, 0},
|
{ST_HEADER, N_("Proxy Server"), 0, 0, 0, 0},
|
||||||
{ST_ENTRY, N_("Hostname:"), P_OFFSETNL(hex_net_proxy_host), 0, 0, sizeof prefs.hex_net_proxy_host},
|
{ST_ENTRY, N_("Hostname:"), P_OFFSETNL(hex_net_proxy_host), 0, 0, sizeof prefs.hex_net_proxy_host},
|
||||||
@@ -655,6 +660,11 @@ static const setting network_settings[] =
|
|||||||
{ST_MENU, N_("Type:"), P_OFFINTNL(hex_net_proxy_type), 0, proxytypes, 0},
|
{ST_MENU, N_("Type:"), P_OFFINTNL(hex_net_proxy_type), 0, proxytypes, 0},
|
||||||
{ST_MENU, N_("Use proxy for:"), P_OFFINTNL(hex_net_proxy_use), 0, proxyuse, 0},
|
{ST_MENU, N_("Use proxy for:"), P_OFFINTNL(hex_net_proxy_use), 0, proxyuse, 0},
|
||||||
|
|
||||||
|
{ST_HEADER, N_("Connection Health"), 0, 0, 0, 0},
|
||||||
|
{ST_NUMBER, N_("TCP keepalive idle:"), P_OFFINTNL(hex_net_keepalive_idle), 0, (const char **)N_("seconds."), 7200},
|
||||||
|
{ST_NUMBER, N_("TCP keepalive interval:"), P_OFFINTNL(hex_net_keepalive_interval), 0, (const char **)N_("seconds."), 600},
|
||||||
|
{ST_NUMBER, N_("TCP keepalive probes:"), P_OFFINTNL(hex_net_keepalive_count), 0, 0, 20},
|
||||||
|
|
||||||
{ST_HEADER, N_("Proxy Authentication"), 0, 0, 0, 0},
|
{ST_HEADER, N_("Proxy Authentication"), 0, 0, 0, 0},
|
||||||
{ST_TOGGLE, N_("Use authentication (HTTP or SOCKS5 only)"), P_OFFINTNL(hex_net_proxy_auth), 0, 0, 0},
|
{ST_TOGGLE, N_("Use authentication (HTTP or SOCKS5 only)"), P_OFFINTNL(hex_net_proxy_auth), 0, 0, 0},
|
||||||
{ST_ENTRY, N_("Username:"), P_OFFSETNL(hex_net_proxy_user), 0, 0, sizeof prefs.hex_net_proxy_user},
|
{ST_ENTRY, N_("Username:"), P_OFFSETNL(hex_net_proxy_user), 0, 0, sizeof prefs.hex_net_proxy_user},
|
||||||
|
|||||||
@@ -2938,19 +2938,41 @@ gtk_xtext_scroll (GtkWidget *widget, GdkEventScroll *event)
|
|||||||
{
|
{
|
||||||
GtkXText *xtext = GTK_XTEXT (widget);
|
GtkXText *xtext = GTK_XTEXT (widget);
|
||||||
gfloat new_value;
|
gfloat new_value;
|
||||||
|
gfloat step;
|
||||||
|
gdouble dx;
|
||||||
|
gdouble dy;
|
||||||
|
int direction = 0;
|
||||||
|
int speed = prefs.hex_gui_mouse_scroll_speed;
|
||||||
|
|
||||||
if (event->direction == GDK_SCROLL_UP) /* mouse wheel pageUp */
|
if (speed < 1)
|
||||||
|
speed = 1;
|
||||||
|
step = (xtext_adj_get_page_increment (xtext->adj) * speed) / 100.0f;
|
||||||
|
|
||||||
|
if (event->direction == GDK_SCROLL_SMOOTH &&
|
||||||
|
gdk_event_get_scroll_deltas ((GdkEvent *)event, &dx, &dy))
|
||||||
|
{
|
||||||
|
if (dy > 0)
|
||||||
|
direction = 1;
|
||||||
|
else if (dy < 0)
|
||||||
|
direction = -1;
|
||||||
|
}
|
||||||
|
else if (event->direction == GDK_SCROLL_UP)
|
||||||
|
direction = -1;
|
||||||
|
else if (event->direction == GDK_SCROLL_DOWN)
|
||||||
|
direction = 1;
|
||||||
|
|
||||||
|
if (direction < 0)
|
||||||
{
|
{
|
||||||
new_value = xtext_adj_get_value (xtext->adj) -
|
new_value = xtext_adj_get_value (xtext->adj) -
|
||||||
(xtext_adj_get_page_increment (xtext->adj) / 10);
|
step;
|
||||||
if (new_value < xtext_adj_get_lower (xtext->adj))
|
if (new_value < xtext_adj_get_lower (xtext->adj))
|
||||||
new_value = xtext_adj_get_lower (xtext->adj);
|
new_value = xtext_adj_get_lower (xtext->adj);
|
||||||
xtext_adj_set_value (xtext->adj, new_value);
|
xtext_adj_set_value (xtext->adj, new_value);
|
||||||
}
|
}
|
||||||
else if (event->direction == GDK_SCROLL_DOWN) /* mouse wheel pageDn */
|
else if (direction > 0)
|
||||||
{
|
{
|
||||||
new_value = xtext_adj_get_value (xtext->adj) +
|
new_value = xtext_adj_get_value (xtext->adj) +
|
||||||
(xtext_adj_get_page_increment (xtext->adj) / 10);
|
step;
|
||||||
if (new_value > (xtext_adj_get_upper (xtext->adj) -
|
if (new_value > (xtext_adj_get_upper (xtext->adj) -
|
||||||
xtext_adj_get_page_size (xtext->adj)))
|
xtext_adj_get_page_size (xtext->adj)))
|
||||||
new_value = xtext_adj_get_upper (xtext->adj) -
|
new_value = xtext_adj_get_upper (xtext->adj) -
|
||||||
@@ -2958,7 +2980,7 @@ gtk_xtext_scroll (GtkWidget *widget, GdkEventScroll *event)
|
|||||||
xtext_adj_set_value (xtext->adj, new_value);
|
xtext_adj_set_value (xtext->adj, new_value);
|
||||||
}
|
}
|
||||||
|
|
||||||
return FALSE;
|
return direction != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|||||||
Reference in New Issue
Block a user