Commit Graph

4501 Commits

Author SHA1 Message Date
d321717da8 Hardened create_input_style() so selection-color CSS no longer hard-depends on @theme_selected_*: it now first tries symbolic theme colors via gtk_style_context_lookup_color(), and only falls back when unavailable.
Added a fallback path that derives selection colors from palette values (COL_MARK_FG/COL_MARK_BG) and then samples selected-state colors from a GTK style context when possible, emitting explicit color strings for CSS.
Ensured fallback regeneration is tied to the same reload flow by extending needs_reload tracking with selection palette channels and persisting those last-seen values.
Kept Preferences > Colors foreground/background behavior intact for normal input rendering; only selection-specific CSS is conditionally overridden. Base text/background/caret rules remain unchanged while only text selection uses the new selection logic.
2026-02-25 20:59:07 -07:00
6310ab245c Updated fe_apply_theme_for_mode() to immediately reapply fe_apply_theme_to_toplevel() across all currently-open GTK toplevel windows (gtk_window_list_toplevels()), so mode switches update existing windows without reopening them.
Added/kept lifecycle call sites for main and detached/channel windows, with comments explaining that .zoitechat-dark / .zoitechat-light classes are required for GTK CSS selectors. This includes top/tab windows and server list/edit windows.
Wired dialog/toplevel creation paths in src/fe-gtk/ to call fe_apply_theme_to_toplevel() (without duplicating platform logic), including common prompt/message dialogs and feature-specific dialogs (join, notify, setup, ignore/ban, etc.), each with the requested brief comment near the new call site.
2026-02-25 20:39:48 -07:00
5952006662 Refactored fe_system_prefers_dark() to always allow gtk-application-prefer-dark-theme to be read as a fallback (when no explicit theme name is set), removing the previous suppression tied to app-written state. This preserves priority for explicit dark theme names and platform-native preference checks before the GTK property fallback.
Added a short in-code comment explaining why app-written GTK property state must not permanently block future reads in AUTO mode.
Removed the now-unneeded app_set_prefer_dark tracking behavior from fe_set_gtk_prefer_dark_theme(), so writes no longer disable later fallback reads.
Confirmed fe_auto_dark_mode_changed() still prevents reapply loops by early-returning when enabled == auto_dark_mode_enabled before calling theme/apply logic.
2026-02-25 20:32:44 -07:00
e4cb453915 Added a centralized theme-class application in gtkutil_window_new() so any toplevel created through this helper gets fe_apply_theme_to_toplevel() during construction. This covers most non-session windows consistently at creation time.
Updated Preferences window creation to explicitly apply the toplevel theme after gtk_widget_show_all() in setup_window_open(), matching your requested timing there.
Added explicit theme application for non-session windows that bypass gtkutil_window_new() and use direct gtk_window_new() in server list UI (editserv and servlist).
Extended mg_apply_setup() to iterate all current GTK toplevels (gtk_window_list_toplevels()) and reapply fe_apply_theme_to_toplevel() during setup/theme reapply flows, ensuring existing windows stay consistent after theme changes. Palette override widgets were not touched.
2026-02-25 20:27:15 -07:00
361e35de7f Updated chanview_apply_theme() in src/fe-gtk/chanview.c to apply the palette colors unconditionally (for tree view chanview), instead of branching on raw dark-mode enum checks. This keys behavior off the already-resolved palette output, which matches how setup_apply_to_sess() / palette_apply_dark_mode() flows are intended to work.
Preserved font handling exactly as before (input_style->font_desc when available).
Added inline rationale comment clarifying that AUTO/light should continue using palette-managed colors and should not revert to GTK theme defaults in a way that clears custom colors.
2026-02-25 20:23:01 -07:00
bbde2e5578 Added a new internal state flag, app_set_prefer_dark, and now set it whenever fe_set_gtk_prefer_dark_theme() writes gtk-application-prefer-dark-theme, so AUTO detection can distinguish app-authored writes from system/user signals.
Reworked fe_system_prefers_dark() to prioritize non-app-written sources in AUTO flow:

        first: gtk-theme-name dark-variant heuristic,

        then (Windows): native platform detection via fe_win32_try_get_system_dark,

        only then fallback to gtk-application-prefer-dark-theme when no theme-name signal was available and the app has not written that property.

    Kept manual LIGHT/DARK behavior unchanged by preserving the existing mode application path (fe_apply_theme_for_mode() still drives fe_set_gtk_prefer_dark_theme() directly).

    Verified fe_auto_dark_mode_changed() and fe_init() signal wiring still trigger AUTO palette/theme refreshes on system theme changes (notify::gtk-theme-name and existing notify callback flow remain in place).
2026-02-25 20:03:20 -07:00
97c6f36b20 Adjusted create_input_style so it no longer globally forces color on #zoitechat-inputbox, reducing over-constraining while still applying the user-selected background and caret color where intended. This keeps non-text-node state rendering more theme-driven.
Kept user override support for baseline text color and caret color on the input’s text node (#zoitechat-inputbox text).
Added targeted state-aware text rules for :focus and :backdrop (to preserve readability when theme state styling changes), plus a softened :disabled text rule instead of broad global color forcing.
Added explicit selection-node handling (#zoitechat-inputbox text selection) using theme selection tokens so selected text remains readable and aligned with Adwaita/Yaru-style theme behavior.
Preserved the existing Adwaita/Yaru background-image workaround logic, so fallback behavior remains compatible with those themes.
2026-02-25 19:43:19 -07:00
deepend-tildeclub
2bf32fc770 Merge pull request #90 from ZoiteChat/code-cleanup
Code cleanup
2026-02-25 18:16:54 -07:00
3e095c3c33 Removed two redundant inline comments in the file dialog response/done handlers, leaving the behavior unchanged and the control flow cleaner.
Removed an old commented-out helper function block (gtkutil_treeview_get_selected_iter) that was dead/commented code.
2026-02-25 18:07:26 -07:00
3445d946bc Removed a redundant inline comment in icon loading/scaling logic, leaving behavior unchanged.
Removed a redundant inline comment in the Windows sysinfo volume-name guard path, with no functional impact.
Removed a redundant inline comment in WinRT toast setup while keeping the same notification/audio attribute behavior.
2026-02-25 18:05:21 -07:00
7578928199 Cleaned up redundant/outdated inline comments in the text frontend argument/config and GUI control paths while leaving behavior unchanged (comment-only cleanup). 2026-02-25 16:22:46 -07:00
deepend-tildeclub
428127ef40 Merge pull request #91 from ZoiteChat/fix-application-focus
Added a Windows-only helper (mg_win32_allow_autohide_taskbar) that ge…
2026-02-25 16:20:47 -07:00
e3f932aa6b Updated the Win32 window-state handling to include shellapi.h and query taskbar auto-hide/taskbar edge state via SHAppBarMessage, so maximized windows can leave a 1px reveal edge for the auto-hidden taskbar.
Added monitor-aware work-area adjustment when maximized (MonitorFromWindow + GetMonitorInfo) and shrink by 1px on the detected taskbar edge (including bottom edge), then apply that rectangle with SetWindowPos. This addresses the “mouse at bottom edge should unhide taskbar” behavior.
Kept the existing HWND_NOTOPMOST safeguard in place after the adjustment, preserving prior not-topmost behavior.
2026-02-25 14:48:18 -07:00
7cfa3b3513 Added a Windows-only helper (mg_win32_allow_autohide_taskbar) that gets the native HWND and calls SetWindowPos(..., HWND_NOTOPMOST, ...) for non-fullscreen window-state transitions, so a maximized ZoiteChat window no longer blocks the taskbar auto-hide reveal edge.
Hooked that helper into mg_windowstate_cb so it runs whenever the main window state changes (while preserving existing maximize/fullscreen preference handling).
2026-02-25 14:18:23 -07:00
81c691491c Removed three redundant inline comments in joind_ok_cb that duplicated obvious control flow, leaving behavior unchanged and improving readability. 2026-02-25 13:55:44 -07:00
c361602b1a Removed four unneeded section comments in src/common/notify.h (WATCH/MONITOR/general/old ISON labels), leaving only the function declarations for a cleaner header interface. 2026-02-25 13:51:22 -07:00
99b969067e Removed one stale, commented-out debug/error line in the PCI device-name lookup path (pci_find_fullname), leaving behavior unchanged and making the function cleaner. 2026-02-25 13:29:20 -07:00
6e8b750c68 Removed an obsolete commented-out hdiutil line from the macOS bundling script, leaving only the active packaging path (zip) to keep the script cleaner and easier to scan. 2026-02-25 13:04:05 -07:00
df37b44cc8 Cleaned up unneeded comment noise in the Solus eopkg workflow by replacing an 11-line explanatory block with a concise 2-line comment while preserving the key rationale for --ignore-file-conflicts and required Meson tooling install. 2026-02-25 13:01:21 -07:00
9548be0cec Removed redundant inline comments in the Winamp plugin by simplifying the plugin handle declaration and cleanup comments around initialization/return values, while keeping functional comments intact.
Removed the redundant return 1 inline comment in the Exec plugin init function.
2026-02-25 12:57:42 -07:00
deepend-tildeclub
588e27b456 Remove Debian Build badge from README
Removed Debian Build badge from README.
2026-02-25 10:32:21 -07:00
deepend-tildeclub
7032d0c6b7 Update contact email in appdata XML file 2026-02-25 10:23:59 -07:00
deepend-tildeclub
72e9a99315 Update developer information and homepage URL 2026-02-25 10:17:14 -07:00
3cff6742f5 Removed unneeded inline comments around the Win32 error-formatting fallback in errorstring() and simplified matching block-closing lines, without changing behavior. 2026-02-25 02:37:08 -07:00
6a02f578b6 Removed obsolete commented-out lines from fe_cleanup() so the function no longer contains dead commented code.
Removed an unnecessary explanatory comment above the unconditional early return in log_handler(), leaving only the active behavior.

Removed an unneeded section marker comment before fe_idle() to keep surrounding code cleaner.
2026-02-25 02:34:50 -07:00
e62769b361 Cleaned up unneeded comments in DCC receive/connect code by removing:
a stale commented-out ACK block in the DCC receive error path,

    an unnecessary speculative note before the quoted filename handling,

    and an editorial inline comment on a static variable declaration.
2026-02-25 02:30:46 -07:00
9df9776238 Removed a stale multi-line # TODO note block from the common Meson build file to clean up unneeded comments without changing build logic.
Removed an old commented-out /* FIXME ... */ prototype block from servlist.h, leaving only active declarations.
2026-02-25 02:28:10 -07:00
4beabb6bf5 Removed a stale commented-out debug function block from the fishlim plugin source to reduce dead/commented code.
Removed the corresponding commented-out RAW LINE hook entry so only active handlers remain in plugin initialization.
2026-02-25 02:24:11 -07:00
10d5bb91ab Cleaned up unneeded, commented-out debug logging lines in Perl plugin callback handlers (server_cb, command_cb, and print_cb) without changing runtime behavior. 2026-02-25 02:14:38 -07:00
7c9c615aed Removed redundant inline comments from the fishlim IRC parsing helpers where the comments only repeated obvious code behavior, while preserving all function docblocks and logic. 2026-02-25 02:12:10 -07:00
fd48c97209 Removed four redundant inline comments in src/fe-gtk/urlgrab.c to clean up readability without changing behavior (treeview enum declaration area, right-click selection block, headers visibility call, and URL list overflow trimming block). 2026-02-25 02:09:35 -07:00
e58bf2be22 Cleaned up redundant comments in dcc_listen_init by removing obvious/explanatory noise and an obsolete commented-out debug printf, while leaving logic unchanged. 2026-02-25 02:07:38 -07:00
dc6453e230 Removed redundant inline comments in lastact_update and lastact_getfirst where the code was already self-explanatory, without changing behavior.
Simplified away_check by removing comment clutter and keeping only the logic flow, including the WHO batching behavior.
Removed unneeded commentary around lag-check helpers and timer reinitialization to keep the core timer code cleaner and easier to scan.
2026-02-25 02:04:31 -07:00
b3a0288fd9 Cleaned up stale inline comments in the tab scrolling handlers by removing outdated explanatory text while keeping behavior unchanged (tab_left_is_moving / tab_right_is_moving reset paths).
Removed an old commented-out gtk_container_set_border_width(...) line that was dead/commented code in cv_tabs_init.
Simplified the tab-switch condition by removing a legacy commented expression from if (is_switching).
2026-02-25 02:01:11 -07:00
9c86f18982 Cleaned up unneeded inline comments in plugins/python/python.py while keeping runtime behavior unchanged (comment-only cleanup around version declaration, compile helpers, wordlist/timer handling, and autoload path handling). 2026-02-25 01:58:19 -07:00
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
0e94432c24 Removed four redundant comments in plugins/sysinfo/sysinfo.c while keeping behavior unchanged (the command parsing, channel checks, and menu add/remove calls are intact). 2026-02-25 01:40:34 -07:00
c4890d157a Cleaned up redundant inline comments in the exec plugin’s command execution path (pipe creation, buffer termination, per-line announce handling, sleep loop, and trailing newline output) without changing behavior. 2026-02-25 01:38:06 -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
105e259f2c Removed redundant inline /* plugin handle */ comments from the ph declarations in three plugin source files, keeping behavior unchanged and making the declarations cleaner. 2026-02-25 01:06:13 -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
2c90c14d72 Removed an unneeded comment above the $(CONFIG_STAMP) target in Makefile, leaving behavior unchanged and just cleaning up the file. 2026-02-25 00:57:30 -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