27 Commits
Author SHA1 Message Date
Eero Tamminen 65886363b8 Replace GPLv2+ texts in Python UI code with SPDX license ID
Improves readability a bit.
2025-08-15 18:23:42 +03:00
Eero Tamminen bc3c46093b Python UI: fix debug UI config saving
ConfigStore does now stricter section & key checks against Hatari
config, which broke debug UI config saving.  Because debug UI is
likely to go away at some point (doing debugging from another process
has too many restrictions), do minimal fix (don't save follow-pc
option).
2021-01-11 01:54:05 +02:00
Eero Tamminen ed55edf795 Add Python UI config file loading error debug messages
And return error from load function instead of proceeding if config
loading failed and there are no defaults given, as things would
definitely fail without even any defaults being there.
2020-12-18 17:52:16 +02:00
Eero Tamminen 77d9ae2b13 Python UI: Support Hatari Key and Float configuration values
Otherwise Python UI crashes to assert after user has changed a
configuration value, and either tries to exit, or re-run Hatari, and
OKs Python UI's suggestion of saving the changed config settings
before that.
2020-11-21 21:28:47 +02:00
Eero Tamminen c3c179c109 Remove shebang from non-executable scripts
From: https://src.fedoraproject.org/rpms/hatari/blob/master/f/hatari.spec#_62
2020-10-16 00:28:06 +03:00
Eero Tamminen 28eab72240 Python UI: handle config values with '=' in them
Used only in LILO config item, so it doesn't matter that rest of the
config value is clipped.
2019-11-07 00:55:39 +02:00
Eero Tamminen d209e486fd Remove trailing whitespace from Python scripts
hg files | grep '\.py$' | xargs sed -i 's/[[:space:]]*$//'
2018-10-13 11:58:44 +03:00
Eero Tamminen 7feb7e72b2 PythonUI: Support both Hatari config file locations
Hatari v2.0 config file can now be in:
- ~/.hatari/hatari.cfg (old)
- ~/.config/hatari/hatari.cfg (new)
2016-12-23 00:57:01 +02:00
Eero Tamminen 85a782cd92 one more assert to config handling 2012-01-08 22:21:47 +02:00
Eero Tamminen b2974ef9b7 Fix assert and resulting empty hatari config file:
* This was caused by Hatari v1.6 config variable name changes and those
  new variable names missing type prefixes.

* Fix is using variable type mapping (conftypes.py) generated from
  Hatari configuration.c file instead of inferring the types from
  the (missing) name prefixes.
2012-01-08 21:41:36 +02:00
Eero Tamminen 1ed99f4f62 remove / replace remaining berlios references 2012-01-07 23:15:20 +02:00
Eero Tamminen b2f96ef84c update python UI copyrights & doc 2011-04-21 00:55:34 +03:00
Eero Tamminen 0f1f9de4c7 hatari UI: partial/preliminary Python v3 support 2011-02-19 20:51:26 +02:00
Eero Tamminen 0eef5abe59 fixes for Hatari UI missing config saving 2010-04-19 00:28:42 +03:00
Eero Tamminen 285593ef53 fix debugger UI config loading
- move config path handling from hatari.py back to config.py for this
- rename HATARI_CONFDIR to more correct HATARI_SYSTEM_CONFDIR
2010-04-18 17:14:53 +03:00
Eero Tamminen fa2c9a22d3 use and handle Hatari system configuration file correctly
(if one exists, but saved user configuration is missing)
2010-04-09 01:12:51 +03:00
Eero Tamminen 8f49c85655 improved UI button type & warning message 2010-03-11 23:55:43 +02:00
Eero Tamminen a18a0cbd5f fix for previous Hatari-UI zooming update,
update Hatari UI sources copyright & email info
2010-03-11 22:00:47 +02:00
Eero Tamminen 7f135d03a9 - Added recanim, recsound, config load/save and memory snapshot
load/save features.  If config changed in UI, give a temporary
  config file to Hatari whenever it's re-run
- Fullscreen isn't anymore a toggle as user cannot use this
  option if Hatari is fullscreen... Removed fullscreen config
  option handling as it will be changed also directly from Hatari
- To support drag&drop for the UI, it forwards non-option args
  (floppy name) to Hatari from the UI command line
- Disk image and joystick settings to separate dialogs
- Add dummy paths and peripherals settings dialogs
- Check that Hatari supports --control-socket argument
- Make dialog run() methods more consistent
- Python code compatible to Python 2.4 (I'm testing with 2.5
  which accepts '()' for classes not inheriting anything) and
  wrapper scripts to older SH (use exit when outside func body)
2008-07-26 00:18:43 +03:00
Eero Tamminen 84f89ee994 - empty string key values should be shown and saved as "", not "None" 2008-06-25 23:19:32 +03:00
Eero Tamminen e628bcbd63 warn if Hatari configuration is missing and bail out 2008-06-18 01:47:37 +03:00
Eero Tamminen b518a0d017 - fix debugui.py default config value type
(without saved config you got exception when trying
   to switch to disasm or memory dump mode)
- hide peripherals dialog faster
- correct ConfigStore() constructor __doc__ method
2008-06-13 00:43:36 +03:00
Eero Tamminen ec3c6edf20 - stupid oversight, Hatari configuration has after all sections
with keys named the same (shortcut and joystick sections),
  needed to rewrite config handling to take this into account
- added joystick emu selection
- apply doesn't close trace settings dialog, only close will do
2008-06-07 01:04:38 +03:00
Eero Tamminen cab94b6f61 - fix cosmetic bugs in config file output (newlines between
sections and capitalized True/False)
- add checkpointing to configuration and change changed
  config variable checking/listing to use that.  Checkpointing
  will be useful for Hatari configuration dialogs
2008-05-28 21:17:10 +03:00
Eero Tamminen e8144a596c - improve documentation (comments)
- fix issues reported by pylint
- take hatari configuration border settings into account
  when deciding on Hatari cli option
2008-05-25 17:59:31 +03:00
Eero Tamminen e86dd8456f config.py:
- improve doc strings
- enable configuration file saving
- create config file on save if it doesn't exits (under ~/.hatari)
debugui.py:
- read/write Debug UI options from/to configuration file
- bind enter to applying options in options dialog
2008-05-20 22:27:01 +03:00
Eero Tamminen 5e144ccd04 Prepare for DebugUI and HatariUI configuration handling:
- generalize Hatari configuration handling code and move it to
  to a new config.py file
- split Config class to ConfigStore and ConfigVariables classes
- ConfigVariables class makes accessing the configuration variables
  nicer as they are now class attributes and have proper types
  instead of being just strings. The code checks/enforces the Hatari
  types (bool, int, string) on them
- ConfigStore class then takes care of loading/saving of
  configuration and its changes
- Renamed ConfigMapping class left to hatari.py into HatariConfigMapping
  and adapted it to the configuration handling changes
2008-05-20 00:06:20 +03:00