2 Commits

Author SHA1 Message Date
5860b3d25c Improve code quality across the codebase
- Add comprehensive type hints to MyTimeline.py methods
  - Add type hints to __init__, change_db, and tooltip formatting methods
  - Use Any for Gramps-specific types that aren't easily importable

- Refactor generate_demo_family.py to use ElementTree
  - Replace string concatenation with xml.etree.ElementTree for proper XML generation
  - Add compatibility handling for Python < 3.9 (ET.indent)
  - Add EventData, PersonData, and FamilyData dataclasses for better structure
  - Add comprehensive type hints to all functions

- Extract magic numbers to named constants
  - Add constants for UI dimensions, timeline heights, dialog sizes
  - Add constants for date calculations and genealogical year ranges
  - Improve code readability and maintainability

- Refactor duplicated code in filter dialog handlers
  - Extract common checkbox handler logic into reusable methods
  - Create _make_group_toggle_handler and _make_child_toggle_handler
  - Eliminate code duplication between event type and family filters

- Improve shell scripts with better error handling
  - Add validation for Gramps installation
  - Improve error messages with actionable troubleshooting steps
  - Use set -euo pipefail for better error detection
  - Add better user guidance in error scenarios
2025-11-29 22:49:16 +01:00
b32be12aea Update plugin to Gramps 6.0 and add snap installation script
- Update MODULE_VERSION from 5.1 to 6.0 in MyTimeline.gpr.py
- Add install_to_snap.sh script to copy plugin to snap-installed Gramps
- Script includes automatic directory detection, backup functionality, and error handling
2025-11-29 20:50:43 +01:00