From kde-devel Thu Nov 29 12:45:19 2012 From: Vishesh Handa Date: Thu, 29 Nov 2012 12:45:19 +0000 To: kde-devel Subject: Re: Nepomuk Tags kioslave - Please Review Message-Id: X-MARC-Message: https://marc.info/?l=kde-devel&m=135419242704053 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--===============3814786102681480981==" --===============3814786102681480981== Content-Type: multipart/alternative; boundary=e89a8ff1c638ef943404cfa17cf9 --e89a8ff1c638ef943404cfa17cf9 Content-Type: text/plain; charset=ISO-8859-1 I chatted with David, and I've enabled 'renameFromFile' and 'copyFromFile'. And I give an error if one tries to rename a local url in the tags kioslave. This results in those cut (from file) + paste (to tags) failing, and the file is not lost. Ideally, this should have been seemly converted to a copy operation. We still need to figure out a way to do that. On Thu, Nov 29, 2012 at 5:17 PM, Vishesh Handa wrote: > > > > On Fri, Nov 23, 2012 at 12:57 AM, Albert Astals Cid wrote: > >> El Dijous, 22 de novembre de 2012, a les 10:27:41, David Faure va >> escriure: >> > On Thursday 22 November 2012 00:24:12 Albert Astals Cid wrote: >> > > El Dimecres, 21 de novembre de 2012, a les 16:15:01, David Faure va >> > >> > escriure: >> > > > On Wednesday 07 November 2012 02:27:17 Albert Astals Cid wrote: >> > > > > Ahh, you mean copying from file: to tags: >> > > > Moving from file: to tags:, rather. >> > > >> > > Right >> > > >> > > > > I see... I'd like to hear David's opinion on how that is going to >> be >> > > > > fixed >> > > > > at the kio/kioslave level. >> > > > >> > > > Not at that level. Apps should be able to call move and end up with >> a >> > > > move. >> > > >> > > Even if that means destroying the file into hyperspace? >> > >> > Well, kioslaves were meant to be V*FS*. A file system doesn't lose files >> > into hyperspace :) >> >> Sure, but it's still Virtual ;-) >> >> > However we already have a number of settings for "this or that >> functionality >> > isn't supported by this kioslave". Hmm, I wonder, what does tags:/ do in >> > put()? Where does it "write the file", if it's only a virtual >> collection of >> > stuff? >> >> Not sure, but i understand it adds the tag of the url you are in to the >> file >> you are dropping. >> >> >> > >> > If put() isn't supported, then moving (by get+put) won't be supported. >> > Only copyFromFile would be possible, which is exactly what you need, >> isn't >> > it? >> >> Ah, interesting, maybe copyFromFile is what Vishesh needs? Vishesh does it >> make sense dropping urls to tags:/ from something different than file:/ ? >> > > No. It doesn't. > > Theoretically one can tag anything but for now I only want to support > files. > > >> Cheers, >> Albert >> >> > >> > In other words, try not implementing put, if that makes sense, and let >> me >> > know what doesn't work. >> > >> > > > But the fix is to let drag-n-drop trigger a copy rather than >> allowing >> > > > the >> > > > user to select "move". The quick fix for that is >> > > > http://www.davidfaure.fr/2012/konq_operations.cpp.diff >> > > > Which hardcodes the protocol name, but at least it gets the job >> done. >> > > > >> > > > If we agree about this on principle, then the next step to make it >> > > > generic >> > > > could be to add another field in .protocol files, say >> > > > forceDropAction=(copy|move) >> > > > The fact that kio_trash needs forceDropAction=move shows that this >> might >> > > > make sense, we already have two users for this setting. >> > > >> > > I guess that works for me, since apps won't probably ever call "move" >> into >> > > a tags: url >> > >> > OK. But let's keep this solution under the arm for now, until we find >> out >> > about put() above. >> > >> > >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to >> unsubscribe >> > >> << >> >> >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to >> unsubscribe << >> > > > > -- > Vishesh Handa > > -- Vishesh Handa --e89a8ff1c638ef943404cfa17cf9 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
I chatted with David, and I've enabled &= #39;renameFromFile' and 'copyFromFile'. And I give an error if = one tries to rename a local url in the tags kioslave. This results in those= cut (from file) + paste (to tags) failing, and the file is not lost.

Ideally, this should have been seemly converted to a copy operation. We= still need to figure out a way to do that.

On Thu, Nov 29, 2012 at 5:17 PM, Vishesh Handa <me@vhanda.in> = wrote:



On Fri, Nov 23, 2012 at 12:57 = AM, Albert Astals Cid <aacid@kde.org> wrote:
El Dijous, 22 de novembre de 2012, a les 10:27:41, David Faure va escriure:=
> On Thursday 22 November 2012 00:24:12 Albert Astals Cid wrote: > > El Dimecres, 21 de novembre de 2012, a les 16:15:01, David Faure = va
>
> escriure:
> > > On Wednesday 07 November 2012 02:27:17 Albert Astals Cid wro= te:
> > > > Ahh, you mean copying from file: to tags:
> > > Moving from file: to tags:, rather.
> >
> > Right
> >
> > > > I see... I'd like to hear David's opinion on ho= w that is going to be
> > > > fixed
> > > > at =A0the kio/kioslave level.
> > >
> > > Not at that level. Apps should be able to call move and end = up with a
> > > move.
> >
> > Even if that means destroying the file into hyperspace?
>
> Well, kioslaves were meant to be V*FS*. A file system doesn't lose= files
> into hyperspace :)

Sure, but it's still Virtual ;-)

> However we already have a number of settings for "this or that fu= nctionality
> isn't supported by this kioslave". Hmm, I wonder, what does t= ags:/ do in
> put()? Where does it "write the file", if it's only a vi= rtual collection of
> stuff?

Not sure, but i understand it adds the tag of the url you are in to t= he file
you are dropping.


>
> If put() isn't supported, then moving (by get+put) won't be su= pported.
> Only copyFromFile would be possible, which is exactly what you need, i= sn't
> it?

Ah, interesting, maybe copyFromFile is what Vishesh needs? Vishesh do= es it
make sense dropping urls to tags:/ from something different than file:/ ?

No. It doesn't.

Theoreticall= y one can tag anything but for now I only want to support files.


Cheers,
=A0 Albert

>
> In other words, try not implementing put, if that makes sense, and let= me
> know what doesn't work.
>
> > > But the fix is to let drag-n-drop trigger a copy rather than= allowing
> > > the
> > > user to select "move". The quick fix for that is > > > http://www.davidfaure.fr/2012/konq_operations.cpp.= diff
> > > Which hardcodes the protocol name, but at least it gets the = job done.
> > >
> > > If we agree about this on principle, then the next step to m= ake it
> > > generic
> > > could be to add another field in .protocol files, say
> > > forceDropAction=3D(copy|move)
> > > The fact that kio_trash needs forceDropAction=3Dmove shows t= hat this might
> > > make sense, we already have two users for this setting.
> >
> > I guess that works for me, since apps won't probably ever cal= l "move" into
> > a tags: url
>
> OK. But let's keep this solution under the arm for now, until we f= ind out
> about put() above.
>



--
Vishesh Handa




--
Vishesh Handa

--e89a8ff1c638ef943404cfa17cf9-- --===============3814786102681480981== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe << --===============3814786102681480981==--