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

List:       kde-devel
Subject:    Re: [Nepomuk] Nepomuk Tags kioslave - Please Review
From:       Vishesh Handa <me () vhanda ! in>
Date:       2012-11-29 11:56:22
Message-ID: CAOPTMKAw4DoFDh54ACg8fdETwfyTf6T29iG=SwNhEi+Me7kmGg () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


On Thu, Nov 22, 2012 at 2:57 PM, David Faure <faure+bluesystems@kde.org>wrote:

> 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 :)
>
> 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?
>
> 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?
>
> 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.
>

I've tried your patch. It only covers the case when the file is dragged and
dropped. It does not cover the case when the file is cut and paste. In that
case the file still gets lost.


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

In the tags kioslave, get only works for url of the form -
tags:/TagName/FileUrl. In this case get simply uses the ForwardingSlaveBase
to forward it to the file kioslave. Put has not been implemented.


> --
> David Faure, faure@kde.org, http://www.davidfaure.fr
> Sponsored by BlueSystems and KDAB to work on KDE Frameworks
>
> _______________________________________________
> Nepomuk mailing list
> Nepomuk@kde.org
> https://mail.kde.org/mailman/listinfo/nepomuk
>



-- 
Vishesh Handa

[Attachment #5 (text/html)]

<br><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Nov 22, 2012 at \
2:57 PM, David Faure <span dir="ltr">&lt;<a href="mailto:faure+bluesystems@kde.org" \
target="_blank">faure+bluesystems@kde.org</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div>On Thursday 22 November 2012 00:24:12 Albert Astals Cid \
wrote:<br> &gt; El Dimecres, 21 de novembre de 2012, a les 16:15:01, David Faure \
va<br> escriure:<br>
&gt; &gt; On Wednesday 07 November 2012 02:27:17 Albert Astals Cid wrote:<br>
&gt; &gt; &gt; Ahh, you mean copying from file: to tags:<br>
&gt; &gt; Moving from file: to tags:, rather.<br>
&gt;<br>
&gt; Right<br>
&gt;<br>
&gt; &gt; &gt; I see... I&#39;d like to hear David&#39;s opinion on how that is going \
to be<br> &gt; &gt; &gt; fixed<br>
&gt; &gt; &gt; at  the kio/kioslave level.<br>
&gt; &gt;<br>
&gt; &gt; Not at that level. Apps should be able to call move and end up with a<br>
&gt; &gt; move.<br>
&gt;<br>
&gt; Even if that means destroying the file into hyperspace?<br>
<br>
</div>Well, kioslaves were meant to be V*FS*. A file system doesn&#39;t lose files \
into<br> hyperspace :)<br>
<br>
However we already have a number of settings for &quot;this or that functionality<br>
isn&#39;t supported by this kioslave&quot;. Hmm, I wonder, what does tags:/ do in<br>
put()? Where does it &quot;write the file&quot;, if it&#39;s only a virtual \
collection of<br> stuff?<br>
<br>
If put() isn&#39;t supported, then moving (by get+put) won&#39;t be supported.<br>
Only copyFromFile would be possible, which is exactly what you need, isn&#39;t \
it?<br> <br>
In other words, try not implementing put, if that makes sense, and let me know<br>
what doesn&#39;t work.<br>
<div><br>
&gt; &gt; But the fix is to let drag-n-drop trigger a copy rather than allowing \
the<br> &gt; &gt; user to select &quot;move&quot;. The quick fix for that is<br>
&gt; &gt; <a href="http://www.davidfaure.fr/2012/konq_operations.cpp.diff" \
target="_blank">http://www.davidfaure.fr/2012/konq_operations.cpp.diff</a><br> &gt; \
&gt; Which hardcodes the protocol name, but at least it gets the job \
done.<br></div></blockquote><div><br>I&#39;ve tried your patch. It only covers the \
case when the file is dragged and dropped. It does not cover the case when the file \
is cut and paste. In that case the file still gets lost.<br>  <br></div><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div> &gt; &gt;<br>
&gt; &gt; If we agree about this on principle, then the next step to make it \
generic<br> &gt; &gt; could be to add another field in .protocol files, say<br>
&gt; &gt; forceDropAction=(copy|move)<br>
&gt; &gt; The fact that kio_trash needs forceDropAction=move shows that this \
might<br> &gt; &gt; make sense, we already have two users for this setting.<br>
&gt;<br>
&gt; I guess that works for me, since apps won&#39;t probably ever call \
&quot;move&quot; into a<br> &gt; tags: url<br>
<br>
</div>OK. But let&#39;s keep this solution under the arm for now, until we find out \
about<br> put() above.<br></blockquote><div><br>In the tags kioslave, get only works \
for url of the form - tags:/TagName/FileUrl. In this case get simply uses the \
ForwardingSlaveBase to forward it to the file kioslave. Put has not been \
implemented.<br> <br></div><blockquote class="gmail_quote" style="margin:0 0 0 \
.8ex;border-left:1px #ccc solid;padding-left:1ex"> <div><br>
--<br>
David Faure, <a href="mailto:faure@kde.org" target="_blank">faure@kde.org</a>, <a \
href="http://www.davidfaure.fr" target="_blank">http://www.davidfaure.fr</a><br> \
</div>Sponsored by BlueSystems and KDAB to work on KDE Frameworks<br> <br>
_______________________________________________<br>
Nepomuk mailing list<br>
<a href="mailto:Nepomuk@kde.org" target="_blank">Nepomuk@kde.org</a><br>
<a href="https://mail.kde.org/mailman/listinfo/nepomuk" \
target="_blank">https://mail.kde.org/mailman/listinfo/nepomuk</a><br> \
</blockquote></div><br><br clear="all"><br>-- <br><span \
style="color:rgb(192,192,192)">Vishesh Handa</span><br><br> </div>



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