Commit Graph

50 Commits

Author SHA1 Message Date
d9be0a7b1c feat: centralize theming in theme-manager (palette/tokens, CSS, dark-mode, setup UI), add tests + win32/meson wiring 2026-03-02 19:42:48 -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
3872c4fcdf Updated the GTK3 Help menu icon constant so _Contents now uses help-contents instead of help-browser, which fixes the oversized icon appearance on Linux and keeps it consistent with other menu icons.
Updated menu_setting_foreach() to safely handle sessions where menu_item[id] is still NULL by storing it in a local pointer and only toggling check state when it exists. This avoids GTK/GLib criticals during layout/menu synchronization paths while preserving normal behavior for initialized menu items.
Fixed the a few dialog box layout so the scrolled keybindings list expands to fill available vertical space in the window. It now packs the scroller into the parent GtkBox with expand/fill enabled (gtk_box_pack_start(..., TRUE, TRUE, 0)) instead of adding it as a generic container child. This allows the window height to be fully utilized.
2026-02-16 18:40:15 -07:00
1fb1865aca Switched palette type selection and color conversion helpers to use the HAVE_GTK3 guard consistently in palette definitions and helpers.
Updated GTK3-specific palette color storage handling in DCC, notify, and user list views to align with HAVE_GTK3 guards.
Standardized setup color application and dialog logic to use HAVE_GTK3 branches for GTK3/GTK2 separation.
2026-01-31 13:38:05 -07:00
d0d6a573a7 Added a GTK3-only icon loader that maps stock names to non-stock icon theme names and uses the icon theme to populate cached DCC pixbufs.
Guarded the GTK2 gtk_widget_render_icon() usage with #if !HAVE_GTK3 while keeping cached pix_up/pix_dn logic intact.
2026-01-30 18:09:31 -07:00
af2678a3a0 Updated the DCC transfer view and notify dialog to use GtkGrid with GTK3 spacing and attachment equivalents while keeping GTK2 table behavior intact.
Switched GTK3 layout helpers and table sections in the server list and setup UI to grid-based attachments and spacing for consistent GTK3 behavior.
2026-01-30 17:13:44 -07:00
3a8a9332d6 Added GTK3 button box creation branches with explicit layout settings across the fe-gtk dialogs while keeping GTK2-only gtk_hbutton_box_new() paths gated under !HAVE_GTK3. 2026-01-30 17:03:27 -07:00
1f7ed3f1cb Added GTK3 expand/alignment setup before attaching widgets in banlist, chanlist, DCC, and main window layouts to mirror legacy table options.
Introduced a servlist table-attach helper and applied it across servlist UI attachments to keep GTK_FILL/GTK_EXPAND confined to GTK2-only paths while setting GTK3 alignment/margins explicitly.
2026-01-30 16:04:50 -07:00
b48376c370 Added per-file ICON_* macros with GTK3 icon-name mappings and GTK2 stock fallbacks across GTK UI modules like banlist, DCC, editlist, ignore, URL grabber, notify, text events, tray menu, chanview tabs, and join dialog UI.
Updated GTK helper usages to reference the new ICON_* (and label) macros so GTK3 builds no longer pass stock IDs to button/icon helpers or dialogs, including banlist buttons, DCC windows, rawlog actions, notify dialog/buttons, pevent dialog buttons, tray menu items, and join dialog image helper usage.
2026-01-30 09:23:52 -07:00
7a37918ec7 Replaced #else with #elif !HAVE_GTK3 anywhere the legacy alignment calls appear, so the GTK2/legacy path is now explicitly scoped to non-GTK3 builds while preserving the existing GTK3 halign/valign behavior across the requested files (maingui.c, chanlist.c, dccgui.c, joind.c, servlistgui.c).
Applied the same explicit !HAVE_GTK3 guard style in setup.c, including the gtk_alignment_* block and the padding/margin section you called out.
2026-01-23 20:34:48 -07:00
31e198f772 Added GTK3 halign/valign handling (and GTK3 label margins) across setup UI elements, including spin widgets, color buttons, sound labels, and page headers while keeping GTK2 fallbacks intact.
Applied GTK3 alignment updates to DCC detail labels in the DCC GUI.
Updated join dialog widgets to use GTK3 alignment calls for the image and labels, retaining legacy alignment for GTK2.
Added GTK3 alignment handling for server list dialogs and labels in the server list UI.
2026-01-23 20:18:49 -07:00
1bb0451d75 Updated GTK3 palette color parsing to use full 16-bit hex strings when converting to RGBA in palette handling and setup color dialogs.
Switched GtkCellRendererText foreground bindings to the palette foreground property macro in user list, notify list, and DCC views.
2026-01-23 00:23:00 -07:00
ea4ef5be90 Updated GTK3 color parsing in the palette/setup helpers to use RGBA-friendly hex strings with gdk_rgba_parse fallbacks while preserving GTK2 behavior.
Switched GtkCellRendererText foreground property selection to foreground-rgba on GTK3 paths (with GTK2 guarded), covering userlist, notify, and DCC views.
2026-01-23 00:13:14 -07:00
131691156a Updated notify tree cell rendering to use the palette foreground property while preserving GTK2/GTK3 color cleanup logic.
Reused the palette foreground property macro for user list and DCC text renderers to match RGBA usage in GTK3 while keeping GTK2 behavior intact.
Aligned GTK2 setup color callbacks with PaletteColor and ensured RGBA parsing initialization in the palette helper.
2026-01-22 23:55:49 -07:00
864bf5e059 Parsed palette color strings with RGBA/GdkColor parsing fallbacks for GTK3/GTK2 palette updates.
Adjusted setup RGBA conversion fallback to explicit channel conversion when parsing fails.
Updated GtkCellRendererText foreground property handling for GTK2/GTK3 in user list, DCC list, and notify list rendering.
2026-01-22 23:45:02 -07:00
dae5eadf1a Updated setup color dialog RGBA derivation to parse hex palette components with gdk_rgba_parse for GTK3 paths.
Standardized GtkCellRendererText foreground color binding to use the palette foreground property macro across user list, DCC, and notify views.
2026-01-22 23:18:59 -07:00
bc11f40a7a Updated notify list cell rendering to apply GTK3 RGBA foreground properties and free boxed colors correctly while keeping GTK2 behavior intact.
Switched user list and DCC tree view text columns to select the GTK3 foreground-rgba property (with GTK2 fallbacks) for cell renderer text colors.
Reused RGBA parsing for palette-backed color chooser defaults and clarified palette change tracking comments.
2026-01-22 23:03:50 -07:00
51fd0fca91 Routed GTK cell renderer foreground bindings through PALETTE_FOREGROUND_PROPERTY for user list, notify, and DCC views to ensure GTK3 uses RGBA while preserving GTK2 behavior.
Tightened GTK3 RGBA parsing by using stack buffers in palette color conversion and guarded parsing in the setup color chooser dialog.
2026-01-22 22:47:11 -07:00
3c0a4e4995 Updated RGB16 palette parsing to use 16-bit RGBA strings with gdk_rgba_parse for GTK3 builds.
Parsed palette colors before initializing the GTK3 color chooser dialog to ensure RGBA normalization.
Switched GTK3 GtkCellRendererText foreground bindings to foreground-rgba with GTK2 fallbacks in user list, notify, and DCC views.
2026-01-22 22:36:49 -07:00
9959cf1f24 Standardized GtkCellRendererText foreground bindings to use the palette foreground property macro across user list, notify list, and DCC views (GTK2/GTK3 aware).
Generated GTK3 caret-color CSS using GdkRGBA string conversion instead of manual RGB math for input styling.
Simplified palette RGB16 parsing by building a GdkRGBA-compatible color string before parsing.
2026-01-22 22:25:26 -07:00
61669f6b98 Added a GTK3 fallback when parsing palette RGB16 values into GdkRGBA colors to keep RGBA initialization robust.
Updated GTK3 list-model color storage and GtkCellRendererText foreground properties to use RGBA values in the user list, notify list, and DCC views while retaining GTK2 behavior.
Copied palette RGBA values before initializing the GTK3 color chooser dialog to ensure RGBA usage on the GTK3 path.
2026-01-22 22:03:31 -07:00
dbb9168426 Parse GTK3 palette RGB16 values into explicit GdkRGBA structs before assignment in the palette helper.
Copy RGBA values from the GTK color chooser into palette entries for the setup dialog path.
Added RGBA-aware list-store color helpers and usage for userlist, notify, and DCC views to keep color handling consistent across GTK versions.
2026-01-20 12:26:01 -07:00
cd52ebd7e8 Centralized the palette foreground property definition for GTK2/GTK3 and applied it to the user list, notify list, and DCC tree renderers to use RGBA where supported.
Removed legacy colormap allocation/free calls in palette handling and setup color selection while preserving the GTK2 path logic.
2026-01-19 22:58:52 -07:00
99e20751a8 Converted palette storage to GdkRGBA with GTK2-guarded helpers, including RGB16 conversion support for shared consumers and dark-mode palette handling.
Updated setup color selection and styling to use RGBA-aware GTK3 overrides/CSS while preserving GTK2 behavior in guarded paths.
Switched tree view color models/renderers and other palette consumers (user list, notify, DCC, menus, spell entry, input style) to RGBA-aware types/properties with shared RGB16 conversion usage.
2026-01-19 22:50:17 -07:00
4683ef705b new name after fork 2026-01-05 23:12:38 -07:00
Patrick Griffis
13b6a40b9c Change preferences sub-dialogs to be modal
This solves the issue where the parent dialog is closed and then
the child dialog is used.

This is however only a partial fix:

- Many other dialogs throughout the codebase do not currently have
  parent windows and need to be refactored.

- Not all window managers respect modal so users can still trigger
  bugs. We can be more defensive against this but it requires more
  refactoring.

Closes #2686
2022-04-16 18:41:34 -05:00
Chase Patterson
18b741804c Use localized "HexChat" in window titles
Also allow rearranging of "HexChat" in window titles
2017-09-15 19:18:29 -04:00
Chase Patterson
d935197895 Change windows from starting with "Hexchat: " to ending with " - Hexchat" 2017-09-15 19:18:29 -04:00
Ben Gamari
9e11280e52 dcc: Introduce dcc_type and dcc_state enums
Closes #1705
2016-06-30 15:51:10 -04:00
TingPing
95febd978c Fix building as c89 2014-12-28 06:47:23 -05:00
TingPing
83032b1aa3 Use glib for all allocations
- Removes need to check for malloc failure
- Removes need for NULL checks on free
- Adds checks for integer overflows
- Removes some extra memset calls
- Removes chance of mixing libc and glib malloc/free
2014-12-28 06:44:44 -05:00
Arnavion
5152040c17 Always use 64-bit filesize and file offsets in DCC.
Based on LRN's commit for replacing stat with GFileInfo https://github.com/hexchat/hexchat/commit/32008bb

Fixes #382
2014-12-06 14:02:45 -08:00
TingPing
9599c29c46 Use filesize format based on OS
Adds gui_filesize_iec option on Unix

Closes #966
2014-05-03 23:57:45 -04:00
TingPing
8a0f2b1d21 Use glib to format filesize in dccgui 2014-04-15 04:05:18 -04:00
Arnavion
fa955a0f1a Don't try to update the clear button state when there's no DCC window. 2013-10-03 17:43:44 -07:00
TingPing
ae04663aa9 First round of using GTK accessor functions
This is the first step to build with GSEAL_ENABLE
setup.c uses a deprecated fontchooser,
chanview-tabs.c didn't like the conversion, and
I am waiting to do some work on xtext.c before
converting it.
2013-09-20 17:24:39 -04:00
Helder Martins
78d14a2b1e Removed restriction that disabled the clear button if at least one transfer item was selected in dcc download manager. 2013-07-23 23:55:20 +01:00
Helder Martins
a8abba84bd Fixed coding style and clearified some comments, following arnavion suggestions 2013-07-17 09:20:54 +01:00
Helder Martins
0c87c49146 Implemented clear functionality for DCC download manager. Created clear button in DCC downloaded manager interface. 2013-07-15 21:34:14 +01:00
Berke Viktor
712eb5428e GtkComboBoxText requires GTK+ 2.24, dump code for older versions 2013-05-11 13:06:25 +02:00
Berke Viktor
9c49254abd Only include top level includes from GTK+, GLib and GDK-PixBuf 2013-04-02 20:39:37 -07:00
RichardHitt
ecdcc99280 ESC key will destroy the windows mentioned at issue 211.
This change implements generic routine gtkutil_destroy_on_esc ()
and adds invocations of it in the requisite window-handling places.
2013-03-17 15:11:23 -07:00
Dan Mashal
b04377825f fix incorrect FSF address 2012-12-23 11:36:54 -08:00
Berke Viktor
1a75c8e1be A lot more rebranding 2012-10-24 21:33:02 +02:00
Berke Viktor
bf27d43052 Variable cleanup for gui_* 2012-10-22 13:49:28 +02:00
Berke Viktor
b563b93414 Variable cleanup for dcc_* 2012-10-22 12:10:55 +02:00
Berke Viktor
05b6e0b330 By default, use <config>/downloads for DCC file transfers when in portable mode 2012-10-13 10:49:29 +02:00
Berke Viktor
bc651b0222 Add extension filter for file dialogs, specify filters and starting folder for loading plugins 2012-07-21 21:42:48 +02:00
Berke Viktor
e57659e63f Some more rebranding 2012-07-12 17:49:26 +02:00
berkeviktor@aol.com
4a6ceffb98 add xchat r1489 2011-02-24 04:14:30 +01:00