Generic File Picker


WizardStan

Mega GP Mania
Joined
May 24, 2008
Messages
16,731
So I was about to PND up jzintv when I realized it didn't have a file picker. The only way to start it is command line. So as a quick and dirty fix, I was thinking of writing a generic file picker app which simply writes the complete tree to the selected file to stdout and then exits, so I could do
Code:
jzintv `filepicker`
and it would pop up a file picker and pass that to jzintv until I got around to writing or porting a proper gui, but before I do that, does anyone know if such a thing already exists?
 
Sounds like a job for zenity to me. A combination of this and the built in terminal program(s) can be used to run command line programs from PNDs.
 
Done! Thank's guys! How have I survived so long without hearing about this? :eek:
 
Ne'er tried the other emus eh? We also had sveral discussions about it -

my theory is that any advanced emu will have an integrated picker, so we need a dumb gneri. One for quick ports - zenith - and then o er time emus can pollish into real UIs. Shrug

jeffphone
 
God I hate zenity, it is almost unusable with a d pad and I hate having to fumble with the stylus and muck up the screen just to load something.

We need to come with a better solution.
 
I intend to write a proper gui for it, it just completely slipped my mind until just last night and I want to get it out sooner rather than later.
 
For emus: develop a front end app that *really* is a front end (aka all emus draw their output to a buffer that is shared by the emu front end, and the emu front end does whatever with it). Gives one absolute control over everything including file dialogs. If anyone has too much free time, there's something for you ;)

For apps in general: use the Qt file picker; much more finger and dpad friendly; tell me if I should write something similar to zenity and I'll do it in 5 min. Or else use your own file browser; dialogs like Qt are dpad-friendly enough for me but if you are one of those people (yeah I'm alienating everyone around here with this statement am I not ;)) who are meticulous about exactly how your UIs should look, or shun using Alt+Whatever to jump around in UIs, just write something better yourself and realize how hard it is (remember: a basic file picker needs lists of files (obviously), previews or icons, keyboard integration with Alt shortcuts and accept/reject shortcuts, localization, accessibility, etc etc), and if you actually manage to produce something good and generic (aka: beyond something like [1]) feel free to package it in a nice tool, and see how many others are gonna use it...

[1]
Code:
Showing "/home/example-of-bad-file-picker/files"

  .
  ..
→ a.file
  b.file
  c.file
  ex.jpg

[  OK  ] [Cancel]
 
DaveC said:
God I hate zenity, it is almost unusable with a d pad and I hate having to fumble with the stylus and muck up the screen just to load something.

We need to come with a better solution.

Start typing the name of the ROM you want to load, then when your one i selected press enter. Works beautifully for me.
 
Last edited by a moderator:
That's what I figure - it's actually a fair amount of work to make a good picker and in the end it's only useful for bad UIs/ports; any good port will have it's own integrated frintend (and yea, every app works different, but hopefully each app is internally consistent. If you instead always make he picker the same, it clashes wih the rest of the UI..)

it's trivial to slap togeher n 5mins an sdl directory walking file picker, but then you have no copy/paste, need to work about Unicode properly, do preview, support single and multifile picking, dir lickng, favourites list in some standard or another, handling Hemingway and font sizing.. Urgh :)

I dunno - Dave ifeel for ya but I figure the problem will go away over time. I'll make some picker for snes9x3d4p if still in use, pico already has one, hatari has one, I'm good :) I need to tweak hataris hough, sort directories to top an make jump-to-key...

JeffPhone
 
Back
Top