<table><tr><td style="">elvisangelaccio requested changes to this revision.<br />elvisangelaccio added a comment.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D29006">View Revision</a></tr></table><br /><div><div><p>The feature looks reasonable to me.</p></div></div><br /><div><strong>INLINE COMMENTS</strong><div><div style="margin: 6px 0 12px 0;"><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D29006#inline-168081">View Inline</a><span style="color: #4b4d51; font-weight: bold;">dolphinmainwindow.cpp:670-684</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"><span style="color: #aa4000">void</span> <span class="n">DolphinMainWindow</span><span style="color: #aa2211">::</span><span class="n">copyToOtherView</span><span class="p">()</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"><span class="p">{</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #aa4000">const</span> <span class="n">DolphinTabPage</span><span style="color: #aa2211">*</span> <span class="n">tabPage</span> <span style="color: #aa2211">=</span> <span class="n">m_tabWidget</span><span style="color: #aa2211">-></span><span class="n">currentTabPage</span><span class="p">();</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #aa4000">if</span> <span class="p">(</span><span style="color: #aa2211">!</span><span class="n">tabPage</span><span style="color: #aa2211">-></span><span class="n">splitViewEnabled</span><span class="p">()</span> <span style="color: #aa2211">||</span> <span class="n">m_activeViewContainer</span><span style="color: #aa2211">-></span><span class="n">view</span><span class="p">()</span><span style="color: #aa2211">-></span><span class="n">selectedItems</span><span class="p">().</span><span class="n">isEmpty</span><span class="p">())</span> <span class="p">{</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #aa4000">return</span><span class="p">;</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span class="p">}</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">Can you try to add a <tt style="background: #ebebeb; font-size: 13px;">DolphinTabWidget::copyToOtherView()</tt> function and move this logic there?</p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D29006#inline-168082">View Inline</a><span style="color: #4b4d51; font-weight: bold;">dolphinmainwindow.cpp:686-700</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"><span style="color: #aa4000">void</span> <span class="n">DolphinMainWindow</span><span style="color: #aa2211">::</span><span class="n">moveToOtherView</span><span class="p">()</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"><span class="p">{</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #aa4000">const</span> <span class="n">DolphinTabPage</span><span style="color: #aa2211">*</span> <span class="n">tabPage</span> <span style="color: #aa2211">=</span> <span class="n">m_tabWidget</span><span style="color: #aa2211">-></span><span class="n">currentTabPage</span><span class="p">();</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #aa4000">if</span> <span class="p">(</span><span style="color: #aa2211">!</span><span class="n">tabPage</span><span style="color: #aa2211">-></span><span class="n">splitViewEnabled</span><span class="p">()</span> <span style="color: #aa2211">||</span> <span class="n">m_activeViewContainer</span><span style="color: #aa2211">-></span><span class="n">view</span><span class="p">()</span><span style="color: #aa2211">-></span><span class="n">selectedItems</span><span class="p">().</span><span class="n">isEmpty</span><span class="p">())</span> <span class="p">{</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #aa4000">return</span><span class="p">;</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span class="p">}</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">Can you try to add a <tt style="background: #ebebeb; font-size: 13px;">DolphinTabWidget::moveToOtherView()</tt> function and move this logic there?</p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D29006#inline-167903">View Inline</a><span style="color: #4b4d51; font-weight: bold;">dfaure</span> wrote in <span style="color: #4b4d51; font-weight: bold;">dolphinview.cpp:1222</span></div>
<div style="margin: 8px 0; padding: 0 12px; color: #74777D;"><p style="padding: 0; margin: 8px;">This line of code (from me, it turns out) is bogus, it should say <tt style="background: #ebebeb; font-size: 13px;">=</tt> instead of <tt style="background: #ebebeb; font-size: 13px;"><<</tt>.<br />
We want to replace the list with the simplified list, not concatenate the two.</p>
<p style="padding: 0; margin: 8px;">And m_selectedUrls needs to contain the new URLs, just like we do when pasting.</p>
<p style="padding: 0; margin: 8px;">The solution I have in mind for that is to connect to CopyJob::slotCopyingDone and grab the "to" argument.</p>
<p style="padding: 0; margin: 8px;">[discussed on IRC, but writing here for the record, and in case someone wonders why this << gets modified]</p></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">I see.</p>
<p style="padding: 0; margin: 8px;"><a href="https://phabricator.kde.org/p/aprcela/" style="
border-color: #f1f7ff;
color: #19558d;
background-color: #f1f7ff;
border: 1px solid transparent;
border-radius: 3px;
font-weight: bold;
padding: 0 4px;">@aprcela</a> Can you add this information in the commit message? Otherwise it will get lost.</p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D29006#inline-168084">View Inline</a><span style="color: #4b4d51; font-weight: bold;">dolphinview.h:367-377</span></div>
<div style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #74777d">/**</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"><span style="color: #74777d"> * Copies all selected items to the other view.</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"><span style="color: #74777d"> * Only available in Split View.</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"><span style="color: #74777d"> */</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #aa4000">void</span> <span style="color: #004012">copySelectedItemsToOtherSplitView</span><span class="p">(</span><span style="color: #aa4000">const</span> <span class="n">KFileItemList</span> <span style="color: #aa2211">&</span><span class="n">selection</span><span class="p">,</span> <span style="color: #aa4000">const</span> <span class="n">QUrl</span> <span style="color: #aa2211">&</span><span class="n">destinationPanelUrl</span><span class="p">);</span>
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);">
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);"> <span style="color: #74777d">/**</span>
</div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">Nitpick: <tt style="background: #ebebeb; font-size: 13px;">DolphinView</tt> doesn't know what a "split view" is. I'd rather call these methods <tt style="background: #ebebeb; font-size: 13px;">copySelectedItems()</tt> and <tt style="background: #ebebeb; font-size: 13px;">moveSelectedItems()</tt>, since that's what they are actually doing.</p></div></div></div></div></div><br /><div><strong>REPOSITORY</strong><div><div>R318 Dolphin</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D29006">https://phabricator.kde.org/D29006</a></div></div><br /><div><strong>To: </strong>aprcela, Dolphin, elvisangelaccio, ngraham, meven, dfaure<br /><strong>Cc: </strong>yurchor, kde-doc-english, dfaure, meven, kfm-devel, azyx, nikolaik, pberestov, iasensio, aprcela, fprice, gennad, fbampaloukas, alexde, Codezela, feverfew, spoorun, navarromorales, firef, ngraham, andrebarros, skadinna, emmanuelp, rdieter, mikesomov<br /></div>