<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
<tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="http://git.reviewboard.kde.org/r/111091/">http://git.reviewboard.kde.org/r/111091/</a>
</td>
</tr>
</table>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<p style="margin-top: 0;">On June 19th, 2013, 12:16 a.m. UTC, <b>Daniele E. Domenichelli</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">I thought a bit about this patch, and I'm always more convinced that this shouldn't be in the file transfer handler, but in the approver (and that's the reason why I never added it).
Imho the approver should have a button to accept and one to change directory, the "Always Ask" is just one extra configuration option that will clutter the ui and will prompt the user every time, even when it is not needed because he just wants to download the file in his download directory</pre>
</blockquote>
<p>On June 19th, 2013, 5:35 p.m. UTC, <b>Dan Vrátil</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Also I don't see how you would want to pass the folder name from approver to ft-handler.
I see the idea of "Always Ask" as an analogy to behavior of web browsers. In browsers, you usually only have these two options as well. You either have to confirm every single file, or every downloaded is saved to a user defined directory.
The usecase of the "Always Ask" option is that users want to keep their files in order. They don't want to have huuuuge ~/Downloads directory, but they rather want to filter incoming files into folders right away. For such people the "when it is not needed" situation does occur only very rarely.
Now thinking about the analogy with browsers, when using the "Always Ask" option, browsers usually remember the last opened folder. This would fix your case when someone is sending you multiple files: you only need to set the folder for the first time; next time the same folder will already selected, so you just confirm the dialog. Would that work for you?
</pre>
</blockquote>
</blockquote>
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">The approver could just overwrite the downloadDirectory entry, and when the ft-handler reads it, it will read the new one.
Why should we do like browsers, when we can do better? Anyway if you remember the last folder, until we get a notification system that is able to handle this, it is ok for me. But instead of checking the empty string, I'd rather add a bool to the ctor of the HandleIncomingFileTransferChannelJob class and always read both parameters.
By the way, I just noticed that in the header, the string passed to the class is "outputFileName" and in the implementation is "downloadDirectory". Since you are touching this, can you change it to downloadDirectory everywhere?</pre>
<br />
<p>- Daniele E.</p>
<br />
<p>On June 18th, 2013, 1:37 p.m. UTC, Dan Vrátil wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('http://git.reviewboard.kde.org/static/rb/images/review_request_box_top_bg.ab6f3b1072c9.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
<tr>
<td>
<div>Review request for Telepathy.</div>
<div>By Dan Vrátil.</div>
<p style="color: grey;"><i>Updated June 18, 2013, 1:37 p.m.</i></p>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Implements support for "Always Ask" for filetransfer destination directory option.
The hack with __k__onDownloadDirectoryCancelled() is necessary because KDirSelectDialog::result() always returns 0 and buttonClicked() signal is emitted even when "New Folder" button is clicked and handling that would make the code more complicated.
</pre>
</td>
</tr>
</table>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Bugs: </b>
<a href="http://bugs.kde.org/show_bug.cgi?id=295937">295937</a>
</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>src/CMakeLists.txt <span style="color: grey">(ebd892c)</span></li>
<li>src/filetransfer-handler.cpp <span style="color: grey">(74c701e)</span></li>
<li>src/handle-incoming-file-transfer-channel-job.h <span style="color: grey">(d5e53c4)</span></li>
<li>src/handle-incoming-file-transfer-channel-job.cpp <span style="color: grey">(7a15237)</span></li>
</ul>
<p><a href="http://git.reviewboard.kde.org/r/111091/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>