From: Florent R. <f.r...@fr...> - 2015-12-17 12:05:42
|
Hello, "Ebbesen Soren" <seb...@id...> wrote: > Thanks you very much for the input! You are welcome. > I have one additional question: I'm working on another project using > pythondialog with a touch screen. It works well, apart from the dialog > fselect. The problem here is that I need to hit the space bar to select a file > (i.e. copy the file-name to the input field below the browser). However, the > touch screen only renders mouse clicks so I cannot get the file-name into the > input field. Is there a way around this? pythondialog can't do that natively in its present state, AFAIK. It is probably possible, in similar ways as mentioned in my previous mail, to translate the touch screen events into keyboard events or terminal input, but the best solution is probably to make dialog behave a bit like mc (Midnight Commander), which is able to recognize mouse clicks in several terminal emulators (tested in XTerm, Konsole and the Linux console, not sure about other terminal emulators). Since mc is based on ncurses like dialog, the technology is the same. The only thing is that you want to work with a touch screen instead of a mouse, but it seems to me it is only one more case to deal with in the relevant software component, i.e., ncurses and/or terminal emulators. Well, there still is some complexity if this has to be handled at terminal emulator level, which I would expect, because depending on what you use (Linux console or X terminal, or Wayland terminal or...), the drivers to read touch screen "clicks" are not the same (Linux kernel in the first case, X.org in the second one; one could also consider Wayland, OS X...). If I were in your place, I would talk to Thomas Dickey about this, because he knows the whole terminal software stack (ncurses, dialog and XTerm maintainer!). > Oh, one more question: In order to not confuse the user, I'd like to show only > the contents of a single specific directory and only files with a specific > extension. In other words, is it possible to remove the "Directories" element > in fdialog and additionally specify a file extension such that only files with > this extension are shown? This sounds like a customization of the fselect widget and must be implemented in dialog (in C) before pythondialog can offer it. Again, your best bet here is to contact Thomas Dickey or an ncurses mailing list. I am sure Thomas would gladly accept a well-written patch. :-) Sorry for not being able to provide more concrete help... > Finally, I could't figure out how to reply to your answer to my original > thread on the mailing list, sorry... Ah, what is the problem exactly? Is there no error message? I am replying to the list for the benefit of other users, since that was apparently your intention (and putting you in Cc just in case, please tell me if this is unwanted). Regards -- Florent |