<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="https://git.reviewboard.kde.org/r/115391/">https://git.reviewboard.kde.org/r/115391/</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;">Burkhard?</pre>
 <br />









<p>- Albert Astals Cid</p>


<br />
<p>On January 29th, 2014, 9:23 p.m. UTC, Burkhard Lück wrote:</p>








<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('https://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 Okular and Albert Astals Cid.</div>
<div>By Burkhard Lück.</div>


<p style="color: grey;"><i>Updated Jan. 29, 2014, 9:23 p.m.</i></p>









<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
okular
</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;">A) So far it is only possible to select an icon via GUI in an editable Combobox with:
1) Select one of the icon from stamp.svg in the combobox
(translated stamp names, but untranslated text in the stamps like "Approved" etc)
2) enter an icon name into the combobox (very hidden feature for me)
If an icon with this name is found in  "kde4-config - -path icon" it will be used then
To use a custom icon, is has to be placed in `kde4-config - -localprefix`/share/icons/
This works only for icons with lower case names, I do not know why and if this is an
intended behavior

B) To allow the user to select a custon icon via the GUI I made these changes:
1) Set property of combobox in PixmapPreviewSelector to non editable, this only used
to select on of the icons provided by Okular from stamp.svg
2) Add a checkbox and a kiconbutton
Activating the checkbox disables the PixmapPreviewSelector and enables the kiconbutton
which opens the common "Select Icon" dialog. In this dialog you can select either a
System icon from several groups (Applications, Actions etc) or check "Other icons"
and open the default file dialog with Filter "Icon Files (*.png *.xpm *.svg *.svgz)"
to select your custom icon from anywhere in the filesystem.

C) Basically this patch works as expected but there are some issues I could not solve or 
where I need some input/advice:
1) Loads only icons with lower case names, why this restriction + how to remove it?
2) The Filter preset "Icon Files (*.png *.xpm *.svg *.svgz)" could have better defaults
maybe png, jpeg, others?. svg + svgz do not really seem to make sense here?
3) Disabling the PixmapPreviewSelector and enabling the kiconbutton (and vice versa) 
via the checkbox works in the "Edit annotation tool" dialog opened from the 
configuration dialog, but not in the "Stamp Properties" dialog opened with "Properties"
from the context menu of a stamp annotation, but why?</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;">Works for me in locale x-test wit the limitations in C)</pre>
  </td>
 </tr>
</table>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>ui/annotationwidgets.h <span style="color: grey">(6e7a218)</span></li>

 <li>ui/annotationwidgets.cpp <span style="color: grey">(450e50b)</span></li>

</ul>

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







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








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