[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: Is there a Konqueror mimetype drop handler?
From:       Allan Sandfeld Jensen <kde () carewolf ! com>
Date:       2004-03-03 16:27:49
Message-ID: 200403031727.49924.kde () carewolf ! com
[Download RAW message or body]

On Wednesday 03 March 2004 13:18, James Marsh wrote:
>
> That's a nice solution if the "destination" icons only need work on
> KDE; unfortunately I'd like to be able to freely pass them between the
> KDE and Windows version of the software. How would I associate my
> "destination host editor" with this desktop file (so that the user can
> easily change the "--host=somehost.com" bit and test that the host is
> actually reachable etc)? I suppose I could pop up the editor if there
> are no arguments passed, but I wouldn't know which .desktop file to
> then change.
>
> What I'd really like is for an arbitrary filetype to have some
> executable associated with dropping icons on it. I've been looking
> through the sourcecode for Konqueror and was wondering about whether
> to create a patch for kdebase-3.2.0/libkonq/konq_operations.cc which
> adds a "X-KDE-DropExec" entry that describes what to execute when an
> icon is dropped on a file. This could be useful, say, for adding files
> to an archive without directly opening it:
>
> [Desktop Entry]
> Encoding=UTF-8
> MimeType=application/x-gzip;application/x-lha;application/x-tar; [...]
> GenericName=Archiving Tool
> Name=Ark
> Exec=ark -caption "%c" %i %m %U
> Icon=ark
> DocPath=ark/index.html
> Type=Application
> Terminal=0
> BinaryPattern=ark;
> X-DCOP-ServiceType=Unique
> Categories=Qt;KDE;Utility
> X-KDE-DropExec=ark -caption "%c" %i %m --add-to %d %U
> X-KDE-DropConfirm="Add files to archive"
>
> This would need a %d placeholder adding in order to specify the
> destination that was dropped upon.
>
> What do you think?

I think it would be better if you offered it as a service, rather than making 
it part of the application desktop-file.

Basically you could have a file just like arkservicemenu.desktop, just with 
the an added flag that states it's a drag'n'drop-service. 

You should also make it more generic. In this case you only care what the 
destination-mimetype is, but other drop-services might only work on certain 
source-mimetypes (add mp3 to m3u-playlist).

`Allan



 
>> 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