MTGProxyPrinter

Timeline
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

630 check-ins using file ThirdPartyLicenses.md or doc/ThirdPartyLicenses.md version 10084909fd

2024-05-02
12:59
Implement crude "round corners" for generated pixmaps. Leaf check-in: 6ddb0532bb user: thomas tags: fix_card_bleed
12:42
Tests: Replace boolean oversized parameter in create_card_with_pixmap() helper with a size parameter taking in a CardSize instance. check-in: 6f9be8556d user: thomas tags: fix_card_bleed
2024-05-01
14:28
Tests: Simplify and unify action application in tests/ui/test_page_scene.py. Always use document.apply(action). Also stop using the wait_signal() context manager, since action application is fully synchronous. Leaf check-in: 2746000e7a user: thomas tags: trunk
14:11
pyproject.toml: Add Python 3.12 to the supported versions classifier list. check-in: 37e46c7abd user: thomas tags: trunk
14:05
Dependencies: Require ijson 3.2.1 when running on Python 3.12. Also preemptively exclude "ijson.benchmark" from built packages, which will be included in future ijson versions. check-in: c6e1b9ab9f user: thomas tags: trunk
13:53
Dependencies: Bump minimum required version of PyHamcrest to 2.0.0. Tests already required it, so running the application only on 2.0 or later is reasonable. check-in: 8ad0978325 user: thomas tags: trunk
13:50
Add dependency on typing_extensions, when running under Python 3.10 or older. It was previously a transitive dependency of pint. Use typing_extensions for Self and NotRequired, instead of hacking something together. check-in: f578ec5ec9 user: thomas tags: trunk
2024-04-27
13:01
Fix a typo in a variable name check-in: 7774985a79 user: thomas tags: trunk
2024-04-26
13:39
test_page_scene: Refactor create_card_with_pixmap() helper. Remove the document parameter. Make the pixmap color configurable, defaulting to transparent. Use the CardSize enum to determine the image size, instead of hard-coding the dimensions in pixels for oversized cards. check-in: b4e0cecc45 user: thomas tags: trunk
2024-04-23
07:04
Merge fork Leaf check-in: 1057bac760 user: thomas tags: enum_based_paper_size
2024-04-22
09:11
WIP test loading various page layout settings from a save file. check-in: 7e45dc12dc user: thomas tags: enum_based_paper_size
2024-04-21
18:58
Sync with trunk check-in: dcacf3ca39 user: thomas tags: enum_based_paper_size
18:40
Mostly whitespace changes to reduce the diff between trunk and the port_pyside6 branch check-in: b925736397 user: thomas tags: trunk
18:29
Use the proper Qt enums in HoverEventFilter.eventFilter() check-in: 5c09339851 user: thomas tags: trunk
18:28
Pull Ui compiler improvements and class name / ui class name alignment improvements from branch [port_pyside6]. check-in: 55b69bba3a user: thomas tags: trunk
18:19
Merge fork. check-in: 9e133072a2 user: thomas tags: enum_based_paper_size
11:47
test_document_loader.py: Further reduced boilerplate code. All tests now use helper functions _load_from_memory_database_expecting_success() or _load_from_memory_database_expecting_failure() to load data from an in-memory database. check-in: 0fa534983b user: thomas tags: enum_based_paper_size
11:19
test_document_loader: Decompose a complex test into 3 separate tests. Refactor common code into re-usable functions to reduce boilerplate code. One test is still WIP. check-in: 6d155b36ad user: thomas tags: enum_based_paper_size
11:16
test_document_loader: Reduce verbosity in test parameter generation. check-in: 256b338409 user: thomas tags: enum_based_paper_size
2024-04-19
13:23
Use the correct PageSizeId for "Custom" paper sizes, instead of using -1. check-in: ada8ebbc94 user: thomas tags: enum_based_paper_size
13:22
settings: Attempt at reading the default paper size from the default printer, instead of hard-coding it to A4. check-in: c42ccb2ecf user: thomas tags: enum_based_paper_size
13:21
units_and_sizes.py: Extract the test if a page size is acceptable into a re-usable function. check-in: 4ed219c92d user: thomas tags: enum_based_paper_size
12:47
units_and_sizes.py: Fix style warnings check-in: fcee8f673f user: thomas tags: enum_based_paper_size
10:15
Use localized paper size names when displaying them to the user in the PageConfigWidget check-in: d3e883b2cd user: thomas tags: enum_based_paper_size
10:08
Revert last change. The reverted code used potentially localized names as entries in the configuration file/save file, making both non-portable. check-in: 683811de76 user: thomas tags: enum_based_paper_size
2024-04-18
18:05
Add changelog entry. check-in: be31f5895f user: thomas tags: enum_based_paper_size
15:56
Use the paper size names obtained from QPageSize.name() as the string-representation of paper sizes. check-in: 3702a96bb0 user: thomas tags: enum_based_paper_size
15:44
Move page size and orientation enum dicts from settings.py to units_and_sizes.py. check-in: 7278a372ee user: thomas tags: enum_based_paper_size
10:22
PageConfigWidget: Implemented saving the page orientation to application settings, and highlighting the ui element when changed. check-in: dbf1d06107 user: thomas tags: enum_based_paper_size
10:17
PageConfigWidget: Populate the orientation combo box, and implement loading the current state from the application or document settings. check-in: 0d66526b29 user: thomas tags: enum_based_paper_size
2024-04-17
21:33
Settings: Add key paper-orientation to the documents setting. It stores if the document is in Portrait or Landscape mode. PageLayoutSettings: Add property page_orientation. Handle portrait/landscape handling in the page_height/page_width properties. check-in: a85dcd97a6 user: thomas tags: enum_based_paper_size
20:57
DEFAULT_SETTINGS: Lookup the A4 paper size from the PageSizeReverse dict, instead of hard-coding the string value. check-in: ef86234f90 user: thomas tags: enum_based_paper_size
20:51
settings: Refactor enum-reading code: Split logic for reading arbitrary enums inside PyQt classes from the post-processing code needed for the QPageSizeId enum. check-in: a6b5f1e0e1 user: thomas tags: enum_based_paper_size
19:56
settings: Remove paper sizes that cannot fit a single oversized card. check-in: d4f31b50d2 user: thomas tags: enum_based_paper_size
19:41
PageConfigWidget: Actually update the paper_size property in _on_paper_size_changed() check-in: 2af4de2732 user: thomas tags: enum_based_paper_size
19:30
PageLayoutSettings: Use the static QPageSize.size() in the page_height and page_width properties. check-in: a5cfaea8af user: thomas tags: enum_based_paper_size
19:29
PageLayoutSettings.to_page_size(): Add two logging lines. check-in: 4d083dbd11 user: thomas tags: enum_based_paper_size
19:22
Actually validate and update the paper size setting when changed by the combo box in the settings UI. check-in: 849dec4ec2 user: thomas tags: enum_based_paper_size
2024-04-11
14:41
PageLayoutSettings.to_page_layout(): Implement two code paths. One for predefined paper sizes and one for custom paper sizes. check-in: 925a1cf0e5 user: thomas tags: enum_based_paper_size
14:39
settings: The PageSize lookup dicts now use QPageSize.PageSizeId, instead of QPrinter.PageSize. Both are semantically the same, but the type system requires the first. check-in: a9273cb70d user: thomas tags: enum_based_paper_size
14:38
PageConfigWidget: Rename the custom page size widgets in the Ui class by adding the "custom_" prefix. check-in: 78b661a353 user: thomas tags: enum_based_paper_size
14:04
PageLayoutSettings now returns the paper dimensions for non-custom paper sizes by querying the Qt QPageSize class. check-in: 6331013c55 user: thomas tags: enum_based_paper_size
13:56
Update the verification logic when loading settings from a document to check the custom page dimension fields for valid values. check-in: 895a845bc5 user: thomas tags: enum_based_paper_size
13:54
PageLayoutSettings: Rename page_height to custom_page_height and page_width to custom_page_width. Add properties page_height and page_width with setters, delegating to the custom values. check-in: e18dae2cdd user: thomas tags: enum_based_paper_size
13:38
Add paper_size attribute to the PageLayoutSettings class. check-in: 9fa3c4bc86 user: thomas tags: enum_based_paper_size
13:28
settings.py now uses the TypeVar from units_and_sizes.py check-in: ee79d80a1d user: thomas tags: enum_based_paper_size
13:27
Add a generic type variable to units_and_sizes.py check-in: e84a0f8702 user: thomas tags: enum_based_paper_size
13:09
Settings: Add "paper-size" to the default document settings. Move the QPrinter.PageSize enum parsing into settings.py. Setting "paper-size" defaults to "A4". If not "Custom", it will take precedence over the paper-height-mm and paper-width-mm settings. Validation checks, if the value is one of the known constants. check-in: dd67b7958f user: thomas tags: enum_based_paper_size
09:49
Add a drop-down to the PageConfigWidget, listing all known, common paper sizes. The paper size table is filled by iterating over QPrinter. See [https://stackoverflow.com/questions/39676200] check-in: 040ac4fab7 user: thomas tags: enum_based_paper_size
09:01
Remove two debug logging lines in the PageConfigWidget. check-in: 19b91df610 user: thomas tags: trunk
2024-04-10
18:44
Improvements to the compilation scripts. Improve module docstrings, and type annotations. check-in: 924cf956c2 user: thomas tags: trunk
2024-04-09
21:24
Reorder imports in scripts/compile_resources.py and use from-imports for pathlib.Path check-in: 455fdc9f68 user: thomas tags: trunk
21:08
Add a landscape bug workaround to the PDF and printer settings. If enabled, PDF exports / direct prints of landscape documents are rotated by 90° internally. check-in: f00db60353 user: thomas tags: trunk
21:06
Add changelog entry. Closed-Leaf check-in: 5302908350 user: thomas tags: landscape_workaround
20:42
Reword the PDF landscape workaround tooltip in the settings window. check-in: 985a3a2b73 user: thomas tags: landscape_workaround
20:13
Implemented rotating direct printouts when landscape workaround in the printer settings is enabled. check-in: cb96d6c46f user: thomas tags: landscape_workaround
18:13
Add landscape workaround setting to the printer settings. Add checkbox for toggling this to the printer settings UI. check-in: 5ca45a7a17 user: thomas tags: landscape_workaround
18:05
Add a checkbox toggle to the PDF settings to change the landscape workaround for PDF exports. check-in: 9c515bfde3 user: thomas tags: landscape_workaround
17:44
Add boolean setting "landscape-compatibility-workaround" to the pdf-export settings section. If set to True and the document is in landscape format, the PDF export is rotated 90°. check-in: c89cdae748 user: thomas tags: landscape_workaround
17:36
Merge with trunk. check-in: ad8f614d2b user: thomas tags: landscape_workaround
17:25
Refactor settings: Move PDF-export related settings into their own config section named "pdf-export". check-in: cf5b51e82d user: thomas tags: trunk
16:50
hasgetter.py: Improve type hinting, according to [https://github.com/hamcrest/PyHamcrest/pull/209]. check-in: 13edcea509 user: thomas tags: trunk
2024-04-01
13:51
Use Path.with_name()/Path.with_stem() where appropriate. check-in: 7686c43c12 user: thomas tags: trunk
2024-03-31
19:53
Dependencies: Fix dependency specification on pint: Use pint < 0.22 on Python 3.8. Do not compare the platform, so that Windows builds using newer Python can also use newer pint versions. check-in: 45d635eec1 user: thomas tags: trunk
18:52
MANIFEST.in: Fix path to doc/ThirdPartyLicenses.md check-in: f6bf63b29d user: thomas tags: trunk
2024-03-29
19:57
WIP port to typed-config. Still incomplete! Leaf check-in: b85ca6947c user: thomas tags: typed_config
2024-03-28
17:41
Dependencies: Bump typed-config to >= 1.4, which adds boolean_cast to typedconfig.casts, implementing support for boolean configuration values. check-in: 1183f78180 user: thomas tags: typed_config
12:16
Rename settings objects: The legacy settings and default settings are now named with suffix _old/_OLD. The new typed config took the previous names. check-in: 1588f467fb user: thomas tags: typed_config
11:49
settings.migrate_settings() now returns a boolean. Returns True, if at least one migration script performed a transformative action, False otherwise. check-in: 98f8413c7a user: thomas tags: typed_config
11:22
Add a copy of the application settings using typed-config. check-in: 7bf03fd3f8 user: thomas tags: typed_config
09:08
Add dependency "typed-config" [https://pypi.org/project/typed-config/]. check-in: eee92673d5 user: thomas tags: typed_config
00:24
Update the build system and cleaned up the repository root a bit. check-in: c3d963bc18 user: thomas tags: trunk
00:22
tox.ini: Use the same one-liner also on Linux. With this, drop the dependency on external commands move (Windows) and mv (Linux). Closed-Leaf check-in: 846094c302 user: thomas tags: refactor_build_system
00:16
tox.ini: Windows move command seems to not work, so use a Python one-liner instead. check-in: b29dcbe5d7 user: thomas tags: refactor_build_system
2024-03-27
23:45
Fix moving the resources directory on Windows. check-in: 85553db8ba user: thomas tags: refactor_build_system
23:45
Move ThirdPartyLicenses.md into the doc directory. check-in: bba9f64356 user: thomas tags: refactor_build_system
23:29
tox.ini: Move the raw resources out of tree after compiling them. Move them back into place in teardown code. With this, the unit tests running under the "compiled" factor do not have access to the raw resource/UI files, mimicking the state inside a frozen application bundle. check-in: 0a0c68be84 user: thomas tags: refactor_build_system
22:57
The packaging scripts now only use the native Python 3 version to package, and not any additional versions that may be around. check-in: 882e6bf7d5 user: thomas tags: refactor_build_system
22:47
Fixed tox invocation in packaging scripts. check-in: 5f1139aa16 user: thomas tags: refactor_build_system
22:44
tox.ini: Introduce the "plain/compiled" factors. Compiled runs the resource and UI compilers in setup code, and restores the tree in teardown code. Plain simply runs the test with the in-tree resources and UI files. check-in: cb786c52ab user: thomas tags: refactor_build_system
22:43
The packaging scripts now use tox run --factor, which allows selecting the packaging tox environment by only specifying the "package" factor. check-in: 1bec447423 user: thomas tags: refactor_build_system
22:30
compile_resources.py: Remove debug path output. check-in: 2ed8c4c264 user: thomas tags: refactor_build_system
22:19
Replace setup.py with a dedicated script to compile the Qt resources. This gets rid of setup.py in the repository root directory. check-in: f1f2c1d91a user: thomas tags: refactor_build_system
21:15
tox.ini: Removed testing for platformdirs==2.6, as that is currently broken. The new setup locks dependencies in generated requirements, preventing the previous way of installing the two variants with 2.6 or >= 3.3. check-in: 838de9c889 user: thomas tags: refactor_build_system
17:51
Try silencing warnings about potentially missing packages, emitted by setuptools. The resources are not part of the to-be-distributed files when building packages. check-in: 68e4f5f178 user: thomas tags: refactor_build_system
17:32
Requirements: Include tox >= 4.0 in the development requirement, ensuring it is put into the virtual environment on systems without a system-wide installation. check-in: c6266f2388 user: thomas tags: refactor_build_system
17:12
tox.ini: Move cleanup tasks in packaging environments from the commands list to commands_post list. The UI files cleanup now runs in teardown code. check-in: 8daf4ef16f user: thomas tags: refactor_build_system
16:57
Use the tox run command in the unit test runner scripts. check-in: e6c1e4981e user: thomas tags: refactor_build_system
16:52
Use the generated requirements.txt files inside tox.ini to ensure consistent versions across environments. This also de-duplicates the requirements, as another copy was also hard-coded in tox.ini. Bump minimum tox version to 4.0 and use the new subcommands to run the tox environments in the build* scripts. check-in: a8470273af user: thomas tags: refactor_build_system
16:51
Use pip-tools to automatically generate the requirements.txt variants. Use the requirements-dev.txt variant to create the development virtual environment. check-in: 06cbdabfc1 user: thomas tags: refactor_build_system
16:36
tox.ini: Use long form options, like pass_env, instead of passenv. Add environment descriptions that are shown when listing tox environments. check-in: acf73e15e7 user: thomas tags: refactor_build_system
15:56
Remove requirements.txt. Also add it to the ignore-glob. The requirements.txt duplicates the requirements also stated in pyproject.toml. It will be automatically generated in the future. check-in: 56c3698f8f user: thomas tags: refactor_build_system
15:53
Move tox.ini out of pyproject.toml. tox still does not support pulling config from pyproject.toml natively, so pull the config out for better syntax highlighting. check-in: a32c0920af user: thomas tags: refactor_build_system
15:52
Fix cx_Freeze builds on non-Windows platforms. Optimizations applied in [b7967a44a77e31ec] stripped parts of platformdirs not used on Windows. But this affected all builds globally. So put the excludes into a module-level list and strip the parts only when the current platform is Windows. check-in: f63a6ba146 user: thomas tags: trunk
12:42
Rotate landscape PDFs by 90°. This makes all landscape documents export as portrait pages with rotated content. check-in: 6eb6ee9729 user: thomas tags: landscape_workaround
2024-03-25
14:31
ComboBoxItemDelegate: Re-order source model resolution to avoid a type hinter warning in setEditorData(). check-in: 33d2c46379 user: thomas tags: trunk
13:04
Settings: Reorganize some settings. Moved PDF export options and printer options to their dedicated settings pages. Refactor how the page model is populated. check-in: ee1f7ab967 user: thomas tags: trunk
13:03
DecklistDownloader: Improve type annotations Closed-Leaf check-in: 5dec7a06dd user: thomas tags: reorganize_settings
13:03
SettingsWindow: Improve type annotations and remove an unused local variable check-in: 90e130d061 user: thomas tags: reorganize_settings
13:02
DeckImportWizard: Fix type warnings. check-in: 0b054d25f0 user: thomas tags: reorganize_settings
13:01
MainWindow: Fix typo in show_application_update_available_message_box(). check-in: 4eceb760fe user: thomas tags: reorganize_settings
13:00
ProgressBar: Fix typo in _set_retain_size_policy(). check-in: bbadb23bab user: thomas tags: reorganize_settings
12:59
Remove PageRenderer.scene() re-implementation, as it no longer serves a purpose. check-in: d0175b2cbc user: thomas tags: reorganize_settings
12:47
BlockedSignals: Rename variables, so that they are no longer treated as typos. check-in: fc54e87e59 user: thomas tags: reorganize_settings
12:40
Settings: Reformat some long lines and add logging messages when the user selected a wrong type in the debug settings download/import buttons. check-in: 7319ee1666 user: thomas tags: reorganize_settings
12:20
Settings: Move the PDF export path setting to the PDF settings page. check-in: 7f3307642d user: thomas tags: reorganize_settings
11:08
Settings: Add button to the Debug settings that opens the Cutelog website when clicked. check-in: a15b7130e5 user: thomas tags: reorganize_settings
10:39
Move the settings page metadata shown in the pages view into the individual settings pages. Now, the type system warns on incomplete data, because the required metadata is defined as an abstract property in the Page base class. check-in: c171a7bd90 user: thomas tags: reorganize_settings
10:19
Moved PDF export and printer settings to new settings pages. check-in: 7203e50371 user: thomas tags: reorganize_settings
2024-03-24
22:09
Further optimizations for the MSI build size, by stripping a few more PyQt5 components the app does not use. check-in: b7967a44a7 user: thomas tags: trunk
18:02
Release v0.28.0 check-in: a148d5b6fb user: thomas tags: trunk, release, v0.28.0
18:01
Release v0.28.0 Edit: Undo release tags. Next check-in fixes the bad reference in the changelog.) check-in: 8bf2c82897 user: thomas tags: trunk
17:27
Remove an unused import check-in: 66edb9ca6c user: thomas tags: trunk
16:15
Support automatic deck list downloads from Manabox.app. See [b76a375bc3f622fe] check-in: 205d04dff1 user: thomas tags: trunk
15:38
MeteredSeekableHTTPFile: Use a dict to store instances, instead of a list. check-in: 6ef061b972 user: thomas tags: trunk
15:33
PageConfigWidget: The paper size is now the reference point and imposes restrictions on the margin sizes. Increasing the margins no longer automatically increases the paper size to make the margins fit. check-in: 9c53dd5750 user: thomas tags: trunk
13:09
Fixed page capacity display in the settings lagging behind by one change. Culprit was the signal connection via UI files: These caused the validation and display update slots to be called first, before the actual PageLayoutSettings instance got updated. The signal connections are now defined in code and the validation slots are called last. check-in: f03b17d3b6 user: thomas tags: trunk
11:33
hasgetter.py: Improved error message if the hasgetter() hamcrest matcher detects a failure. check-in: a7551b89fb user: thomas tags: trunk
2024-03-21
14:24
Fix package name of dependency cx_Freeze in the requirements. While the official documentation states "cx_Freeze", the canonical package name is "cx-Freeze". While the underscore variant does re-direct to the proper package, it causes PyCharm's dependency monitoring to complain. check-in: be4626583e user: thomas tags: trunk
2024-03-20
13:56
Tests: Refactor tests/ui/test_page_config_widget.py to create the PageConfigWidget via a pytest fixture. check-in: 6ba8aadad7 user: thomas tags: trunk
13:43
Add feature to flip the paper width and height values via a single button click. It allows toggling between portrait and landscape mode. check-in: fbb4b1a4cb user: thomas tags: trunk
13:42
Add button to the PageConfigWidget that flips the page height and page width values. This toggles between landscape and portrait mode. Closed-Leaf check-in: d53c8b1e89 user: thomas tags: flip_paper
13:17
Add icon transform-rotate to the internal icon theme. check-in: 7793f5d773 user: thomas tags: flip_paper
13:03
Add changelog entry for the square corner lines issue. check-in: 14d2b7445a user: thomas tags: trunk
2024-03-19
15:21
Merge with trunk Leaf check-in: 11e3c7f5ab user: thomas tags: l10n
15:15
Update display strings based on notes on crowdin. check-in: 359e1d63e7 user: thomas tags: trunk
14:42
Fully hide zero-width card bleeds. Likely fixes [51862cdc87d0b9ae]. check-in: 4b588c7851 user: thomas tags: trunk
13:52
Merge fork in trunk. check-in: f19cb2d17d user: thomas tags: trunk
2024-03-14
14:08
Add missing signal connection between the DebugSettingsPage and the SettingsDialog. Downloading card data to file works again. Fixes [76ffc931a7047e1f]. check-in: 3e61b0f8cd user: thomas tags: trunk
2024-03-11
20:52
PrintingFilterWidget: Use the QUrl.ParsingMode enum, instead of bare constants. check-in: bd6e68ece8 user: thomas tags: trunk
2024-03-08
16:48
Update README.md. check-in: 755e84278d user: thomas tags: trunk
2024-03-01
16:47
PageConfigWidget: Display the page capacity for both regular and oversized cards. check-in: 4bc1afbfc9 user: thomas tags: trunk
2024-02-29
11:23
Properly handle double-faced tokens and Dungeon cards. These are now hidden by the "hide-tokens" filter and the related cards search stops at them. Fixes excessive related cards results with Incubator tokens, The Ring emblem, "venture into the Dungeon", and "Take the initiative." Fixes [aad4fb275224cc6e]. check-in: ab80f94db8 user: thomas tags: trunk
11:15
Implement removal of obsolete related printings by purging the entire RelatedPrintings table before writing new entries. Closed-Leaf check-in: 94a1bc67c2 user: thomas tags: df_tokens
09:55
Add import test case for the 3 double-faced tokens in the JSON samples. check-in: 323391b5b1 user: thomas tags: df_tokens
09:51
Add a description to an assert in test_carddb.py check-in: 11b31addbb user: thomas tags: df_tokens
08:13
Tests: Rename JSON sample from double_faced_card_without_top_level_oracle_id.json to reversible_card.json check-in: 2231d103f0 user: thomas tags: df_tokens
2024-02-28
18:28
Add changelog entry. check-in: bf32a1121a user: thomas tags: df_tokens
18:21
Handle double-faced tokens and treat Dungeon cards as tokens during the card data import. Fixes the token card filter, and causes the related card search to stop at these. The app still needs to rebuild the related cards table and remove the relations from existing databases. check-in: e3060aeaca user: thomas tags: df_tokens
13:22
Runner script: Add CardDatabase.find_related_cards() to the list of profiled methods. check-in: d3f50be54b user: thomas tags: trunk
11:59
crowdin.yml: Remove a leading slash in a path. check-in: eda3b88a87 user: thomas tags: l10n
2024-02-27
11:14
pyproject.toml: Add link to the translation project to the URLs section. check-in: 8466159fdd user: thomas tags: l10n
2024-02-26
16:59
AddCardWidget: Unify punctuation in display text between both variants. check-in: 9dd3fe94da user: thomas tags: l10n
15:54
AboutDialog: Mark some labels as non-translatable, and add a few context comments. check-in: 1173c7c4bf user: thomas tags: l10n
15:53
Fix string upload. Also drop obsolete strings when updating the source strings from code. check-in: dd48f9e4a1 user: thomas tags: l10n
15:45
Enable string extraction for UI files. check-in: 4b35fdcd34 user: thomas tags: l10n
15:39
Fix mapping between locales provided by Crowdin and locale names loaded by Qt. Implement loading translations in the Application class. For now, register en_US and de as languages included in the compiled resources. check-in: 683c39cb22 user: thomas tags: l10n
14:42
Add crowdin.yml and scripts/update_translations.py to manage the project translations on Crowdin.com. check-in: 9669d98d02 user: thomas tags: l10n
14:23
Project settings: Ignore .qm files, containing compiled translations in a binary format used by Qt. check-in: 361d63b6f3 user: thomas tags: l10n
2024-02-24
22:55
SettingsWindow: Wrap UI strings in tr() calls, which allows the extraction via Qt's lupdate tool. check-in: 9dfaf2b878 user: thomas tags: l10n
12:12
Refactor the settings window: - Replace the tabs with a list view showing the pages - Add icons to pages - Highlight changes when hovering over the Reset and Restore Defaults buttons - When clicking those, ask the user if they want to apply the reset/restore to the current or all pages - Also add the highlighting feature to the DocumentSettingsDialog check-in: 71dcabf978 user: thomas tags: trunk
12:07
Added links in the changelog for recently added card filters. Closed-Leaf check-in: 65cf221ce8 user: thomas tags: refactor_settings_window
11:49
Reworded a changelog entry. check-in: cea54f25c6 user: thomas tags: refactor_settings_window
11:41
Add changelog entry mentioning the highlighting. check-in: dad430f6e7 user: thomas tags: refactor_settings_window
11:41
SettingsWindow: Remove the highlighting when the user clicks the Reset or Restore Defaults button. check-in: 2107015205 user: thomas tags: refactor_settings_window
11:26
Implement change highlighting for the DocumentSettingsDialog. check-in: 699d0bfcfa user: thomas tags: refactor_settings_window
2024-02-23
14:46
Set highlight effect strength to 0.75, improving rendering of dark, highlighted text on light background. check-in: aef535e916 user: thomas tags: refactor_settings_window
14:43
Query the current color palette for the highlight color and use that for the widget highlight. This may need some tweaking to make it look better. check-in: 0719462d1a user: thomas tags: refactor_settings_window
14:09
Move function highlight_widget() into ui.common.py, as it is used by different classes in the same way. This unifies the handling across the whole application. check-in: 41d1797f8d user: thomas tags: refactor_settings_window
14:05
Implemented change highlighting for the PageConfigWidget for changes against the application settings. check-in: 5f89f0100d user: thomas tags: refactor_settings_window
13:21
Implemented change highlighting for the printing filter widget classes. check-in: c2da86667d user: thomas tags: refactor_settings_window
11:59
Page: Rename set_highlight() to highlight_differing_settings() check-in: b688b5663c user: thomas tags: refactor_settings_window
11:55
Implement set_highlight() for the remaining pages. This currently does not work on widgets in subclasses, which is still TODO. check-in: 2faf914c75 user: thomas tags: refactor_settings_window
11:22
Directy implement clear_highlight() in the Page base class. Use QObject.findChildren() for this, and simply remove all effects from all child QWidgets. check-in: 703a0f5c80 user: thomas tags: refactor_settings_window
10:40
Add docstrings to the Page class. check-in: e01f93f173 user: thomas tags: refactor_settings_window
10:34
Refactor highlight effect creation: Move the logic into a dedicated method, instead of duplicating the same lines all over the module. check-in: 68bb4a283e user: thomas tags: refactor_settings_window
10:27
Implement highlighting on the DecklistImportSettingsPage. Mark the highlighting methods in the base class as abstract. check-in: 62f3df9897 user: thomas tags: refactor_settings_window
10:14
Implement API for highlighting changed settings and clearing the highlight. The highlighting is implemented by adding a QGraphicsColorizeEffect on the widgets, which tints them blue. The trigger is implemented by using an event filter on the Reset and Restore Defaults buttons, which triggers the highlighting on hover events. check-in: e013cb694a user: thomas tags: refactor_settings_window
09:29
Dialogs: Resolve file system paths stored in the settings on access. This allows using shortcuts, like "~/Documents" on Linux. check-in: ecf0066056 user: thomas tags: trunk
2024-02-22
15:38
SettingsWindow: Unify button labels in reset() and restore_defaults(). They now use a unified templating. check-in: 51cff04681 user: thomas tags: refactor_settings_window
15:22
SettingsWindow: restore_defaults() and reset() now ask, if they should apply to the currently shown page or all pages. check-in: c35c1c24c9 user: thomas tags: refactor_settings_window
15:18
Fix test that referenced the no longer existing tab widget to refer to the page stack instead. Rename the test and test module to no longer refer to tabs. check-in: fca6650fef user: thomas tags: refactor_settings_window
14:20
SettingsWindow: reject() no longer calls reset(), instead performs the reset itself. check-in: 439128c891 user: thomas tags: refactor_settings_window
14:19
settings_window.py: Put both QMessageBox.StandardButton and QDialogButtonBox.StandardButton into the global scope and rename them, so that both can live together in the same scope. Reduces verbosity in the usage locations. check-in: 447c1a244f user: thomas tags: refactor_settings_window
13:58
Rename variables in SettingsWindow.accept() to more expressive. check-in: e471d80ad5 user: thomas tags: refactor_settings_window
2024-02-19
18:07
Add changelog entry. check-in: a877c2f354 user: thomas tags: refactor_settings_window
17:16
Implemented syncing the two page selection widgets, completing the refactoring. check-in: bc115924e5 user: thomas tags: refactor_settings_window
16:38
Link the page_selection_list_view with the stacked pages. Selecting a page now switches to it. Also select the first page when instantiating the dialog to have a consistent view. check-in: 2c18941f3e user: thomas tags: refactor_settings_window
16:29
SettingsWindow: Select the first item in the page selection list view. check-in: a64e3e7bc5 user: thomas tags: refactor_settings_window
14:25
Settings Window: Set up reactive design. The page list view is shown when the window is more than 750 pixel wide. Otherwise, the page list drop-down is used. Adjusted the horizontal expands in the UI so that the configuration widgets get a bit more space. check-in: f305fad8b7 user: thomas tags: refactor_settings_window
13:33
SettingsWindow: mark the icon name parameter in item_factory() as optional. check-in: ecf108dae0 user: thomas tags: refactor_settings_window
13:32
SettingsWindow UI: set property uniformItemSizes to True. check-in: 1c6882e5e9 user: thomas tags: refactor_settings_window
13:22
Add icon view-hidden.svg to the icon theme. It is used by the settings window for the print hiding page. check-in: 32554ab1fa user: thomas tags: refactor_settings_window
13:06
DeckImportWizard: Fix log line in on_deck_list_browse_button_clicked(). The line indicating the user replaces an existing deck list should only be logged, if the deck list is actually non-empty. check-in: 0a5adffe8c user: thomas tags: trunk
12:46
SettingsWindow: Implement a page model based on QStandardItemModel and QStandardItem. The model is not yet connected with the stacked pages widget, and a few icons are not yet decided on. check-in: 7466e6f158 user: thomas tags: refactor_settings_window
12:44
Settings Window UI: Set the page list view icon size to 22x22. check-in: 7b727ff81d user: thomas tags: refactor_settings_window
11:47
SettingsWindow: Convert UI to use a QStackedWidget, instead of a QTabWidget for settings pages. The model required for page switching is not yet in place. check-in: e939812ee4 user: thomas tags: refactor_settings_window
11:46
Tests: Remove unused imports check-in: f4b11d0e5a user: thomas tags: refactor_settings_window
2024-02-18
17:37
Refactor tests/ui/settings/test_set_filter.py to work with the new settings window structure. The tests now test the specific page, without instantiating the whole settings dialog, thus run a good bit faster. check-in: e118aa6154 user: thomas tags: refactor_settings_window
17:23
Resolve circular imports by moving the settings Page subclasses into a new, separate module. check-in: 13c31f4b32 user: thomas tags: refactor_settings_window
17:09
Decompose the SettingsWindow class by extracting all pages into individual classes. check-in: 44f7aa2f81 user: thomas tags: refactor_settings_window
16:46
Fix module paths for custom widgets set in settings_window.ui. check-in: 2b55ece870 user: thomas tags: refactor_settings_window
15:28
Extracted tab contents of the SettingsWindow into individual UI files. check-in: d0c9c55371 user: thomas tags: refactor_settings_window
2024-02-14
16:51
ImageDatabase: Remove module constant IMAGE_SIZE, replacing usages with CardSizes.REGULAR, defined in units_and_sizes.py. Tests: Replace "white" blank image with a transparent one, to be in line with changes introduced in [8e8346ca98b4313e]. check-in: b1d7ab960c user: thomas tags: trunk
16:31
Remove a long-broken and disabled test for check card rendering. check-in: 0464c217d7 user: thomas tags: trunk
16:28
Fix a few reported style issues. check-in: d818cd65b8 user: thomas tags: trunk
16:01
Remove explicit parameters passed to super() calls. These are not required and get filled automatically. check-in: e1063f026b user: thomas tags: trunk
15:45
Cache cleanup wizard: The image tooltip now shows the card name translated into the preferred language, if the card language does not match the preferred language. Implements [dacf73a1304303f5]. check-in: de36a62811 user: thomas tags: trunk
2024-02-07
09:34
Merge with trunk Leaf check-in: b9395505f1 user: thomas tags: duplex_printing
09:20
Merge with trunk Leaf check-in: 15bcb5d42b user: thomas tags: decklist_export
09:19
Merge with trunk Leaf check-in: 51e9305d88 user: thomas tags: additional_deck_list_websites
09:16
Merge with trunk Leaf check-in: abf38abb29 user: thomas tags: first_launch_wizard
2024-02-04
18:20
Release v0.27.0 check-in: 0fb5f602a5 user: thomas tags: trunk, release, v0.27.0
18:02
Implement drawing thick outlines around cards. check-in: 5095c6ad51 user: thomas tags: trunk
17:57
Serialize image downloads. This prevents multiple progress reports from overwriting each other. check-in: dcaf1aa3cb user: thomas tags: trunk
17:57
Fix name clashes during card image download, if the downloader concurrently fetches both sides of a DFC. check-in: 8dc245eed0 user: thomas tags: trunk
17:20
Add changelog entry. Closed-Leaf check-in: 62282c06ee user: thomas tags: card_bleed
17:04
Implemented corner bleeds. check-in: c0cafcb56c user: thomas tags: card_bleed
16:12
CardBleeds: Renamed from_image() to from_card() and replace the QPixmap parameter with the Card instance. check-in: 84dd2ce161 user: thomas tags: card_bleed
15:37
CardItem.create_corners(): Refactor position computation code by factoring out the coordinate math into local variables. check-in: acdf5ff51c user: thomas tags: card_bleed
14:24
CardItem: Replace the corner_area attribute with the static CORNER_SIZE_PX attribute. check-in: 0d77524cf2 user: thomas tags: card_bleed
13:08
CardItem: Refactor create_corners() to not use itertools.starmap(). Instead, call _create_corner() directly inside a list literal, which improves type hinting and reduces complexity. check-in: 6ccb299a59 user: thomas tags: card_bleed
09:58
Improve variable handling in update_bleed_size(). Use tuple unpacking to assign scaling to named scalars. check-in: 292dee8d63 user: thomas tags: card_bleed
2024-02-03
17:00
Explicitly set a Z value for card corners. They now stack between card images and card bleeds. check-in: d7387d4061 user: thomas tags: card_bleed
16:39
Move the text elements below the area occupied by card bleeds. check-in: 1a8e4f93c2 user: thomas tags: card_bleed
16:34
The adaptive bleed widths now handle row/column spacings larger than 2* bleed width. In that case, the configured bleed width is used, instead of filling the entire space. check-in: a8feaba094 user: thomas tags: card_bleed
16:32
Implemented adaptive bleed widths. Bleeds on edges facing neighboring cards now use half the image spacing, instead of the full bleed width, preventing overlapping bleeds. check-in: 6d12c8c24a user: thomas tags: card_bleed
2024-02-02
14:41
Use enum.auto() to declare subsequent render layers, instead of hard-coding Z values. check-in: 3d22869c3f user: thomas tags: card_bleed
14:38
Refactored bleed handling: Encapsulate the behavior in the new CardBleedItem class. check-in: b23a1515be user: thomas tags: card_bleed
2024-02-01
16:17
Revert [30b5a1d484e22b], because it looks bad with borderless cards. Sampling closer to the image edge works better with those cards. check-in: 874207484b user: thomas tags: card_bleed
15:57
Implemented updating the card bleed width when the page layout settings change. check-in: 390fdb6719 user: thomas tags: card_bleed
13:08
Sample the 3rd/3rd last pixel row/column in the card images to generate the bleed. This should avoid potential issues with artifacts in the border pixels. check-in: a94ab464d6 user: thomas tags: card_bleed
13:05
Use the transformation matrix to shift the top/left bleeds outside the card image area. check-in: 30b5a1d484 user: thomas tags: card_bleed
12:58
First, working draft implementation. Does not support dynamic resizing and does not honor neighboring images with positive image spacing settings. check-in: af6329d076 user: thomas tags: card_bleed
2024-01-31
12:24
Add a numerical card-bleed-mm setting to the document settings. It allows setting the card bleed width as a non-negative integer in millimeters. check-in: c1cce395e5 user: thomas tags: card_bleed
11:38
Merge with trunk check-in: ea344b143b user: thomas tags: card_bleed
08:39
PageConfigWidget: Reduce code verbosity a bit by putting the ui attribute into method local scopes first. check-in: 1993ff2a31 user: thomas tags: trunk
08:35
Merge with trunk check-in: 8e7951fd4b user: thomas tags: card_bleed
08:28
Merge with trunk. check-in: 7b3df924ef user: thomas tags: duplex_printing
2024-01-30
21:24
Merge with trunk check-in: 0c89361958 user: thomas tags: first_launch_wizard
21:00
Round 3 of syncing trunk with port_pyside6 branch. This should complete the trunk side. All changes worth importing should be imported by this check-in. check-in: 2e052061de user: thomas tags: trunk
19:59
A few further adjustments reducing the diff between trunk and port_pyside6 branches. check-in: bda38e06f4 user: thomas tags: trunk
19:38
Backported changes from the port_pyside6 branch. Notably, usage of Qt enums, which are available in Qt5. And some other formatting adjustments to reduce the diff size. check-in: ebe29d5f33 user: thomas tags: trunk
14:37
Use a transparent blank image in the ImageDatabase. This improves the rendering with dark application themes. check-in: 8e8346ca98 user: thomas tags: trunk
2024-01-28
11:16
Implement some scaffolding code for card bleeds in CardItem. check-in: 11aae8973b user: thomas tags: card_bleed
11:07
CardItem: Use multiplication to to convert the sharp corner enabled boolean to an opacity value. Also rename the variable in on_page_layout_changed() from "value" to "opacity" check-in: d0b05a7e4d user: thomas tags: card_bleed
2024-01-27
16:10
Release 0.26.1 check-in: ae52fab480 user: thomas tags: trunk, release, v0.26.1
16:05
Update year in copyright notices to 2024. check-in: 3e1a1cd323 user: thomas tags: trunk
15:49
Improve wording in the changelog. check-in: 1c145c1735 user: thomas tags: trunk
10:39
Merge with trunk. check-in: eac83e9c0a user: thomas tags: duplex_printing
10:19
Stabilize the re-flow algorithm used when the page capacity decreases. It no longer re-orders cards within the document. Implements [fae56bc9b847f2c0] check-in: 6770e36952 user: thomas tags: trunk
10:12
Add changelog entry. Closed-Leaf check-in: 7b10386405 user: thomas tags: reflow_pages
09:52
ActionEditDocumentSettings: Name a variable in the reflow algorithm check-in: 0405ff2e2c user: thomas tags: reflow_pages
09:43
ActionNewPage: Extend docstring to clarify behavior. check-in: e2fdbfa803 user: thomas tags: reflow_pages
2024-01-26
18:45
Implement order-stable document reflowing. Remove a broken test. check-in: 53406883bd user: thomas tags: reflow_pages
16:59
Remove tests/test_document.py::test_page_layout_compute_page_card_capacity, which is outdated. A better test for the card capacity computation is in tests/test_page_layout_settings.py. check-in: d0d8c6171d user: thomas tags: reflow_pages
16:48
Merge with trunk check-in: cd10b78ef1 user: thomas tags: reflow_pages
16:24
PageLayoutSettings: Fixed bug in the row/column count computation. Those are now tested and work properly. Fixes [f2f8b5cc6b79f7a6]. check-in: 15abc995ce user: thomas tags: trunk
2024-01-25
09:29
Fix type annotation. check-in: 6aeb3900a7 user: thomas tags: reflow_pages
09:28
ActionEditDocumentSettings: Extracted page type filtering in _reflow_pages_of_type() into a separate method. check-in: 61cbea08b9 user: thomas tags: reflow_pages
2024-01-24
15:25
ActionMoveCard: Complete handling of the target_row parameter in undo(). And fix a wrong value in a test case. check-in: ce351a7727 user: thomas tags: reflow_pages
15:13
WIP: ActionMoveCard gains parameter target_row. It can be used to move cards into the middle of the target page. apply() already supports the new parameter. undo() still needs extension, and tests for undo() currently fail. check-in: c8905bb8bb user: thomas tags: reflow_pages
08:18
ActionMoveCards: Rename parameter target to target_page. check-in: d69b777827 user: thomas tags: reflow_pages
08:14
Merge fork. check-in: e7d5fa0a05 user: thomas tags: reflow_pages
2024-01-21
14:11
Clarify docstring for ActionRemoveCards. Indicate that the index range parameter uses inclusive ends. check-in: faa8f6c769 user: thomas tags: reflow_pages
13:56
Add class BackFace used for SFC back sides. Introduce a common "interface" base class for cards, card faces, and back faces, that defines the required attributes for UI display. Leaf check-in: 0097eff371 user: thomas tags: duplex_printing
2024-01-18
16:29
_interface.py: Fix missing TypeVar that wasn't moved correctly in the previous check-in. check-in: 8e7eb174d7 user: thomas tags: reflow_pages
16:24
Move split_iterable() from card_actions.py into _interface.py. check-in: 3ff626ed95 user: thomas tags: reflow_pages
15:18
Simplify loop in ActionEditDocumentSettings._reflow_pages_of_type(). check-in: 2c11bd9bb7 user: thomas tags: reflow_pages
13:01
MeteredSeekableHTTPFile: Remove a warning if read() returns less than the requested amount of bytes. Some readers probe the file by repeated calls to read() to determine if EOF is reached, triggering this multiple times. check-in: 6344b3eda8 user: thomas tags: trunk
12:58
MeteredSeekableHTTPFile: Handle AttributeError when calling file.read(). This may occur, if the app force-closes the read file from another thread during application shutdown. This should prevent infrequent crashes that can occur during exit, while a card data update runs. check-in: 2c8d98956f user: thomas tags: trunk
12:52
CardDatabase: Use SAVEPOINTs in get_all_cards_from_image_cache(), instead of restarting the database transaction at the end of the method. check-in: 48a000a9c7 user: thomas tags: trunk
10:09
Merge with trunk. check-in: aefb139aa6 user: thomas tags: duplex_printing
09:57
Page now internally handles CardContainer creation. ActionAddPage can take a content parameter and create pages filled with cards, to reduce Qt model overhead. check-in: 8a3e12a3d9 user: thomas tags: trunk
09:54
Refactor ActionAddCard to use the new capabilities of ActionAddPage. When cards spill over to newly created pages, the logic now creates pre-populated pages, instead of performing two steps to add empty pages and then fill them. Closed-Leaf check-in: a759a3ed86 user: thomas tags: add_page_with_content
09:52
Broaden type annotations for Page and ActionNewPage. The content parameters are now annotated to accept Iterable[AnyCardType], instead of List[Card]. check-in: cf3fac7975 user: thomas tags: add_page_with_content
2024-01-17
16:38
ActionLoadDocument: Use the new ability of ActionNewPage to directly add pages with cards. check-in: 380990a5b7 user: thomas tags: add_page_with_content
16:25
ActionNewPage: Add "content" parameter, that allows setting the page content for newly created pages. check-in: 5ea6a47e72 user: thomas tags: add_page_with_content
12:05
Extend class Page to internally handle CardContainer creation. check-in: a0a6ee9cca user: thomas tags: add_page_with_content
09:16
Add a TODO. check-in: 3205b2d751 user: thomas tags: duplex_printing
09:12
Began work on supporting Duplex mode in the Document: ActionEditDocumentSettings now inserts/removes pages for the duplex back sides. check-in: 0df6690306 user: thomas tags: duplex_printing
09:09
Fix NameErrors in print.py. check-in: a59fb367f1 user: thomas tags: duplex_printing
08:46
Fix a crash in the application update checker. It occurred, if the connected network requires a login and replaces the expected JSON document with the authentication HTML website. check-in: bcafd0d919 user: thomas tags: trunk
08:26
Deduplicate a type hinting definition in card_list.py. check-in: 3f53393fed user: thomas tags: duplex_printing
2024-01-15
15:47
CardDatabase: Implement a TODO note. check-in: 41e2caf4e5 user: thomas tags: trunk
09:48
Adjust a few type annotations. check-in: c1fc13a580 user: thomas tags: duplex_printing
2024-01-14
23:20
Introduce distinction between Card and CardFace. This is currently a simple alias, but is meant to be eventually split into distinct classes. check-in: 4aa723984f user: thomas tags: duplex_printing
17:11
Remove unused method introduced in recent check-in [49acf0b68b1860bb]. check-in: c0dd364a21 user: thomas tags: trunk
16:42
CardInfoDownloader: Update PrintingDisplayFilter in-place, instead of deleting the complete table content and re-populating it during the import. This saves ~ 15% of the database writes when updating the database with a same-version dump. CPU time usage stays roughly the same, because it replaces 1 B-Tree write with 1 B-Tree read in case of in-place updates. check-in: 49acf0b68b user: thomas tags: trunk
10:58
Fix benchmark script throwing an exception during the card data import. The breakage was merged into trunk in [4e623b8aa41d3341]. Starting with that commit, the importer relies on the PrintingFilters table being filled with the values from the settings, as that task was moved into a separate worker. Thus, the benchmark script has to run the PrintingFilterUpdater before importing the card data. check-in: b1f4b90247 user: thomas tags: trunk
10:40
Fix benchmark script not running by removing the global database semaphore. It also checked the QApplication instance if it should start, which does not work in the context of the benchmark script. check-in: 5ac9e961a1 user: thomas tags: trunk
10:26
Mark the benchmark script as executable. check-in: 291fde8254 user: thomas tags: trunk
2024-01-13
10:35
sqlite_helpers: Rename _read_current_database_schema_version() to _get_target_database_schema_version(). Rename internal variables in check_database_schema_version() to use better, less confusing names. check-in: 4983258f7e user: thomas tags: trunk
00:26
CardDatabase: Add two TODO entries. Edit: On ~ 1000 images, these queries complete in under 5ms each. For now, there is no need to worry about optimizing them. Closed-Leaf check-in: 1004a584d7 user: thomas tags: bogus
00:08
CardDatabase: Add a FIXME for a potential bug in translate_card() when tranlating check cards. check-in: 2c2772182f user: thomas tags: duplex_printing
2024-01-11
16:24
Merge with trunk. check-in: 0537a7ee47 user: thomas tags: duplex_printing
16:23
Fix CardInfoDatabaseImportWorker._insert_card_back_id() using the wrong database connection. It used the logic from before [db560eb766a99124] with a shared database connection. Closed-Leaf check-in: e916aa42c8 user: thomas tags: WIP
15:57
Let errors in _download_from_scryfall() propagate to the calling function, which was originally intended to handle these errors. This causes the correct signals to be emitted at the correct time. check-in: cf16793f7c user: thomas tags: WIP
15:39
Fixed remaining tests. check-in: 2a09d34648 user: thomas tags: WIP
2024-01-10
20:02
ImageDatabase: Fix _fetch_and_set_image() not populating the loaded_images map and images_on_disk set. Additionally, fix a few broken tests. check-in: 52e9aa41b1 user: thomas tags: WIP
18:24
Improve type hinting in tests/test_image_downloader.py. check-in: f4aa76d402 user: thomas tags: WIP
15:32
Fix syntax error that was checked-in by accident. check-in: 2ed4264c02 user: thomas tags: WIP
12:15
Fix a few tests in tests/test_image_downloader.py check-in: bf21ecee95 user: thomas tags: WIP
2024-01-09
17:54
Fix test_unknown_save_version_raises_exception(). check-in: 80aad3ca57 user: thomas tags: WIP
17:50
tests/test_card_info_downloader.py: Fix handling of card layouts in class TestCaseData. check-in: 4b6752113d user: thomas tags: WIP
17:10
Merge with trunk. check-in: 72fb51e5e7 user: thomas tags: WIP
17:05
ActionRemoveCards: Move the static method to_list_of_ranges into the module scope. Update it to perform the input value sorting internally. Adjust the test cases to test the function directly, instead of through ActionRemoveCard.__init__(). Add a few test cases for zero and negative numbers. check-in: 8589dbf049 user: thomas tags: trunk
16:32
Fix a crash in ActionAddCard.as_str(). The action now handles distributing multiple copies across multiple, already existing pages. check-in: 3cdf9d94c4 user: thomas tags: trunk
2024-01-08
16:58
Resolve a merge in tests/ui/test_page_scene.py. check-in: 8aac1255fb user: thomas tags: WIP
2024-01-07
10:14
Fix two test cases in tests/test_card_info_downloader.py. check-in: f2bea666d4 user: thomas tags: WIP
2024-01-06
23:13
Fix a few tests in tests/test_image_downloader.py check-in: 4b4042b955 user: thomas tags: WIP
23:12
Remove unused import check-in: 6e112dc16d user: thomas tags: WIP
22:49
Fix a NameError in the PageConfigWidget class. check-in: 2ff3ccd036 user: thomas tags: WIP
2024-01-05
22:18
Rename JSON sample double_faced_card_without_top_level_oracle_id.json to reversible_card.json check-in: 52317b46c1 user: thomas tags: WIP
22:12
Fix TestCaseData property back_face_id. check-in: 5cb119bb6c user: thomas tags: WIP
22:08
ImageDatabase: Remove the ImageDownloader instance created in __init__(). Add the missing_image_obtained(QModelIndex) signal. Properly handle the missing image signals when obtaining missing images. The ImageDownloader instance created when fetching missing images now properly relays both signals to the Document and UI. check-in: c4d4b43b81 user: thomas tags: WIP
21:53
Fix pytest fixture document_light. check-in: 9b44e8bb0a user: thomas tags: WIP
21:42
Fix syntax errors in tests/test_document_loader.py caused by an invalid merge. check-in: 399c5c90be user: thomas tags: WIP
21:29
Fix tests/test_check_card_rendering.py. check-in: d906409b38 user: thomas tags: WIP
2024-01-03
19:39
Continue fixing tests. check-in: 24a5dd962a user: thomas tags: WIP
19:25
Fix database schema migration script for the 32 to 33 update. The script no longer causes the deletion of rows in tables dependent on the Card table. check-in: c484f8767b user: thomas tags: WIP
2024-01-02
21:36
Merge page_config_widget.ui check-in: 68e5fd04dd user: thomas tags: WIP
21:30
Remove remaining uses of the removed CardSizes enum. check-in: 38c44f8348 user: thomas tags: WIP
2024-01-01
03:20
Potentially complete the merge in card_info_downloader.py. check-in: 21cd8f0421 user: thomas tags: WIP
02:59
Encode UUID format correctness in the type system: Introduce class UUID(str), which ensures that UUIDs have the proper format. check-in: 7afd4afc21 user: thomas tags: trunk
01:54
Fix two broken merges in document.py and document_loader.py check-in: d86179c5b6 user: thomas tags: WIP
2023-12-30
18:11
Large, WIP merge with trunk. This needs post-merge clean-ups. There is still a merge conflict in one UI file, which has to be resolved manually. check-in: bddcd3ab40 user: thomas tags: WIP
2023-12-26
19:19
Fix a bunch of style warnings and remove unused imports. check-in: 5d720d677d user: thomas tags: trunk
15:24
DocumentLoader: Rework signal connections. Use a BlockingQueuedConnection to let the loader runner wait until the document action is applied. With this, finishing the loading is within the scope of the run() method, instead of delaying it after run() finished. check-in: 450fd420f2 user: thomas tags: trunk
2023-12-25
22:47
Improve task cancel behavior. in quit(), wait for the QThreadPool to finish. This avoids a bunch of Runtime errors related to Qt deleting objects too early. With this, the exit behavior is improved when exiting directly after starting the app, while the system has a really slow internet connection. check-in: c102cd1860 user: thomas tags: trunk
15:56
Replace all instances of QThread with a QRunnable-based approach. This removes all long-running, manually managed QThreads. All asynchronous tasks are now contained in short-lived workers. Remove the stop_thread module, as it is no longer needed. MeteredSeekableHTTPFile now registers itself in an instance list, so that the application exit code can easily access all open connections for termination. check-in: 8c775f8538 user: thomas tags: trunk
15:51
Fix tests. Closed-Leaf check-in: 99d9a66288 user: thomas tags: stop_using_qthread
14:07
ImageDownloader: Restructured image fetching. The three loading steps (from memory, disk, and Scryfall) are now performed sequentially in one location. The call structure is now flat, instead of being nested. check-in: f298233e08 user: thomas tags: stop_using_qthread
10:51
Add a global registry for MeteredSeekableHTTPFile instances. Use it to abort all open file transfers on application exit. check-in: a66afb21e2 user: thomas tags: stop_using_qthread
2023-12-24
23:08
Remove now unused module stop_thread.py together with its unit tests. check-in: d572fb33be user: thomas tags: stop_using_qthread
23:06
WIP replacing the ImageDownloader background thread with QRunnable-based runners. check-in: d88a767958 user: thomas tags: stop_using_qthread
17:29
Fix unit tests. The QThreadpool needs more careful, per-test mocking, as some tests require a working thread pool. check-in: 3a3e161891 user: thomas tags: stop_using_qthread
2023-12-23
22:22
DocumentLoader: Add method cancel() to directly cancel a running loading process. Adjust the tests, as the worker thread no longer exists. check-in: c29c1769ab user: thomas tags: stop_using_qthread
21:57
Unify a few type hinting aliases. Define them in units_and_sizes.py and import them were used, instead of re-defining them in multiple locations. check-in: 4a69ac2c0e user: thomas tags: stop_using_qthread
21:45
Update checker: Directly run check_for_updates(), instead of enqueueing it with a QTimer. It internally enqueues its tasks via the global thread pool, so it doesn't make much sense to delay the execution. check-in: 031cd2fd9d user: thomas tags: stop_using_qthread
18:18
Refactored QRunnable-based classes. Use a custom base class that encapsulates a common instance-tracking and cancelling interface. check-in: ff03dea115 user: thomas tags: stop_using_qthread
17:01
ImageDatabase: Move read_disk_cache_content() into the module scope. Move population of the images_on_disk set into a QRunnable. check-in: 567a58db91 user: thomas tags: stop_using_qthread
11:37
Remove unused definition check-in: f891a36ff7 user: thomas tags: stop_using_qthread
10:25
The GUI now properly unlocks after loading a document finishes. This requires a direct signal connection, because the loader resides in a stopped thread. check-in: 4ce02b60cd user: thomas tags: stop_using_qthread
2023-12-22
21:58
WIP Refactoring of DocumentLoader to use a QRunnable as the background worker. This currently does not properly unlock the UI after finishing the loading process. check-in: 4078f6f41b user: thomas tags: stop_using_qthread
20:58
WIP refactoring of DocumentLoader to use the global QThreadPool, instead of a worker thread. This version still emits warnings "QObject: Cannot create children for a parent that is in a different thread.", and crashes when closing the app while an image download runs in the document loader. check-in: 9002352a71 user: thomas tags: stop_using_qthread
20:36
Refactor the Update checker logic to use two independent QRunner-based update checkers, instead of using a QThread. Both checks now run independently in parallel in the global QThreadPool. check-in: 73e35e69eb user: thomas tags: stop_using_qthread
20:34
Extend the @with_database_write_lock decorator to work with the QApplication instance created by pytestqt. check-in: 2e5cb56075 user: thomas tags: trunk
18:31
decorator @with_database_write_lock now uses @functools.wraps() for the inner function. check-in: 073c360598 user: thomas tags: trunk
18:25
Application: Add boolean should_run, that indicates if tasks should start. Extend decorator @with_database_write_lock to check this boolean. If the app is in the shutdown state, all enqueued database-writing tasks are skipped, instead of being started. check-in: a0be793320 user: thomas tags: trunk
18:14
Add two more logging lines, that log the beginning of the download and import actions. check-in: f5d53461bf user: thomas tags: trunk
11:51
Add button to the Debug settings to import an existing card data file. Implements [8fc0e1bc593fee14]. check-in: 87c5abc3e2 user: thomas tags: trunk
2023-12-21
18:38
Fix tests/test_carddb.py. The PrintCountUpdater gained the ability to be used synchronously with a pre-existing database connection. check-in: 19fe902d43 user: thomas tags: trunk
2023-12-20
19:59
Properly serialize database write transactions. Fixes [98bf63219f09652f]. check-in: 24a6e830b5 user: thomas tags: trunk
19:53
Update changelog, add entry for the lifted restriction on what can run in parallel. Closed-Leaf check-in: 013c4d4e50 user: thomas tags: serialize_db_writes
19:20
Implemented cancelling PrintingFilterUpdater.run(). With this, the app can be closed without crashing, while the printing filter updater works on the database. In that case, the transaction is rolled back. check-in: 17414d1a7d user: thomas tags: serialize_db_writes
18:56
UI: Allow PDF export, printing, settings access while a card data update runs. No longer disable the actions. check-in: 7e309c3b79 user: thomas tags: serialize_db_writes
18:51
Move the print count updater logic into a separate QRunnable-derived class. With this, the printing and PDF export no longer write to the database synchronously, but rather enqueue a write task. That task is also serialized by the database write semaphore, thus enabling safe operation while a card database update runs. check-in: 8d8a1dc681 user: thomas tags: serialize_db_writes
18:49
Add logging to the with_database_write_lock decorator. check-in: 70e1984524 user: thomas tags: serialize_db_writes
18:48
PrintingFilterUpdater: Resolve deadlock during card data import. The import process uses the PrintingFilterUpdater. So split the QRunnable.run() method, which is guarded by the database write semaphore, and the actual logic. The card data import now uses the updater logic without the write lock, thus avoiding locking the semaphore twice. check-in: c7ded6eaf4 user: thomas tags: serialize_db_writes
18:44
Add logging line to the UpdateChecker BackgroundWorker.db property. check-in: dd6f3fadb9 user: thomas tags: serialize_db_writes
18:43
Tests: Remove an outdated test, that seems to no longer test what the test name suggests. check-in: 60e69c75db user: thomas tags: serialize_db_writes
16:52
PrintingFilterUpdater: Guard the database update with the database write lock. check-in: a866cdf3c2 user: thomas tags: serialize_db_writes
16:44
Rewritten card data downloader to use QRunnable classes for the three tasks implemented (download to file, import from file, import from API). These three use a semaphore to protect the database from simultaneous write access. The card info downloader API class no longer holds a QThread instance. It schedules to run the tasks in the global QThreadPool instead. check-in: 75ad95b357 user: thomas tags: serialize_db_writes
09:06
Remove signal CardInfoDownloader.request_download_to_file. Directly connect the source trigger to the slot method instead. check-in: f36e99647e user: thomas tags: serialize_db_writes
09:02
CardInfoFileDownloadWorker: Update the empirically determined compression ratio. check-in: 5ead60463b user: thomas tags: trunk
08:42
Merge with trunk. check-in: 74088e5e28 user: thomas tags: serialize_db_writes
08:38
CardInfoFileDownloader: Remove worker attribute, as it was never accessed. check-in: 01b16a80c6 user: thomas tags: serialize_db_writes
08:26
Add semaphore and management decorator to carddb.py. check-in: edefbd35fe user: thomas tags: serialize_db_writes
2023-12-19
13:22
Release v0.26.0 check-in: 2c5548a7fe user: thomas tags: trunk, release, v0.26.0
13:16
Tests: Fix imports in tests/ui/test_item_delegate.py being placed in the copyright header. This was done by PyCharm's automatic refactoring tool. check-in: 17b5ab2172 user: thomas tags: trunk
13:07
Clean-up license headers: Put # in empty lines, to hopefully prevent PyCharm from automatically placing imports into the empty lines when performing automated refactoring tasks. check-in: 39ffd648fe user: thomas tags: trunk
10:33
Ensure compatibility with Python 3.8. This fixes the Windows builds. check-in: e09a2ae5fb user: thomas tags: trunk
10:24
Replace itertools.chain with typing.Iterable in type annotations. Closed-Leaf check-in: 04c6d5e72e user: thomas tags: py38_compat
10:19
Tests: Python 3.8 compatibility fix. Replace actual container types in type annotations ('list[str]') with the ones from typing ('List[str]'). check-in: 69dff50b97 user: thomas tags: py38_compat
10:15
Tests: Python 3.8 compatibility fix. Replace type union using '|' with typing.Union[]. check-in: 30c0cbf653 user: thomas tags: py38_compat
10:02
Remove unittest library from cx_Freeze exclusion list. This should fix the standalone builds. check-in: 9637ae021a user: thomas tags: trunk
2023-12-18
21:35
Center the printing area on the paper (See [abdb5df1fec475c0]) and add option to toggle between explicit and implicit margin handling when printing pages. (Potential fix for [b80a3f6992e94b82]) check-in: 7974e6091a user: thomas tags: trunk
21:33
Update changelog. Closed-Leaf check-in: 8c6c9ac5c9 user: thomas tags: explicit_margins
21:20
The borderless printing option now toggles the created QPrinter between explicit and implicit margin handling. check-in: b4a36f02d9 user: thomas tags: explicit_margins
20:57
Add Printer settings section, and option to enable/disable borderless printing. Add a checkbox to the Settings window to toggle the option. check-in: dcc5ab7924 user: thomas tags: explicit_margins
2023-12-17
17:24
Fix PEP8 style warnings. check-in: 038382666b user: thomas tags: explicit_margins
15:33
Updated changelog. check-in: fd41a9c553 user: thomas tags: explicit_margins
14:46
Add unit tests for image location computation. Fix card image placement. The spacing parameters were swapped (column spacing used for rows and vice versa). It now also handles excessive margins properly. check-in: ee39bca628 user: thomas tags: explicit_margins
2023-12-15
12:27
Extended changelog. check-in: 024bbab202 user: thomas tags: explicit_margins
12:07
Refactored QPrinter creation. Values are now set via a QPageLayout instance. The QPageLayout instance creation is done by the PageLayoutSettings class, which holds all required information. Additionally, an error message is logged, if setting the page layout in the QPrinter instance fails. check-in: 7fef93718b user: thomas tags: explicit_margins
12:02
Fix invalid values in tests/ui/test_page_config_widget.py, that were invalidated by the change in the default page margins. check-in: 3199f3657b user: thomas tags: explicit_margins
11:18
Tests: Refactored test_page_layout_settings.py. Tests no longer use the heavy "document" fixture just to access the page layout within. Instead, a dedicated fixture returning a page layout instance is used. check-in: f5572164e5 user: thomas tags: explicit_margins
2023-12-14
15:49
Fix test case for test_page_layout_compute_page_card_capacity(), which was broken after reducing the default margins to 5mm. check-in: 431b84a712 user: thomas tags: explicit_margins
13:01
Fixed error in test_vertical_cut_line_locations_when_enabled(), which caused unexpected test failures. All tests now pass check-in: 88b8bbe175 user: thomas tags: explicit_margins
12:51
Improved location computation for horizontal cut line locations. All cases for test_horizontal_cut_line_locations_when_enabled() now pass. check-in: 60d4d8ebf6 user: thomas tags: explicit_margins
12:07
Fix cut marker positioning with implicit margins for normal margin sizes. This currently does not handle huge margins that cause the rendering area to shift. check-in: 66c5aba431 user: thomas tags: explicit_margins
00:19
Tests: Decomposed test cases for cut markers in the PageScene class. Test function test_cut_line_locations_when_enabled() split into multiple, independent tests: Horizontal line positions, vertical line positions, type correctness of the cut_lines property, bounding box sizes for cut lines. check-in: a7278b5483 user: thomas tags: explicit_margins
00:15
Remove unused import check-in: 78ce000228 user: thomas tags: explicit_margins
2023-12-13
23:21
Fixed broken settings migration code, introduced into trunk in [251b2a3abd362e4c]. check-in: c370cf7bfd user: thomas tags: explicit_margins
12:56
Fix default suggested file name when exporting a loaded document as a PDF. Fixes [3843fbfeb04ccb37]. The logic now strips the file extension to be implicitly replaced by ".pdf". If the file name stem includes a dot, explicitly add ".pdf". check-in: e081be8036 user: thomas tags: trunk
11:53
Set the default document margins to 5mm in all directions. Add changelog entry for this and for centered printing support. check-in: 2e054b2af9 user: thomas tags: explicit_margins
11:46
Implemented centered printing. The 3x3/2x2 printing area is now centered on the page. Implements [abdb5df1fec475c0]. check-in: daecb5dbe4 user: thomas tags: explicit_margins
11:36
Fix tests for cut line locations. Closed-Leaf check-in: 400a1e51d6 user: thomas tags: center_printings
2023-12-07
15:32
Center cut line locations. check-in: b375e42404 user: thomas tags: center_printings
2023-12-03
15:36
Merge with trunk. check-in: d57ceec85d user: thomas tags: center_printings
15:33
Rename image spacing document settings to be easier understandable. Implements [6ca7a559951e0117]. Fix crash when loading documents with numerical document titles. check-in: 251b2a3abd user: thomas tags: trunk
15:26
Add changelog entry for the settings rename. Closed-Leaf check-in: 37dd04c0d7 user: thomas tags: rename_spacing_settings
15:18
Moved save file database migration code to document_loader.py. The document loader now uses the migration code to migrate save files to the latest version, before accessing the data. This removes the need for different code paths based on the save file version at hand. Fix a crash when loading a document with a pure numerical document title, e.g. "1", as that was coerced to an integer type. Handle migrating the image spacing settings stored in old documents to use the new names. With this, the refactoring is complete. check-in: 8d0effd9bd user: thomas tags: rename_spacing_settings
12:50
Rename spacing-related attributes in the PageLayoutSettings class. check-in: 8ac638b637 user: thomas tags: rename_spacing_settings
11:56
Renamed widgets in the PageConfigWidget to reflect the image spacing rename. Also updated the UI strings and tooltips. check-in: 8ae2a07ae2 user: thomas tags: rename_spacing_settings
11:31
Renamed document settings for image spacing. Added migration code for the application settings file. Renamed "image-spacing-horizontal-mm" to "row-spacing-mm". Renamed "image-spacing-vertical-mm" to "column-spacing-mm". check-in: da304840e1 user: thomas tags: rename_spacing_settings
2023-11-30
12:56
PageScene: Changed _compute_position_for_image() to center images on the page. check-in: c67358bd4d user: thomas tags: center_printings
2023-11-29
11:09
Implement explicit margin handling in the printing code. When IMPLICIT_MARGINS is enabled in the PageScene, it reduces the rendering area to the center, removing the margins. check-in: 989df585fd user: thomas tags: explicit_margins
2023-11-23
15:06
Merge with trunk check-in: a160004cce user: thomas tags: explicit_margins
2023-11-22
13:53
Reduce memory usage of the test suite, by clearing object's __dict__ in pytest fixture teardown code. This reduces memory usage to about 40%-50% of the previous level. I.e. 2GiB -> 900MiB check-in: fba7cca802 user: thomas tags: trunk
13:45
Clear objects yielded by pytest fixtures. Simply call clear() on the __dict__ attribute, which causes the garbage collector to delete the object contents. This frees memory held by those, instead of holding it until pytest completes. Closed-Leaf check-in: cc5d067f15 user: thomas tags: optimize_test_memory_usage
13:43
ImageDatabase: Do not connect the worker thread "finished" signal to a lambda. Instead, use a method, so that the connection can be broken in test teardown code. check-in: 449f62d140 user: thomas tags: optimize_test_memory_usage
13:40
test_page_scene: Explicitly list the RenderMode values. check-in: 05ba99c50c user: thomas tags: optimize_test_memory_usage
12:22
test_check_card_rendering.py no longer uses the ImageDatabase fixture for the blank image. The tests now use a minimal fixture that only provides that pixmap. check-in: f27eb56017 user: thomas tags: optimize_test_memory_usage
11:04
Fix style issues in test_page_scene.py check-in: 4565b0c2f1 user: thomas tags: explicit_margins
09:02
Convert RenderMode enum into a Flag enum. Add value IMPLICIT_MARGINS to it. Preparations for [b80a3f6992e94b82]. check-in: d4ca6e52e5 user: thomas tags: explicit_margins
2023-11-16
15:50
Remove hard-coded program name in setup_cx_freeze.py check-in: 7aa8a6ec7a user: thomas tags: trunk
15:24
Move PageScene and direct dependencies from page_renderer.py into a new module page_scene.py. check-in: 72abb3e08f user: thomas tags: trunk
12:23
Fix imports in printing_filter_updater.py check-in: fd7dbb696c user: thomas tags: trunk
10:25
Add card filters for extended art cards and cards banned in Oathbreaker. Refactored the use of card data samples in most tests: Instead of hard-coding the card data, duplicating the JSON values, load them from the JSON instead. Updated most JSON samples to a newer version, to reflect changes in the data format done by Scryfall in the test data. check-in: b380dde951 user: thomas tags: trunk
10:23
Add card filter for extended art cards. Implements [cfd07193956f93c5]. Closed-Leaf check-in: f6e1fd46f9 user: thomas tags: update_card_import_tests
2023-11-15
11:44
Add card filter for cards banned in Oathbreaker. Implements [67c671e2f8e5695b]. check-in: 0b6cb088ce user: thomas tags: update_card_import_tests
08:12
Fix remaining failing tests in tests/ui/test_deck_import_wizard.py. check-in: 82993ec1ac user: thomas tags: update_card_import_tests
2023-11-14
18:24
Removed hard-coded card data from tests/test_carddb.py. Updated most of the JSON test data to the newest versions each. check-in: c46eb9dd9c user: thomas tags: update_card_import_tests
2023-11-13
18:43
Whitespace changes in the database schema. Replace tabs with spaces. check-in: 6a1a304870 user: thomas tags: update_card_import_tests
18:43
Add test cases validating the set release date update logic. check-in: f5f684dded user: thomas tags: update_card_import_tests
18:23
CardInfoDatabaseImportWorker: Fix wrong number of SQL binding in _insert_card_faces(). The UPDATE branch was not working correctly. check-in: 4fe4fa9992 user: thomas tags: update_card_import_tests
17:58
Fixed broken card filter for reversible cards. The test looked for the wrong card layout, thus failed to identify the cards it should match. check-in: 79101e733e user: thomas tags: update_card_import_tests
17:52
Refactor tests/test_card_info_downloader.py. No longer hard-code values from the card data JSON samples. The TestCaseData class now loads the required elements directly from the JSON. This makes it easier to extend and update the underlying JSON samples. Also merge a few individual tests into a single parametrized test. check-in: 2c3cdb9a2c user: thomas tags: update_card_import_tests
17:49
Merge the card data json type hinting classes into CardDataType. The static checker seems to not support merging it from multiple TypedDicts via multiple inheritance. check-in: 2eaa7bae00 user: thomas tags: update_card_import_tests
12:56
Update the card data type annotations to cover the entire dataset as specified by the Scryfall API documentation. check-in: c0183e4f5d user: thomas tags: update_card_import_tests
2023-11-12
13:08
Extract the printing filter update logic from the CardDatabase class into a separate class. The new PrintingFilterUpdater is derived from QRunnable and thus allows running the update in a separate thread. The updater now runs asynchronously during app startup, if the filters were edited in the configuration file, and when the user edits the filter in the settings window. This removes several hacks, like monkey-patching the card database during the card import, calling QApplication.processEvents() in the Settings window, and improves app startup time. check-in: 4e623b8aa4 user: thomas tags: trunk
13:04
Do not run the PrintingFilterUpdater synchronously in CardDatabase.__init__(). Instead run it in a separate thread once the event loop runs. This improves app startup time when the printing filters need update due to an edited configuration file. Closed-Leaf check-in: 6d38fcafe2 user: thomas tags: split_carddb
10:29
PrintingFilterUpdater: Improve __init__ docstring. check-in: ba04676552 user: thomas tags: split_carddb
10:24
PrintingFilterUpdater.run(): Fix another location checking if the db connection was passed in via __init__ parameter check-in: 400e3cfb0d user: thomas tags: split_carddb
10:07
PrintingFilterUpdater: Fixed database connection closure in run(). Refactor logic to determine if an explicit database connection was passed in, so that it is more robust under testing. check-in: 4e39894561 user: thomas tags: split_carddb
10:06
Document: Fixed transaction management in store_image_usage(). This now takes into account that there is an always-active read transaction in the main card database instance. check-in: bceff4fd62 user: thomas tags: split_carddb
2023-11-11
17:44
ImageDB: Remove duplicate download_finished signal emit. check-in: 8805bed438 user: thomas tags: trunk
17:40
Fix crash when loading multiple documents in a row. The database used by the documment loader has to be closed in between, because it is locked to the current thread and multiple loads use different threads. check-in: 084b89f6c7 user: thomas tags: trunk
17:37
Fix exception when loading a document. check-in: 511273ac7b user: thomas tags: trunk
17:31
WIP move PrintingFilterUpdater to a separate module. Some tests still need fixing. check-in: 56e0bfacdf user: thomas tags: split_carddb
16:37
Moved the logic updating the printing filters into a separate class PrintingFilterUpdater(QRunnable). The CardDatabase and the card data updater use it synchronously. The settings window starts it asynchronously, if the user updated the printing filters. With this, the settings window no longer runs the update in the main UI thread and also no longer has to call processEvents() check-in: f54e9dabc4 user: thomas tags: split_carddb
13:24
Rephrased recent changelog entries. check-in: da0e253488 user: thomas tags: trunk
2023-11-09
16:02
Optimize card database imports by splitting complex queries into smaller ones that only do the minimum require work. This also reduces disk I/O by avoiding unneccessary overwrites. check-in: 6fe008de32 user: thomas tags: trunk
15:27
Optimize _insert_card_faces(). Split the complex INSERT … ON CONFLICT DO UPDATE … query into 3 lighter queries, to only do work if actually required. This saves a few seconds. Closed-Leaf check-in: 7cbd69a350 user: thomas tags: optimize_import
12:42
Cache _insert_face_name(), as the cache can have roughly 150k hits during the import. Also refactor the LRU cache cleaning. It now automatically discovers present caches by iterating the __dict__ attribute. check-in: e9008abbc3 user: thomas tags: optimize_import
10:31
Fix branch in _parse_single_printing(). The set id may be zero, so actually check if it is None, instead of the truthyness. check-in: 59b8890b0f user: thomas tags: optimize_import
2023-11-08
19:35
Highly experimental split of the card data import logic. It works, but seems to be slower. Tests need fixing. Split reading and parsing of the JSON input stream into separate classes that run asynchronously as QRunnable instances in the global thread pool. The import loop in the database importer is now split into a 3 segments, pre-processing, post-processing and parsing a single printing. The data input and database importer are connected via queued Qt connections. The semaphore used ensures that the fast JSON parser does not accumulate too many card objects in the queue. Closed-Leaf check-in: 5434587deb user: thomas tags: optimize_import
15:00
Increase card data queue size to 2 elements. check-in: 128760fe00 user: thomas tags: optimize_import
14:39
Whitespace change check-in: 1185a7994c user: thomas tags: optimize_import
14:32
Move reading card data from a file on disk into a specialized worker class derived from QRunnable. check-in: 27e2202871 user: thomas tags: optimize_import
12:49
Convert the card data to file downloader to the QRunnable interface and run it in the global Qt thread pool. check-in: e3524e4323 user: thomas tags: optimize_import
2023-11-06
22:49
Further re-structured _insert_printing() and renamed it to _handle_printing(). Checking for printing presence and update need is extracted into the new _is_printing_present() method. check-in: 84d0300c59 user: thomas tags: optimize_import
22:15
First pass of optimizing _insert_printing(). Instead of doing a complex INSERT ON CONFLICT DO UPDATE query, query if the printing exists and needs updating in Python code, then only run a simple insert or update. This seems to save quite a few seconds on initial import and still a bit on database updates. check-in: 6cb1e9c6c7 user: thomas tags: optimize_import
21:21
CardInfoDatabaseImportWorker: Remove a dead branch from _populate_database() and correct the number of post-processing steps to fix progress reporting on that. check-in: feb9c40d84 user: thomas tags: trunk
15:50
Card data downloader: Move all static methods from CardInfoDatabaseImportWorker into the module scope. check-in: f54117d85d user: thomas tags: trunk
09:23
Update dependency on Pint, which dropped Py 3.8/Win7 support in 0.22. So use 0.21 on Windows. Fixes [f27f9d80a693ddd6] check-in: c90b441231 user: thomas tags: trunk
2023-11-05
16:09
PEP8 check-in: 8e0212cfd4 user: thomas tags: trunk
15:35
Do not block the cache cleanup wizard during the card data update process, as it can run concurrently without causing exceptions. check-in: 1b4d43a57c user: thomas tags: trunk
14:16
Extended wording in the changelog. check-in: 0db0485a1d user: thomas tags: trunk
14:00
Fix link in the changelog. check-in: b85c2acf6c user: thomas tags: trunk
13:53
Optimize batch card insertion logic, like deck list importer and document loader. These now avoid O(n²) searches for empty pages to insert cards on, and also avoid unnecessary updates to the PageScene. check-in: ade591bf27 user: thomas tags: trunk
13:44
Add changelog entry. Closed-Leaf check-in: 1c57962bf0 user: thomas tags: optimize_adding_multiple_cards
13:41
PageScene: Deduplicate a computation. check-in: 642c1fe2cf user: thomas tags: optimize_adding_multiple_cards
13:27
PageScene: Fix on_rows_inserted() and on_rows_removed(). Now, it only updates the page number text element, if a page is inserted/deleted. check-in: ecc4599efa user: thomas tags: optimize_adding_multiple_cards
13:19
Optimize applying ActionImportDeckList. It now caches the last page operated on, so that the ActionNewCard instances used internally no longer have to scan the document for free spots. This reduces runtime from O(n²) to O(n). check-in: 4fd1e87482 user: thomas tags: optimize_adding_multiple_cards
13:15
Fix ActionAddCard.apply() when using the target_page argument. check-in: 3ec2230d6f user: thomas tags: optimize_adding_multiple_cards
13:13
Fix test test_allow_updating_card_data_on_stale_populated_database_returns_true check-in: 48fc0fc354 user: thomas tags: optimize_adding_multiple_cards
12:07
ActionAddCard: Attribute first_added_page is now None by default. Cleaned up conditionals in as_str(). check-in: 4dd6e1960c user: thomas tags: optimize_adding_multiple_cards
10:54
Optimize adding cards to the document during the document loading process. check-in: 6c4ad8a133 user: thomas tags: optimize_adding_multiple_cards
10:45
Add keyword argument target_page to ActionAddCard. With this, the class gains the ability start searching for a page to add the given cards on at any arbitrary index. check-in: 5e4e511cd1 user: thomas tags: optimize_adding_multiple_cards
09:47
Fix typo in a tooltip in the settings window. check-in: 99ac2f025a user: thomas tags: trunk
2023-11-04
23:44
Fixed flakiness of CardDatabase.allow_updating_card_data() between 00:00 and 01:00. Fixes [1b9dbcaaef4cb716]. check-in: ae281e5e27 user: thomas tags: trunk
10:20
Use one database connection per accessing thread. Improve transaction management. All database writes are now wrapped in IMMEDIATE transactions and committed early. The main, read-only transaction is rolled back and restarted when the card data update completes. Do not lock most of the UI during a card data update. Only lock functions that write to the database. Implements [c6284a8182ae1917]. check-in: db560eb766 user: thomas tags: trunk
10:07
Improve progress bar hiding: Only the inner progress bar retains it's size when hidden. An in-progress, stand-alone card image download now uses the entire available space, as it was before merging [67dd6c8fc490ed1c]. Closed-Leaf check-in: 3dabf8673b user: thomas tags: per_thread_db_connections
09:32
Add changelog entry check-in: 3804508d92 user: thomas tags: per_thread_db_connections
2023-11-02
15:48
Fix tests check-in: dd19d643c8 user: thomas tags: per_thread_db_connections
13:14
Keep everything not writing to the database enabled during card data downloads. This allows continuing work on a document, while the card data updates. Everything writing to the database remains disabled. check-in: 7f00db0711 user: thomas tags: per_thread_db_connections
12:56
Add third progress bar for asynchronous card data updates. check-in: 553dd12f48 user: thomas tags: per_thread_db_connections
2023-10-31
11:28
Merge with trunk. check-in: a2efb93a32 user: thomas tags: per_thread_db_connections
11:13
Implement progress reporting for document loading and deck list imports. Both tasks now show a general progress bar, in addition to one for individual card image downloads. check-in: 67dd6c8fc4 user: thomas tags: trunk
11:10
Fix tests for MainWindow. Closed-Leaf check-in: ece2d2495f user: thomas tags: tiered_progress_bars
10:51
ImageDatabase: Reduced image progress display text verbosity. check-in: e96120e33f user: thomas tags: tiered_progress_bars
10:33
Add changelog entry. check-in: 80c2bb26ef user: thomas tags: tiered_progress_bars
10:24
MainWindow: Fixed wrong Qt signal connection. check-in: 05fa0469d6 user: thomas tags: tiered_progress_bars
10:24
ImageDatabase: Improved logging by stating the batch operation item count in messages. check-in: d31a809723 user: thomas tags: tiered_progress_bars
10:06
DocumentLoader: Remove testing code. check-in: 6ec1f731be user: thomas tags: tiered_progress_bars
10:06
ProgressBar: Do not reset the progress label texts when hiding a progress bar. This avoids re-sizing another shown progress bar. check-in: a29ac5fbc1 user: thomas tags: tiered_progress_bars
10:02
Increase timeouts in stop_thread(). This should avoid most crashes occurring when cancelling image downloads. check-in: db1396e4df user: thomas tags: tiered_progress_bars
09:41
Fixed potential crash when cancelling the document loading. It was only possible to trigger this by quitting the application immediately after triggering the loading action. check-in: 1fd7c67c84 user: thomas tags: tiered_progress_bars
2023-10-30
09:03
Improved handling of showing/hiding inner progress bars. The outer no longer automatically fills the entire space, reducing the jumpyness check-in: 58d086ee57 user: thomas tags: tiered_progress_bars
2023-10-27
16:03
WIP 2-tiered progress reporting. Wrorks for deck loading. Doesn't render properly for deck list imports. check-in: acc4ff9b1d user: thomas tags: tiered_progress_bars
14:52
Encapsulate the progress reporting for long-running processes in the ProgressBar class, instead of using individual widgets in the status bar. The ProgressBar class offers two progress bars, so that layered progress reporting becomes possible. check-in: 0dfc729eb5 user: thomas tags: tiered_progress_bars
2023-10-26
11:23
Mark scripts/compile_ui_files.py as executable check-in: 3a330b3540 user: thomas tags: trunk
11:08
MainWindow: Split list of items to disable during long-running processes into two lists: One to disable while a card data update runs, and one to disable during document loading and deck list imports. check-in: cef17115bf user: thomas tags: per_thread_db_connections
2023-10-25
11:15
Fix relevant typo in a comment. check-in: 9b93a6c1f8 user: thomas tags: per_thread_db_connections
11:01
CardDatabase: Rename signal card_filter_updated to card_data_updated. It is now emitted whenever the card data changes significantly. Remove unused parameter in store_current_printing_filters() check-in: fc5fac1220 user: thomas tags: per_thread_db_connections
08:11
CardDatabase: Remove internal transaction and emitting UI update signal from store_current_printing_filters(). Instead, return the boolean indicating if the UI should be updated. This cleans up the control flow. The method now depends on external transaction management, which is already in place in the card data downloader. __init__() and the settings window now explicitly create transactions when card filters are updated. check-in: d9ea17635d user: thomas tags: per_thread_db_connections
07:11
CardDatabase class no longer uses delegateto to delegate commit() and rollback() to the internal database connection. check-in: f42a5b42dd user: thomas tags: per_thread_db_connections
2023-10-18
10:28
Reworded text in MainWindow.ask_user_about_empty_database(), which still implied that the card filters worked by filtering the download stream, as it suggested that the user may want to configure the filters before downloading the card data. It now states that only printing custom cards is possible without the data present. check-in: b48a3f127f user: thomas tags: trunk
07:42
Add fetching cube lists from cubecobra.com. check-in: 5cd2fa27aa user: thomas tags: trunk
07:23
Reworded automatic image selection UI texts in the cache cleanup wizard. check-in: a14ac04af9 user: thomas tags: trunk
2023-10-15
09:23
Remove the temporary table in get_all_cards_from_image_cache() by rolling back the transaction, instead of dropping the table. This is beneficial, as it ends the transaction, which at that point is elevated to a write transaction. check-in: a214e50a77 user: thomas tags: per_thread_db_connections
2023-10-14
16:29
Improve performance of CardDatabase.get_all_cards_from_image_cache(). This improves the inconsistent performance of the cache cleanup wizard. On the developer PC, with ~250 images, runtime drops from ~8s to ~400ms. check-in: 246fbbb9b5 user: thomas tags: per_thread_db_connections
16:24
Fix a type warning in document.py check-in: 979b51fcc6 user: thomas tags: per_thread_db_connections
16:23
Register sqlite type conversion adapters for Path instances. check-in: fa5f92cb4b user: thomas tags: per_thread_db_connections
13:48
Fix tests check-in: d677b9d3e5 user: thomas tags: per_thread_db_connections
13:29
The Card data importer now has it's own database connection. check-in: c824b35aaa user: thomas tags: per_thread_db_connections
13:18
UpdateChecker: Open the database connection when first accessed, instead of when the thread it runs in starts. This is better for testing. check-in: 8839aee8da user: thomas tags: per_thread_db_connections
13:17
Switch database journaling mode to WAL mode. check-in: dfa2c22e34 user: thomas tags: per_thread_db_connections
09:21
The UpdateChecker now creates it's own connection to the card database file. Moved a method from the CardDatabase to the UpdateChecker, which was only used there. check-in: 4cedc3eca1 user: thomas tags: per_thread_db_connections
2023-10-12
12:56
Refactored MeteredSeekableHTTPFile and ported unit tests from another project. check-in: 151ebc5256 user: thomas tags: trunk
12:51
Catch exceptions when downloading a deck list fails. Show an error message in that case. Fixes [03b31f107d695544]. check-in: b76e4a71b9 user: thomas tags: trunk
2023-10-11
18:41
Fixed tests. The set code parsers operate on sets, which are not order-preserving. Thus use contains_inanyorder in tests, instead of contains_exactly. check-in: 10c380fdf2 user: thomas tags: trunk
18:38
Fixed processing the cached is_hidden columns when changing the set code filter. Also, the cached data update is no longer run at each start. With that, application startup time is back to normal. check-in: e57bf433d6 user: thomas tags: trunk
17:44
Add set-code based card filter. It is now possible to hide specific MTG sets, by entering their set codes in the set code blacklist in the settings. Implements [627376982eb8d8c4]. check-in: 99ca97f285 user: thomas tags: trunk
17:40
Clarified wording in the changelog entry. Closed-Leaf check-in: e93c19edd5 user: thomas tags: set_filter
17:31
Add changelog entry. check-in: b3a7132c0a user: thomas tags: set_filter
17:24
Implemented set code filtering. check-in: 821a3364f4 user: thomas tags: set_filter
09:34
Implemented high-level test cases for the set filter logic. Those currently fail, because the actual logic is not yet implemented. check-in: c3dcf7df49 user: thomas tags: set_filter
2023-10-10
16:24
Implemented function to parse the raw set filter setting into a sorted and deduplicated list of uppercase set codes. check-in: 0300adc112 user: thomas tags: set_filter
15:53
Implemented storing/loading the set filters in the application settings. check-in: 631c8bfc6d user: thomas tags: set_filter
15:20
SettingsWindow: Renamed methods _save_downloads_settings and _load_download_settings to _save_card_filter_settings and _load_card_filter_settings. The names still reflected legacy behavior and were no longer accurate. check-in: 4e4c0a1879 user: thomas tags: set_filter
14:44
Settings window: Add plain text editor that will contain the set codes for the set code filter. check-in: 59728e4cef user: thomas tags: set_filter
14:43
Settings window: Reordered the general printing filters to be rectangular and save vertical space in the settings window. check-in: d910abaf5b user: thomas tags: set_filter
14:08
Fix crash when updating the text element colors in the PageScene when a system theme change event occurs. Fixes [495c2d51e63f53e8]. check-in: 7270b90f7e user: thomas tags: trunk
2023-08-25
10:43
Restore compatibility with Python 3.8 Closed-Leaf check-in: cbd9eb4843 user: thomas tags: unit_tests
10:36
Actually add tests for main() check-in: b93103bc3b user: thomas tags: unit_tests
10:35
Add tests for main(). check-in: a2ced4438b user: thomas tags: unit_tests
10:01
Add tests for the argument parser. check-in: 33b419c29f user: thomas tags: unit_tests
08:28
Add tests for natsort.py check-in: 263be804c3 user: thomas tags: unit_tests
08:28
Add tests for stop_thread.py. check-in: 2a5298ee6b user: thomas tags: unit_tests
08:26
Refactored MeteredSeekableHTTPFile. Add tests for it with 100% statement coverage. check-in: 759769c387 user: thomas tags: unit_tests
2023-08-16
18:36
WIP implementation for a aetherhub.com deck list downloader. The downloader works and is tested, but the UI integration does not yet work. check-in: 910d02ab7c user: thomas tags: additional_deck_list_websites
13:59
Implement direct downloads from cubecobra.com. check-in: 69c4014d93 user: thomas tags: additional_deck_list_websites
2023-07-21
11:41
Release v0.25.0 check-in: ce676a04be user: thomas tags: trunk, release, v0.25.0
11:28
Fix test_document.py on Windows. Delete the database connection to a temporary file to lift a file lock before the parent directory is cleaned up. Without this, the tests raise a PermissionError on Windows. check-in: 8180c71418 user: thomas tags: trunk
11:18
Do not use typing.Union instances in isinstance() calls for Python 3.8 compatibility check-in: b779d05b95 user: thomas tags: trunk
11:05
Application: rename run_startup_tasks to enqueue_startup_tasks, because it enqueues the tasks for later execution. Also log the icon theme name used, if the system theme is in use. check-in: b3287e52ef user: thomas tags: trunk
2023-07-20
14:04
Fix card removal, if cards are selected from bottom to top. Reason for failure is that groups in Qt multi-selections are not ordered by start, but rather selection timestamp. This broke the range merging algorithm in the ActionRemoveCards class. Fixes [9098350c2b88c42c]. check-in: cde1f5a44a user: thomas tags: trunk
2023-07-18
16:54
PageScene: Reduce text font size from 50 to 40, as 50 is quite large. May need further tweaking. check-in: a29d18b3e9 user: thomas tags: trunk
16:52
Reworded a changelog entry. check-in: 46d6b695c6 user: thomas tags: trunk
2023-07-15
18:08
CardDatabase: Order by highres_image column in get_cards_from_data(). This improves print guessing card selection during spoiler season to not use the newest spoiled printing with lowres images over better printings with high-res images. check-in: 39af3d8897 user: thomas tags: trunk
2023-07-14
11:40
Added two new document settings: Adding a document name that is printed on each sheet and an option to enable printing a running page number on each sheet. Both options help organizing stacks of printed and uncut sheets. check-in: b7fcbc4eca user: thomas tags: trunk
2023-07-13
19:03
SettingsWindow: Update tooltip for the main window layout combo box. check-in: 87a740779b user: thomas tags: trunk
16:50
Added keyboard shortcuts for the Undo and Redo actions. check-in: 44789d5db1 user: thomas tags: trunk
16:34
Tests: Verify that DocumentLoader._read_document_settings_version_4_5() is not order-dependant. Closed-Leaf check-in: 0b857df656 user: thomas tags: document_name_setting
16:02
fix linter warning. check-in: 0a9e20d40f user: thomas tags: document_name_setting
15:59
DocumentLoader: Fix type conversion for booleans in _read_document_settings_version_4_5(). All expected boolean values are now an instance of bool. check-in: 00dd6ac1b2 user: thomas tags: document_name_setting
14:55
Added changelog entry. Completes [7e2d18f1d6fc24ce] check-in: d396bc3441 user: thomas tags: document_name_setting
14:40
Render document name and page numbers when loading a document via command line parameter check-in: a258e9f70a user: thomas tags: document_name_setting
14:34
Removed a debug logging line check-in: ad61a5f0e3 user: thomas tags: document_name_setting
14:33
Settings: Fix documents section validation. It now properly handles the default-document-name setting with a str value. check-in: 3312762725 user: thomas tags: document_name_setting
14:27
Fixed validation in DocumentLoader._read_document_settings_version_4_5(). Added multiple logging lines at debug level. check-in: e65b2f55c2 user: thomas tags: document_name_setting
13:29
Refactored DocumentLoader._read_document_settings_version_4_5(). It now dynamically replaces settings defined in the PageLayoutSettings that are not stored in the database with the default values. The implementation is now independent of the attributes defined in the PageLayoutSettings and supports attribute addition/deletion without further modification. check-in: 90891385d3 user: thomas tags: document_name_setting
11:02
Properly update the page number text when inserting/deleting pages. check-in: 4032432d71 user: thomas tags: document_name_setting
10:51
Implemented a basic line wrap for the document name. It will split the document name at word boundaries so that the text stays within the visible area. The current implementation breaks on really long words that are longer than the page width. In those cases, the "word" will be placed on it's own line and the end is cut off. check-in: 3a74dcc436 user: thomas tags: document_name_setting
10:19
Implemented proper right-adjust for the page number text. check-in: f27a61ce46 user: thomas tags: document_name_setting
2023-07-12
18:02
Implemented basic rendering for the document title and page numbers. check-in: 9ba2013523 user: thomas tags: document_name_setting
2023-07-11
18:16
PageScene: Add property text_items, returning all QGraphicsTextItem instances. Add get_text_color(), returning the text color to use. check-in: 9dfdbb5795 user: thomas tags: document_name_setting
17:57
Adjust tests for the new fields. check-in: 2cc3213d50 user: thomas tags: document_name_setting
17:47
PageConfigWidget: Handle settings with textual values in load_from_page_layout(). check-in: e0ade6b194 user: thomas tags: document_name_setting
17:46
Document: Add logging line at end of __init__() check-in: fb08ec84c9 user: thomas tags: document_name_setting
17:45
Fixed wrong settings name in PageLayoutSettings.create_from_settings(), causing crashes when opening the DocumentSettingsDialog. check-in: c263ffd4ea user: thomas tags: document_name_setting
17:32
Fix argument order in PageLayoutSettings.create_from_settings() check-in: c6995232cf user: thomas tags: document_name_setting
17:28
Merge with trunk, pulling a fix for a crash affecting the DocumentSettingsDialog. check-in: 923ef627b6 user: thomas tags: document_name_setting
17:09
Fixed off-by-one error in CardListModel._request_replacement_card(). check-in: bafd6444e9 user: thomas tags: trunk
16:21
Fixed crashes when opening te PageConfigDialog. check-in: 73e6fc506f user: thomas tags: trunk
14:08
Remove an unused import. check-in: 62e1a99052 user: thomas tags: trunk
14:07
Implemented translating cards added to the Document or CardListModel instances. Implements [490f65b51f942c7f]. The Language column is now editable, both in the Document and in the deck import wizard. check-in: e22365acae user: thomas tags: trunk
14:01
Fix crash when trying to translate a custom card Closed-Leaf check-in: efe3aea945 user: thomas tags: translate_added_cards
12:27
Implemented translating cards in the CardListModel. This enables translating cards in the SummaryPage of the DeckImportWizard. check-in: 89e9a5bfc3 user: thomas tags: translate_added_cards
2023-07-10
20:08
Added changelog entry. check-in: f8151c89e1 user: thomas tags: translate_added_cards
19:56
Use the new capability of Document._data_card() to return the Card instance using the UserRole, replacing usage of the internalPointer() method throughout the codebase. This entails a small performance penalty, but uses the Qt model API properly and is thus transparent through layered filter models, etc. check-in: 6607d7006c user: thomas tags: translate_added_cards
19:36
Document: Add PageColumns.Language to the editable columns. Handle those in setData(). Additionally, card indices now return the Card instance when calling data(Qt.ItemDataRole.UserRole), which is used by the editor delegate. check-in: f2fce9132b user: thomas tags: translate_added_cards
19:32
CardDatabase: translate_card() now handles CheckCard instances. Also use a type variable to indicate that the output type is the same as the input type. check-in: 23797e10ec user: thomas tags: translate_added_cards
19:23
CentralWidget: Set the ComboBoxItemDelegate as the editor for the PageColumns.Language column check-in: 7b32b169ab user: thomas tags: translate_added_cards
19:19
ComboBoxItemDelegate: Implement handling the PageColumns.Language column. check-in: b1ad7ebe0c user: thomas tags: translate_added_cards
19:13
CardDatabase: Introduce type variable AnyCardType as a Union of Card and CheckCard. Use it across the code base, where applicable. check-in: 7fa611d4c5 user: thomas tags: translate_added_cards
17:56
Document: Fix linter type warning in compute_pages_saved_by_compacting(). check-in: 004258808d user: thomas tags: translate_added_cards
17:55
document_loader.py: Add CardType to __all__. check-in: 6a8f47d5ef user: thomas tags: translate_added_cards
17:48
CardDatabase: Minor re-format of translate_card_name() check-in: d162300eb2 user: thomas tags: translate_added_cards
17:36
Optimize database query for get_available_languages_for_card(). Cuts execution time from ~80ms down to ~10ms. check-in: d0b01a17cd user: thomas tags: translate_added_cards
13:50
CardDatabase: Add method get_available_languages_for_card(Card), which returns the sorted list of languages the given card is available in. check-in: 89d240a34d user: thomas tags: translate_added_cards
12:10
Tests: Implement DummyAction.as_str property to fix a linter warning about not implementing all required abstract methods. check-in: 4c6428fe84 user: thomas tags: trunk
2023-07-07
15:51
WIP saving/loading the document name and print page numbers setting check-in: e9c17b7e22 user: thomas tags: document_name_setting
2023-07-06
19:44
PageConfigWidget: Added document_name line edit and draw_page_numbers check box. The document_name can hold a printable name that is added to each page to aid distinguishing different printed sheets. The draw_page_numbers toggle shall enable printing the page number onto each page, to make it easier to spot missing printouts. See [7e2d18f1d6fc24ce] check-in: 785f002701 user: thomas tags: document_name_setting
2023-07-05
18:00
Ui: Update class names specified in Ui files, removing the need for renaming on import of the compiled modules. check-in: 418a3871fb user: thomas tags: trunk
13:35
Remove unneccessary type annotations. check-in: 72f50143c9 user: thomas tags: trunk
08:32
main(): Put the appdirs migration after calling the argument parser. This prevents any system-altering code from running, if the user merely used the --help switch. check-in: c84bf71bd2 user: thomas tags: trunk
2023-07-04
14:31
Improvements for the QWizard-based wizards. Improved positioning on screen, like improved centering and avoiding placing parts of the window outside the screen border. Use a darkmode-compatible style on Windows, instead of the Aero style. This also fixes the style switching that occurred on Windows 7. Fixes [3e5f17f1eb5bf319]. check-in: 2445789c1f user: thomas tags: trunk
14:22
Added changelog entry. Closed-Leaf check-in: c3ba069788 user: thomas tags: improve_wizard_init
14:06
Use a better centering algorithm that works on both Linux and Windows. check-in: 3fccb6a456 user: thomas tags: improve_wizard_init
13:35
Clamp the initial wizard position on screen in a way that it stays within the screen. check-in: 974fcfa793 user: thomas tags: improve_wizard_init
12:15
Move button icon setup into the base class. Subclasses now specify icons to use on buttons as a static mapping. check-in: ed8ac2d492 user: thomas tags: improve_wizard_init
12:05
Move _set_default_size() on both wizards into the base class. Introduce a size parameter in __init__() that replaces the hard-coded sizes within the method bodies. check-in: 7ac730163c user: thomas tags: improve_wizard_init
12:02
Move _set_default_size() on both wizards into the base class. Introduce a size parameter in __init__() that replaces the hard-coded sizes within the method bodies. Edit: Forgot to remove calls to self._set_default_size(), causing crashes on opening wizards. Closed-Leaf check-in: 5c3e02e9d8 user: thomas tags: bogus
11:57
Wizards: Override the default style on Windows with WizardStyle.ModernStyle. This fixes issues with dark mode rendering. The default uses AeroStyle, which is completely incompatible with dark mode rendering, so avoid that on Windows. check-in: 27b6185f38 user: thomas tags: improve_wizard_init
11:53
QWizard-based wizards now inherit from a common base class. Explicitly name the Qt Wizard arguments (parent, flags) instead of specifying them as generic *args, **kwargs. check-in: 3d8d931e04 user: thomas tags: improve_wizard_init
2023-07-02
15:59
Log application version at startup. check-in: 454f3a9c50 user: thomas tags: trunk
2023-06-29
17:02
Implemented saving/loading DFC check cards. check-in: e8dfec41a4 user: thomas tags: trunk
16:48
Add changelog entry. Closed-Leaf check-in: 9edd46c3c5 user: thomas tags: generate_check_cards
16:42
Implemented loading check cards check-in: 8c3a3db2f6 user: thomas tags: generate_check_cards
15:06
Implemented saving check cards check-in: 3599de8365 user: thomas tags: generate_check_cards
2023-06-27
15:47
Release v0.24.1 check-in: ffeac3ce7a user: thomas tags: trunk, release, v0.24.1
15:45
Add changelog entry. check-in: 70bf1540ef user: thomas tags: trunk
15:38
Document: Improve IsFront card column rendering. The column was accidentally included for display in 0.23. The column now has a proper header ("Side") and display text ("Front" or "Back"). check-in: 94d4f58439 user: thomas tags: trunk
13:55
Add test cases for issue fixed in [19e7e12e8022e5dc] check-in: bc19577943 user: thomas tags: trunk
13:36
CentralWidget: Fixed broken check card generation and addition of related cards. Both features failed to fetch the required images, causing the document to render them as white rectangles, instead of showing the expected card images. check-in: 19e7e12e80 user: thomas tags: trunk
2023-06-26
12:19
Release v0.24.0 check-in: 362549a89f user: thomas tags: trunk, release, v0.24.0
12:17
README: Add custom cards feature to the feature list check-in: 585a96bb5e user: thomas tags: trunk
12:11
Changelog: increase indentation of second-level list entries check-in: ac24825836 user: thomas tags: trunk
11:59
tox: Fix tox.ini allowlist_externals for Windows. check-in: f73a990621 user: thomas tags: trunk
11:57
Accept dropping files onto the main window. Dropped document saves are loaded and dropped images are added as custom cards to the document. Partially implements [418371f8a10e3649]. check-in: 668191d156 user: thomas tags: trunk
11:17
Fix exceptions when adding additional copies of custom cards via the context menu actions. Closed-Leaf check-in: a0ce81a0ba user: thomas tags: drop_files
10:56
Added basic support for adding custom images via drag&drop onto the main window. Partially implements [418371f8a10e3649]. check-in: 6c13769644 user: thomas tags: drop_files
09:15
DocumentLoader: Protect against loading invalid databases. Catch the sqlite3.DatabaseError and report the error instead of crashing, if the user tries to load a file that is not an SQLite3 database. check-in: d05ecd142d user: thomas tags: drop_files
09:09
Loading documents via drag & drop mechanism. If a single file with .mtgproxies file extension is dropped onto the main window, it is loaded. check-in: caf9f40d24 user: thomas tags: drop_files
08:34
Declare the defaul document save file extension in one place, instead of hard-coding it in several locations. check-in: a711541cdf user: thomas tags: trunk
2023-06-25
14:04
README: Added recent feature additions to the feature overview check-in: 4faaabfeb8 user: thomas tags: trunk
13:18
Implemented generating check cards and exporting images as files. Both features are added to the card table context menu. Implements [f0af61b7bb1215a0] check-in: e6370ef7c7 user: thomas tags: trunk
13:15
Tests: Pass variable XDG_RUNTIME_DIR to the py3-test_create_bundle-* tox test environments. This fixes a warning emitted during the program execution check-in: 53458f3cc6 user: thomas tags: generate_check_cards
13:04
CardDatabase: Fix incomplete comment in find_related_cards(). Added two comments to the SQL query. check-in: 2e535288d1 user: thomas tags: generate_check_cards
10:16
Restore compatibility with platformdirs >= 2.6. Extend the tox environments to test with both 2.6 and 3.3. This is done to improve compatibility with currently supported Ubuntu systems, which all still ship platformdirs < 3.3 As a fallback for the user pictures directory, the home directory is used on systems with platformdirs < 3.3 check-in: a30df703e8 user: thomas tags: generate_check_cards
2023-06-24
23:21
Add changelog entry. check-in: 5e8dccaed8 user: thomas tags: generate_check_cards
22:54
Export images as files to a user-specified directory. This uses platformdirs.user_pictures_path, which was added in platformdirs 3.3.0, so bump the required version to 3.3.0. Image export is added to the right-click context menu for the current page table. The suggested file name is derived from the card name, stripped of characters not allowed on FAT32, for increased compatibility with Windows systems. Implements [5265af42b7f94e65] check-in: 3c2f4b5b9d user: thomas tags: generate_check_cards
15:45
CardDatabase: Define proper return type for get_all_cards_from_image_cache(). check-in: a4c020f379 user: thomas tags: generate_check_cards
15:36
CardDatabase: Replaced manually constructing a transparent QColor, use the one from the QColorConstants enum instead. check-in: 89808847fe user: thomas tags: generate_check_cards
13:40
Added changelog entry. check-in: b05539fa4e user: thomas tags: generate_check_cards
13:22
Fixed remaining issue with check cards not fitting on pages with regular cards. check-in: 66836e4c7c user: thomas tags: generate_check_cards
13:13
Tests: Potentially fix crashing the Python interpreter in the document_light fixture. Creating a QPixmap instance without the qtbot fixture present seems to have caused spurious crashes. check-in: 9ab62eb40d user: thomas tags: generate_check_cards
13:00
Tests: Properly setup the document_light pytest fixture check-in: 051c5ace1f user: thomas tags: generate_check_cards
12:33
Implemented adding check cards via the context menu. It currently causes adding new pages, which still has to be fixed check-in: 39da91e3a7 user: thomas tags: generate_check_cards
11:43
Merge with trunk check-in: 453359751e user: thomas tags: generate_check_cards
2023-06-08
16:23
Release v0.23.0 check-in: 1a7a9d026c user: thomas tags: trunk, release, v0.23.0
16:18
When looking up other sets a card was reprinted in for the purpose of switching printings, also take the front/back property into account. This is required for the SLD reversible cards. Partial fix for [8513cf57bba8e695]. check-in: 9b0ed0e999 user: thomas tags: trunk
15:37
Properly ROLLBACK the card database during the card data import, if the import fails because of an error in the input data stream. check-in: 8d5efc428c user: thomas tags: trunk
14:17
Increase Qt signal timeouts in tests from 100ms to 1s. This makes the test suite more robust under heavy system load check-in: 7158e10d1e user: thomas tags: trunk
13:25
Update ThirdPartyLicenses.md for the Appdirs → platformdirs transition check-in: e68f22e383 user: thomas tags: trunk