New Gtk3 UI: Difference between revisions

From vice-emu
Jump to navigation Jump to search
Line 88: Line 88:
** in the HELP menu the "browse documentation" item is non functional. we either need a portable solution, or use archdep code here
** in the HELP menu the "browse documentation" item is non functional. we either need a portable solution, or use archdep code here
** <s>the debug menu is completely non functional</s>
** <s>the debug menu is completely non functional</s>
* Dialogs
** "File->Netplay" needs some testing and refactoring. perhaps move it into settings?
** "File->Create and attach empty Disk image" is missing
** "File->Create and attach empty Tape image" is missing


* Media recording
* Media recording

Revision as of 00:19, 29 December 2017

New Gtk3 UI

This page is meant to keep track of development efforts on the new Gtk3 UI. Once the Gtk3 UI is the de-facto UI standard, this page can be (re)moved. For now, I'd like to keep it here so it can quickly be found.

Rationale

The how and why we go Gtk3 for *nix, Windows and OSX should be clear, but I'll reiterate: since we don't have any Windows or OSX maintainters left and failed to attract new ones, the decision was made to use Gtk3 as the new UI for 'modern' OSes.

Gtk3 is portable and widely supported and has a C interface. So we should be able to write the UI code once and have it run on our major platforms: Linux, Windows and OSX. Using GLib (a dependency of Gtk3) a lot of platform-dependent code in the UI can be avoided and many standard dialogs, such as open/save/select-dir need to written only once, Gtk3/GLib will handle most of the platform-dependent stuff.

Current development state

  • All emulators except VSID work, though a lot of UI code still needs to be written or updated to properly support all machines
  • Default renderer is OpenGL 3.2 based (GTK 3.16 required) and does full HW scaling. Fallback renderer is Cairo-based, which will scale in software if necessary but slows down noticably when it does.
  • All UI code is hand-written, we tried using Glade/GtkBuilder, but the amount of machines and extra hardware VICE supports is way too much what a static UI can handle
  • Though many UI elements look okay, some don't. This isn't lazyness but rather to avoid tweaking the layout only to discover later that it still needs to be changed. So any layout/style issues will eventually get fixed. So don't complain about it, unless there are glaring bugs (such as dialogs that are too large to fit on a decent screen)
  • The developers currently working on Gtk3 are:
    • compyx - UI, archdep, documentation, bug fixes
    • McMartin - rendering backends, UI, archdep, bug fixes
    • loggedoubt - testing, bug fixes
    • groepaz - testing, monitor code, QA
    • blacky startdust - testing, build system, QA

BUGS/TODO

This is a list of things to do and bugs to fix. This is no way an exhaustive list, to get a better understanding of what needs to be fixed/altered, run this command inside VICE's top dir: grep -n 'FIXME\|TODO\|XXX' `find src/arch/gtk3 -name '*.c'`, and be amazed.

  • Monitor support for Windows (2017-11-08)
    • it should work in the mingw console - what we really need is something like VTE that works everywhere Gpz (talk) 01:13, 17 November 2017 (CET)
  • Mouse-grab. The UI items is there, but the actual mouse code isn't implemented yet (2017-11-08)
  • x64dtv: DTV has no tape port, disable tape port widget (2017-11-08)
  • The Tape Devices widget needs to check if resources can be set to avoid segfaults (2017-11-14)
  • Light pen support. (2017-11-15)
  • Implement image content preview widget for open/attach dialogs (2017-11-08) Done for disk and tape images compyx
  • Mouse cursor should vanish if it's obstructing the display and not in use. (2017-11-15)
  • OpenGL
    • The OpenGL renderer should transform itself into a Cairo renderer if the system doesn't support OpenGL. (2017-11-15)
    • Do-not-scale option. Important for Cairo renderer, possible for OpenGL. (2017-11-15)
    • Stretch goal: the OpenGL renderer should fall back to legacy mode (the SDL renderer) if GTK3 itself has, instead of failing. (2017-11-15)
    • Rework OpenGL support on Windows and optionally on Linux to check for OpenGL library/driver compatibility at runtime instead of compile time. (2017-11-15)
    • sometimes the window comes up with the menu- and statusbar being black, slightly resizing the window would fix it. perhaps related to grabbing the GL context at points it expects it to be somewhere else, and then its not "given back". So one possible fix would be to move all those operations into the 'realize' and 'render' signals. A patch has been implemented to "give back" any pre-existing context, which seems to influence normal screen updates. Further testing is required before this bug can be called definitely fixed. (2017-11-19)
      • still no dice. upstream bug? Gpz (talk) 23:16, 21 November 2017 (CET)
  • Settings
    • xpet: "model settings" widget is way too large, vertical space needs to be reduced drastically (2017-11-16) Fixed, but more glue logic is needed (2017-11-21)
    • monitor settings are missing
    • action on CPU JAM setting is missing
    • setting an external palette in video settings does not work
    • On Windows (and perhaps OSX) the MIDI widget should show a combobox with supported drivers (2017-11-14)
    • ROM settings are missing
    • CRT-emulation settings are missing (the sliders at the bottom in GTK2 UI). perhaps just move them into the regular settings
  • C64 Cartridge settings
    • "Enable 32K Supersnapshot RAM expansion" should go to a seperate "Supersnapshot V5" page
    • cartridge images vs extra eeprom images are screwed up...
      • some of the cartridges have flash rom - this refers to the actual cartridge image. for this the filename can NOT be selected (MMC64 is an exception - perhaps we can even generally allow it for the others too). there is also "flush image" (button) "save image as" (browse button) and "update image on detach/quit" (checkbox)
      • only mmcr and gmod2 have an extra eeprom, for this only the filename can be selected (textfield, browse button), and there is a resource to make the eeprom read/write (checkbox)
        • in detail:
          • GMOD2 "GMod2FlashWrite" resource is related to the flash rom (actual cartridge image) and not the EEPROM. it should be moved further down on the page and the description should mention "flash image" to make clear its not related to the eeprom. also the "flush cartridge" and "save as" buttons should refer to the cartridge image (which is flash rom)
          • MMC64 - BIOS file selection is inactive when MMC64 is not enabled. this makes no sense, since in order to enable it, a BIOS file must be set. so always enable it :)
          • MMCR - cartridge image and EEPROM image is mixed up. only the filename selection is related to the EEPROM, the other stuff is related to the cartridge image/flash ROM. also "make eeprom read/write" checkbox is missing.
    • for those cartridges with an "enable cartridge" checkbox the logic is backwards, when the cartridge is disabled then the filename selection is disabled. it should be the other way around, when no filename is set, then the cartridge can not be enabled (but in order to enable it, a filename must be set)
      • IEEE-488 Cartridge
      • Magic Voice
    • I/O extensions to check for proper behaviour:
      • Memory Expansion Hack
      • GEO-RAM
      • RAM Expansion Module
      • RamCart
      • Double Quick Brown Box
      • Expert Cartridge
      • ISEPIC
      • EasyFlash
      • GMod2
      • IDE64 (this one is so 'special', I probably actually go it right --compyx)
      • MMC64
      • MMC Replay
      • Retro Replay
      • Super Snapshot V5
      • Ethernet Cartridge
      • RR-Net Mk3
      • IEEE-488 interface
      • Magic Voice
  • Menus
    • in the HELP menu the "browse documentation" item is non functional. we either need a portable solution, or use archdep code here
    • the debug menu is completely non functional
  • Dialogs
    • "File->Netplay" needs some testing and refactoring. perhaps move it into settings?
    • "File->Create and attach empty Disk image" is missing
    • "File->Create and attach empty Tape image" is missing
  • Media recording
    • Implement audio recording and video recording (2017-12-17) -- Mostly implemented, what is missing is a 'stop recording' button on the status bar (compyx 2017-12-23)
    • MacOS: Add QuickTime recording settings widget, like the FFMPEG recording settings widget (I can't do this, someone with MacOS/QuickTime knowledge will have implement that compyx 2017-12-17)
  • Fix full screen with x128 (2017-11-08)
  • Keymaps in C128 are flaky (aren't they all the same? --compyx) (2017-11-08)
  • x128: C64 memory hacks shouldn't be available (2017-11-08)
  • Only activate "media input file" widgets when Sampler Device is "media input file" (2017-11-08)
  • Implement drive settings UI glue code (enable/disable widgets depending on drive model and machine class) (2017-11-08)
  • Grey-out other widgets when a certain memory hack is selected (x64) (2017-11-08)
  • x128 Video Settings UI is too large (2017-11-08)
  • x64dtv: this machine has only one SID (2017-11-08)
  • x64dtv: no userport printer available (userport has only 5 pins) (2017-11-08)
  • x64dtv: no SmartMouse available (2017-11-08)
  • Drive settings UI: machines without IEC cause resource errors due to 'IEDevice[8-11]' etc (2017-11-08)
  • xcbm5x0: doesn't support userport printer, remove (2017-11-08)
  • xplus4: doesn't support userport printer, remove (2017-11-08)
  • xplus4: may support 1351/SmartMouse through SidCard, research needed (2017-11-08)
  • xpet: doesn't support SmartMouse, fix (2017-11-08)
  • xpet: SidCard only supports a single SID, fix (2017-11-08)
  • xvic: joystick settings UI is scrambled (20170-11-08)
  • xpet: SidCard only supports a single SID, fix (2017-11-08
  • xpet: PET DWW should only be possible to enable with I/O space of 2048 bytes (2017-11-16)

Upstream bugs

  • Some combobox contents appear to have 'empty' entries and sometimes the colors of the items change (upstream Gtk3 bug) (2017-11-08)


misc

  • in xvic the joysticks do not work
    • the status bar shows two joysticks (it should show one)

Feature requests

  • Add preview of the RAM init pattern (2017-11-08)
  • Add 'revert changes' to dialogs/widgets to revert resources to their state when the widget/dialog was activated. (This is different from restoring to factory defaults) (2017-11-16)
  • Add a 'smart' cartridge attach dialog: show "preview" of .crt image if selected in the dialog, show only valid cartridge types when selecting a cart image.