[prev in list] [next in list] [prev in thread] [next in thread]
List: kmail-devel
Subject: Re: attachment execution
From: George Staikos <staikos () 0wned ! org>
Date: 2000-05-29 22:28:29
[Download RAW message or body]
On Mon, 29 May 2000, Daniel Naber wrote:
> I just started implementing better attachment handling. I'm not very far
> yet, the idea is this (see code below, it belongs to
> KMReaderWin::slotAtmOpen()): If there is a know service for an attachment,
> offer to open the attachment with that. If there's none, open the "open
> with" dialog. Quite simple, but I thought I had to do something... (I hope
> I can continue with this tomorrow).
>
> I'll send another mail with some attachments so we can better test this.
[..]
> QString mimetype = KMimeType::findByURL(KURL(fileName))->name();
> KService::Ptr offer =
> KServiceTypeProfile::preferredService( mimetype, true /*need app*/ );
> if ( !offer ) {
> printf("** fixme: open with...\n");
> } else {
> // fixme: default to "Cancel":
> QString service = offer->name();
> int choice = KMessageBox::questionYesNo(this,
> "Open attachment using'" + service + "'?", "Open Attachment?",
> "Yes", "Cancel");
> if( choice == KMessageBox::Yes ) {
> KURL::List *lst;
> lst = new KURL::List();
> KRun::run( *offer, *lst );
> } else {
> printf("** offer save?? at least don't exec....\n");
> }
> }
Good work, excellent ideas, but can we change one thing? Can we have a
single dialog instead of Run yes/no? no=> Save yes/no? etc....
--
George Staikos
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic