[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: Getting a string from the user in a KIOSlave
From: David Faure <david () mandrakesoft ! com>
Date: 2001-11-16 17:35:46
[Download RAW message or body]
On Friday 16 November 2001 16:42, Shaun Jackman wrote:
> This seems to defeat the modularity of a KIO::Slave. If reading this
> information from the user is necessary to the transfer process, then every
> application that uses the KIO::Slave would have to duplicate the same code
> InputDialog code. I'll describe my application and perhaps you can give me a
> better solution.
When I say "in the application", it means, in the process of the application.
This doesn't necessarily mean duplicating code, one can use the functions in
the libraries - as we do currently for everything else that happens "in the app"
like the password-dialog and the kio_uiserver's message boxes.
> I'm writing a KIO::Slave for the Nomad Jukebox (an mp3 player with a 6 gig
> HD). The NJB uses a system of Album/Artist/Title to organize the
> pseudo-directory structure. So, this information is required for a copy to
> the device. I extract the information from ID3 tags if possible, but if the
> tags aren't present the operation fails. I could return a COULD_NOT_READ and
> leave it up to the user to fill the ID3 information in, but it seems to me it
> would be much more useful if I could pop up a simple dialog box with three
> text inputs. Particularly since this information is usually readily available
> from the filename and the user simply has to select the proper text from
> filename label and paste it into the proper field in the dialog box. One way
> may be the "clean" way, but it's about as useful as dirt. Any ideas?
Yes, what you're missing is an extension to SlaveBase::messageBox
that lets the slave pop up a message box (in kio_uiserver's process, via
the application) that contains a lineedit. The current message boxes
are simple yes/no/cancel and such. Feel free to post a patch that extends
the functionality of SlaveBase::messageBox (or adds a new method like
SlaveBase::getInputText), with the necessary forwards to kio_uiserver
and the actual implementation in kio_uiserver.
--
David FAURE, david@mandrakesoft.com, faure@kde.org
http://perso.mandrakesoft.com/~david/ , http://www.konqueror.org/
KDE 3.0: Konquering the Desktops
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic