52 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 08ae94c0ad Update Python script shebang lines to latest recommendation
"env" usage is deprecated nowadays:
* https://docs.fedoraproject.org/en-US/packaging-guidelines/#_shebang_lines
* https://www.debian.org/doc/packaging-manuals/python-policy/#interpreter-directive-shebang

(RPM based distro packages for Hatari 2.5 were already removing it.)
2025-06-05 00:22:12 +03:00
Eero Tamminen 1abf5e37cf python-ui: fix some PyLint complaints
Most of these are just code cleanup, but there was also
bug in UI corner-case error path.
2025-05-29 01:11:38 +03:00
Eero Tamminen e1364f720c Python UI: drop Hatari <2.4 (oldUAE) support
Also improve TT-RAM / 24-bit addressing support slightly and
update Python UI docs.
2024-03-17 00:37:13 +02:00
Eero Tamminen 272ec5489c Fix: Handle UAE disassembly + symbols output in Hatari UI debug UI 2022-05-30 02:05:29 +03:00
Eero Tamminen 8bf5895426 Python UI: misc debugger UI improvements
- Use more appropriate fsel var name instead of file
- Fix rest of PyGTK deprecation warnings by:
  - changing how GtkDialog is created
  - not using monospaced font in address entry
  - using GtkTextView instead of GtkLabel to get text widget
    with monospaced font
- Remove left/right arrow keyboard shorcuts for memory address
  changing as then that would be triggered also when editing
  the memory adddress
- Call set_dumpmode() method at start and dump() after options dialog
  so that debugger window is immediately in right size
2021-01-12 01:12:39 +02:00
Eero Tamminen 4000996ed4 Python UI: fix more "positional argument" PyGTKDeprecationWarnings
"Using positional arguments with the GObject constructor has been
deprecated. Please specify keyword ... or use a class specific
constructor."
2021-01-11 01:54:05 +02:00
Eero Tamminen 5019116bef Python UI: fix/improve file selector titles
Fix: specify for Gtk.FileChooserButton() that label is to be used as
file selector title.

Allow title to be specified also FselEntry, not just for file
selectors gotten from FselAndEjectFactory.

Use labels in front of options (in settings dialogs) also as their
file selector titles, and have all of them ending with ':' for
consistency.
2021-01-11 01:54:05 +02:00
Eero Tamminen c47320c4a6 Python UI: change rest of deprecated HScale widgets to Scale ones
Also add tooltips to debugger options settings, and set DisplayDialog
variables in both instances in same order.
2021-01-11 01:54:05 +02: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 9c3156a12b Update Python code copyrights 2020-12-15 16:06:19 +02:00
Eero Tamminen 3ccc775f5e Python scripts hashbang: python -> python3
Scripts still support both Python versions, but most current distros
don't anymore install Python v2, or "python" symlink to it, by default.
2020-10-21 11:33:38 +03:00
Eero Tamminen c464f908a3 Python-UI: support both Python v2 & v3 2019-01-09 23:35:47 +02:00
Eero Tamminen 9b32d5c8ce Fix rest of issues from PyGtk v2 -> Python/Gtk v3 transition
There are some additional changes on top of Gtk v2 -> v3 changes
coming from switching from static PyGtk bindings to GObject
introspected ones.

- Extra data can't anymore be stored to objects.  This caused
  a lot of changes in Table widget handling -> column needed to
  go into helper function parameters
- Alignments are now given as properties to widget constructor
  instead of needing to use a wrapper object
- Focus flags are now also given as properties
- Some other changes widget constructor parameters and whether
  they're optional or not
2018-10-13 19:44:21 +03:00
Eero Tamminen 04fdb01732 Add missing imports + update copyrights 2018-10-13 13:32:14 +03:00
Eero Tamminen 0aec09cd04 Start of PyGtk 2.x -> Gtk 3.x / GObject transition
Raw results from running:
https://gitlab.gnome.org/GNOME/pygobject/raw/master/tools/pygi-convert.sh

(Just string replace)
2018-10-13 13:19:15 +03: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 015a1f3cc9 Hatari UI fix for systems where "python" is v3
GUI parts are python2 only due to PyGtk dependency,
so set that as hashbang as specified in:
	https://www.python.org/dev/peps/pep-0394/
2017-01-04 00:25:44 +02:00
Eero Tamminen b69f7f9322 Support WinUAE CPU core regs output in Python GUI
Without this the Python GUI debug window doesn't work.
2015-05-18 00:10:18 +03: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 4437e322f4 debug UI: disassembly is now prefixed with '$', adapt 2011-02-19 20:52:17 +02:00
Eero Tamminen 0f1f9de4c7 hatari UI: partial/preliminary Python v3 support 2011-02-19 20:51:26 +02:00
Eero Tamminen 1d157e067f Option for whether Hatari UI debugger will change to new PC address
(whenever emulation is stopped again)
2010-04-19 00:30:29 +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 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 35d92b6bfd Support for setting CPU level & clock and Falcon DSP type:
- table dialog helper supports multiple columns
- table helper for radio button group items
- use above in machine config dialog
- add CPU level & clock and Falcon DSP support to machine config dialog
  and configuration handler
2009-09-20 14:25:54 +03:00
Eero Tamminen 9b9c5609df fix: debugger memdump/disasm show/save/load need now to use '$' for hex 2009-08-17 22:54:39 +03:00
Eero Tamminen 895cf13bd1 support arbitrary sound frequency. scripts should be executable 2009-05-31 21:31:16 +03:00
Eero Tamminen 4df8a384a4 Implement support for paths and update TODO 2008-09-29 23:05:02 +03: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 8564fc5d59 - "finish" configuration setup dialog and add support
for all the required hatari variables
- list (in comment) which Hatari variables are not yet supported
- disable Hatari internal quit confirmation when starting Hatari
2008-06-15 23:46:24 +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 6fd0b76d3d - move table helper functions from debugui.py to uihelpers.py
- adapt to the new Hatari joystick settings option
- add handling for the new Hatari disk options
- add Hatari peripherals dialog (uses table helpers)
  and move disk & joystick settings there
- refactor hatari.py a bit so that debugui.py can be
  given options with which it should run Hatari
- comment code more
2008-06-10 23:29:08 +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 7bfd9edcd6 - add README
- allow running the UI and debugger scripts from elsewhere than
  where the scripts themselves (and icon/logo images) are
2008-05-30 23:03:01 +03:00
Eero Tamminen 0e0984f57c code cleanup:
- don't derive from HatariUIDialog unnecessarily
- change helper methods that don't use other class methods
  or object variables into functions
- prefix internal methods with "_" is is python convention
- add docstrings to methods
2008-05-27 23:40:03 +03:00
Eero Tamminen 042c448aed More refactoring inspired by Pylint OO-style warnings:
- move common / helper functions from dialogs.py to new uihelpers.py file
- add there create_toggle() and create_button() and use these in debugger
  and hatari UI instead of methods
- move class variable constants to their own Constants and UInfo classes,
  this makes sharing them more explicit
- associate HatariControls instead of inheriting it in HatariUI,
  this makes the class roles more explicit (but there are some less
  clean things still)
- prefix all internal callback methods in HatariControls with "_"
  (which is a Python idiom)
2008-05-26 22:54:49 +03:00
Eero Tamminen 38e77f339b - refactor address handling to MemoryAddress class from DebugUI class
in preparation for additional memory area monitoring windows requested
  by Nicolas
- ask user whether Hatari should be killed instead of just killing it
- fix OO-style issues reported by pylint
2008-05-25 23:24:01 +03:00
Eero Tamminen 129a9cbee3 - nicer resizing for dialogs
- leave 0x prefix out from addresses in dialogs
- kill Hatari on exit
2008-05-25 10:42:52 +03:00
Eero Tamminen 7bce2a7850 - add memory load and save dialogs & functionality
- refactor the existing classes for this a bit
2008-05-24 23:35:51 +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 fbd8045c56 - use todo and error dialogs in debug UI
- add options dialog for number of lines on screen
- use different address skips in memdump & disasm modes
- get distinct lines from hatari instead of concatenated data
- remove "Default" button as useless (when monitor windows are added)
  and set Registers as default mode (+ get address from PC register)
- lots of fixes to how address changes are calculated
2008-05-17 00:28:39 +03:00
Eero Tamminen 52c8021988 - Support arrow keys and page up/down as Nicolas requested
- Added buttons corresponding to page up/down address change
- fixed TODO dialog close button
- fixed address entry size
2008-05-13 23:22:35 +03:00
Eero Tamminen 955d618cb4 - make debug UI work also as standalone
- move Hatari output file open and read from debugui.py to hatari.py
2008-05-13 00:17:06 +03:00
Eero Tamminen 972c675635 remove extra space 2008-05-11 21:25:12 +03:00
Eero Tamminen aa174f79da when Hatari is stopped again, let Hatari decide from which address
to do the disassemble/memdump (hopefully that's PC)
2008-05-11 21:15:21 +03:00
Eero Tamminen c0a800e0df - <<, <, >, >> buttons work now
- user can set the address also
- add button for default address and option
- show dialogs for all TODOs
2008-05-11 21:06:11 +03:00
Eero Tamminen a839da0699 - fix debugui startup, try deleting the log file only if it exists
- make register dump just one of the dump modes
- fix the dump widget to monospace font and make it not to resize
  the debugui window if the widget is smaller than the available space,
  only when there's too little space
2008-05-11 20:04:30 +03:00
Eero Tamminen ede9033b4b fix text to monospaced 2008-05-10 02:13:46 +03:00