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

List:       kde-core-devel
Subject:    Review Request: make KFileWidget keep current extension if possible
From:       "Martin Koller" <kollix () aon ! at>
Date:       2011-10-29 11:32:38
Message-ID: 20111029113238.28094.18802 () vidsolbach ! de
[Download RAW message or body]

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/102986/
-----------------------------------------------------------

Review request for kdelibs.


Description
-------

In trying to fix mentioned bug, I found out the original problem lies in KFileWidget:
If I'm editing a JPEG file which has the non-mainExtension ".jpg" and KFileWidget was \
told to auto-select an extension, then it did not check if the already given \
extension is one which is also allowed and simply removed ".jpg" and added ".jpeg", \
which is not what a user would expect.

This patch now checks the current extension against all allowed extensions and if \
there's a match, it keeps the current extension. Only otherwise will it add the \
default extension.


This addresses bug 229547.
    http://bugs.kde.org/show_bug.cgi?id=229547


Diffs
-----

  kfile/kfilewidget.cpp 09b86d4 

Diff: http://git.reviewboard.kde.org/r/102986/diff/diff


Testing
-------

Used kolourpaint with "name.jpg", "name.jpeg", "name.", "name", "name.tif", \
"name.tiff"


Thanks,

Martin Koller


[Attachment #3 (text/html)]

<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/102986/">http://git.reviewboard.kde.org/r/102986/</a>
  </td>
    </tr>
   </table>
   <br />


<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 kdelibs.</div>
<div>By Martin Koller.</div>







<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;">In trying to fix mentioned bug, I found out the original problem lies in \
KFileWidget: If I&#39;m editing a JPEG file which has the non-mainExtension \
&quot;.jpg&quot; and KFileWidget was told to auto-select an extension, then it did \
not check if the already given extension is one which is also allowed and simply \
removed &quot;.jpg&quot; and added &quot;.jpeg&quot;, which is not what a user would \
expect.

This patch now checks the current extension against all allowed extensions and if \
there&#39;s a match, it keeps the current extension. Only otherwise will it add the \
default extension.</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;">Used kolourpaint with &quot;name.jpg&quot;, &quot;name.jpeg&quot;, \
&quot;name.&quot;, &quot;name&quot;, &quot;name.tif&quot;, \
&quot;name.tiff&quot;</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=229547">229547</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>kfile/kfilewidget.cpp <span style="color: grey">(09b86d4)</span></li>

</ul>

<p><a href="http://git.reviewboard.kde.org/r/102986/diff/" style="margin-left: \
3em;">View Diff</a></p>




  </td>
 </tr>
</table>




  </div>
 </body>
</html>



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

Configure | About | News | Add a list | Sponsored by KoreLogic