mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-03-23 14:00:21 +00:00
Compare commits
5 Commits
zoitechat-
...
v2.18.0-pr
| Author | SHA1 | Date | |
|---|---|---|---|
| aead92d9e4 | |||
|
|
7cc5d14045 | ||
| 33fce2af2a | |||
| d26fbb6e89 | |||
| cd93fe3b0e |
@@ -1,6 +1,28 @@
|
||||
ZoiteChat ChangeLog
|
||||
=================
|
||||
|
||||
2.18.0~pre5 (2026-03-22)
|
||||
------------------------
|
||||
- Overhauled preferences/config saving: fully staged and transactional, debounced
|
||||
with flush on close, write failures now surfaced.
|
||||
- Overhauled GTK theme handling: live preview, correct colour reset persistence,
|
||||
proper file:// import paths, consistent menubar CSS.
|
||||
- Fixed GTK entry scroll artifact in the input box.
|
||||
- Hardened tray menu lifetime; fixed stale pointer crash on menu destruction.
|
||||
- Fixed AppIndicator tray init for Wayland/source builds; skip redundant X11
|
||||
tray probe for AppIndicator builds.
|
||||
- Split topic/mode rows in channel bar, tighten spacing, persist userlist column widths.
|
||||
- Preserve saved right-pane size on first layout.
|
||||
- Fixed sounds prefs section.
|
||||
- Fixed chanview tree layout and header alignment; tighten topic URL hit-testing.
|
||||
- Dropped realpath() in favour of GLib-only absolute path build.
|
||||
- Made About dialog links explicit; added GPL licence URL.
|
||||
- Added licence headers to new source files.
|
||||
- Windows installer: fixed VC++ redist URL, added non-plugin download fallback,
|
||||
switched to registry-based runtime detection.
|
||||
- Made libayatana-appindicator a required dep in PKGBUILD.
|
||||
- Cleaned up Meson libperl detection.
|
||||
|
||||
2.18.0~pre4 (2026-03-15)
|
||||
------------------------
|
||||
|
||||
|
||||
@@ -29,6 +29,45 @@
|
||||
<id>zoitechat.desktop</id>
|
||||
</provides>
|
||||
<releases>
|
||||
<release date="2026-03-22" version="2.18.0~pre5">
|
||||
<description>
|
||||
<p>Preferences and config saving:</p>
|
||||
<ul>
|
||||
<li>Overhauled preferences/config saving: fully staged and transactional, debounced with flush on close, write failures now surfaced.</li>
|
||||
</ul>
|
||||
<p>GTK theme and UI:</p>
|
||||
<ul>
|
||||
<li>Overhauled GTK theme handling: live preview, correct colour reset persistence, proper <code>file://</code> import paths, consistent menubar CSS.</li>
|
||||
<li>Fixed GTK entry scroll artifact in the input box.</li>
|
||||
<li>Split topic/mode rows in channel bar, tighten spacing, persist userlist column widths.</li>
|
||||
<li>Preserve saved right-pane size on first layout.</li>
|
||||
<li>Fixed sounds prefs section.</li>
|
||||
<li>Fixed chanview tree layout and header alignment; tighten topic URL hit-testing.</li>
|
||||
</ul>
|
||||
<p>Tray:</p>
|
||||
<ul>
|
||||
<li>Hardened tray menu lifetime; fixed stale pointer crash on menu destruction.</li>
|
||||
<li>Fixed AppIndicator tray init for Wayland/source builds; skip redundant X11 tray probe for AppIndicator builds.</li>
|
||||
</ul>
|
||||
<p>Build and packaging:</p>
|
||||
<ul>
|
||||
<li>Dropped <code>realpath()</code> in favour of GLib-only absolute path build.</li>
|
||||
<li>Made About dialog links explicit; added GPL licence URL.</li>
|
||||
<li>Added licence headers to new source files.</li>
|
||||
<li>Windows installer: fixed VC++ redist URL, added non-plugin download fallback, switched to registry-based runtime detection.</li>
|
||||
<li>Made <code>libayatana-appindicator</code> a required dep in PKGBUILD.</li>
|
||||
<li>Cleaned up Meson libperl detection.</li>
|
||||
</ul>
|
||||
</description>
|
||||
</release>
|
||||
<release date="2026-03-22" version="2.18.0~pre5">
|
||||
<description>
|
||||
<p>Version metadata update:</p>
|
||||
<ul>
|
||||
<li>Bumped release version references to <code>2.18.0~pre5</code> across build and packaging files.</li>
|
||||
</ul>
|
||||
</description>
|
||||
</release>
|
||||
<release date="2026-03-14" version="2.18.0~pre4">
|
||||
<description>
|
||||
<p>UI fixes, topic bar improvements, and selection styling updates:</p>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
project('zoitechat', 'c',
|
||||
version: '2.18.0~pre4',
|
||||
version: '2.18.0~pre5',
|
||||
meson_version: '>= 0.55.0',
|
||||
default_options: [
|
||||
'c_std=c17',
|
||||
|
||||
@@ -19,7 +19,7 @@ else:
|
||||
if not hasattr(sys, 'argv'):
|
||||
sys.argv = ['<zoitechat>']
|
||||
|
||||
VERSION = b'2.18.0~pre4'
|
||||
VERSION = b'2.18.0~pre5'
|
||||
PLUGIN_NAME = ffi.new('char[]', b'Python')
|
||||
PLUGIN_DESC = ffi.new('char[]', b'Python %d.%d scripting interface' % (sys.version_info[0], sys.version_info[1]))
|
||||
PLUGIN_VERSION = ffi.new('char[]', VERSION)
|
||||
|
||||
@@ -4206,7 +4206,7 @@ mg_create_menu (session_gui *gui, GtkWidget *table, int away_state)
|
||||
gui->menu_item);
|
||||
gtk_widget_set_hexpand (gui->menu, TRUE);
|
||||
gtk_widget_set_vexpand (gui->menu, FALSE);
|
||||
gtk_widget_set_halign (gui->menu, GTK_ALIGN_FILL);
|
||||
gtk_widget_set_halign (gui->menu, GTK_ALIGN_START);
|
||||
gtk_widget_set_valign (gui->menu, GTK_ALIGN_FILL);
|
||||
gtk_grid_attach (GTK_GRID (table), gui->menu, 0, 0, 3, 1);
|
||||
}
|
||||
|
||||
@@ -102,6 +102,12 @@ theme_manager_save_preferences (void)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void
|
||||
theme_manager_dispatch_changed (ThemeChangedReason reasons)
|
||||
{
|
||||
(void)reasons;
|
||||
}
|
||||
|
||||
ThemePaletteBehavior
|
||||
theme_manager_get_userlist_palette_behavior (const PangoFontDescription *font_desc)
|
||||
{
|
||||
|
||||
@@ -26,16 +26,29 @@
|
||||
#include "theme-runtime.h"
|
||||
#include "theme-gtk3.h"
|
||||
#include "../maingui.h"
|
||||
|
||||
#ifdef G_OS_WIN32
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#if defined(__GNUC__) || defined(__clang__)
|
||||
extern char *theme_css_build_toplevel_classes (void) __attribute__ ((weak));
|
||||
#else
|
||||
extern char *theme_css_build_toplevel_classes (void);
|
||||
#endif
|
||||
|
||||
static char *
|
||||
theme_application_build_toplevel_css (void)
|
||||
{
|
||||
if (theme_css_build_toplevel_classes)
|
||||
return theme_css_build_toplevel_classes ();
|
||||
|
||||
return g_strdup ("");
|
||||
}
|
||||
|
||||
static void
|
||||
theme_application_apply_windows_theme (gboolean dark)
|
||||
theme_application_apply_toplevel_theme (gboolean dark)
|
||||
{
|
||||
GtkSettings *settings = gtk_settings_get_default ();
|
||||
static GtkCssProvider *win_theme_provider = NULL;
|
||||
static gboolean win_theme_provider_installed = FALSE;
|
||||
static GtkCssProvider *theme_provider = NULL;
|
||||
static gboolean theme_provider_installed = FALSE;
|
||||
GdkScreen *screen;
|
||||
gboolean prefer_dark = dark;
|
||||
char *css;
|
||||
@@ -56,33 +69,21 @@ theme_application_apply_windows_theme (gboolean dark)
|
||||
if (!screen)
|
||||
return;
|
||||
|
||||
if (theme_gtk3_is_active ())
|
||||
{
|
||||
if (win_theme_provider_installed && win_theme_provider)
|
||||
{
|
||||
gtk_style_context_remove_provider_for_screen (screen,
|
||||
GTK_STYLE_PROVIDER (win_theme_provider));
|
||||
win_theme_provider_installed = FALSE;
|
||||
}
|
||||
return;
|
||||
}
|
||||
if (!theme_provider)
|
||||
theme_provider = gtk_css_provider_new ();
|
||||
|
||||
if (!win_theme_provider)
|
||||
win_theme_provider = gtk_css_provider_new ();
|
||||
|
||||
css = theme_css_build_toplevel_classes ();
|
||||
gtk_css_provider_load_from_data (win_theme_provider, css, -1, NULL);
|
||||
css = theme_application_build_toplevel_css ();
|
||||
gtk_css_provider_load_from_data (theme_provider, css, -1, NULL);
|
||||
g_free (css);
|
||||
|
||||
if (!win_theme_provider_installed)
|
||||
if (!theme_provider_installed)
|
||||
{
|
||||
gtk_style_context_add_provider_for_screen (screen,
|
||||
GTK_STYLE_PROVIDER (win_theme_provider),
|
||||
GTK_STYLE_PROVIDER (theme_provider),
|
||||
GTK_STYLE_PROVIDER_PRIORITY_APPLICATION + 1);
|
||||
win_theme_provider_installed = TRUE;
|
||||
theme_provider_installed = TRUE;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
gboolean
|
||||
theme_application_apply_mode (unsigned int mode, gboolean *palette_changed)
|
||||
@@ -91,10 +92,7 @@ theme_application_apply_mode (unsigned int mode, gboolean *palette_changed)
|
||||
|
||||
theme_runtime_load ();
|
||||
dark = theme_runtime_apply_mode (mode, palette_changed);
|
||||
|
||||
#ifdef G_OS_WIN32
|
||||
theme_application_apply_windows_theme (dark);
|
||||
#endif
|
||||
theme_application_apply_toplevel_theme (dark);
|
||||
|
||||
theme_application_reload_input_style ();
|
||||
|
||||
|
||||
@@ -361,20 +361,22 @@ theme_css_build_toplevel_classes (void)
|
||||
"color: #f0f0f0;"
|
||||
"border-color: #202020;"
|
||||
"}"
|
||||
"window.%s menubar, window.%s menubar:backdrop, window.%s menuitem, window.%s menuitem:backdrop {"
|
||||
"background-color: #202020;"
|
||||
"color: #f0f0f0;"
|
||||
"border-color: #202020;"
|
||||
"window.%s menubar, window.%s menubar:backdrop, window.%s menubar box, window.%s menubar box:backdrop, window.%s menuitem, window.%s menuitem:backdrop {"
|
||||
"background-color: @theme_bg_color;"
|
||||
"background-image: none;"
|
||||
"color: @theme_fg_color;"
|
||||
"border-color: @theme_bg_color;"
|
||||
"}"
|
||||
"window.%s, window.%s:backdrop, .%s {"
|
||||
"background-color: #f6f6f6;"
|
||||
"color: #101010;"
|
||||
"border-color: #f6f6f6;"
|
||||
"}"
|
||||
"window.%s menubar, window.%s menubar:backdrop, window.%s menuitem, window.%s menuitem:backdrop {"
|
||||
"background-color: #f6f6f6;"
|
||||
"color: #101010;"
|
||||
"border-color: #f6f6f6;"
|
||||
"window.%s menubar, window.%s menubar:backdrop, window.%s menubar box, window.%s menubar box:backdrop, window.%s menuitem, window.%s menuitem:backdrop {"
|
||||
"background-color: @theme_bg_color;"
|
||||
"background-image: none;"
|
||||
"color: @theme_fg_color;"
|
||||
"border-color: @theme_bg_color;"
|
||||
"}",
|
||||
theme_css_selector_dark_class,
|
||||
theme_css_selector_dark_class,
|
||||
@@ -383,6 +385,10 @@ theme_css_build_toplevel_classes (void)
|
||||
theme_css_selector_dark_class,
|
||||
theme_css_selector_dark_class,
|
||||
theme_css_selector_dark_class,
|
||||
theme_css_selector_dark_class,
|
||||
theme_css_selector_dark_class,
|
||||
theme_css_selector_light_class,
|
||||
theme_css_selector_light_class,
|
||||
theme_css_selector_light_class,
|
||||
theme_css_selector_light_class,
|
||||
theme_css_selector_light_class,
|
||||
|
||||
@@ -216,8 +216,6 @@ theme_manager_queue_auto_refresh (GtkSettings *settings, GParamSpec *pspec, gpoi
|
||||
void
|
||||
theme_manager_init (void)
|
||||
{
|
||||
GtkSettings *settings;
|
||||
|
||||
if (!theme_manager_listeners)
|
||||
theme_manager_listeners = g_hash_table_new_full (g_direct_hash, g_direct_equal, NULL,
|
||||
theme_listener_free);
|
||||
@@ -225,21 +223,10 @@ theme_manager_init (void)
|
||||
if (!theme_manager_setup_listener_id)
|
||||
theme_manager_setup_listener_id = theme_listener_register ("setup.apply", theme_manager_setup_apply_listener, NULL);
|
||||
|
||||
settings = gtk_settings_get_default ();
|
||||
if (settings)
|
||||
fe_set_auto_dark_mode_state (theme_policy_system_prefers_dark ());
|
||||
|
||||
fe_set_auto_dark_mode_state (FALSE);
|
||||
theme_application_apply_mode (prefs.hex_gui_dark_mode, NULL);
|
||||
theme_gtk3_init ();
|
||||
zoitechat_set_theme_post_apply_callback (theme_manager_handle_theme_applied);
|
||||
|
||||
if (settings)
|
||||
{
|
||||
g_signal_connect (settings, "notify::gtk-application-prefer-dark-theme",
|
||||
G_CALLBACK (theme_manager_queue_auto_refresh), NULL);
|
||||
g_signal_connect (settings, "notify::gtk-theme-name",
|
||||
G_CALLBACK (theme_manager_queue_auto_refresh), NULL);
|
||||
}
|
||||
}
|
||||
|
||||
gboolean
|
||||
@@ -494,7 +481,6 @@ theme_manager_apply_wayland_kde_csd (GtkWidget *window)
|
||||
static void
|
||||
theme_manager_apply_platform_window_theme (GtkWidget *window)
|
||||
{
|
||||
#ifdef G_OS_WIN32
|
||||
GtkStyleContext *context;
|
||||
gboolean dark;
|
||||
|
||||
@@ -516,6 +502,7 @@ theme_manager_apply_platform_window_theme (GtkWidget *window)
|
||||
gtk_style_context_remove_class (context, "zoitechat-light");
|
||||
gtk_style_context_add_class (context, dark ? "zoitechat-dark" : "zoitechat-light");
|
||||
}
|
||||
#ifdef G_OS_WIN32
|
||||
fe_win32_apply_native_titlebar (window, dark);
|
||||
#else
|
||||
theme_manager_apply_wayland_kde_csd (window);
|
||||
|
||||
@@ -27,38 +27,7 @@
|
||||
gboolean
|
||||
theme_policy_system_prefers_dark (void)
|
||||
{
|
||||
GtkSettings *settings = gtk_settings_get_default ();
|
||||
gboolean prefer_dark = FALSE;
|
||||
char *theme_name = NULL;
|
||||
#ifdef G_OS_WIN32
|
||||
gboolean have_win_pref = FALSE;
|
||||
|
||||
if (fe_win32_high_contrast_is_enabled ())
|
||||
return FALSE;
|
||||
|
||||
have_win_pref = fe_win32_try_get_system_dark (&prefer_dark);
|
||||
if (!have_win_pref)
|
||||
#endif
|
||||
if (settings && g_object_class_find_property (G_OBJECT_GET_CLASS (settings),
|
||||
"gtk-application-prefer-dark-theme"))
|
||||
{
|
||||
g_object_get (settings, "gtk-application-prefer-dark-theme", &prefer_dark, NULL);
|
||||
}
|
||||
|
||||
if (settings && !prefer_dark)
|
||||
{
|
||||
g_object_get (settings, "gtk-theme-name", &theme_name, NULL);
|
||||
if (theme_name)
|
||||
{
|
||||
char *lower = g_ascii_strdown (theme_name, -1);
|
||||
if (g_str_has_suffix (lower, "-dark") || g_strrstr (lower, "dark"))
|
||||
prefer_dark = TRUE;
|
||||
g_free (lower);
|
||||
g_free (theme_name);
|
||||
}
|
||||
}
|
||||
|
||||
return prefer_dark;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
gboolean
|
||||
|
||||
@@ -1350,6 +1350,19 @@ theme_preferences_gtk3_sync_remove_state (theme_preferences_ui *ui)
|
||||
gtk_widget_set_sensitive (ui->gtk3_remove, source == ZOITECHAT_GTK3_THEME_SOURCE_USER);
|
||||
}
|
||||
|
||||
static gboolean
|
||||
theme_preferences_gtk3_apply_and_refresh (GError **error)
|
||||
{
|
||||
if (!theme_gtk3_apply_current (error))
|
||||
return FALSE;
|
||||
theme_manager_dispatch_changed (THEME_CHANGED_REASON_THEME_PACK |
|
||||
THEME_CHANGED_REASON_PALETTE |
|
||||
THEME_CHANGED_REASON_WIDGET_STYLE |
|
||||
THEME_CHANGED_REASON_USERLIST |
|
||||
THEME_CHANGED_REASON_MODE);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
theme_preferences_gtk3_changed_cb (GtkComboBox *combo, gpointer user_data)
|
||||
{
|
||||
@@ -1380,7 +1393,7 @@ theme_preferences_gtk3_changed_cb (GtkComboBox *combo, gpointer user_data)
|
||||
ui->setup_prefs->hex_gui_gtk3_variant = prefs.hex_gui_gtk3_variant;
|
||||
}
|
||||
|
||||
if (selection_changed && !theme_gtk3_apply_current (&error))
|
||||
if (selection_changed && !theme_preferences_gtk3_apply_and_refresh (&error))
|
||||
{
|
||||
theme_preferences_show_message (ui, GTK_MESSAGE_ERROR,
|
||||
error ? error->message : _("Failed to apply GTK3 theme."));
|
||||
@@ -1557,7 +1570,7 @@ theme_preferences_populate_gtk3 (theme_preferences_ui *ui)
|
||||
g_free (final_id);
|
||||
}
|
||||
|
||||
if (should_apply && !theme_gtk3_apply_current (&error))
|
||||
if (should_apply && !theme_preferences_gtk3_apply_and_refresh (&error))
|
||||
{
|
||||
theme_preferences_show_message (ui, GTK_MESSAGE_ERROR,
|
||||
error ? error->message : _("Failed to apply GTK3 theme."));
|
||||
|
||||
@@ -1 +1 @@
|
||||
2.18.0~pre4
|
||||
2.18.0~pre5
|
||||
|
||||
Reference in New Issue
Block a user