Commit Graph

2265 Commits

Author SHA1 Message Date
067670bd01 Removed three redundant inline comments in the server helper code to clean up readability without changing any behavior:
Deleted comment above the serv->network check in server_get_network.
 Deleted comment above the server_session->channel check in server_get_network.
 Deleted comment above the name != serv->servername guard in server_set_name.
2026-02-25 00:46:18 -07:00
610d6fa1c0 Removed stale, commented-out SSL debug code in ssl_cb_info, leaving the function behavior unchanged while cleaning dead comments.
Removed an old commented-out rsa_tmp_bits certificate logging block in the SSL certificate info path.
Removed commented-out “Verify OK” signal lines in the SSL verification switch for cleaner control-flow comments.
2026-02-25 00:43:03 -07:00
5cab7be8a9 Removed redundant inline comments in notify network filtering and server-entry lookup paths to clean up noise without changing behavior.
Simplified notify list preparation in notify_save into a single reverse-copy expression and normalized GLib call spacing for consistency.
2026-02-25 00:34:59 -07:00
4808d83b26 Cleaned up unneeded inline comments in IRC inbound handling by removing redundant // comments around session selection and SCRAM auth status branches, with no logic changes. 2026-02-25 00:32:23 -07:00
c4951a06f3 Cleaned up unneeded commented-out debug lines in maingui.c (old printf/puts and an obsolete commented call), without changing behavior or logic flow.
Committed the cleanup on the current branch with commit message: Remove stale debug comments from maingui.
2026-02-25 00:29:52 -07:00
90a3d6d839 Removed redundant comments in url_save_node() and url_add() so the function bodies are cleaner without changing logic.
Removed an outdated performance note comment before the cached match state variables and a redundant comment in match_nick(); behavior remains unchanged.
2026-02-25 00:23:42 -07:00
618aecd349 Fixed a crash-prone memory management path in Linux URL launching by only freeing the previous environment vector when g_environ_unsetenv() returns a different pointer. This avoids freeing memory that may still be owned/returned as-is by GLib, which matches your segfault symptoms when opening links from the AppImage build.
The fix is in fe_open_url_inner() right where LD_LIBRARY_PATH and LD_PRELOAD are sanitized before spawning xdg-open.
2026-02-24 20:29:48 -07:00
3ed66f9945 Updated Linux URL-opening logic in fe_open_url_inner to sanitize runtime linker env vars (LD_LIBRARY_PATH, LD_PRELOAD) before launching external URL handlers, which is aimed at preventing /bin/sh symbol lookup failures in AppImage-like environments.
Changed the flow to prefer xdg-open first (with sanitized env) and only then fall back to gtk_show_uri, instead of trying GTK first under a potentially broken runtime environment.

    Added explicit final warning when both mechanisms fail, and ensured temporary allocations (including xdg_open_path) are released cleanly.
2026-02-24 20:22:54 -07:00
4284cb76c1 Updated Linux URL opening fallback in fe_open_url_inner to launch xdg-open with a sanitized environment instead of inheriting AppImage runtime linker vars. Specifically, LD_LIBRARY_PATH and LD_PRELOAD are removed before spawning, which prevents host /bin/sh and related tools from loading incompatible bundled libraries (the root cause of the rl_trim_arg_from_keyseq symbol error).
Kept the existing behavior of trying gtk_show_uri first and only using xdg-open as fallback; this change only hardens the fallback path and preserves existing flow/logging.
2026-02-24 20:13:48 -07:00
b7693e75ec Updated Linux URL launching in fe_open_url_inner to capture gtk_show_uri errors instead of discarding them, so failures are no longer silent.
Added an xdg-open fallback path when gtk_show_uri fails, which improves behavior in AppImage/sandbox-like environments where GTK/GIO handler resolution can fail.
Added warning logs for both the primary gtk_show_uri failure and fallback failure to make future debugging much easier.
2026-02-24 19:36:36 -07:00
deepend-tildeclub
672fe041cc Merge pull request #77 from ZoiteChat/manjaro-package
Added a Manjaro/Arch-style PKGBUILD for a VCS package (zoitechat-git)…
2026-02-24 18:02:02 -07:00
deepend-tildeclub
118ac25059 Change network name check from 'Libera.Chat' to 'Zoite' 2026-02-24 14:22:01 -07:00
0935799f7d Updated emoji-token normalization to first apply Unicode composition normalization (G_NORMALIZE_ALL_COMPOSE) before matching, so canonically-equivalent sequences compare reliably in highlight checks.
Expanded ignored codepoints during highlight token comparison to include zero-width joiner (U+200D) in addition to variation selectors (U+FE0E/U+FE0F), which helps emoji entered from different input methods still match configured “extra highlight words.”

This logic is used by the alert/highlight matching path (alert_match_word) that compares configured extra words against extracted message tokens.
2026-02-24 11:18:46 -07:00
b7804fd7eb Fixed the right-click nick info refresh flow in fe_userlist_update() so the submenu can keep updating after the first refresh when WHOIS-derived data is still incomplete. It now tracks a needs_refresh condition and reattaches the submenu show callback when required. This ensures user info can continue to refresh as data arrives instead of stopping after one update. 2026-02-24 08:35:23 -07:00
314dfbbd75 Fixed highlight word parsing so Unicode symbols (including emoji like 🐜) are treated as part of words when scanning incoming text for alert matches, which enables /Extra words to highlight/ entries containing emoji to work.
Improved token scanning to use UTF-8-aware character classification (gunichar, g_unichar_isdigit, g_unichar_isalpha) instead of byte-only checks, avoiding split/mis-detection on multibyte characters.
2026-02-23 16:11:41 -07:00
a79d34bcc0 cleaned up some gtk2 specific comments 2026-02-23 12:42:44 -07:00
eebe11b95b I removed the leftover GTK2 compatibility include path from src/fe-gtk/xtext.h by dropping the GTK_MAJOR_VERSION < 3 / gtkobject.h block, leaving the GTK3 header path (<gtk/gtk.h>) in place. 2026-02-23 12:36:33 -07:00
ab0e84257a Replaced gnome.genmarshal() usage with explicit Meson custom_target() rules that generate both marshal.h and marshal.c from marshalers.list, preserving the same marshaller prefix and generated outputs consumed by the build.
Added a direct find_program() lookup for glib-genmarshal (with glib-genmarshal-2.0 fallback), so configuration no longer depends on the broken glib-2.0 pkg-config tool variable (glib_genmarshal) reported in your error.
2026-02-23 10:50:53 -07:00
1b66b136dc Removed the obsolete GTK3 compatibility compile define from the GTK frontend build flags by deleting -DHAVE_GTK3 in src/fe-gtk/meson.build. 2026-02-22 15:31:51 -07:00
4b188192f8 Removed GTK2 compatibility shims from fe-gtk.h by deleting the local HAVE_GTK3 fallback derivation, deleting GTK2 no-op wrappers for expansion APIs, and making InputStyle GTK3-only.
Simplified the Windows theme block in fe-gtk.c from a GTK3-conditional compile guard to a direct Windows guard (#ifdef G_OS_WIN32), matching the GTK3-only codebase direction.

Simplified native file chooser guards in gtkutil.c from WIN32 && HAVE_GTK3 to #ifdef WIN32, removing remaining GTK3 compatibility-condition clutter in that file.
2026-02-22 15:27:28 -07:00
1c5bf9d6b1 Removed GTK2/GTK3 dual-path preprocessor branches across src/fe-gtk by keeping GTK3-native paths only, including the high-density targets you prioritized (xtext.c, setup.c, maingui.c, gtkutil.c, servlistgui.c).
Removed GTK2 compatibility shims from headers (fe-gtk.h, gtkutil.h), leaving direct GTK3-facing declarations/includes only (and platform-specific guards unrelated to GTK2 kept as-is).

Cleaned GTK2-specific comments/wording now that behavior is GTK3-native (menu accelerator note and emoji/userlist comment blocks).
2026-02-22 15:11:35 -07:00
52f547ae13 Deprecated the gtk3 Meson option and effectively forced GTK3 usage (value: true, deprecated: true), plus updated option/help text so users no longer expect GTK2 frontend builds. Also clarified the AppIndicator option text for non-Windows GTK frontend builds.
Updated src/fe-gtk/meson.build to always resolve gtk_dep from dependency('gtk+-3.0', version: '>= 3.22'), removed the GTK2 fallback branch and -DHAVE_GTK2, and kept AppIndicator detection guarded under host_machine.system() != 'windows' as requested. The GTK X11 helper dep is now unconditionally checked within that same non-Windows block (no gtk3 toggle).

Updated Meson summary output to explicitly report the GTK frontend as GTK+ 3.22+ when enabled, reinforcing that GTK2 builds are no longer expected.
2026-02-22 14:42:20 -07:00
6c699ac07b Added a Flatpak-specific guard in proxy auto-detection to skip g_proxy_resolver_lookup() when running inside Flatpak (/.flatpak-info present), preventing the Connect flow from appearing to freeze in sandbox environments with missing proxy backends. This still preserves normal behavior for explicit manual proxy settings. 2026-02-22 11:55:49 -07:00
deepend-tildeclub
e58d128c73 Implement fallback for tray icon resolution
Add fallback for tray icon if desktop-id fails to resolve.
2026-02-22 14:54:18 +00:00
acb8d2f539 Investigated the XFCE tray issue and confirmed the code path depends on build-time AppIndicator availability: GTK3 uses AppIndicator/StatusNotifier only when Ayatana/AppIndicator headers/libs were present at compile time; otherwise it falls back to GtkStatusIcon behavior. That fallback is less reliable across XFCE setups, which explains why one user could miss the tray icon.
Added a new Meson feature option appindicator (default auto) so this backend is explicitly controllable.

    Updated GTK Meson logic to honor -Dappindicator=... and fail fast if enabled is requested but neither ayatana-appindicator3-0.1 nor appindicator3-0.1 is found (prevents silently shipping a build without AppIndicator tray support).

    Updated AppImage CI configure flags to force -Dappindicator=enabled, which should prevent AppImage artifacts from lacking StatusNotifier/AppIndicator tray support in XFCE-like environments.
2026-02-22 06:58:24 -07:00
a459d0a086 fixed docs url, removed extra help menu. 2026-02-21 19:17:31 -07:00
0796b96908 Added a Win32 existing-instance fallback so --existing with no URL/command now sends a dedicated __WIN32_TASKBAR_TOGGLE__ command to the running ZoiteChat instance, instead of doing nothing. This gives taskbar/shortcut invocations an explicit toggle action.
Updated the Win32 WM_COPYDATA handler to recognize that toggle command and perform minimize/restore behavior:

visible window → iconify

hidden window → show/present
while preserving existing behavior for normal remote commands.
2026-02-18 13:28:17 -07:00
e3f624d2bb Fixed the GTK3 window-state handler so minimizing via taskbar no longer immediately deiconifies the window again. Specifically, I removed the conflicting gtk_window_deiconify(wid) call from the iconify path in mg_windowstate_cb, while preserving the existing tray-hide behavior and window state bookkeeping. This restores expected toggle behavior when clicking the taskbar icon on a maximized window. 2026-02-18 13:11:04 -07:00
7568c73062 Updated the Network List Connect button icon on GTK3 to use the bundled zc-menu-connect asset, which avoids theme-dependent missing network-connect behavior.
Added a Help menu _Update entry with a dedicated zc-menu-update icon constant, so Windows builds can display an appropriate update icon in the Help menu.

    Extended icon mapping/fallback logic so emoji/update icons resolve correctly across stock/icon-name paths (zc-menu-emoji, zc-menu-update) including GTK2 stock fallback compatibility.

    Added zc-menu-emoji to the input entry fallback icon list so the emoji affordance has a deterministic built-in fallback when theme emoji icons are missing.

    Added new update and emoji icon assets in both SVG and PNG for light/dark variants, and registered the PNG resources in the gresource manifest for runtime loading.
2026-02-18 01:30:45 -07:00
6ce7de23a3 Switched menu resource loading to use bundled PNG assets (instead of SVG paths) for zc-menu-* icons, so menu icon resolution is consistent and no longer depends on SVG/icon-theme availability on different platforms (including Win32 builds).
Updated the GResource manifest so all menu icons now come from data/icons/menu/{light,dark} PNG files and are embedded with to-pixdata preprocessing, ensuring the app uses one unified internal icon set across platforms.

    Generated and added PNG assets for both light and dark menu icon variants under data/icons/menu/ to back the new resource paths used by the GTK menu code.

    Fixed menu icon resource detection to fall back from PNG to SVG when probing zc-menu-* entries, so menu item icon lookup no longer fails just because one format is unavailable at runtime.

    Updated GTK menu icon loading to use gdk_pixbuf_new_from_resource (instead of ..._at_scale) and added explicit fallback order across variant/light and PNG/SVG resources, which addresses the “red no-entry square” missing-icon behavior you reported.

    Kept compatibility with your previous menu resource setup while making loading more resilient on Win32 and other environments where resource/pixbuf behavior differs.
2026-02-18 01:16:03 -07:00
dbc517de99 Updated channel list icon button creation to always use gtkutil_image_new_from_stock(..., GTK_ICON_SIZE_MENU) so it follows the same zc-menu-* icon resolution path on all GTK targets instead of mixing direct stock-image calls.
Updated the GTK2 channel list context-menu icon path to use the same helper, removing direct gtk_image_new_from_stock usage for menu icons.

    Updated the GTK2 spell-entry popup icon path to use gtkutil_image_new_from_stock, aligning it with the same menu icon set/mapping pipeline used elsewhere (data/icons/menu).
2026-02-18 00:57:58 -07:00
e214c76bdf Unified GTK3 menu icon resolution so menu-sized icons now consistently map to the bundled zc-menu-* icon set (from data/icons/menu) even when callers pass freedesktop icon names (like edit-copy, go-next) instead of legacy stock IDs. This removes the mixed behavior where some items came from system themes while others came from bundled resources.
Added a new icon-name→zc-menu-* mapping helper and wired it into gtkutil_image_new_from_stock() as a fallback path for GTK_ICON_SIZE_MENU, after the existing stock-name mapping.
2026-02-18 00:52:49 -07:00
3ccd8c44b3 Added a centralized menu icon resolver in menu.c so menu items consistently prefer the bundled zc-menu-* resource icons (from data/icons/menu) instead of relying on platform/theme fallback behavior. This includes:
checking whether a matching zc-menu-* resource exists,

        preserving support for absolute file paths and <config>/... relative icon paths,

        mapping plain icon names (for example, copy) to zc-menu-copy when available.

    Updated menu_quick_item() to use the new resolver (menu_icon_widget_new) for all icon-bearing quick/popup menu entries, making icon rendering behavior consistent across platforms.
2026-02-18 00:47:10 -07:00
5df6f68cd9 Unified menu icon loading so zc-menu-* icons can be loaded directly from the bundled data/icons/menu/light/*.svg resource set via a new helper (gtkutil_menu_icon_pixbuf_new), instead of depending only on platform stock themes. This makes menu icon resolution consistent across platforms for the custom menu icon namespace.
Updated the GTK2 (!HAVE_GTK3) code path in gtkutil_image_new_from_stock to first try the bundled zc-menu-* SVG resource icons and only fall back to GTK stock icons if a bundled icon cannot be loaded.
2026-02-18 00:41:55 -07:00
45d4025ad7 Updated the built-in popup menu defaults to stop using mixed legacy GTK stock icon names and instead use the app’s unified zc-menu-* icon IDs (backed by data/icons/menu resources). Specifically changed: Open Dialog Window, Send a File, User Info (WhoIs), Add to Friends List, and Ignore. 2026-02-18 00:38:18 -07:00
f6b78bd167 Standardized GTK menu-icon fallback mapping so stock names for Save As, Previous, and Next now resolve through the bundled zc-menu-* icon family (and map back correctly on GTK2), ensuring these menu actions use the same icon set path as the rest of your menu icons.
Updated search controls in the main UI to use zc-menu-previous / zc-menu-next and to load through gtkutil_image_new_from_stock(...), so those menu-sized icons are rendered from the same data/icons/menu resources instead of theme-dependent icon names.

    Updated URL Grabber and Raw Log “Save As” icon constants to use zc-menu-save-as for consistency with the menu icon set.

    Added new menu SVGs (save-as, previous, next) in both light and dark variants, and registered all of them in the GResource manifest so they’re available cross-platform from the bundled resource system.
2026-02-18 00:32:42 -07:00
17f239e6fc Unified tray menu icon definitions to always use the zc-menu-* identifiers (instead of conditional stock GTK icons), so Preferences/Quit resolve through the same menu icon set on all builds.
Unified plugin manager action icons to use zc-menu-load-plugin, zc-menu-delete, and zc-menu-refresh across platforms.

Unified channel list action icons to only use the zc-menu-* icon names (join/copy/find/refresh/save), matching data/icons/menu usage.

Unified spell-entry menu action icons to only use zc-menu-add, zc-menu-remove, and zc-menu-spell-check.
2026-02-18 00:24:43 -07:00
fcf00ebd8f Updated menu-item icon resolution in menu_quick_item() to always go through gtkutil_image_new_from_stock(..., GTK_ICON_SIZE_MENU) when not loading from a file path, so icon-bearing menu items consistently use the same icon pipeline.
Standardized the main menu icon identifiers to the zc-menu-* set (the icon set backed by data/icons/menu) across builds, instead of splitting between custom IDs and GTK stock IDs.

    Updated create_icon_menu() to use the same stock-to-image helper for stock-backed menu entries, so all menu icons follow the same resolution logic.

    Added a non-GTK3 compatibility mapper that converts zc-menu-* icon IDs to GTK stock names before calling gtk_image_new_from_stock, keeping behavior consistent on older GTK platforms while still using the unified zc-menu-* identifiers in menu definitions.
2026-02-18 00:16:04 -07:00
e347fdc899 Unified GTK3 menu-item icon loading to use the same helper path everywhere (gtkutil_image_new_from_stock(..., GTK_ICON_SIZE_MENU)), so stock/menu icon names consistently resolve through the shared custom menu icon logic (which uses data/icons/menu first, then fallback). This was applied in menu_quick_item.
Unified main menubar icon creation to the same helper in create_icon_menu, removing the separate/duplicated icon-mapping and platform-specific loading logic from menu.c.
2026-02-18 00:09:56 -07:00
b419804ddb Updated GTK3 icon resolution so gtkutil_image_new_from_stock() now preserves zc-menu-* icon IDs (when no stock-to-theme mapping exists), allowing those items to load directly from the data/icons/menu resource set instead of falling back inconsistently to theme icon names.
Updated channel list popup menu icon creation to pass the original icon ID directly into the shared loader, so those menu items use the same icon pipeline and set as other menus (data/icons/menu).
2026-02-18 00:05:44 -07:00
bdfabcf800 Standardized GTK3 menu icon resolution so stock-style menu icons are first mapped to the bundled zc-menu-* names (which are backed by data/icons/menu/...), but only for menu-sized icon requests. This keeps non-menu button icons unaffected while making menu icons consistent.
Updated menu construction paths to resolve both zc-menu-* and legacy gtk-* stock names through one custom mapping before loading icons from the bundled menu icon assets, with fallback to light theme assets and then theme icon names. This affects both quick/user menus and standard icon menu items.
2026-02-18 00:00:59 -07:00
ebf695abdf Standardized GTK3 menu-related icon constants to the bundled zc-menu-* namespace so menu actions stop depending on mixed system-theme icon names (edit-copy, view-refresh, etc.) and instead use the same internal set. This was updated in channel list, plugin manager, URL grabber, and spell-entry menu definitions.
Updated GTK3 icon rendering paths in affected UI helpers to call gtkutil_image_new_from_stock(...), which is the path that resolves zc-menu-* resources correctly and consistently from data/icons/menu (instead of raw theme lookup).

Added new icons to the shared bundled menu icon set (light/dark) for copy, delete, add, remove, spell-check, and refresh, and registered them in the GResource manifest so they are always available at runtime.
2026-02-17 23:56:49 -07:00
bc2b1bd509 Standardized GTK3 menu-related icon constants to use the bundled zc-menu-* icon set (from data/icons/menu) in the places that had direct equivalents, including raw log, URL grabber, channel list actions, tray menu, and plugin load action.
Updated menu_quick_item() so zc-menu-* icons now fall back to the light variant if the current theme variant is unavailable, which helps avoid missing icons.

    Added centralized zc-menu-* resource loading to gtkutil_image_new_from_stock() (theme-variant detection + light fallback), so menu/button icon rendering uses the same bundled source path consistently.
2026-02-17 23:49:59 -07:00
8642d8bde4 Updated the Network List menu entry to use the same menu icon mechanism as the other iconized menu items by switching it from M_MENUPIX (pix_book) to M_MENUSTOCK with a zc-menu-* icon name (zc-menu-network-list).
Added the new network-list SVG icon in both light and dark variants under data/icons/menu, so it comes from the same icon set as the rest of the menu icons.

    Registered both new icon files in the compiled GResource manifest so they are available through the existing resource-loading path.
2026-02-17 23:44:22 -07:00
01e890eb3f Updated GTK3 menu item rendering so any zc-menu-* icon passed into menu_quick_item() is treated as a bundled ZoiteChat menu icon and loaded via menu_icon_image_from_data_icons(...) using the active light/dark variant, which makes dynamic/custom menu entries use the same icon source as the main menu icons.
Added GTK3 forward declarations for menu_icon_theme_variant() and menu_icon_image_from_data_icons() so menu_quick_item() can call those helpers before their later definitions in the file.

    Kept fallback behavior intact: if bundled icon loading fails, the code still falls back to icon-theme lookup by name.
2026-02-17 23:35:32 -07:00
7af8f069e7 Reworked the GTK3 menu icon pipeline so zc-menu-* entries now load from the bundled data/icons/menu assets only, with shared theme-variant detection (light/dark).
Split menu icon loading by platform:

        Windows: loads from installed share/icons/menu/<variant>/<icon>.svg.

        Non-Windows: loads from embedded GResource /icons/menu/<variant>/<icon>.svg.

    Removed the old per-icon fallback mapping for zc-menu-* (system icon substitutions), so menu icons stay consistent with the exact bundled icon set; non-zc-menu-* stock behavior remains unchanged.
2026-02-17 23:26:26 -07:00
b5db1685da Removed the unresolved version-control conflict markers from create_icon_menu and kept the custom_alt_fallback_icon declaration intact so the later fallback icon assignments remain valid for compilation. 2026-02-17 23:15:51 -07:00
335a8f4d6b Added stronger icon fallback handling for zc-menu-* menu items (including Server dropdown icons and Preferences) by introducing alternate fallback icon names and choosing an alternate only when the primary fallback icon is unavailable in the active icon theme. This specifically improves connect, disconnect, join, and preferences cases on Windows theme variations.
Kept the custom resource/file loading path in place (resource SVG + installed file fallback), then layered the improved theme fallback selection after it so menu icons still resolve if resource decoding is unavailable.

Added emoji entry fallback logic: if GTK’s built-in show-emoji-icon leaves the secondary icon empty, the input box now picks the first available icon from a fallback list (face-smile-symbolic, face-smile, insert-emoticon-symbolic, insert-emoticon)
2026-02-17 23:12:34 -07:00
e316413f60 Added stronger icon fallback handling for zc-menu-* menu items (including Server dropdown icons and Preferences) by introducing alternate fallback icon names and choosing an alternate only when the primary fallback icon is unavailable in the active icon theme. This specifically improves connect, disconnect, join, and preferences cases on Windows theme variations.
Kept the custom resource/file loading path in place (resource SVG + installed file fallback), then layered the improved theme fallback selection after it so menu icons still resolve if resource decoding is unavailable.

    Added emoji entry fallback logic: if GTK’s built-in show-emoji-icon leaves the secondary icon empty, the input box now picks the first available icon from a fallback list (face-smile-symbolic, face-smile, insert-emoticon-symbolic, insert-emoticon).
2026-02-17 23:07:17 -07:00
e8ca0a1213 attempting to fix menu icon loading issues on the windows build. 2026-02-17 22:50:34 -07:00