Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port to Gtk4 #46

Draft
wants to merge 143 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
143 commits
Select commit Hold shift + click to select a range
50a3c68
First compilable version (does not run)
Jul 11, 2022
a878884
Get to run native
Jul 11, 2022
be46a07
Split out some private classes
Jul 12, 2022
13fd8d2
Tweak margins in popover
Jul 12, 2022
30f1741
Fix Ctrl+scroll zooming; remove unneeded code
Jul 12, 2022
3da4062
Remove resize buttons from popover (do not work properly in Gtk4)
Jul 12, 2022
c1f5de1
Add missing flatpak permission
Jul 14, 2022
4db82a6
Remove commented code; change signal names; add comments
Jul 14, 2022
f479474
Lose unnecessary function in Controller
Jul 14, 2022
7462405
Simplify
Jul 14, 2022
9ec0ad6
Set size of window and maingrid in View
Jul 14, 2022
4400a7a
Fix keyboard painting on/off
Jul 15, 2022
ee2a0b7
Fix spurious pointer movement after key painting
Jul 15, 2022
29aea75
Listen to all buttons
Jul 15, 2022
2d29bd2
Fix game generation
Jul 15, 2022
81f1132
Fix hinting
Jul 15, 2022
01f18d4
Position toast top start
Jul 15, 2022
27975d2
Fix follow system style
Jul 15, 2022
8623d58
Support Shift-click for EMPTY
Dec 24, 2023
107cd49
Move cursor to (0, 0) if out of grid and cursor moved
Dec 24, 2023
f34c754
Fix lint
Dec 24, 2023
d400759
Override measure () for CellGrid
Dec 24, 2023
6378924
Ensure clues cleared on dimension change
Dec 24, 2023
19494b7
Fix resizing (with hack)
Dec 25, 2023
04717af
Fix Control-Scroll to zoom
Dec 25, 2023
dfd8c88
Fix Shift-Click
Dec 25, 2023
846b2e2
Fix BUTTON_SECONDARY press
Dec 25, 2023
a2b5d31
Stop headerbar focusing
Dec 25, 2023
5a77941
Set size request on clueboxes
Dec 25, 2023
ca13112
Change header css
Dec 27, 2023
d8fab1e
Code cleanup, shorter lines
Dec 27, 2023
e5819eb
Move progress and grade label to main grid, narrower header
Dec 27, 2023
ae23496
Lose Application.css
jeremypw Feb 17, 2024
a976398
Lose head-thinking icon
jeremypw Feb 17, 2024
77a22e0
Remove residual ref to Application.css
jeremypw Feb 17, 2024
5c33e7f
Increase header button image size
jeremypw Feb 17, 2024
a45fe74
Use some symbolic icons
jeremypw Feb 17, 2024
467dc61
Cleanup
jeremypw Feb 17, 2024
eb8024e
Increase fallback cell size
jeremypw Feb 17, 2024
9a2e1ff
Load some colors from settings
jeremypw Feb 19, 2024
d603765
Add color dialog buttos to app popover
jeremypw Feb 19, 2024
ce0cfc6
Use rgb() format in schema
jeremypw Feb 19, 2024
9f775b2
Tweak alignments
jeremypw Feb 20, 2024
7b5fd08
Move progress stack back into header
jeremypw Feb 20, 2024
171932c
View: Reduce line lengths
jeremypw Feb 20, 2024
cbe4bfd
Controller: reduce line lengths
jeremypw Feb 20, 2024
2bd74e5
Fit cell size to resizable window
jeremypw Feb 20, 2024
0df3ed7
Tweak font size
jeremypw Feb 20, 2024
4fe75df
Cleanup, code style, line length
jeremypw Feb 20, 2024
f165b5b
Remove unused property
jeremypw Feb 20, 2024
a308839
Use Gtk.DropDown in AppPopover
jeremypw Feb 21, 2024
d0e08b2
Use Gtk.FileDialog
jeremypw Feb 21, 2024
e9b30f8
Modernise license and copyright
jeremypw Feb 21, 2024
2653876
Discontinue zoom action
jeremypw Feb 21, 2024
0beadf8
Merge branch 'master' into gtk4
jeremypw Oct 24, 2024
ec031cc
Start simplifying
jeremypw Oct 24, 2024
ed2f425
Continue simplifying, add basic preferences dialog
jeremypw Nov 4, 2024
6555bfe
Add load, save save_as buttons to AppPopover
jeremypw Nov 4, 2024
c1e3364
Ignore buildgtk4 directory
jeremypw Nov 5, 2024
65dc91f
Simplify cell grid size control
jeremypw Nov 5, 2024
19b8d28
Replace cell-size with font-size in View; cleanup, simplify
jeremypw Nov 5, 2024
b5df550
Clue, ClueBox: get font size from View, simplify
jeremypw Nov 5, 2024
acda4e0
COntinue to rework grid drawing
jeremypw Nov 5, 2024
2a83cc8
Lose unused
jeremypw Nov 5, 2024
86f2493
CellGrid: Allow non-square cells
jeremypw Nov 5, 2024
97de9d4
Cleanup
jeremypw Nov 5, 2024
3c1929e
CellGrid: Do not set baseline
jeremypw Nov 5, 2024
7883e3a
Bind rows and columns to settings
jeremypw Nov 5, 2024
9047f98
Add and use font scaling setting
jeremypw Nov 5, 2024
219ad9f
Set main grid margins
jeremypw Nov 5, 2024
a56d0f6
Cleanup
jeremypw Nov 5, 2024
eebd338
Tweak drawing grid lines
jeremypw Nov 5, 2024
f340c7a
Main grid as child of ToastOverlay
jeremypw Nov 5, 2024
5591048
Lose TRIVIAL and VERY_EASY grades
jeremypw Nov 5, 2024
57f00e4
Connect grade setting to preferences dialog
jeremypw Nov 5, 2024
65fa184
Cleanup Preference dialog creation
jeremypw Nov 5, 2024
c1a166e
Implement minimum space in clueboxes, based on window size
jeremypw Nov 6, 2024
922f2f1
Ensure labels aligned with cells
jeremypw Nov 7, 2024
57daff6
Comment, tweak
jeremypw Nov 7, 2024
250be6c
Implement show preferences action and shortcut
jeremypw Nov 8, 2024
bfa99ce
Align labels with grid better; lose font scale control
jeremypw Nov 10, 2024
d539312
Move hint button to start of header bar
jeremypw Nov 10, 2024
f7109ac
Fix open file
jeremypw Nov 10, 2024
7011950
Update screenshot headings
jeremypw Nov 10, 2024
5381205
Update Designing screenshots
jeremypw Nov 10, 2024
3bd05bb
Add Designing game .gno file
jeremypw Nov 10, 2024
2e0836a
Add solve button to app popover
jeremypw Nov 10, 2024
ca300cf
Update Solving screenshots
jeremypw Nov 10, 2024
73f1ef7
Layout PreferencesDialog better
jeremypw Nov 10, 2024
0e371f9
Add color buttons to preferences dialog
jeremypw Nov 10, 2024
2f1d063
Tweak popover margins
jeremypw Nov 11, 2024
97dcb66
Bind game name to app_popover title entry text
jeremypw Nov 11, 2024
b0b3a30
Cleanup
jeremypw Nov 11, 2024
b91a724
Move PopoverButton to separate file
jeremypw Nov 11, 2024
6dfeb90
Move PreferenceDialog and PreferenceRow into HeaderBar folder
jeremypw Nov 11, 2024
1af9c2b
Add color style widgets to preference dialog
jeremypw Nov 11, 2024
1893cbb
Change color style according to widget settings
jeremypw Nov 11, 2024
93870ee
Discontinue clue help setting (always on)
jeremypw Nov 11, 2024
a14008d
Move CellPattern to separate file
jeremypw Nov 11, 2024
876bf1c
Update cluebox size request add move clues; tweak to minimise window …
jeremypw Nov 12, 2024
a578842
Add actions and controls for window size
jeremypw Nov 12, 2024
b1bef00
Tweak .editorconfig
jeremypw Nov 13, 2024
dbd74f2
Implement shortcut window
jeremypw Nov 13, 2024
901964c
Add additional shortcut to Shortcut winddow
jeremypw Nov 15, 2024
e21ae7a
Bump version to 4.0.0, add skeletion release note; add min gtk4 version
jeremypw Nov 15, 2024
b5593fc
Add About button to AppMenu and show About Dialog
jeremypw Nov 15, 2024
ceebcf7
Fix deprecated meson option
jeremypw Nov 15, 2024
e3f9d6f
Fix keypress paint
jeremypw Dec 8, 2024
4852612
Move button controller into View
jeremypw Dec 8, 2024
e6fba83
Cleanup
jeremypw Dec 8, 2024
2ea37f2
Lose unused window
jeremypw Dec 8, 2024
3123535
Restructure source folders
jeremypw Dec 8, 2024
3c53e63
Lose window size controls in app menu
jeremypw Dec 8, 2024
cf37feb
Reinstate auto-solve button
jeremypw Dec 8, 2024
6547057
Use more symbolic icons
jeremypw Dec 8, 2024
05860c2
Silence terminal warning re progress stack
jeremypw Dec 8, 2024
123303b
Use autosolve only in designing mode
jeremypw Dec 8, 2024
081920b
Tweak auto solve tooltip
jeremypw Dec 8, 2024
4d6e07c
Move game size/difficulty controls into app popover
jeremypw Dec 8, 2024
560aea9
Start reducing back references
jeremypw Dec 8, 2024
5cd52bf
Add two Application signals
jeremypw Dec 8, 2024
3ed68a6
Controller: Emit app signal when game state changes
jeremypw Dec 8, 2024
51fc8a9
Move headerbar stuff into separate file, start to debug
jeremypw Dec 9, 2024
90a5446
Fix forward/back
jeremypw Dec 10, 2024
4cfa8f4
Fix mode switch
jeremypw Dec 10, 2024
f45739e
Fix save on quit + restore
jeremypw Dec 10, 2024
eb54859
Use singletons for Controller, Mode, View
jeremypw Dec 10, 2024
ef85c73
Cleanup; handle not restored; disable settings temp
jeremypw Dec 10, 2024
680f2c7
Fix sync AppPopover rows, cols, grade
jeremypw Dec 11, 2024
87017ad
Fix and simplify file writing
jeremypw Dec 11, 2024
d979e4d
Start to document file format
jeremypw Dec 11, 2024
6b876bb
Fix file reading
jeremypw Dec 11, 2024
b02edea
Fix more bugs with loading and saving
jeremypw Dec 11, 2024
dba1dbf
Discontinue Lock key, use SaveFlags
jeremypw Dec 12, 2024
b88d841
Cleanup
jeremypw Dec 12, 2024
60c5d1f
Rename Factory->Manager
jeremypw Dec 12, 2024
6b74609
Show grade in header; fix load grade and author
jeremypw Dec 12, 2024
5bcee65
Sync editable label text
jeremypw Dec 12, 2024
38a9ed9
Fix title tooltip
jeremypw Dec 12, 2024
d8b5b08
Move game-grade to Controller
jeremypw Dec 12, 2024
9bba7f3
Use dimensions property and notify
jeremypw Dec 12, 2024
896f730
Sync dimensions with AppPopover
jeremypw Dec 12, 2024
6337949
Sync popover on show/close
jeremypw Dec 12, 2024
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
5 changes: 5 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,8 @@ insert_final_newline = true
max_line_length = 80
tab_width = 4

[*.ui]
tab_width = 2

[*.xml]
tab_width = 2
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
.flatpak
*~
build

buildgtk4
File renamed without changes.
63 changes: 63 additions & 0 deletions FileFormat.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
[Description]
Random pattern // Title of game to show in headerbar
Gnonograms Generator // Author (default)
2024-12-11T10:36:56+0000 // Date game was saved
2 // Difficulty 0 = Easy, 1 = Moderate, 2 = Difficult, 3 = Challenging, 4 = Advanced, 5 = Ambiguous
// [License] (unused)
[Dimensions]
10 // Rows
10 // Columns
[Row clues]
1, 4
4
4
1, 2
1, 3, 1
2
5
4, 3
2, 3
2, 2
[Column clues]
1, 2, 2
1, 2
1, 1, 1
1, 1, 3
6
1, 3
2, 1, 1
2, 1, 2
2, 1, 2
2, 1, 1
[Solution grid] // 0 = Unknown, 1 = Empty, 2 = Filled (optional)
2 1 1 1 1 1 2 2 2 2
1 1 1 1 1 1 2 2 2 2
2 2 2 2 1 1 1 1 1 1
2 1 1 1 1 1 1 2 2 1
1 1 2 1 2 2 2 1 1 2
1 1 1 2 2 1 1 1 1 1
1 1 1 1 2 2 2 2 2 1
1 1 2 2 2 2 1 2 2 2
2 2 1 2 2 2 1 1 1 1
2 2 1 2 2 1 1 1 1 1
[Locked] // Whether game is read-only (modifications must be saved to different file
true
// Following only saved to temp file for restoring on startup
[Working grid]
2 0 0 0 0 0 0 0 0 0
0 2 0 0 0 0 0 0 0 0
0 0 2 0 0 0 0 0 0 0
0 0 0 2 0 0 0 0 0 0
0 0 0 0 2 0 0 0 0 0
0 0 0 0 0 2 0 0 0 0
0 0 0 0 0 2 2 0 0 0
0 0 0 0 0 0 2 2 0 0
0 0 0 0 0 0 0 2 2 0
0 0 0 0 0 0 0 0 2 2
[State] // 0 = Setting 1 = Solving
GNONOGRAMS_GAME_STATE_SOLVING
[Original path] // Path to original game
/home/jeremy/.config/unsaved/Unsaved Game.gno
[History] // Series of moves made when solving [row, col, current_state, previous_state;]
0,0,2,0;1,1,2,0;2,2,2,0;3,3,2,0;4,4,2,0;5,5,2,0;6,5,2,0;6,6,2,0;7,6,2,0;7,7,2,0;8,7,2,0;8,8,2,0;9,8,2,0;9,9,2,0;

674 changes: 0 additions & 674 deletions LICENSE

This file was deleted.

3 changes: 2 additions & 1 deletion com.github.jeremypw.gnonograms.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
app-id: com.github.jeremypw.gnonograms
runtime: io.elementary.Platform
runtime-version: '7'
runtime-version: 'daily'
sdk: io.elementary.Sdk
command: com.github.jeremypw.gnonograms
finish-args:
- '--device=dri'
- '--share=ipc'
- '--socket=wayland'
- '--socket=fallback-x11'
Expand Down
30 changes: 0 additions & 30 deletions data/Application.css

This file was deleted.

43 changes: 25 additions & 18 deletions data/com.github.jeremypw.gnonograms.appdata.xml.in
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,32 @@
<category>Game</category>
<category>LogicGame</category>
</categories>
<screenshots>
<screenshot type="default">
<caption>Solving a puzzle</caption>
<image>https://raw.githubusercontent.com/jeremypw/gnonograms/master/data/screenshots/GnonogramsSolvingLight.png</image>
</screenshot>
<screenshot>
<caption>Solving a puzzle (dark variant)</caption>
<image>https://raw.githubusercontent.com/jeremypw/gnonograms/master/data/screenshots/GnonogramsSolvingDark.png</image>
</screenshot>
<screenshot>
<caption>Designing a puzzle</caption>
<image>https://raw.githubusercontent.com/jeremypw/gnonograms/master/data/screenshots/GnonogramsDesigningLight.png</image>
</screenshot>
<screenshot>
<caption>Designing a puzzle (dark variant)</caption>
<image>https://raw.githubusercontent.com/jeremypw/gnonograms/master/data/screenshots/GnonogramsDesigningDark.png</image>
</screenshot>
</screenshots>
<releases>
<release version="4.0.0" date="2024-11-15" urgency="low">
<description>
<ul>
<li>Port to Gtk-4</li>
</ul>
</description>
</release>
<release version="2.1.2" date="2022-06-20" urgency="low">
<description>
<ul>
Expand Down Expand Up @@ -202,24 +227,6 @@
<binary>com.github.jeremypw.gnonograms</binary>
<library>libgnonograms-core</library>
</provides>
<screenshots>
<screenshot type="default">
<caption>Manually solving a puzzle</caption>
<image>https://raw.githubusercontent.com/jeremypw/gnonograms/master/data/screenshots/GnonogramsSolvingLight.png</image>
</screenshot>
<screenshot>
<caption>Manually solving a puzzle</caption>
<image>https://raw.githubusercontent.com/jeremypw/gnonograms/master/data/screenshots/GnonogramsSolvingDark.png</image>
</screenshot>
<screenshot>
<caption>Manually solving a puzzle</caption>
<image>https://raw.githubusercontent.com/jeremypw/gnonograms/master/data/screenshots/GnonogramsDesigningLight.png</image>
</screenshot>
<screenshot>
<caption>Manually solving a puzzle</caption>
<image>https://raw.githubusercontent.com/jeremypw/gnonograms/master/data/screenshots/GnonogramsDesigningDark.png</image>
</screenshot>
</screenshots>
<developer_name>Jeremy Paul Wootten</developer_name>
<url type="homepage">https://github.com/jeremypw/gnonograms</url>
<url type="bugtracker">https://github.com/jeremypw/gnonograms/issues</url>
Expand Down
8 changes: 0 additions & 8 deletions data/gresource.xml

This file was deleted.

123 changes: 0 additions & 123 deletions data/icons/24/head-thinking-symbolic.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading