Commit Graph

2173 Commits

Author SHA1 Message Date
747a1dca97 I made a targeted fix for the Plugins/Scripts Load button on Windows: before issuing LOAD ..., the selected file path is now copied and normalized to forward slashes (\ → /) under #ifdef WIN32, then quoted if needed. This keeps Linux behavior unchanged and avoids Windows path parsing issues in the command path.
The load dialog wiring remains the same (same callback and filters), only the command path construction was hardened.
2026-02-15 22:13:13 -07:00
16f2c6cc0d Updated Windows sysinfo HDD querying to use Win32_LogicalDisk filtered to local fixed drives (DriveType = 3) instead of Win32_Volume, with an inline comment explaining this avoids provider/RPC probe failures (such as Plan9/WSL-backed providers) seen in debugger sessions.
Updated the HDD size property read from WMI from Capacity to Size so it matches the new Win32_LogicalDisk query schema.
2026-02-15 16:51:11 -07:00
b569d24cd1 Added a new Windows-only startup helper, win32_set_gsettings_schema_dir(), that sets GSETTINGS_SCHEMA_DIR to <install-dir>/share/glib-2.0/schemas when the environment variable is not already set and the directory exists. This is intended to prevent GTK/GSettings initialization failures (like the file chooser crash path you shared).
Called that helper in fe_args() before gtk_init() on Windows so schema resolution is configured early in process startup.
2026-02-15 16:37:51 -07:00
7f4ffdb1e5 Added defensive path validation in gtkutil_file_req() so the file chooser only receives existing directories for initial/current folder setup, with fallback to get_xdir() when the requested folder is invalid. This is aimed at preventing the Windows crash that occurs immediately on pressing the Plugin GUI Load button (before file selection).
Wrapped shortcut-folder setup with existence checks and explicit GError handling so invalid config paths don’t propagate into GTK chooser failures/crashes on Windows.
Removed an unused get_xdir_fs extern declaration from this function while introducing a single xdir value reused across chooser setup logic.
2026-02-15 16:15:25 -07:00
60c05710b1 Reviewed src/fe-gtk/plugingui.c and fixed several crash-prone assumptions in the plugin GUI code path that can surface on Windows during plugin load/unload lifecycle edges:
Added type guards before using the stored plugin view/model (GTK_IS_TREE_VIEW, GTK_IS_LIST_STORE) so stale or unexpected object data doesn’t get dereferenced.
    Switched plugin list population to always pass non-null strings for name/version/description via plugingui_safe_string, preventing null string propagation into GTK model setters.
    Added an unload guard for empty/null modname before calling unload logic, preventing unsafe calls into plugin teardown paths with invalid identifiers.
2026-02-15 15:57:19 -07:00
3e59822753 Reviewed the plugin GUI code path and fixed two crash-prone null-handling cases that are especially risky on Windows plugin metadata paths:
fe_pluginlist_update() now guards against pl == NULL, pl->version == NULL, and pl->filename == NULL before dereferencing, and uses safe empty-string fallbacks for filename-backed columns. This prevents null dereferences from malformed or partially-populated plugin entries.
plugingui_unload() now early-returns when the selected plugin filepath is NULL/empty before suffix checks and command formatting, preventing invalid string operations in unload flow.
2026-02-15 15:41:28 -07:00
47a9729737 Added a new session guard helper for the plugin GUI so addon commands only run when there is a valid active session, and emit a user-facing error otherwise. This prevents handle_command() calls with an invalid/null session context (a likely crash path on Windows in edge UI states).
Updated plugin Unload and Reload callbacks to use the guarded session helper before issuing command-based unload/reload for script plugins, and to exit cleanly when no session is available.
Fixed plugin list layout sizing by forcing the tree view’s scrolled container to expand/fill inside the plugin window’s vbox, so the loaded-plugins list now uses full available height above the button row.
2026-02-15 15:23:39 -07:00
3f31d9bd5a Fixed the plugin/script load callback to avoid using a potentially stale session pointer from the file dialog callback userdata; it now resolves a safe target session at callback time. This prevents crashes when the original session is no longer valid.
Added a defensive check that reports a user-facing error ("No active session available for loading addons.") and exits early when no valid session exists, instead of calling handle_command() with invalid state.
Updated the file request call to pass NULL userdata for load operations, so the callback no longer retains a stale session pointer while the chooser is open.
2026-02-15 15:12:00 -07:00
95538794e3 Fixed the GTK file chooser handling to avoid dereferencing/processing invalid filenames by adding an early guard in gtkutil_check_file() for NULL/empty selections, which prevents the load flow from continuing with bad input.
Fixed the single-file open path in gtkutil_file_req_done() to fetch the filename once and only call gtkutil_check_file() when a non-NULL filename is returned, preventing the crash path when GTK returns no file on accept/load.
2026-02-15 15:02:26 -07:00
173d10f336 revert: back to 874ea99 2026-02-14 17:40:42 -07:00
3e2268b391 chore: normalize line endings 2026-02-14 17:02:11 -07:00
9aceea0134 Fixed the preferences layout packing so the main content region can expand vertically and use the full window height in GTK3 builds by packing the notebook with expand/fill enabled (TRUE, TRUE).
Fixed the top-level preferences window layout so the central horizontal content area expands within the main vertical container, instead of staying at natural height.
2026-02-13 18:45:13 -07:00
45ef2da0ac Added Windows dependency detection to enable/disable the Lua plugin build based on available headers and skip builds when missing.
Updated the Windows build to prefer glib-genmarshal executables with a Python fallback for marshal generation.
Made GTK link dependencies more robust by selecting available ATK library names before assembling GTK libs.
2026-02-06 00:24:24 -07:00
75d54e25e9 Made tray_menu_destroy available in GTK3 builds to avoid implicit declaration errors during tray menu cleanup callbacks. 2026-02-05 15:33:59 -07:00
930e91834f Updated the tray menu callback compilation guard so the GtkStatusIcon popup handler is built for non-AppIndicator backends, fixing the missing symbol during linking. 2026-02-05 15:24:17 -07:00
8ad1394f1a Expanded the GTK3 deprecated-status-icon prototype guard so non-AppIndicator builds can compile without implicit function errors. 2026-02-05 15:12:30 -07:00
deepend-tildeclub
a53ac4479b Modify GTK3 status icon definitions for Windows
Updated conditional compilation for GTK3 on Windows to exclude appindicator backend.
2026-02-05 14:55:37 -07:00
bd707e7514 Yes — it should fall back to the X11/StatusIcon backend, but the GTK3 code path was unconditionally including the appindicator header and selecting the appindicator backend. I updated the tray backend selection to only use appindicator when the library is available and otherwise fall back to GtkStatusIcon, which avoids the missing header error and restores the intended X11 fallback. 2026-02-05 14:17:46 -07:00
f42157fdd7 Made GTK3 AppIndicator dependencies optional and only define AppIndicator macros when the dependency is found.
Added compile-time selection to use AppIndicator when available and fall back to GtkStatusIcon otherwise, keeping the status-icon backend available for non-AppIndicator builds (including GTK3 fallback).
2026-02-05 11:25:07 -07:00
9e9a0be80d Ensure gtkutil.h derives HAVE_GTK3 from GTK_MAJOR_VERSION when missing so GTK3/GTK4 builds select the correct typedefs and declarations in Windows builds that include gtkutil.h directly.
Link libX11 on non-Windows builds regardless of GTK2/GTK3 to satisfy the X11 symbols used in gtkutil.c, fixing the GTK2 linker failure.
2026-02-05 08:14:59 -07:00
0dd25cb631 Set the GTK program name/class to the desktop ID before initialization to ensure window-to-desktop-entry mapping uses the correct identifier.
Updated the desktop file’s StartupWMClass to match the desktop ID for consistent icon matching.
2026-02-05 02:05:48 -07:00
eb46631a7d Added GTK utility helpers for box/grid creation and attachment that map GTK3 layout settings while preserving GTK2 fallbacks.
Updated multiple GTK UI layout paths (setup, server list, notify, ban list, join dialog, and menu) to use the new helpers for GTK3-safe box/grid creation and attachment behavior.
Added GTK3-safe attach option definitions and updated helper signatures to avoid GTK2-only types/macros in public headers.
Updated gtkutil grid-attachment helpers to use the new attach option type in alignment/expansion logic.
Switched banlist grid attachments to the new helper option flags for GTK3 builds.
2026-02-05 01:59:15 -07:00
e187252afd Scoped GTK2 action-area layout to #if !HAVE_GTK3 in the quit dialog while keeping GTK3 action widget usage unchanged.
Switched the join dialog OK button to gtk_dialog_add_action_widget() for GTK3 while preserving GTK2 action-area packing and layout.
2026-02-05 00:04:07 -07:00
0349e44856 Guarded the GTK3/Wayland redraw path in gtk_xtext_render_page with #if HAVE_GTK3 so GTK2 builds render immediately instead of waiting for expose events. 2026-02-05 00:03:35 -07:00
45300a233b Fixed GTK2 build guard in gtkutil_tray_icon_supported by using #if HAVE_GTK3 so GTK2 builds skip the GTK3-only GDK_IS_X11_DISPLAY check. 2026-02-04 21:07:49 -07:00
65f417cf7d Added a GTK3 version fallback in sexy-spell-entry.c so Windows builds use the GTK3 code paths even when HAVE_GTK3 isn’t defined by config headers.
Avoided MSVC unused-variable warnings in setup.c by scoping GTK2-only locals to GTK2 code paths.
2026-02-04 21:03:04 -07:00
deepend-tildeclub
fb952dd209 Add GTK version check in fe-gtk.h
Added a fallback in the GTK frontend header to derive HAVE_GTK3 from GTK_MAJOR_VERSION when the macro is missing, so Windows GTK3 builds don’t compile GTK2-only code paths by mistake.
2026-02-04 15:34:24 -07:00
deepend-tildeclub
572e2173c3 Merge pull request #54 from ZoiteChat/master
sync with master
2026-02-04 14:46:48 -07:00
752b10273b Updated the gtkobject.h include guard to rely on GTK_MAJOR_VERSION, preventing GTK3 Windows build failures when HAVE_GTK3 isn’t defined. 2026-02-04 14:42:34 -07:00
9aba312c8e Resolved the merge conflict in STS capability handling by keeping the clearer warning message for missing values. 2026-02-04 13:13:51 -07:00
983ae5337b Added a diagnostic message when an STS capability token is missing its value, while keeping the ignore behavior intact. 2026-02-04 12:57:07 -07:00
f58785c2e0 Added an explicit diagnostic when an STS capability token lacks a value while keeping the ignore policy unchanged. 2026-02-04 12:42:22 -07:00
3d030a96b7 Updated sts_handle_capability to return FALSE after logging the no‑TLS warning, so the insecure upgrade path doesn’t stop capability negotiation; it still returns TRUE only when an STS upgrade/reconnect is initiated or already in progress.
Confirmed inbound_cap_ls only returns early when sts_upgrade_triggered is set by sts_handle_capability, which now only happens for real upgrade/reconnect initiation or in‑progress upgrades.
2026-02-04 12:42:04 -07:00
2ecf1c18fb Added STS value parsing in CAP ACK handling so sts= capability values are applied immediately before toggling capabilities. 2026-02-04 12:41:32 -07:00
eae5a209d3 Updated STS parsing to ignore preload tokens that include a value while preserving duplicate-preload rejection for valid tokens. 2026-02-04 11:58:13 -07:00
78a00b5b88 Updated STS policy handling to preserve any existing stored port on secure updates rather than overwriting it from the current TLS port, keeping secure-path updates focused on duration/preload. 2026-02-04 11:57:54 -07:00
b9bc65e3c2 Updated STS parsing to only accept preload when it appears without a value, ignoring tokens like preload=0. 2026-02-04 11:39:20 -07:00
3d8d3958ea Updated STS parsing to treat duplicate port, duration, or preload keys as invalid by returning FALSE immediately when repeats are encountered. 2026-02-04 11:35:40 -07:00
b09e6a5405 Updated STS policy handling to require an active connection port when already on TLS, ignoring any advertised port token before storing the profile. 2026-02-04 10:30:13 -07:00
89a8f3eb0a Updated STS handling to require an explicit port in insecure-connection capability upgrades, ignoring incomplete policies without upgrading. 2026-02-04 10:19:26 -07:00
deepend-tildeclub
8606e505d1 Adjust Windows build paths for gvsbuild deps 2026-02-03 12:59:31 -07:00
872c5d6572 Switched tray menu icon defines to use GTK3 icon names when GTK3 is enabled, avoiding deprecated GTK stock IDs on Windows builds.
Added GtkStatusIcon function prototypes for GTK3 Windows builds when deprecated APIs are hidden, preventing implicit declaration errors.
2026-02-03 12:06:04 -07:00
11b11c9166 Guarded AppIndicator includes and GTK3 tray integration so Windows builds skip libappindicator, while Windows uses the status icon tray backend instead.
Enabled Windows tray menu handling paths to match the status icon backend on WIN32, even when GTK3 is enabled.
2026-02-03 11:52:22 -07:00
415066345a Fixed the GTK3 input-style toggle to remove the CSS provider and reset cached theme/color state when the preference is disabled, preventing stale styling from persisting or blocking a clean re-apply later. 2026-02-03 11:15:52 -07:00
ffa7afd09c adjustment for windows builds 2026-02-02 15:53:38 -07:00
7dd47dbd2e Adjust for GTK3 github actions compile testing.
fixed gtk2 compiling.
2026-02-01 15:23:36 -07:00
e5673e9a7b fix compile errors with GTK3 and Wayland. Now compiles/Runs using GTK3+Wayland. 2026-02-01 14:04:56 -07:00
8abc95205a Replaced GTK3 palette font styling with CSS-compliant properties derived from PangoFontDescription, avoiding the deprecated Pango font: syntax in generated CSS.
Added a GTK3-only helper to translate Pango font fields into font-family, font-size, font-style, font-weight, font-variant, and font-stretch CSS declarations while preserving GTK2 behavior under #if !HAVE_GTK3.
Reused the GTK3 font CSS helper in the main UI font styling path to eliminate remaining Pango font: shorthand usage that triggers GTK3 theme parsing warnings.
Exposed the GTK3 font CSS helper in gtkutil so callers can emit CSS-compliant font properties consistently.
2026-01-31 16:37:15 -07:00
d8a8e6ce73 dded GTK3 draw handling while keeping GTK2 expose handling wrapped under #if !HAVE_GTK3 for the spell entry widget.
Updated gtk_entry_find_position to use GTK3-safe layout offsets and cursor position APIs while preserving GTK2-only field access behind #if !HAVE_GTK3.
2026-01-31 16:22:35 -07:00
e44e801e3a Replaced the GTK3 G_DECLARE_DERIVABLE_TYPE usage in sexy-spell-entry.h with explicit typedefs/macros so the SexySpellEntry instance struct (and priv) remains visible in GTK3 builds.
Replaced the GTK3 G_DECLARE_DERIVABLE_TYPE usage with explicit GtkXText typedefs/macros to keep the instance struct visible in GTK3 builds and avoid missing member errors.
2026-01-31 16:00:49 -07:00