From kde-devel Fri Nov 16 23:26:55 2001 From: Waldo Bastian Date: Fri, 16 Nov 2001 23:26:55 +0000 To: kde-devel Subject: Re: Getting a string from the user in a KIOSlave X-MARC-Message: https://marc.info/?l=kde-devel&m=100595328920843 On Friday 16 November 2001 07:42 am, 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. > 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? The dirty way: Write a small aplication that requests the information and prints the results to stdout and call this from within the slave with e.g. popen() The over-engineered (but slightly faster) way: Create a kdedmodule that pops up the dialog and call this module from your slave via dcop. Cheers, Waldo >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<