mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-09-24 08:27:12 +00:00
Compare commits
11
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
24951f5504 | ||
|
|
c3d8f27f48 | ||
|
|
d03298a048 | ||
|
|
798e0b487e | ||
|
|
49444d72b4 | ||
|
|
c0e0fe4dcb | ||
|
|
9a189848ea | ||
|
|
96b09bfc1d | ||
|
|
9a6c913d89 | ||
|
|
42010594be | ||
|
|
5469c30b75 |
@@ -0,0 +1,57 @@
|
|||||||
|
---
|
||||||
|
name: Feature request
|
||||||
|
about: Suggest an improvement for ZoiteChat
|
||||||
|
title: "[Feature]: "
|
||||||
|
labels: enhancement
|
||||||
|
assignees: ""
|
||||||
|
---
|
||||||
|
|
||||||
|
## Summary
|
||||||
|
|
||||||
|
```text
|
||||||
|
Describe the feature or enhancement clearly and briefly.
|
||||||
|
```
|
||||||
|
|
||||||
|
## Problem
|
||||||
|
|
||||||
|
```text
|
||||||
|
What problem would this solve?
|
||||||
|
```
|
||||||
|
|
||||||
|
## Proposed Solution
|
||||||
|
|
||||||
|
```text
|
||||||
|
How should ZoiteChat behave?
|
||||||
|
```
|
||||||
|
|
||||||
|
## Alternatives Considered
|
||||||
|
|
||||||
|
```text
|
||||||
|
Other approaches or workarounds you considered.
|
||||||
|
```
|
||||||
|
|
||||||
|
## Use Case
|
||||||
|
|
||||||
|
```text
|
||||||
|
Who benefits from this, and when would they use it?
|
||||||
|
```
|
||||||
|
|
||||||
|
## Platform Details
|
||||||
|
|
||||||
|
```text
|
||||||
|
OS:
|
||||||
|
ZoiteChat version:
|
||||||
|
Build/source: GitHub release / Fedora package / source build / Windows installer / other
|
||||||
|
```
|
||||||
|
|
||||||
|
## Checklist
|
||||||
|
|
||||||
|
* [ ] I searched existing issues first.
|
||||||
|
* [ ] I checked whether this already exists in the latest ZoiteChat version available to me.
|
||||||
|
* [ ] I explained the problem this would solve.
|
||||||
|
|
||||||
|
## Extra Notes
|
||||||
|
|
||||||
|
```text
|
||||||
|
Anything else that might help.
|
||||||
|
```
|
||||||
@@ -113,6 +113,25 @@ jobs:
|
|||||||
New-Item -Path $pyDir -Name "${{ matrix.platform }}" -ItemType Junction -Value $pyRoot | Out-Null
|
New-Item -Path $pyDir -Name "${{ matrix.platform }}" -ItemType Junction -Value $pyRoot | Out-Null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- uses: actions/setup-python@v6
|
||||||
|
with:
|
||||||
|
python-version: '3.8.10'
|
||||||
|
architecture: ${{ matrix.arch }}
|
||||||
|
|
||||||
|
- name: Prepare Python 3.8
|
||||||
|
run: |
|
||||||
|
python -m pip install --upgrade pip
|
||||||
|
python -m pip install cffi
|
||||||
|
|
||||||
|
$pyRoot = $env:pythonLocation
|
||||||
|
if (-not $pyRoot) { $pyRoot = & python -c "import sys; print(sys.prefix)" }
|
||||||
|
|
||||||
|
$pyDir = "C:\gtk-build\python-3.8"
|
||||||
|
New-Item -Path $pyDir -ItemType Directory -Force | Out-Null
|
||||||
|
$target = Join-Path $pyDir "${{ matrix.platform }}"
|
||||||
|
if (Test-Path $target) { Remove-Item $target -Recurse -Force }
|
||||||
|
New-Item -Path $pyDir -Name "${{ matrix.platform }}" -ItemType Junction -Value $pyRoot | Out-Null
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat"
|
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat"
|
||||||
@@ -130,6 +149,17 @@ jobs:
|
|||||||
powershell -NoProfile -ExecutionPolicy Bypass -Command "$archiveLib='C:\gtk-build\gtk\x64\release\lib\libarchive.lib'; if (-not (Test-Path $archiveLib)) { $archiveDll = Get-ChildItem 'C:\gtk-build\gtk\x64\release\bin\libarchive*.dll' | Select-Object -First 1; if ($archiveDll) { Push-Location 'C:\gtk-build\gtk\x64\release\lib'; & 'C:\gtk-build\gendef\gendef.exe' $archiveDll.FullName | Out-Null; $archiveDef = Get-ChildItem 'libarchive*.def' | Select-Object -First 1; if ($archiveDef) { & lib /def:$archiveDef.Name /machine:${{ matrix.platform }} /out:libarchive.lib | Out-Null }; Pop-Location } }"
|
powershell -NoProfile -ExecutionPolicy Bypass -Command "$archiveLib='C:\gtk-build\gtk\x64\release\lib\libarchive.lib'; if (-not (Test-Path $archiveLib)) { $archiveDll = Get-ChildItem 'C:\gtk-build\gtk\x64\release\bin\libarchive*.dll' | Select-Object -First 1; if ($archiveDll) { Push-Location 'C:\gtk-build\gtk\x64\release\lib'; & 'C:\gtk-build\gendef\gendef.exe' $archiveDll.FullName | Out-Null; $archiveDef = Get-ChildItem 'libarchive*.def' | Select-Object -First 1; if ($archiveDef) { & lib /def:$archiveDef.Name /machine:${{ matrix.platform }} /out:libarchive.lib | Out-Null }; Pop-Location } }"
|
||||||
|
|
||||||
msbuild win32\zoitechat.sln /m /verbosity:minimal /p:Configuration=Release /p:Platform=${{ matrix.platform }}
|
msbuild win32\zoitechat.sln /m /verbosity:minimal /p:Configuration=Release /p:Platform=${{ matrix.platform }}
|
||||||
|
|
||||||
|
set "PYTHON38_DIR=C:\gtk-build\python-3.8\${{ matrix.platform }}"
|
||||||
|
if not exist "%PYTHON38_DIR%\libs\python38.lib" (
|
||||||
|
echo Missing %PYTHON38_DIR%\libs\python38.lib
|
||||||
|
dir "%PYTHON38_DIR%\libs"
|
||||||
|
exit /b 1
|
||||||
|
)
|
||||||
|
|
||||||
|
msbuild plugins\python\python3.vcxproj /m /verbosity:minimal /p:Configuration=Release /p:Platform=${{ matrix.platform }} /p:SolutionDir=%CD%\win32\ /p:YourPython3Path=C:\gtk-build\python-3.8 /p:Python3Lib=python38 /p:Python3Output=hcpython38
|
||||||
|
copy /Y "%PYTHON38_DIR%\Lib\site-packages\_cffi_backend.cp38*.pyd" "..\zoitechat-build\${{ matrix.platform }}\bin\"
|
||||||
|
msbuild win32\installer\installer.vcxproj /m /verbosity:minimal /p:Configuration=Release /p:Platform=${{ matrix.platform }} /p:SolutionDir=%CD%\win32\
|
||||||
shell: cmd
|
shell: cmd
|
||||||
|
|
||||||
- name: Preparing Artifacts
|
- name: Preparing Artifacts
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
GNU GENERAL PUBLIC LICENSE
|
GNU GENERAL PUBLIC LICENSE
|
||||||
Version 2, June 1991
|
Version 2, June 1991
|
||||||
|
|
||||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
||||||
51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
<https://fsf.org/>
|
||||||
Everyone is permitted to copy and distribute verbatim copies
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
of this license document, but changing it is not allowed.
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
Preamble
|
Preamble
|
||||||
|
|
||||||
The licenses for most software are designed to take away your
|
The licenses for most software are designed to take away your
|
||||||
freedom to share and change it. By contrast, the GNU General Public
|
freedom to share and change it. By contrast, the GNU General Public
|
||||||
@@ -15,7 +15,7 @@ software--to make sure the software is free for all its users. This
|
|||||||
General Public License applies to most of the Free Software
|
General Public License applies to most of the Free Software
|
||||||
Foundation's software and to any other program whose authors commit to
|
Foundation's software and to any other program whose authors commit to
|
||||||
using it. (Some other Free Software Foundation software is covered by
|
using it. (Some other Free Software Foundation software is covered by
|
||||||
the GNU Library General Public License instead.) You can apply it to
|
the GNU Lesser General Public License instead.) You can apply it to
|
||||||
your programs, too.
|
your programs, too.
|
||||||
|
|
||||||
When we speak of free software, we are referring to freedom, not
|
When we speak of free software, we are referring to freedom, not
|
||||||
@@ -55,8 +55,8 @@ patent must be licensed for everyone's free use or not licensed at all.
|
|||||||
|
|
||||||
The precise terms and conditions for copying, distribution and
|
The precise terms and conditions for copying, distribution and
|
||||||
modification follow.
|
modification follow.
|
||||||
|
|
||||||
GNU GENERAL PUBLIC LICENSE
|
GNU GENERAL PUBLIC LICENSE
|
||||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||||
|
|
||||||
0. This License applies to any program or other work which contains
|
0. This License applies to any program or other work which contains
|
||||||
@@ -110,7 +110,7 @@ above, provided that you also meet all of these conditions:
|
|||||||
License. (Exception: if the Program itself is interactive but
|
License. (Exception: if the Program itself is interactive but
|
||||||
does not normally print such an announcement, your work based on
|
does not normally print such an announcement, your work based on
|
||||||
the Program is not required to print an announcement.)
|
the Program is not required to print an announcement.)
|
||||||
|
|
||||||
These requirements apply to the modified work as a whole. If
|
These requirements apply to the modified work as a whole. If
|
||||||
identifiable sections of that work are not derived from the Program,
|
identifiable sections of that work are not derived from the Program,
|
||||||
and can be reasonably considered independent and separate works in
|
and can be reasonably considered independent and separate works in
|
||||||
@@ -168,7 +168,7 @@ access to copy from a designated place, then offering equivalent
|
|||||||
access to copy the source code from the same place counts as
|
access to copy the source code from the same place counts as
|
||||||
distribution of the source code, even though third parties are not
|
distribution of the source code, even though third parties are not
|
||||||
compelled to copy the source along with the object code.
|
compelled to copy the source along with the object code.
|
||||||
|
|
||||||
4. You may not copy, modify, sublicense, or distribute the Program
|
4. You may not copy, modify, sublicense, or distribute the Program
|
||||||
except as expressly provided under this License. Any attempt
|
except as expressly provided under this License. Any attempt
|
||||||
otherwise to copy, modify, sublicense or distribute the Program is
|
otherwise to copy, modify, sublicense or distribute the Program is
|
||||||
@@ -225,7 +225,7 @@ impose that choice.
|
|||||||
|
|
||||||
This section is intended to make thoroughly clear what is believed to
|
This section is intended to make thoroughly clear what is believed to
|
||||||
be a consequence of the rest of this License.
|
be a consequence of the rest of this License.
|
||||||
|
|
||||||
8. If the distribution and/or use of the Program is restricted in
|
8. If the distribution and/or use of the Program is restricted in
|
||||||
certain countries either by patents or by copyrighted interfaces, the
|
certain countries either by patents or by copyrighted interfaces, the
|
||||||
original copyright holder who places the Program under this License
|
original copyright holder who places the Program under this License
|
||||||
@@ -255,7 +255,7 @@ make exceptions for this. Our decision will be guided by the two goals
|
|||||||
of preserving the free status of all derivatives of our free software and
|
of preserving the free status of all derivatives of our free software and
|
||||||
of promoting the sharing and reuse of software generally.
|
of promoting the sharing and reuse of software generally.
|
||||||
|
|
||||||
NO WARRANTY
|
NO WARRANTY
|
||||||
|
|
||||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||||
@@ -277,9 +277,9 @@ YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
|||||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||||
POSSIBILITY OF SUCH DAMAGES.
|
POSSIBILITY OF SUCH DAMAGES.
|
||||||
|
|
||||||
END OF TERMS AND CONDITIONS
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
How to Apply These Terms to Your New Programs
|
How to Apply These Terms to Your New Programs
|
||||||
|
|
||||||
If you develop a new program, and you want it to be of the greatest
|
If you develop a new program, and you want it to be of the greatest
|
||||||
possible use to the public, the best way to achieve this is to make it
|
possible use to the public, the best way to achieve this is to make it
|
||||||
@@ -291,7 +291,7 @@ convey the exclusion of warranty; and each file should have at least
|
|||||||
the "copyright" line and a pointer to where the full notice is found.
|
the "copyright" line and a pointer to where the full notice is found.
|
||||||
|
|
||||||
<one line to give the program's name and a brief idea of what it does.>
|
<one line to give the program's name and a brief idea of what it does.>
|
||||||
Copyright (C) 19yy <name of author>
|
Copyright (C) <year> <name of author>
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
@@ -303,17 +303,15 @@ the "copyright" line and a pointer to where the full notice is found.
|
|||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License along
|
||||||
along with this program; if not, write to the Free Software
|
with this program; if not, see <https://www.gnu.org/licenses/>.
|
||||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
|
|
||||||
|
|
||||||
Also add information on how to contact you by electronic and paper mail.
|
Also add information on how to contact you by electronic and paper mail.
|
||||||
|
|
||||||
If the program is interactive, make it output a short notice like this
|
If the program is interactive, make it output a short notice like this
|
||||||
when it starts in an interactive mode:
|
when it starts in an interactive mode:
|
||||||
|
|
||||||
Gnomovision version 69, Copyright (C) 19yy name of author
|
Gnomovision version 69, Copyright (C) year name of author
|
||||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||||
This is free software, and you are welcome to redistribute it
|
This is free software, and you are welcome to redistribute it
|
||||||
under certain conditions; type `show c' for details.
|
under certain conditions; type `show c' for details.
|
||||||
@@ -330,11 +328,11 @@ necessary. Here is a sample; alter the names:
|
|||||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||||
|
|
||||||
<signature of Ty Coon>, 1 April 1989
|
<signature of Moe Ghoul>, 1 April 1989
|
||||||
Ty Coon, President of Vice
|
Moe Ghoul, President of Vice
|
||||||
|
|
||||||
This General Public License does not permit incorporating your program into
|
This General Public License does not permit incorporating your program into
|
||||||
proprietary programs. If your program is a subroutine library, you may
|
proprietary programs. If your program is a subroutine library, you may
|
||||||
consider it more useful to permit linking proprietary applications with the
|
consider it more useful to permit linking proprietary applications with the
|
||||||
library. If this is what you want to do, use the GNU Library General
|
library. If this is what you want to do, use the GNU Lesser General
|
||||||
Public License instead of this License.
|
Public License instead of this License.
|
||||||
|
|||||||
@@ -1815,14 +1815,14 @@ inbound_login_end (session *sess, char *text, const message_tags_data *tags_data
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
/* send nickserv password */
|
/* send nickserv password */
|
||||||
if (net && net->pass && inbound_nickserv_login (serv))
|
if (net && serv->password[0] && inbound_nickserv_login (serv))
|
||||||
{
|
{
|
||||||
serv->p_ns_identify (serv, net->pass);
|
serv->p_ns_identify (serv, serv->password);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* wait for join if command or nickserv set */
|
/* wait for join if command or nickserv set */
|
||||||
if (net && prefs.hex_irc_join_delay
|
if (net && prefs.hex_irc_join_delay
|
||||||
&& ((net->pass && inbound_nickserv_login (serv))
|
&& ((serv->password[0] && inbound_nickserv_login (serv))
|
||||||
|| net->commandlist))
|
|| net->commandlist))
|
||||||
{
|
{
|
||||||
serv->joindelay_tag = fe_timeout_add_seconds (prefs.hex_irc_join_delay, check_autojoin_channels, serv);
|
serv->joindelay_tag = fe_timeout_add_seconds (prefs.hex_irc_join_delay, check_autojoin_channels, serv);
|
||||||
|
|||||||
@@ -4868,9 +4868,9 @@ command_insert_vars (session *sess, char *cmd)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case 'p':
|
case 'p':
|
||||||
if (mynet->pass)
|
if (sess->server->password[0])
|
||||||
{
|
{
|
||||||
g_string_append (expanded, mynet->pass);
|
g_string_append (expanded, sess->server->password);
|
||||||
}
|
}
|
||||||
cmd++;
|
cmd++;
|
||||||
break;
|
break;
|
||||||
|
|||||||
+21
-1
@@ -25,6 +25,7 @@
|
|||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
#include <io.h>
|
#include <io.h>
|
||||||
|
#include <windows.h>
|
||||||
#else
|
#else
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#endif
|
#endif
|
||||||
@@ -56,6 +57,22 @@ typedef struct session zoitechat_context;
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define DEBUG(x) {x;}
|
#define DEBUG(x) {x;}
|
||||||
|
#ifdef WIN32
|
||||||
|
|
||||||
|
static gboolean
|
||||||
|
plugin_windows_is_windows7 (void)
|
||||||
|
{
|
||||||
|
OSVERSIONINFOEXA version;
|
||||||
|
|
||||||
|
memset (&version, 0, sizeof (version));
|
||||||
|
version.dwOSVersionInfoSize = sizeof (version);
|
||||||
|
if (!GetVersionExA ((OSVERSIONINFOA *)&version))
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
return version.dwPlatformId == VER_PLATFORM_WIN32_NT &&
|
||||||
|
version.dwMajorVersion == 6 && version.dwMinorVersion == 1;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* crafted to be an even 32 bytes */
|
/* crafted to be an even 32 bytes */
|
||||||
struct _zoitechat_hook
|
struct _zoitechat_hook
|
||||||
@@ -491,7 +508,10 @@ plugin_auto_load (session *sess)
|
|||||||
for_files (lib_dir, "hcfishlim.dll", plugin_auto_load_cb);
|
for_files (lib_dir, "hcfishlim.dll", plugin_auto_load_cb);
|
||||||
for_files(lib_dir, "hclua.dll", plugin_auto_load_cb);
|
for_files(lib_dir, "hclua.dll", plugin_auto_load_cb);
|
||||||
for_files (lib_dir, "hcperl.dll", plugin_auto_load_cb);
|
for_files (lib_dir, "hcperl.dll", plugin_auto_load_cb);
|
||||||
for_files (lib_dir, "hcpython3.dll", plugin_auto_load_cb);
|
if (plugin_windows_is_windows7 ())
|
||||||
|
for_files (lib_dir, "hcpython38.dll", plugin_auto_load_cb);
|
||||||
|
else
|
||||||
|
for_files (lib_dir, "hcpython3.dll", plugin_auto_load_cb);
|
||||||
for_files (lib_dir, "hcupd.dll", plugin_auto_load_cb);
|
for_files (lib_dir, "hcupd.dll", plugin_auto_load_cb);
|
||||||
for_files (lib_dir, "hcsysinfo.dll", plugin_auto_load_cb);
|
for_files (lib_dir, "hcsysinfo.dll", plugin_auto_load_cb);
|
||||||
#else
|
#else
|
||||||
|
|||||||
+15
-1
@@ -79,6 +79,8 @@ struct _chanview
|
|||||||
guint theme_listener_id;
|
guint theme_listener_id;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
static void chanview_set_font_desc (chanview *cv, const PangoFontDescription *font_desc);
|
||||||
|
|
||||||
struct _chan
|
struct _chan
|
||||||
{
|
{
|
||||||
chanview *cv; /* our owner */
|
chanview *cv; /* our owner */
|
||||||
@@ -169,6 +171,7 @@ chanview_apply_theme (chanview *cv)
|
|||||||
w = GTK_WIDGET (tv->tree);
|
w = GTK_WIDGET (tv->tree);
|
||||||
if (input_style)
|
if (input_style)
|
||||||
font = input_style->font_desc;
|
font = input_style->font_desc;
|
||||||
|
chanview_set_font_desc (cv, font);
|
||||||
|
|
||||||
theme_manager_apply_channel_tree_style (w,
|
theme_manager_apply_channel_tree_style (w,
|
||||||
theme_manager_get_channel_tree_palette_behavior (font));
|
theme_manager_get_channel_tree_palette_behavior (font));
|
||||||
@@ -313,6 +316,14 @@ chanview_free_ch (chanview *cv, GtkTreeIter *iter)
|
|||||||
g_free (ch);
|
g_free (ch);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
chanview_set_font_desc (chanview *cv, const PangoFontDescription *font_desc)
|
||||||
|
{
|
||||||
|
if (cv->font_desc)
|
||||||
|
pango_font_description_free (cv->font_desc);
|
||||||
|
cv->font_desc = font_desc ? pango_font_description_copy (font_desc) : NULL;
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
chanview_destroy_store (chanview *cv) /* free every (chan *) in the store */
|
chanview_destroy_store (chanview *cv) /* free every (chan *) in the store */
|
||||||
{
|
{
|
||||||
@@ -335,6 +346,9 @@ chanview_destroy (chanview *cv)
|
|||||||
if (cv->box)
|
if (cv->box)
|
||||||
gtk_widget_destroy (cv->box);
|
gtk_widget_destroy (cv->box);
|
||||||
|
|
||||||
|
if (cv->font_desc)
|
||||||
|
pango_font_description_free (cv->font_desc);
|
||||||
|
|
||||||
chanview_destroy_store (cv);
|
chanview_destroy_store (cv);
|
||||||
g_free (cv);
|
g_free (cv);
|
||||||
}
|
}
|
||||||
@@ -356,7 +370,7 @@ chanview_new (int type, int trunc_len, gboolean sort, gboolean use_icons,
|
|||||||
cv = g_new0 (chanview, 1);
|
cv = g_new0 (chanview, 1);
|
||||||
cv->store = gtk_tree_store_new (5, G_TYPE_STRING, G_TYPE_POINTER,
|
cv->store = gtk_tree_store_new (5, G_TYPE_STRING, G_TYPE_POINTER,
|
||||||
PANGO_TYPE_ATTR_LIST, GDK_TYPE_PIXBUF, G_TYPE_INT);
|
PANGO_TYPE_ATTR_LIST, GDK_TYPE_PIXBUF, G_TYPE_INT);
|
||||||
cv->font_desc = font_desc;
|
cv->font_desc = font_desc ? pango_font_description_copy (font_desc) : NULL;
|
||||||
cv->box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
cv->box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
|
||||||
cv->trunc_len = trunc_len;
|
cv->trunc_len = trunc_len;
|
||||||
cv->sorted = sort;
|
cv->sorted = sort;
|
||||||
|
|||||||
+11
-9
@@ -1357,17 +1357,19 @@ fe_open_url_inner (const char *url)
|
|||||||
gboolean opened = FALSE;
|
gboolean opened = FALSE;
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
opened = g_app_info_launch_default_for_uri (escaped_url, NULL, &error);
|
gunichar2 *url_utf16 = g_utf8_to_utf16 (escaped_url, -1, NULL, NULL, NULL);
|
||||||
|
|
||||||
|
if (url_utf16 != NULL)
|
||||||
|
{
|
||||||
|
opened = ((INT_PTR) ShellExecuteW (0, L"open", url_utf16, NULL, NULL, SW_SHOWNORMAL)) > 32;
|
||||||
|
g_free (url_utf16);
|
||||||
|
}
|
||||||
|
|
||||||
if (!opened)
|
if (!opened)
|
||||||
{
|
{
|
||||||
g_clear_error (&error);
|
opened = g_app_info_launch_default_for_uri (escaped_url, NULL, &error);
|
||||||
gunichar2 *url_utf16 = g_utf8_to_utf16 (escaped_url, -1, NULL, NULL, NULL);
|
if (!opened)
|
||||||
|
g_clear_error (&error);
|
||||||
if (url_utf16 != NULL)
|
|
||||||
{
|
|
||||||
opened = ((INT_PTR) ShellExecuteW (0, L"open", url_utf16, NULL, NULL, SW_SHOWNORMAL)) > 32;
|
|
||||||
g_free (url_utf16);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
{
|
{
|
||||||
|
|||||||
+6
-4
@@ -286,10 +286,12 @@ xtext_adj_get_page_increment (GtkAdjustment *adj)
|
|||||||
static void
|
static void
|
||||||
xtext_adjustment_apply (GtkAdjustment *adj, gdouble lower, gdouble upper, gdouble value, gdouble page_size)
|
xtext_adjustment_apply (GtkAdjustment *adj, gdouble lower, gdouble upper, gdouble value, gdouble page_size)
|
||||||
{
|
{
|
||||||
gtk_adjustment_set_lower (adj, lower);
|
gdouble step_increment = page_size * prefs.hex_gui_mouse_scroll_speed / 100.0;
|
||||||
gtk_adjustment_set_upper (adj, upper);
|
|
||||||
gtk_adjustment_set_page_size (adj, page_size);
|
if (step_increment < 1)
|
||||||
gtk_adjustment_set_value (adj, value);
|
step_increment = 1;
|
||||||
|
|
||||||
|
gtk_adjustment_configure (adj, value, lower, upper, step_increment, page_size, page_size);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ AppUpdatesURL=http://zoitechat.org/downloads.html
|
|||||||
LicenseFile=share\doc\zoitechat\COPYING
|
LicenseFile=share\doc\zoitechat\COPYING
|
||||||
UninstallDisplayIcon={app}\zoitechat.exe
|
UninstallDisplayIcon={app}\zoitechat.exe
|
||||||
UninstallDisplayName=ZoiteChat
|
UninstallDisplayName=ZoiteChat
|
||||||
DefaultDirName={pf64}\ZoiteChat
|
DefaultDirName={commonpf64}\ZoiteChat
|
||||||
DisableDirPage=no
|
DisableDirPage=no
|
||||||
DefaultGroupName=ZoiteChat
|
DefaultGroupName=ZoiteChat
|
||||||
AllowNoIcons=yes
|
AllowNoIcons=yes
|
||||||
@@ -28,11 +28,11 @@ OutputBaseFilename={#APPNAM}-{#APPVER}_x64
|
|||||||
FlatComponentsList=no
|
FlatComponentsList=no
|
||||||
PrivilegesRequired=none
|
PrivilegesRequired=none
|
||||||
ShowComponentSizes=no
|
ShowComponentSizes=no
|
||||||
CreateUninstallRegKey=not IsTaskSelected('portable')
|
CreateUninstallRegKey=not WizardIsTaskSelected('portable')
|
||||||
Uninstallable=not IsTaskSelected('portable')
|
Uninstallable=not WizardIsTaskSelected('portable')
|
||||||
ArchitecturesAllowed=x64compatible
|
ArchitecturesAllowed=x64compatible
|
||||||
ArchitecturesInstallIn64BitMode=x64compatible
|
ArchitecturesInstallIn64BitMode=x64compatible
|
||||||
MinVersion=6.1
|
MinVersion=6.1sp1
|
||||||
WizardImageFile={#PROJECTDIR}wizardimage.bmp
|
WizardImageFile={#PROJECTDIR}wizardimage.bmp
|
||||||
WizardSmallImageFile={#PROJECTDIR}wizardsmallimage.bmp
|
WizardSmallImageFile={#PROJECTDIR}wizardsmallimage.bmp
|
||||||
SetupIconFile={#PROJECTDIR}..\..\data\icons\zoitechat.ico
|
SetupIconFile={#PROJECTDIR}..\..\data\icons\zoitechat.ico
|
||||||
@@ -59,7 +59,7 @@ Name: "plugins\upd"; Description: "Update Checker"; Types: normal custom; Flags:
|
|||||||
Name: "langs"; Description: "Language Interfaces"; Types: custom; Flags: disablenouninstallwarning
|
Name: "langs"; Description: "Language Interfaces"; Types: custom; Flags: disablenouninstallwarning
|
||||||
Name: "langs\lua"; Description: "Lua (LuaJIT 2.1)"; Types: normal custom; Flags: disablenouninstallwarning
|
Name: "langs\lua"; Description: "Lua (LuaJIT 2.1)"; Types: normal custom; Flags: disablenouninstallwarning
|
||||||
Name: "langs\perl"; Description: "Perl (Strawberry Perl 5.42.0.1)"; Types: custom; Flags: disablenouninstallwarning
|
Name: "langs\perl"; Description: "Perl (Strawberry Perl 5.42.0.1)"; Types: custom; Flags: disablenouninstallwarning
|
||||||
Name: "langs\python"; Description: "Python (Python 3.14.3)"; Types: custom; Flags: disablenouninstallwarning
|
Name: "langs\python"; Description: "Python (Python 3.14.3, or 3.8.10 on Windows 7)"; Types: custom; Flags: disablenouninstallwarning
|
||||||
Name: "themes"; Description: "GTK3 Themes"; Types: normal minimal custom; Flags: disablenouninstallwarning
|
Name: "themes"; Description: "GTK3 Themes"; Types: normal minimal custom; Flags: disablenouninstallwarning
|
||||||
Name: "themes\windows10"; Description: "Windows 10"; Types: normal minimal custom; Flags: disablenouninstallwarning
|
Name: "themes\windows10"; Description: "Windows 10"; Types: normal minimal custom; Flags: disablenouninstallwarning
|
||||||
Name: "themes\windows10dark"; Description: "Windows 10 Dark"; Types: normal minimal custom; Flags: disablenouninstallwarning
|
Name: "themes\windows10dark"; Description: "Windows 10 Dark"; Types: normal minimal custom; Flags: disablenouninstallwarning
|
||||||
@@ -181,7 +181,8 @@ Source: "plugins\hcperl.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Co
|
|||||||
|
|
||||||
Source: "python\*.py"; DestDir: "{app}\python"; Flags: ignoreversion; Components: langs\python
|
Source: "python\*.py"; DestDir: "{app}\python"; Flags: ignoreversion; Components: langs\python
|
||||||
|
|
||||||
Source: "plugins\hcpython3.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: langs\python
|
Source: "plugins\hcpython3.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion; Components: langs\python; Check: not IsWindows7
|
||||||
|
Source: "plugins\hcpython38.dll"; DestDir: "{app}\plugins"; Flags: ignoreversion skipifsourcedoesntexist; Components: langs\python; Check: IsWindows7
|
||||||
Source: "_cffi_backend.cp3*.pyd"; DestDir: "{app}"; Flags: ignoreversion; Components: langs\python
|
Source: "_cffi_backend.cp3*.pyd"; DestDir: "{app}"; Flags: ignoreversion; Components: langs\python
|
||||||
|
|
||||||
Source: "zoitechat.exe"; DestDir: "{app}"; Flags: ignoreversion; Components: libs
|
Source: "zoitechat.exe"; DestDir: "{app}"; Flags: ignoreversion; Components: libs
|
||||||
@@ -328,6 +329,30 @@ begin
|
|||||||
Result := DirExists(ExpandConstant('{localappdata}') + '\enchant\myspell');
|
Result := DirExists(ExpandConstant('{localappdata}') + '\enchant\myspell');
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function IsWindows7(): Boolean;
|
||||||
|
var
|
||||||
|
Version: TWindowsVersion;
|
||||||
|
begin
|
||||||
|
GetWindowsVersionEx(Version);
|
||||||
|
Result := Version.NTPlatform and (Version.Major = 6) and (Version.Minor = 1);
|
||||||
|
end;
|
||||||
|
|
||||||
|
function PythonURL(): String;
|
||||||
|
begin
|
||||||
|
if IsWindows7() then
|
||||||
|
Result := 'https://www.python.org/ftp/python/3.8.10/python-3.8.10-amd64.exe'
|
||||||
|
else
|
||||||
|
Result := 'https://www.python.org/ftp/python/3.14.3/python-3.14.3-amd64.exe';
|
||||||
|
end;
|
||||||
|
|
||||||
|
function PythonDLL(): String;
|
||||||
|
begin
|
||||||
|
if IsWindows7() then
|
||||||
|
Result := 'python38.dll'
|
||||||
|
else
|
||||||
|
Result := 'python314.dll';
|
||||||
|
end;
|
||||||
|
|
||||||
/////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////
|
||||||
// Sets up the automatic downloads
|
// Sets up the automatic downloads
|
||||||
/////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////
|
||||||
@@ -345,34 +370,34 @@ begin
|
|||||||
begin
|
begin
|
||||||
idpClearFiles;
|
idpClearFiles;
|
||||||
|
|
||||||
if IsComponentSelected('themes\windows10') then
|
if WizardIsComponentSelected('themes\windows10') then
|
||||||
idpAddFile('https://dl.zoitechat.zoite.net/themes/GTK3Themes/Windows-10-3.2.1.zip', ExpandConstant('{tmp}\Windows-10-3.2.1.zip'));
|
idpAddFile('https://dl.zoitechat.zoite.net/themes/GTK3Themes/Windows-10-3.2.1.zip', ExpandConstant('{tmp}\Windows-10-3.2.1.zip'));
|
||||||
|
|
||||||
if IsComponentSelected('themes\windows10dark') then
|
if WizardIsComponentSelected('themes\windows10dark') then
|
||||||
idpAddFile('https://dl.zoitechat.zoite.net/themes/GTK3Themes/Windows-10-Dark-3.2.1-dark.zip', ExpandConstant('{tmp}\Windows-10-Dark-3.2.1-dark.zip'));
|
idpAddFile('https://dl.zoitechat.zoite.net/themes/GTK3Themes/Windows-10-Dark-3.2.1-dark.zip', ExpandConstant('{tmp}\Windows-10-Dark-3.2.1-dark.zip'));
|
||||||
|
|
||||||
if not IsTaskSelected('portable') then
|
if not WizardIsTaskSelected('portable') then
|
||||||
begin
|
begin
|
||||||
|
|
||||||
REDIST := 'https://aka.ms/vs/17/release/vc_redist.x64.exe';
|
REDIST := 'https://aka.ms/vs/17/release/vc_redist.x64.exe';
|
||||||
PERL := 'https://github.com/StrawberryPerl/Perl-Dist-Strawberry/releases/download/SP_54201_64bit/strawberry-perl-5.42.0.1-64bit.msi';
|
PERL := 'https://github.com/StrawberryPerl/Perl-Dist-Strawberry/releases/download/SP_54201_64bit/strawberry-perl-5.42.0.1-64bit.msi';
|
||||||
PY3 := 'https://www.python.org/ftp/python/3.14.3/python-3.14.3-amd64.exe';
|
PY3 := PythonURL();
|
||||||
SPELL := 'https://github.com/zoitechat/gvsbuild/releases/download/zoitechat-2.16.2/ZoiteChat.Spelling.Dictionaries.r2.exe';
|
SPELL := 'https://github.com/hexchat/gvsbuild/releases/download/hexchat-2.16.2/HexChat.Spelling.Dictionaries.r2.exe';
|
||||||
|
|
||||||
if IsComponentSelected('deps\vcredist2015') and not CheckVCInstall() then
|
if WizardIsComponentSelected('deps\vcredist2015') and not CheckVCInstall() then
|
||||||
idpAddFile(REDIST, ExpandConstant('{tmp}\vcredist.exe'));
|
idpAddFile(REDIST, ExpandConstant('{tmp}\vcredist.exe'));
|
||||||
|
|
||||||
if IsComponentSelected('spell') and not CheckSpellInstall() then
|
if WizardIsComponentSelected('spell') and not CheckSpellInstall() then
|
||||||
idpAddFile(SPELL, ExpandConstant('{tmp}\spelling-dicts.exe'));
|
idpAddFile(SPELL, ExpandConstant('{tmp}\spelling-dicts.exe'));
|
||||||
|
|
||||||
if not WizardSilent() then
|
if not WizardSilent() then
|
||||||
begin
|
begin
|
||||||
if IsComponentSelected('langs\perl') and not CheckDLL('perl542.dll') then
|
if WizardIsComponentSelected('langs\perl') and not CheckDLL('perl542.dll') then
|
||||||
begin
|
begin
|
||||||
idpAddFile(PERL, ExpandConstant('{tmp}\perl.msi'))
|
idpAddFile(PERL, ExpandConstant('{tmp}\perl.msi'))
|
||||||
end;
|
end;
|
||||||
|
|
||||||
if IsComponentSelected('langs\python') and not CheckDLL('python314.dll') then
|
if WizardIsComponentSelected('langs\python') and not CheckDLL(PythonDLL()) then
|
||||||
idpAddFile(PY3, ExpandConstant('{tmp}\python.exe'));
|
idpAddFile(PY3, ExpandConstant('{tmp}\python.exe'));
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@@ -397,7 +422,7 @@ begin
|
|||||||
|
|
||||||
if (CurPageID = wpSelectTasks) then
|
if (CurPageID = wpSelectTasks) then
|
||||||
if (WizardForm.TasksList.Checked[1] = True) then
|
if (WizardForm.TasksList.Checked[1] = True) then
|
||||||
if (WizardDirValue() = ExpandConstant('{pf64}\ZoiteChat')) then
|
if (WizardDirValue() = ExpandConstant('{commonpf64}\ZoiteChat')) then
|
||||||
begin
|
begin
|
||||||
WizardForm.TasksList.Checked[1] := False
|
WizardForm.TasksList.Checked[1] := False
|
||||||
MsgBox('Portable mode is only intended for use on portable drives and has been disabled.', mbInformation, MB_OK)
|
MsgBox('Portable mode is only intended for use on portable drives and has been disabled.', mbInformation, MB_OK)
|
||||||
@@ -405,21 +430,21 @@ begin
|
|||||||
|
|
||||||
if CurPageID = wpReady then
|
if CurPageID = wpReady then
|
||||||
begin
|
begin
|
||||||
if IsComponentSelected('themes\windows10') and not FileExists(ExpandConstant('{tmp}\Windows-10-3.2.1.zip')) then
|
if WizardIsComponentSelected('themes\windows10') and not FileExists(ExpandConstant('{tmp}\Windows-10-3.2.1.zip')) then
|
||||||
begin
|
begin
|
||||||
MsgBox('Windows 10 GTK3 theme could not be downloaded. Please retry setup and rerun setup.', mbError, MB_OK);
|
MsgBox('Windows 10 GTK3 theme could not be downloaded. Please retry setup and rerun setup.', mbError, MB_OK);
|
||||||
Result := False;
|
Result := False;
|
||||||
Exit;
|
Exit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
if IsComponentSelected('themes\windows10dark') and not FileExists(ExpandConstant('{tmp}\Windows-10-Dark-3.2.1-dark.zip')) then
|
if WizardIsComponentSelected('themes\windows10dark') and not FileExists(ExpandConstant('{tmp}\Windows-10-Dark-3.2.1-dark.zip')) then
|
||||||
begin
|
begin
|
||||||
MsgBox('Windows 10 Dark GTK3 theme could not be downloaded. Please retry setup and rerun setup.', mbError, MB_OK);
|
MsgBox('Windows 10 Dark GTK3 theme could not be downloaded. Please retry setup and rerun setup.', mbError, MB_OK);
|
||||||
Result := False;
|
Result := False;
|
||||||
Exit;
|
Exit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
if IsComponentSelected('deps\vcredist2015') and not CheckVCInstall() and not FileExists(ExpandConstant('{tmp}\vcredist.exe')) then
|
if WizardIsComponentSelected('deps\vcredist2015') and not CheckVCInstall() and not FileExists(ExpandConstant('{tmp}\vcredist.exe')) then
|
||||||
begin
|
begin
|
||||||
MsgBox('Visual C++ Redistributable could not be downloaded. Please retry setup or install it manually and rerun setup.', mbError, MB_OK);
|
MsgBox('Visual C++ Redistributable could not be downloaded. Please retry setup or install it manually and rerun setup.', mbError, MB_OK);
|
||||||
Result := False;
|
Result := False;
|
||||||
@@ -486,7 +511,7 @@ end;
|
|||||||
/////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////
|
||||||
procedure CurStepChanged(CurStep: TSetupStep);
|
procedure CurStepChanged(CurStep: TSetupStep);
|
||||||
begin
|
begin
|
||||||
if not (IsTaskSelected('portable')) then
|
if not (WizardIsTaskSelected('portable')) then
|
||||||
begin
|
begin
|
||||||
if (CurStep=ssInstall) then
|
if (CurStep=ssInstall) then
|
||||||
begin
|
begin
|
||||||
|
|||||||
Reference in New Issue
Block a user