Commit Graph

2277 Commits

Author SHA1 Message Date
1bf0140652 Cleaned up redundant inline comments in the SCRAM implementation so the file is less noisy while preserving behavior exactly as-is (no logic changes). 2026-02-25 01:54:34 -07:00
bb72f8afab Removed redundant inline comments from the common header includes/platform guards in src/common/zoitechat.h (e.g., comments like “need time_t”, “for win32”, “for unix”), while preserving meaningful explanatory comments. 2026-02-25 01:50:00 -07:00
bb11c4676b Cleaned up src/fe-gtk/meson.build by removing an outdated commented-out WinRT build block in the Windows section, leaving only active build logic.
Removed an inline TODO comment from the gnome.compile_resources call to keep the Meson configuration concise and focused on current settings.
2026-02-25 01:47:32 -07:00
32fe3e54f1 Removed redundant section-divider comments in the Windows spellcheck provider to reduce clutter without changing behavior.
Removed non-essential inline comments that restated obvious return values and assignment intent (return -1/1/0, add_to_exclude alias), keeping logic identical.
2026-02-25 01:45:20 -07:00
9d2187ca4d Cleaned up unneeded inline comments in src/fe-text/fe-text.c where control-character switch cases were already self-explanatory, while keeping behavior unchanged.
Removed a redundant comment from the done global flag declaration for a cleaner declaration section.
2026-02-25 01:43:01 -07:00
ef2befa698 Cleaned up redundant comments in src/fe-gtk/fkeys.c by removing section-divider noise and a stale XXX line near key-action helpers, while keeping useful function-level documentation.
Removed repetitive inline comments from return 2; statements in tab-move/history key actions, since behavior is already clear from the surrounding code.
Removed an unnecessary separator comment before replace_handle() for a cleaner transition between functions.
2026-02-25 01:35:30 -07:00
5f9ce549f8 Removed redundant inline comments in the timer plugin that did not add useful context (plugin handle declaration and return value comment), keeping behavior unchanged.
Removed an obsolete visual alignment guide comment above the timer list header print call to clean up the function body.
2026-02-25 01:32:27 -07:00
cb435f0d15 Cleaned up unneeded comments in default config initialization by removing:
a stale commented-out assignment line,

    an outdated inline TODO/FIXME note on hex_irc_who_join,

    and an inline /*FIXME*/ marker on hex_flood_msg_time.
2026-02-25 01:29:05 -07:00
51bf0c3fe0 Removed redundant explanatory comments in chanopt_command so the control flow reads cleanly without inline narration, while keeping behavior unchanged.
Simplified the chanopt_in_memory struct and helper routines by removing comments that repeated obvious intent (allocation/default initialization/loading notes), with no logic changes.
2026-02-25 01:02:37 -07:00
e6311a5fe7 Removed two stale, commented-out lines in ignore_showlist() (an unused EMIT_SIGNAL call and its note), cleaning up unneeded comments without changing runtime behavior. 2026-02-25 00:59:53 -07:00
6c9aeac36f Cleaned up unneeded inline comments in swtype by removing index/reserved annotations that didn’t add value, while keeping the data unchanged.
Removed a stale commented-out ST_HEADER line from tabs_settings so the settings table only contains active entries.
Removed a dead commented-out call from setup_apply_trans to reduce noise in the function body.
Removed redundant trailing declaration comments from proxy_user and proxy_pass since the types are already explicit.
2026-02-25 00:55:37 -07:00
48f7693eac Removed redundant comments in the notification plugin implementation to clean up the code without changing behavior (including comments around color stripping, alert gating logic, and special-event hook registration). 2026-02-25 00:53:10 -07:00
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