[yast-devel] gui ask for existing device

Hi, I want add to bootloader browse button which should browse in device under /dev (for dump device for s390). I try AskForExistingFile but it doesn't shown any device. How should I use same looking dialog (as for files and directories), which browse devices? Thanks, JR -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org

Josef Reidinger wrote:
http://forgeftp.novell.com/yast/doc/SL11.1/tdg/AskForExistingFile.html string AskForExistingFile( string startWith, string filter, string headline ); I've tried this AskForExistingFile ("/dev", "*", _("Choose one...")) but it seems to filter out the devices, probably because they are not "real" files... File a bugreport. L.

Hi,
You're right. At least ncurses YaST (where the file browser has been coded within YaST team from scratch) contains hard-coded restriction to regular files - S_ISREG, and links -S_ISLNK. Did not study Qt and Gtk code (as they just use built-in library functions) but I would bet their file browser is restricted in similar way.
How should I use same looking dialog (as for files and directories), which browse devices?
Currently you can't do it easily ;-( I mean, without having someone patch and extend the UI code so it considers not only files but also devices. Even then, I'm not sure if that is what we want and if there is any wider use for such feature If you need quick solution, for the time being you might use system agent (SCR::Read(.target.dir,...) to list the content of /dev directory and feed the data into some custom dialog with SelectionBox widget B. -- \\\\\ Katarina Machalkova \\\\\\\__o YaST developer __\\\\\\\'/_ & hedgehog painter -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
participants (3)
-
Josef Reidinger
-
Katarina Machalkova
-
Lukas Ocilka