Commit Graph

478 Commits

Author SHA1 Message Date
Savanni D'Gerinel aed4735209 Add some documentation around the quit action 2024-02-19 12:05:21 -05:00
Savanni D'Gerinel c14b20b79e Set up an application quit action group
This ties together a menu item, closing the main window, and Ctrl-Q into
the same action, which is to quit the application.
2024-02-19 11:58:01 -05:00
Savanni D'Gerinel 56ff5527ba Quit the application when the user clicks the header bar X 2024-02-19 09:49:20 -05:00
Savanni D'Gerinel f7f55d74fd Bump fitnesstrax to v0.5.0 2024-02-18 17:58:52 -05:00
Savanni D'Gerinel 843924afef Wrap the list view within a scrolled window 2024-02-18 22:19:39 +00:00
Savanni D'Gerinel 86d7ca0b01 Change TextEntry to a builder pattern 2024-02-18 22:19:39 +00:00
Savanni D'Gerinel d137ee2481 Apply clippy 2024-02-18 22:19:39 +00:00
Savanni D'Gerinel 74dbb58ed9 Extract the date range picker and enable the quick picker 2024-02-18 22:19:39 +00:00
Savanni D'Gerinel 9a18496c95 Apply the value of a date field to the historical view
Date fields can now be updated and their values retrieved. So now I have added a button that retrieves the range of the date field and updates the historical view in response to them.
2024-02-18 22:19:39 +00:00
Savanni D'Gerinel 01776a534e Start setting up date range widgets 2024-02-18 22:19:39 +00:00
Savanni D'Gerinel b33d17c256 Start building an internally editable date field 2024-02-18 22:19:39 +00:00
Savanni D'Gerinel ab59eedef5 Fitnesstrax v0.4.1 2024-02-12 10:14:55 -05:00
Savanni D'Gerinel 4dd6afeae7 Add the desktop shortcut and the gsettings schema to the fitnesstrax installation 2024-02-12 09:15:47 -05:00
Savanni D'Gerinel cb2bec4287 First pass at an installer override 2024-02-10 12:28:12 -05:00
Savanni D'Gerinel 5a93c4fdcd Bump the fitnesstrax version to 0.4.0 2024-02-09 22:52:34 -05:00
Savanni D'Gerinel 6e5cbc0930 Ensure there is a button for every workout type 2024-02-09 22:40:29 -05:00
Savanni D'Gerinel 73a5ab89a3 Rename BikeRide to Biking
This just generally feels more comfortable, especially when put in conjuction with the other activity types
2024-02-09 08:24:01 -05:00
Savanni D'Gerinel 291dc32fe5 Show summaries of all time-distance workouts 2024-02-09 08:22:12 -05:00
Savanni D'Gerinel b5c42e3ac3 Add the activity type selector to the time-distance widget 2024-02-09 08:17:10 -05:00
Savanni D'Gerinel 6394d89331 Create new records with the date of the view model 2024-02-08 22:11:46 -05:00
Savanni D'Gerinel 38b1e62b60 Add the ability to edit the time on a time_distance record 2024-02-08 21:58:22 -05:00
Savanni D'Gerinel 4acf034b8d Clean up warnings and remove printlns 2024-02-08 19:01:56 -05:00
Savanni D'Gerinel 1aff203afc Reload data when the user saves on the DayEdit panel
This required some big overhauls. The view model no longer takes records. It only takes the date that it is responsible for, and it will ask the database for records pertaining to that date. This means that once the view model has saved all of its records, it can simply reload those records from the database. This has the effect that as soon as the user moves from DayEdit back to DayDetail, all of the interesting information has been repopulated.
2024-02-08 19:01:56 -05:00
Savanni D'Gerinel 9fc9d2b758 Create Duration and Distance structures to handle rendering
These structures handle parsing and rendering of a Duration and a Distance, allowing that knowledge to be centralized and reused. Then I'm using those structures in a variety of places in order to ensure that the information gets rendered consistently.
2024-02-08 10:30:14 -05:00
Savanni D'Gerinel 76f4b31466 Show existing time/distance workout rows in day detail and editor 2024-02-08 10:23:47 -05:00
Savanni D'Gerinel 73052a0694 Save new time/distance records
This sets up a bunch of callbacks. We're starting to get into Callback Hell, where there are things that need knowledge that I really don't want them to have.

However, edit fields for TimeDistanceEdit now propogate data back into the view model, which is then able to save the results.
2024-02-08 10:20:57 -05:00
Savanni D'Gerinel 2c42c35dfe Build the facilities to add a new time/distance workout
This adds the code to show the new records in the UI, plus it adds them to the view model. Some of the representation changed in order to facilitate linking UI elements to particular records. There are now some buttons to create workouts of various types, clicking on a button adds a new row to the UI, and it also adds a new record to the view model. Saving the view model writes the records to the database.
2024-02-08 09:44:58 -05:00
Savanni D'Gerinel afe693fe10 Make emseries::Record copyable 2024-02-08 09:18:55 -05:00
Savanni D'Gerinel af1422d523 Build some convenienc functions for measurement entry fields
Move the weight field into text_entry
2024-02-08 09:18:55 -05:00
Savanni D'Gerinel 792e20d44b Add buttons with icons to represent workouts 2024-02-08 09:13:54 -05:00
Savanni D'Gerinel 8016188b29 Add a test program for gnome icons 2024-02-08 09:13:54 -05:00
Savanni D'Gerinel 74df2880bb Implement the Edit Cancel button 2024-02-08 09:13:54 -05:00
Savanni D'Gerinel 96c4201680 Render time distance details in the day detail view 2024-02-08 09:02:09 -05:00
Savanni D'Gerinel ecdd38ebbc Show a summary of the day's biking stats when there is one 2024-02-08 08:57:17 -05:00
Savanni D'Gerinel 2fb8728856 Invert the TraxRecord
This simplifies, though not as much as I was hoping, the patterns for accessing data along strict type patterns. I may see better results once I'm getting the Time/Distance views working.
2024-02-08 00:20:40 -05:00
Savanni D'Gerinel a7d43ef184 Update Cargo.nix 2024-02-08 00:16:27 -05:00
Savanni D'Gerinel 9727d35116 Resolve clippy warnings
Warnings were mounting up. It was time to resolve them before attempting a massive rebase.
2024-02-07 23:36:03 -05:00
Savanni D'Gerinel 1d6155d9e5 Finish the update and delete view model functions 2024-02-07 09:29:08 -05:00
Savanni D'Gerinel a8bf540517 Remove test that steps and weights are honored correctly
Step and weight records may be presented in any order. Any test that
tries to enforce that one gets presented before teh other can't cannot
succeed. So, I've removed that test and instead put in a warning that
will appear when the view model gets loaded.
2024-02-07 08:28:38 -05:00
Savanni D'Gerinel 3db870d790 Set up time distance operations and tests 2024-02-03 15:28:33 -05:00
Savanni D'Gerinel 24276d172b Introduce the RecordProvider interface
DayDetailViewModel needs testing. I've worked out an improved API, and a set of tests to go along with it, and those can be made more easily with a mockable RecordProvider. So, in addition to stubbing out a bunch of tests, I've also created RecordProvider, mocked it, and implemented it for App.
2024-02-01 10:12:35 -05:00
Savanni D'Gerinel 96317f5692 Finish removing the previous record grouping
Now that the DayDetailViewModel knows to retrieve its own records, the grouping functions, and passing groups of records around, no longer make sens.
2024-02-01 10:08:18 -05:00
Savanni D'Gerinel c1e797f3ae DayDetailViewModel now ignores records and directly retrieves data from App
This is preparatory work. Having the view model directly retrieve data both adds a degree of symmetry (it both gets data from and sends data to the app) and makes it possible for the view model to refresh itself when needing to revert data or after saving data.
2024-02-01 09:27:40 -05:00
Savanni D'Gerinel 304008c674 The view model can no longer be initialized without an app 2024-01-31 09:51:17 -05:00
Savanni D'Gerinel 772188b470 Set up text entry fields for all of the common metrics 2024-01-31 08:56:54 -05:00
Savanni D'Gerinel bc31522c95 Add the on_update callback to TextEntry, and test the component 2024-01-31 08:44:46 -05:00
Savanni D'Gerinel 6c68564a77 Create a function which safely initializes GTK once
This is only available in test code, and it allows GUI component tests to run without having to worry about double-initializing GTK
2024-01-31 08:40:55 -05:00
Savanni D'Gerinel 55c1a6372f Rename the formatters 2024-01-31 08:38:17 -05:00
Savanni D'Gerinel 2cbd539bf4 Add a type for managing Time of Day values 2024-01-31 08:27:42 -05:00
Savanni D'Gerinel 7d14308def Create automated testing for weight, duration, and distance formatters 2024-01-31 08:10:46 -05:00