4 Commits

Author SHA1 Message Date
deepend-tildeclub
64bffd0dc8 Merge pull request #184 from ZoiteChat/add-gtk3-themes-windows-installer
Theme: Adding themes users can select at install time.
2026-03-31 19:38:40 -06:00
deepend-tildeclub
b451240dfd Merge pull request #181 from ZoiteChat/prefs-option-disable-tab-close-button
Add pref for tab close buttons
2026-03-31 19:30:26 -06:00
41cc1f617f Theme: Adding themes users can select at install time. 2026-03-31 19:28:45 -06:00
ed671eac25 Add pref for tab close buttons 2026-03-31 18:10:28 -06:00
7 changed files with 51 additions and 68 deletions

View File

@@ -31,14 +31,11 @@ jobs:
libcanberra-dev libdbus-glib-1-dev libglib2.0-dev \
libarchive-dev \
libgtk-3-dev \
libenchant-2-2 enchant-2 \
libnuspell5 \
libwayland-client0 libwayland-cursor0 libwayland-egl1 \
libxkbcommon0 \
libgtk-3-bin libglib2.0-bin shared-mime-info gsettings-desktop-schemas \
libluajit-5.1-dev libpci-dev libperl-dev libssl-dev libayatana-appindicator3-dev \
perl python3 python3-minimal python3-dev python3-cffi mono-devel desktop-file-utils \
hunspell hunspell-en-us hunspell-en-gb hunspell-en-ca hunspell-es hunspell-fr hunspell-de-de hunspell-it hunspell-pt-br hunspell-ru hunspell-uk hunspell-nl hunspell-pl \
fonts-noto-color-emoji breeze-gtk-theme \
patchelf file curl
@@ -128,68 +125,17 @@ jobs:
cp -a /usr/lib/gtk-3.0/modules AppDir/usr/lib/gtk-3.0/
fi
if compgen -G '/usr/lib/x86_64-linux-gnu/libenchant-2.so*' > /dev/null; then
install -d AppDir/usr/lib/x86_64-linux-gnu
cp -a /usr/lib/x86_64-linux-gnu/libenchant-2.so* AppDir/usr/lib/x86_64-linux-gnu/
fi
if compgen -G '/usr/lib/x86_64-linux-gnu/libgmodule-2.0.so*' > /dev/null; then
install -d AppDir/usr/lib/x86_64-linux-gnu
cp -a /usr/lib/x86_64-linux-gnu/libgmodule-2.0.so* AppDir/usr/lib/x86_64-linux-gnu/
fi
if compgen -G '/usr/lib/x86_64-linux-gnu/libnuspell.so*' > /dev/null; then
install -d AppDir/usr/lib/x86_64-linux-gnu
cp -a /usr/lib/x86_64-linux-gnu/libnuspell.so* AppDir/usr/lib/x86_64-linux-gnu/
fi
if compgen -G '/usr/lib/x86_64-linux-gnu/libhunspell-*.so*' > /dev/null; then
install -d AppDir/usr/lib/x86_64-linux-gnu
cp -a /usr/lib/x86_64-linux-gnu/libhunspell-*.so* AppDir/usr/lib/x86_64-linux-gnu/
fi
if [ -d "/usr/lib/x86_64-linux-gnu/enchant-2" ]; then
install -d AppDir/usr/lib/x86_64-linux-gnu
cp -a /usr/lib/x86_64-linux-gnu/enchant-2 AppDir/usr/lib/x86_64-linux-gnu/
fi
if [ -d "/usr/share/enchant-2" ]; then
install -d AppDir/usr/share
cp -a /usr/share/enchant-2 AppDir/usr/share/
fi
if [ -d "/etc/enchant-2" ]; then
install -d AppDir/etc
cp -a /etc/enchant-2 AppDir/etc/
fi
if [ -d "/usr/share/hunspell" ]; then
install -d AppDir/usr/share
cp -a /usr/share/hunspell AppDir/usr/share/
fi
- name: Verify bundled plugins
run: |
set -eux
# Include every built-in plugin except the Windows-only update plugin.
find AppDir/usr/lib -maxdepth 4 -type f -name '*.so' -path '*/zoitechat/plugins/*' -print | sort
for plugin in checksum fishlim lua perl python sysinfo; do
find "AppDir/usr/lib" -maxdepth 4 -type f -name "${plugin}.so" -path '*/zoitechat/plugins/*' -print -quit | grep -q .
done
find AppDir/usr/lib/x86_64-linux-gnu -maxdepth 1 \( -type f -o -type l \) -name 'libenchant-2.so*' -print -quit | grep -q .
find AppDir/usr/lib/x86_64-linux-gnu -maxdepth 1 \( -type f -o -type l \) -name 'libgmodule-2.0.so*' -print -quit | grep -q .
find AppDir/usr/lib/x86_64-linux-gnu -maxdepth 1 -type f -name 'libhunspell-*.so*' -print -quit | grep -q .
find AppDir/usr/lib/x86_64-linux-gnu/enchant-2 -maxdepth 1 -type f -name '*hunspell*.so*' -print -quit | grep -q .
test -f AppDir/usr/share/hunspell/en_CA.dic
test -f AppDir/usr/share/hunspell/en_CA.aff
test -d AppDir/usr/share/enchant-2
ldd -r AppDir/usr/lib/x86_64-linux-gnu/libenchant-2.so.2 | tee /tmp/ldd-enchant.txt
if grep -q 'undefined symbol' /tmp/ldd-enchant.txt; then
exit 1
fi
- name: Build AppImage
env:
APPIMAGE_EXTRACT_AND_RUN: 1
@@ -221,9 +167,6 @@ jobs:
export XDG_DATA_DIRS="$APPDIR/usr/share:${XDG_DATA_DIRS:-/usr/local/share:/usr/share}"
export GTK_EXE_PREFIX="$APPDIR/usr"
export GTK_DATA_PREFIX="$APPDIR/usr"
export ENCHANT_PREFIX="$APPDIR/usr"
export DICPATH="$APPDIR/usr/share/hunspell${DICPATH:+:$DICPATH}"
export ENCHANT_CONFIG_DIR="$APPDIR/etc/enchant-2"
gtk_path_entries=""
if [ -d "$APPDIR/usr/lib/x86_64-linux-gnu/gtk-3.0" ]; then
gtk_path_entries="$APPDIR/usr/lib/x86_64-linux-gnu/gtk-3.0"

View File

@@ -445,6 +445,7 @@ const struct prefs vars[] =
{"gui_dark_mode", P_OFFINT (hex_gui_dark_mode), TYPE_INT},
{"gui_gtk3_variant", P_OFFINT (hex_gui_gtk3_variant), 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_middleclose", P_OFFINT (hex_gui_tab_middleclose), TYPE_BOOL},
{"gui_tab_newtofront", P_OFFINT (hex_gui_tab_newtofront), TYPE_INT},
{"gui_tab_pos", P_OFFINT (hex_gui_tab_pos), TYPE_INT},
@@ -777,6 +778,7 @@ load_default_config(void)
prefs.hex_gui_tab_chans = 1;
prefs.hex_gui_tab_dialogs = 1;
prefs.hex_gui_tab_icons = 1;
prefs.hex_gui_tab_closebuttons = 1;
prefs.hex_gui_tab_middleclose = 1;
prefs.hex_gui_tab_server = 1;
prefs.hex_gui_tab_sort = 1;

View File

@@ -265,6 +265,7 @@ struct zoitechatprefs
int hex_gui_search_pos;
int hex_gui_slist_select;
int hex_gui_tab_layout;
int hex_gui_tab_closebuttons;
int hex_gui_tab_middleclose;
int hex_gui_tab_newtofront;
int hex_gui_tab_pos;

View File

@@ -653,7 +653,7 @@ tab_click_cb (GtkWidget *wid, GdkEventButton *event, chan *ch)
if (event->button == 1 && event->type == GDK_BUTTON_PRESS)
{
close_button = g_object_get_data (G_OBJECT (wid), "tab-close-button");
if (close_button &&
if (prefs.hex_gui_tab_closebuttons && close_button &&
gtk_widget_translate_coordinates (close_button, wid, 0, 0, &close_x, &close_y))
{
gtk_widget_get_allocation (close_button, &close_alloc);
@@ -679,7 +679,7 @@ tab_close_motion_cb (GtkWidget *wid, GdkEventMotion *event, chan *ch)
gboolean hover = FALSE;
close_button = g_object_get_data (G_OBJECT (wid), "tab-close-button");
if (close_button &&
if (prefs.hex_gui_tab_closebuttons && close_button &&
gtk_widget_translate_coordinates (close_button, wid, 0, 0, &close_x, &close_y))
{
gtk_widget_get_allocation (close_button, &close_alloc);
@@ -714,7 +714,7 @@ tab_close_leave_cb (GtkWidget *wid, GdkEventCrossing *event, chan *ch)
GtkWidget *close_button;
close_button = g_object_get_data (G_OBJECT (wid), "tab-close-button");
if (close_button)
if (prefs.hex_gui_tab_closebuttons && close_button)
gtk_widget_unset_state_flags (close_button, GTK_STATE_FLAG_PRELIGHT);
if (gtk_widget_get_window (wid))
gdk_window_set_cursor (gtk_widget_get_window (wid), NULL);
@@ -780,6 +780,8 @@ cv_tabs_add (chanview *cv, chan *ch, char *name, GtkTreeIter *parent)
G_CALLBACK (tab_toggled_cb), ch);
g_object_set_data (G_OBJECT (but), "u", ch->userdata);
gtk_widget_show_all (hbox);
if (!prefs.hex_gui_tab_closebuttons)
gtk_widget_hide (close_button);
tab_add_real (cv, but, ch);

View File

@@ -1888,8 +1888,7 @@ menu_about (GtkWidget *wid, gpointer sess)
GtkWidget *license;
GtkWidget *close;
GtkWidget *actions;
GList *children;
GList *child;
GtkWidget *default_close;
static const gchar *empty_people[] = { NULL };
theme_manager_attach_window (GTK_WIDGET (dialog));
char comment[512];
@@ -1918,14 +1917,13 @@ menu_about (GtkWidget *wid, gpointer sess)
gtk_about_dialog_set_logo (dialog, pix_zoitechat);
gtk_about_dialog_set_copyright (dialog, "\302\251 1998-2010 Peter \305\275elezn\303\275\n\302\251 2009-2014 Berke Viktor\n\302\251 2015-2025 Patrick Griffis\n\302\251 2026 deepend");
gtk_about_dialog_set_comments (dialog, comment);
actions = gtk_dialog_get_action_area (GTK_DIALOG (dialog));
children = gtk_container_get_children (GTK_CONTAINER (actions));
for (child = children; child; child = child->next)
gtk_widget_destroy (GTK_WIDGET (child->data));
g_list_free (children);
default_close = gtk_dialog_get_widget_for_response (GTK_DIALOG (dialog), GTK_RESPONSE_CANCEL);
if (default_close)
gtk_widget_destroy (default_close);
website = gtk_dialog_add_button (GTK_DIALOG (dialog), "Website", GTK_RESPONSE_HELP);
license = gtk_dialog_add_button (GTK_DIALOG (dialog), "License", GTK_RESPONSE_APPLY);
close = gtk_dialog_add_button (GTK_DIALOG (dialog), _("_Close"), GTK_RESPONSE_CLOSE);
actions = gtk_widget_get_parent (close);
gtk_button_box_set_child_secondary (GTK_BUTTON_BOX (actions), website, TRUE);
gtk_button_box_set_child_secondary (GTK_BUTTON_BOX (actions), license, TRUE);
gtk_button_box_set_child_secondary (GTK_BUTTON_BOX (actions), close, FALSE);

View File

@@ -330,6 +330,7 @@ static const setting tabs_settings[] =
{ST_TOGGLE, N_("Show icons in the channel tree"), P_OFFINTNL(hex_gui_tab_icons), 0, 0, 0},
{ST_TOGGLE, N_("Show dotted lines in the channel tree"), P_OFFINTNL(hex_gui_tab_dots), 0, 0, 0},
{ST_TOGGLE, N_("Scroll mouse-wheel to change tabs"), P_OFFINTNL (hex_gui_tab_scrollchans), 0, 0, 0},
{ST_TOGGLE, N_("Show close button on tabs"), P_OFFINTNL(hex_gui_tab_closebuttons), 0, 0, 0},
{ST_TOGGLE, N_("Middle click to close tab"), P_OFFINTNL(hex_gui_tab_middleclose), 0, 0, 0},
{ST_TOGGLE, N_("Smaller text"), P_OFFINTNL(hex_gui_tab_small), 0, 0, 0},
{ST_MENU, N_("Focus new tabs:"), P_OFFINTNL(hex_gui_tab_newtofront), 0, focusnewtabsmenu, 0},
@@ -2186,6 +2187,8 @@ setup_apply (struct zoitechatprefs *pr)
noapply = TRUE;
if (DIFF (hex_gui_tab_icons))
noapply = TRUE;
if (DIFF (hex_gui_tab_closebuttons))
noapply = TRUE;
if (DIFF (hex_gui_tab_server))
noapply = TRUE;
if (DIFF (hex_gui_tab_small))

View File

@@ -61,6 +61,9 @@ Name: "langs"; Description: "Language Interfaces"; Types: custom; Flags: disable
Name: "langs\lua"; Description: "Lua"; Types: normal custom; Flags: disablenouninstallwarning
Name: "langs\perl"; Description: "Perl (requires Perl 5.42)"; Types: custom; Flags: disablenouninstallwarning
Name: "langs\python"; Description: "Python (requires Python 3.14.3)"; Types: 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\windows10dark"; Description: "Windows 10 Dark"; Types: normal minimal custom; Flags: disablenouninstallwarning
Name: "deps"; Description: "Dependencies"; Types: custom; Flags: disablenouninstallwarning
Name: "deps\vcredist2015"; Description: "Visual C++ Redistributable 2015"; Types: normal minimal custom; Flags: disablenouninstallwarning
@@ -88,6 +91,11 @@ Filename: "{tmp}\perl.msi"; StatusMsg: "Installing Perl"; Components: langs\perl
Filename: "{tmp}\python.msi"; StatusMsg: "Installing Python"; Components: langs\python; Flags: shellexec skipifdoesntexist; Tasks: not portable
Filename: "{tmp}\python.exe"; Parameters: "InstallAllUsers=1 PrependPath=1"; StatusMsg: "Installing Python"; Components: langs\python; Flags: shellexec skipifdoesntexist; Tasks: not portable
Filename: "{tmp}\spelling-dicts.exe"; Parameters: "/verysilent"; StatusMsg: "Installing Spelling Dictionaries"; Components: spell; Flags: skipifdoesntexist; Tasks: not portable
Filename: "{sys}\WindowsPowerShell\v1.0\powershell.exe"; Parameters: "-NoProfile -ExecutionPolicy Bypass -Command ""Expand-Archive -LiteralPath '{tmp}\Windows-10-3.2.1.zip' -DestinationPath '{userappdata}\ZoiteChat\gtk3-themes' -Force"""; StatusMsg: "Installing GTK3 Theme: Windows 10"; Components: themes\windows10; Flags: runhidden waituntilterminated skipifdoesntexist
Filename: "{sys}\WindowsPowerShell\v1.0\powershell.exe"; Parameters: "-NoProfile -ExecutionPolicy Bypass -Command ""Expand-Archive -LiteralPath '{tmp}\Windows-10-Dark-3.2.1-dark.zip' -DestinationPath '{userappdata}\ZoiteChat\gtk3-themes' -Force"""; StatusMsg: "Installing GTK3 Theme: Windows 10 Dark"; Components: themes\windows10dark; Flags: runhidden waituntilterminated skipifdoesntexist
[Dirs]
Name: "{userappdata}\ZoiteChat\gtk3-themes"; Components: themes
[Files]
Source: "portable-mode"; DestDir: "{app}"; Tasks: portable
@@ -196,6 +204,10 @@ Name: "{commonappdata}\Microsoft\Internet Explorer\Quick Launch\ZoiteChat"; File
[Messages]
BeveledLabel= {#APPNAM}
[UninstallDelete]
Type: filesandordirs; Name: "{userappdata}\ZoiteChat\gtk3-themes\Windows-10-3.2.1"; Components: themes\windows10
Type: filesandordirs; Name: "{userappdata}\ZoiteChat\gtk3-themes\Windows-10-Dark-3.2.1-dark"; Components: themes\windows10dark
[Code]
#ifndef USE_INNO_DOWNLOAD_PLUGIN
var
@@ -336,6 +348,12 @@ begin
begin
idpClearFiles;
if IsComponentSelected('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'));
if IsComponentSelected('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'));
if not IsTaskSelected('portable') then
begin
@@ -389,12 +407,28 @@ begin
end;
if CurPageID = wpReady then
begin
if IsComponentSelected('themes\windows10') and not FileExists(ExpandConstant('{tmp}\Windows-10-3.2.1.zip')) then
begin
MsgBox('Windows 10 GTK3 theme could not be downloaded. Please retry setup and rerun setup.', mbError, MB_OK);
Result := False;
Exit;
end;
if IsComponentSelected('themes\windows10dark') and not FileExists(ExpandConstant('{tmp}\Windows-10-Dark-3.2.1-dark.zip')) then
begin
MsgBox('Windows 10 Dark GTK3 theme could not be downloaded. Please retry setup and rerun setup.', mbError, MB_OK);
Result := False;
Exit;
end;
if IsComponentSelected('deps\vcredist2015') and not CheckVCInstall() and not FileExists(ExpandConstant('{tmp}\vcredist.exe')) then
begin
MsgBox('Visual C++ Redistributable could not be downloaded. Please retry setup or install it manually and rerun setup.', mbError, MB_OK);
Result := False;
Exit;
end;
end;
end;
/////////////////////////////////////////////////////////////////////