<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/104892/">http://git.reviewboard.kde.org/r/104892/</a>
</td>
</tr>
</table>
<br />
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">> * if the user presses yes, they get a new, unnamed document with the autosaved contents. I intentionally do not set the url to the url of the image the autosave file was created from, to avoid accidents. The autosave file is deleted
Ok, there are cases, where not to automatically set the filename would be the better option (calligra crashing, user copies another file over the old, loads it -> recovery + save would destroy the newer file; or working with git and not having the autosave file added to the repository).
But think of people loading their files from "recent documents" or via nepomuk search - it will get quite nasty to figure out, where the currently loaded file came from. If one pressed "yes, recover", then tries to save and the file dialog points to $DOCUMENTS_DIR, then closes the window -> recovery not possible anymore, as the autsave file was deleted.
In order to catch both cases the best solution would be a button "show files side-by-side", and let the user chose which file to load, then it should be save to set the filename.</pre>
<br />
<p>- Franz</p>
<br />
<p>On May 10th, 2012, 1:21 p.m., Boudewijn Rempt wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('http://git.reviewboard.kde.org/media/rb/images/review_request_box_top_bg.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
<tr>
<td>
<div>Review request for Calligra.</div>
<div>By Boudewijn Rempt.</div>
<p style="color: grey;"><i>Updated May 10, 2012, 1:21 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;">1) X-KDE-NativeExtension can be empy, in that case take mime->mainExtension.
Otherwise our autosave files are called .autosave, and that's not something
the filter's mime detection can handle
2) don't overwrite autosave files when running multiple unnamed modified
documents
3) tag the autosave files with the pid and use dbus to check which processes
that have autosave files are still active; don't offer to recover those.
4) show the autosave files in a nice dialog with the ora/odf thumbnail
as a preview, and offer to recover them all.</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </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;">went manually through all possible scenarios</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=299611">299611</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>krita/image/kis_group_layer.cc <span style="color: grey">(ffb542f)</span></li>
<li>libs/main/CMakeLists.txt <span style="color: grey">(ea408b7)</span></li>
<li>libs/main/KoApplication.cpp <span style="color: grey">(12ddec3)</span></li>
<li>libs/main/KoAutoSaveRecoveryDialog.h <span style="color: grey">(PRE-CREATION)</span></li>
<li>libs/main/KoAutoSaveRecoveryDialog.cpp <span style="color: grey">(PRE-CREATION)</span></li>
<li>libs/main/KoDocument.h <span style="color: grey">(0a28c7c)</span></li>
<li>libs/main/KoDocument.cpp <span style="color: grey">(d2d3938)</span></li>
<li>libs/main/KoMainWindow.cpp <span style="color: grey">(c01f44d)</span></li>
</ul>
<p><a href="http://git.reviewboard.kde.org/r/104892/diff/" style="margin-left: 3em;">View Diff</a></p>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Screenshots </h1>
<div>
<a href="http://git.reviewboard.kde.org/r/104892/s/561/"><img src="http://git.reviewboard.kde.org/media/uploaded/images/2012/05/09/autosavedialog_400x100.png" style="border: 1px black solid;" alt="autosavefile recovery dialog" /></a>
</div>
</td>
</tr>
</table>
</div>
</body>
</html>