Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
104 commits
Select commit Hold shift + click to select a range
4241a21
gtk4: port build system, compat layer, and GTK2/3 API calls to GTK4
jmallach May 11, 2026
8ea24cf
gtk4: replace GtkCList server/player lists with GtkColumnView
jmallach May 11, 2026
9d19c4d
Replace srvinf GtkCTree with GtkTreeView + GtkTreeStore
jmallach May 11, 2026
5c8c76a
Replace source GtkCTree with GtkTreeView + GtkTreeStore
jmallach May 11, 2026
e0fb1d4
Replace remaining gtk_clist_* compat stubs against server/player views
jmallach May 11, 2026
199e0d4
Replace dialog-internal GtkCList widgets with GtkTreeView + GtkListStore
jmallach May 11, 2026
938257e
Replace gtk_vbox_new/gtk_hbox_new with gtk_box_new (GTK4 migration)
jmallach May 11, 2026
d535f2c
Replace GtkTable with GtkGrid (GTK4 migration)
jmallach May 11, 2026
fd5b492
Remove GtkWindow.type_hint from UI file (GTK4 migration)
jmallach May 11, 2026
9180b92
Remove dead about-dialog and pref-window objects from UI file (GTK4)
jmallach May 11, 2026
fc63e9f
Phase 1 status update: mark tasks 1, 5, 6, 8 as complete
May 11, 2026
a10c606
GTK4: replace menu item sensitivity with GAction enable/disable
jmallach May 11, 2026
843795d
GTK4: server info panel with GtkTreeView+GtkTreeStore; UI widget cleanup
jmallach May 11, 2026
2476c4f
GTK4: rewrite main window UI file; delete obsolete xqf-gtk2/3.ui
jmallach May 11, 2026
7cce16b
GTK4: GSimpleActionGroup for window actions, explicit app GMainLoop
jmallach May 11, 2026
2b14c66
GTK4: replace gtk_main modal loops with dialog_run_modal + explicit G…
jmallach May 11, 2026
9f55b85
docs: update GTK4 migration plan — Phase 1 complete
jmallach May 11, 2026
9b8c7a9
GTK4: add interaction layer for GtkColumnView (Phase 1 tasks 1a-1d)
jmallach May 11, 2026
c550134
GTK4: fix dialog CRITICALs and source tree startup
jmallach May 11, 2026
c2726a3
docs: add build/run instructions and commit discipline note
jmallach May 17, 2026
86e5636
GTK4: fix GtkCellRendererPixbuf CRITICALs — use GdkTexture not GdkPixbuf
jmallach May 17, 2026
3bf1c66
GTK4: fix double-unref of GtkListItemFactory in column view setup
jmallach May 17, 2026
b19e65a
docs: update migration plan — startup CRITICALs resolved
jmallach May 17, 2026
e7d7cd0
build+docs: require gtk4 >= 4.0; document deprecated APIs still in use
jmallach May 17, 2026
ec79b73
GTK4: replace GtkToggleButton/GtkRadioButton with GtkCheckButton API
jmallach May 17, 2026
cf27ce5
GTK4: fix signal 'clicked' invalid for GtkCheckButton
jmallach May 17, 2026
1f8d313
filter: don't bump current_server_filter when no filters exist
jmallach May 17, 2026
0f686dc
GTK4: fix prefs dialog CRITICALs (size_request, focus_out_event, event)
jmallach May 17, 2026
fc8397b
GTK4: guard tree selection callbacks against widget teardown
jmallach May 17, 2026
9670094
GTK4: fix remaining GtkTreeSelection teardown CRITICALs
jmallach May 17, 2026
8d1ead7
game: fix NULL dereference in q3_exec and get_custom_arguments
jmallach May 17, 2026
bb79591
i18n: mark missing strings for translation and update .pot/.po
jmallach May 17, 2026
0eebafd
ca: translate "unreachable", "down", and empty command line
jmallach May 17, 2026
5425c70
GTK4: fix GtkTextBuffer/GtkEditable cast and remove GtkVScrollbar
jmallach May 17, 2026
7aef995
GTK4: fix player filter pattern add and comment editability
jmallach May 17, 2026
a7a3d6c
GTK4: replace comment GtkFrame with plain label + scrolled window
jmallach May 17, 2026
817bd02
GTK4: add visible border to comment text view
jmallach May 17, 2026
5dfe02d
GTK4: sync pattern list on every keystroke in pattern/comment fields
jmallach May 17, 2026
e6248cd
source: auto-populate masters when none are loaded from config
jmallach May 17, 2026
524e66b
docs: mark source pane startup bug as resolved
jmallach May 17, 2026
f5b4eea
GTK4: replace deprecated container API in small dialog files
jmallach May 17, 2026
855af66
GTK4: move margin helper to xqf-utils.h with xqf_ prefix
jmallach May 17, 2026
28d2339
GTK4: replace deprecated container API in scripts.c and srv-prop.c
jmallach May 17, 2026
b390b4a
GTK4: replace deprecated container API in flt-player, filter, statistics
jmallach May 17, 2026
15a5eac
GTK4: replace deprecated container API in pref.c
jmallach May 17, 2026
da03611
GTK4: replace deprecated container API in addmaster, psearch, xqf
jmallach May 17, 2026
9532db1
Remove GTK1 dead-code blocks from scripts.c and pref.c
jmallach May 17, 2026
55665f9
GTK4: replace gtk_alignment_new with halign/valign properties
jmallach May 17, 2026
8135d7c
GTK4: replace gtk_widget_show with gtk_widget_set_visible across all …
jmallach May 17, 2026
65d3efe
GTK4: force full repaint on main window resize
jmallach May 17, 2026
f66b24f
GTK4: fix blank area on resize via GdkSurface notify::width/height
jmallach May 17, 2026
820254f
GTK4: revert unnecessary resize workaround; expand Name column to fil…
jmallach May 17, 2026
e0aa920
GTK4: fix column expand/fixed_width conflict in server and player views
jmallach May 17, 2026
22d4a6d
GTK4: expand last column instead of first in server and player views
jmallach May 17, 2026
62a62b3
GTK4: use GtkColumnView "activate" signal for server double-click/Enter
jmallach May 17, 2026
a86e56d
GTK4: wrap comment text scrolled window in GtkFrame for rounded corners
jmallach May 17, 2026
ccc190e
build: require GTK 4.10 (gtk_column_view_column_set_expand)
jmallach May 17, 2026
0c46a5c
GTK4: replace GtkMenu color picker with GtkPopover + GtkDrawingArea s…
jmallach May 17, 2026
6910f88
GTK4: fix three warnings/criticals on prefs dialog close
jmallach May 17, 2026
4a20165
GTK4: fix color popover finalize warning — unparent in close handler
jmallach May 17, 2026
3ba0e00
GTK4: fix color popover cleanup timing — use window destroy signal
jmallach May 17, 2026
7902315
GTK4: fix prefs_color_popovers_cleanup signature and add GTK_IS_WIDGE…
jmallach May 18, 2026
f987040
GTK4: restore server-filter radio items in Server Filters menu (task 1e)
jmallach May 18, 2026
d9e6bff
GTK4: fix pref dialog — popover cleanup, sound player entry, sound fi…
jmallach May 18, 2026
19aefd7
GTK4: clean up gtk4-compat.h; update migration plan
jmallach May 18, 2026
9251b34
Phase 2: add PNG game/UI icons, regenerate app icon PNGs from SVG
jmallach May 18, 2026
515a4d9
Phase 2: remove XPM/dlsym mechanism, load icons from PNG files on disk
jmallach May 18, 2026
dd1bb8e
GTK4: wire toolbar button signals explicitly, remove <signal> from xq…
jmallach May 18, 2026
00316fb
GTK4: register install-relative icon theme path for "xqf" icon lookup
jmallach May 18, 2026
9bdd38c
GTK4: replace GtkStyle/GdkColor with CSS (Phase 3)
jmallach May 19, 2026
05358d4
GTK4: prune dead stubs from gtk4-compat.h; rebuild migration plan
jmallach May 19, 2026
41be036
GTK4: adopt GtkApplication (Phase 4)
jmallach May 19, 2026
de06f9a
fix: correct GtkApplication ID to io.github.xqf.xqf
jmallach May 19, 2026
e94c37f
fix: simplify app ID to io.github.xqf
jmallach May 19, 2026
5d9ba54
fix: set human-readable application name "XQF"
jmallach May 19, 2026
7aaddfc
GTK4 Phase 6 batch 1: migrate small dialog shims
jmallach May 19, 2026
27a5252
GTK4 Phase 6 batch 2: migrate medium dialog shims
jmallach May 19, 2026
1d93ed4
GTK4 Phase 6 batch 3: migrate xqf-ui, scripts, flt-player shims
jmallach May 19, 2026
bc42b37
GTK4: migrate pref.c off gtk4-compat.h shims
jmallach May 19, 2026
1499423
GTK4: migrate filter.c off gtk4-compat.h shims
jmallach May 19, 2026
10d78c1
GTK4: finish shim removal — fix stragglers and purge dead shims
jmallach May 19, 2026
785a1de
GTK4: inline remaining compat shims — Phase 6 complete
jmallach May 19, 2026
d059330
chore: remove leftover .bak files from perl in-place edits
jmallach May 19, 2026
0083c2a
GTK4: shrink gtk4-compat.h to near-zero — remove all migrated shims
jmallach May 19, 2026
092885b
GTK4 Phase 5: migrate scripts.c list from GtkTreeView to GtkListView
jmallach May 19, 2026
ad5003d
GTK4 Phase 5: migrate pref.c games list from GtkTreeView to GtkListView
jmallach May 19, 2026
126d457
GTK4 Phase 5: migrate pref.c custom args list from GtkTreeView to Gtk…
jmallach May 19, 2026
e1bcec1
GTK4 Phase 5: migrate filter.c country lists from GtkTreeView to GtkL…
jmallach May 19, 2026
b2d6d62
GTK4 Phase 5: migrate flt-player.c pattern list to GListStore+GtkColu…
jmallach May 19, 2026
d3b8102
docs: update GTK4 migration plan — Phase 5 and 6 complete
jmallach May 19, 2026
d6da41e
GTK4: guard gtk_column_view_scroll_to behind GTK_CHECK_VERSION(4,12,0)
jmallach May 19, 2026
c80ccec
cmake: lower GTK4 minimum requirement from 4.10 to 4.0
jmallach May 19, 2026
973c0dc
docs: mark Phase 4 (GtkApplication) complete in migration plan
jmallach May 19, 2026
34634ab
config: replace custom INI parser with GKeyFile
jmallach May 20, 2026
2a64324
GTK4: replace GtkFileChooserDialog shim with GtkFileDialog + delete g…
jmallach May 20, 2026
9f33a1d
cleanup: delete src/xpm/ (superseded by PNG icons in Phase 2)
jmallach May 20, 2026
fcd0ddd
docs: update GTK4 migration plan — Phases 6/7 complete, add Phases 8/9
jmallach May 20, 2026
4632fcf
GTK4 Phase 8: replace GtkComboBox with GtkDropDown / GtkEntry
jmallach May 20, 2026
5f0f2e1
GTK4: Phase 9 — replace deprecated image/allocation APIs (4.12)
jmallach May 20, 2026
8708120
docs: mark Phase 8 and Phase 9 complete in migration plan
jmallach May 20, 2026
9923c70
docs: explain why GtkTreeView is intentionally kept in srv-info and s…
jmallach May 20, 2026
bcda50f
ci: update GitHub Actions for GTK4 build requirements
jmallach Jul 10, 2026
e863a52
fix: resolve four compiler warnings introduced by GTK4 migration
jmallach Jul 10, 2026
07e81fd
fix: suppress -Wdeprecated-declarations for the xqf target
jmallach Jul 10, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ jobs:
name: GCC (Linux)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Install Dependencies
run: |
sudo apt update
sudo apt install -y qstat intltool cmake libgtk2.0-dev libgeoip-dev libminizip-dev libreadline-dev
sudo apt install -y qstat gettext cmake libgtk-4-dev libgeoip-dev libminizip-dev libreadline-dev libxml2-dev
- name: Update submodules
run: git submodule update --init --recursive
- name: cmake
run: CC=gcc CXX=g++ cmake -DWITH_QSTAT=/usr/bin/quakestat -DCMAKE_C_FLAGS=-Werror .
run: CC=gcc CXX=g++ cmake -DWITH_QSTAT=/usr/bin/quakestat .
- name: make
run: make -j"$(nproc)"
- name: make install
Expand All @@ -24,15 +24,15 @@ jobs:
name: Clang (Linux)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Install Dependencies
run: |
sudo apt update
sudo apt install -y qstat intltool cmake libgtk2.0-dev libgeoip-dev libminizip-dev libreadline-dev
sudo apt install -y qstat gettext cmake libgtk-4-dev libgeoip-dev libminizip-dev libreadline-dev libxml2-dev
- name: Update submodules
run: git submodule update --init --recursive
- name: cmake
run: CC=clang CXX=clang++ cmake -DWITH_QSTAT=/usr/bin/quakestat -DCMAKE_C_FLAGS=-Werror .
run: CC=clang CXX=clang++ cmake -DWITH_QSTAT=/usr/bin/quakestat .
- name: make
run: make -j"$(nproc)"
- name: make install
Expand Down
75 changes: 19 additions & 56 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,23 +1,5 @@
cmake_minimum_required(VERSION 3.27)

# Required since CMake 3.4 otherwise symbols are not exported and
# XQF can't find some internal resources like compiled XPM images.
#
# See:
# - https://cmake.org/cmake/help/latest/release/3.4.html
# - https://cmake.org/cmake/help/v3.4/variable/CMAKE_ENABLE_EXPORTS.html
# - https://cmake.org/cmake/help/v3.27/variable/CMAKE_ENABLE_EXPORTS.html
# - https://cmake.org/cmake/help/v3.27/variable/CMAKE_EXECUTABLE_ENABLE_EXPORTS.html
# - https://cmake.org/cmake/help/v3.27/prop_tgt/ENABLE_EXPORTS.html
#
# > Normally an executable does not export any symbols because it is the final program.
# > It is possible for an executable to export symbols to be used by loadable modules.
# > When this property is set to true CMake will allow other targets to "link" to the executable.
#
# For some reasons we need that for the executable to find embedded
# data at run time.
set(CMAKE_EXECUTABLE_ENABLE_EXPORTS ON)

include(CheckCXXCompilerFlag)

# Project information
Expand Down Expand Up @@ -49,7 +31,6 @@ set(DOMAIN "${PROJECT_NAME}")
set(LINGUAS ca da de es fi fr pl ru)

set(DEFAULT_QSTAT "qstat")
set(DEFAULT_GTK_TARGET 2)

# Macros
macro(set_c_flag FLAG)
Expand Down Expand Up @@ -235,6 +216,9 @@ set(xqf_SOURCES
${CMAKE_SOURCE_DIR}/src/utils.c
${CMAKE_SOURCE_DIR}/src/xqf.c
${CMAKE_SOURCE_DIR}/src/xqf-ui.c
${CMAKE_SOURCE_DIR}/src/xqf-server-item.c
${CMAKE_SOURCE_DIR}/src/xqf-player-item.c
${CMAKE_SOURCE_DIR}/src/xqf-lists.c
${CMAKE_SOURCE_DIR}/src/zipped.c
${CMAKE_SOURCE_DIR}/src/redial.c
${CMAKE_SOURCE_DIR}/src/q3maps.c
Expand Down Expand Up @@ -280,6 +264,9 @@ set(xqf_SOURCES
${CMAKE_SOURCE_DIR}/src/system.h
${CMAKE_SOURCE_DIR}/src/utils.h
${CMAKE_SOURCE_DIR}/src/xqf-ui.h
${CMAKE_SOURCE_DIR}/src/xqf-server-item.h
${CMAKE_SOURCE_DIR}/src/xqf-player-item.h
${CMAKE_SOURCE_DIR}/src/xqf-lists.h
${CMAKE_SOURCE_DIR}/src/xqf.h
${CMAKE_SOURCE_DIR}/src/zipped.h
${CMAKE_SOURCE_DIR}/src/redial.h
Expand Down Expand Up @@ -555,19 +542,7 @@ set(flag_DATA
${CMAKE_SOURCE_DIR}/pixmaps/flags/country/zw.png
)

set(xpm_MAIN ${CMAKE_SOURCE_DIR}/pixmaps/xqf.xpm)

set(xpm_DATA
${CMAKE_SOURCE_DIR}/src/xpm/update.xpm
${CMAKE_SOURCE_DIR}/src/xpm/refresh.xpm
${CMAKE_SOURCE_DIR}/src/xpm/refrsel.xpm
${CMAKE_SOURCE_DIR}/src/xpm/stop.xpm
${CMAKE_SOURCE_DIR}/src/xpm/connect.xpm
${CMAKE_SOURCE_DIR}/src/xpm/observe.xpm
${CMAKE_SOURCE_DIR}/src/xpm/record.xpm
${CMAKE_SOURCE_DIR}/src/xpm/sfilter.xpm
${CMAKE_SOURCE_DIR}/src/xpm/pfilter.xpm
)
file(GLOB png_DEFAULT_DATA ${CMAKE_SOURCE_DIR}/pixmaps/default/*.png)

set(icon_SIZE 22 32 48 128)

Expand All @@ -586,32 +561,19 @@ if (BUILD_XQF OR BUILD_RCON)
add_executable(gamesxml2c ${CMAKE_SOURCE_DIR}/src/gamesxml2c.c)
target_link_libraries(gamesxml2c xml2)

# Custom build rule for converting games.xml to games.c
# Custom build rule for converting games.xml to games.c/games.h
add_custom_command(
OUTPUT ${CMAKE_BINARY_DIR}/games.c
OUTPUT ${CMAKE_BINARY_DIR}/games.c ${CMAKE_BINARY_DIR}/games.h
COMMAND gamesxml2c ${CMAKE_SOURCE_DIR}/src/games.xml ${CMAKE_BINARY_DIR}/games.c ${CMAKE_BINARY_DIR}/games.h ${CMAKE_BINARY_DIR}/icons.c
MAIN_DEPENDENCY ${CMAKE_SOURCE_DIR}/src/games.xml
DEPENDS gamesxml2c)

# Define games.c filename for including in src/game.c
add_definitions(-DGAMES_C_INCLUDE="${CMAKE_BINARY_DIR}/games.c")
add_definitions(-DGAMES_H_INCLUDE="${CMAKE_BINARY_DIR}/games.h")
add_definitions(-DICONS_C_INCLUDE="${CMAKE_BINARY_DIR}/icons.c")
endif()

if (BUILD_XQF)
set(GTK_TARGET_HELP "GTK target (2 or 3)")
set(GTK_TARGET "${DEFAULT_GTK_TARGET}" CACHE STRING "${GTK_TARGET_HELP}")

# Default GTK_TARGET setting
if (NOT (GTK_TARGET STREQUAL "2" OR GTK_TARGET STREQUAL "3"))
set(GTK_TARGET "${DEFAULT_GTK_TARGET}" CACHE STRING "${GTK_TARGET_HELP}" FORCE)
endif()

# GUI definitions
if (GTK_TARGET STREQUAL "2")
set_c_cxx_flag("-Wno-deprecated-declarations")
endif()

# Other definitions
if (USE_GEOIP)
Expand All @@ -628,7 +590,7 @@ if (BUILD_XQF)
if(NOT UNZIP_FOUND)
pkg_check_modules(UNZIP REQUIRED minizip)
endif()
pkg_check_modules(GTK REQUIRED gtk+-${GTK_TARGET}.0)
pkg_check_modules(GTK REQUIRED gtk4>=4.0)

include_directories(${GTK_INCLUDE_DIRS})
link_directories(${GTK_LIBRARY_DIRS})
Expand Down Expand Up @@ -658,8 +620,12 @@ endif()
# Compile and link
add_executable(xqf ${xqf_SOURCES})
target_compile_definitions(xqf PUBLIC BUILD_XQF)
target_compile_definitions(xqf PUBLIC GUI_GTK${GTK_TARGET})
target_link_libraries(xqf ${UNZIP_LIBRARIES} ${GTK_LIBRARIES} dl m)
target_compile_definitions(xqf PUBLIC GUI_GTK4)
# Suppress deprecated-declarations during the GTK4 migration: srv-info.c,
# xqf-ui.c and related files intentionally keep GtkTreeView/GtkTreeStore
# until those panels are ported to GtkListView/GtkColumnView.
target_compile_options(xqf PRIVATE -Wno-deprecated-declarations)
target_link_libraries(xqf ${UNZIP_LIBRARIES} ${GTK_LIBRARIES} m)

if (USE_GEOIP)
target_link_libraries(xqf GeoIP)
Expand Down Expand Up @@ -708,15 +674,12 @@ endif()
DESTINATION "${CMAKE_INSTALL_PREFIX}${XQF_BIN_DIR}")

# UI
install(FILES ${CMAKE_SOURCE_DIR}/src/xqf-gtk${GTK_TARGET}.ui
install(FILES ${CMAKE_SOURCE_DIR}/src/xqf.ui
DESTINATION ${PACKAGE_DATA_DIR}/ui)

# Icons
install(FILES ${xpm_DATA}
DESTINATION ${PACKAGE_DATA_DIR}/xpm)

install(FILES ${xpm_MAIN}
DESTINATION ${CMAKE_INSTALL_PREFIX}/share/pixmaps)
install(FILES ${png_DEFAULT_DATA}
DESTINATION ${PACKAGE_DATA_DIR}/default)

install(FILES ${flag_DATA}
DESTINATION ${PACKAGE_DATA_DIR}/default/flags)
Expand Down
Loading
Loading