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










<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On May 26th, 2013, 2:03 p.m. UTC, <b>Friedrich W. H. Kossebau</b> wrote:</p>
 <blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
  



<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; border-collapse: collapse; margin: 2px padding: 2px;">
 <thead>
  <tr>
   <th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; font-size: 9pt; padding: 4px 8px; text-align: left;">
    <a href="http://git.reviewboard.kde.org/r/110541/diff/7/?file=146265#file146265line849" style="color: black; font-weight: bold; text-decoration: underline;">libs/widgets/KoResourceItemChooser.cpp</a>
    <span style="font-weight: normal;">

     (Diff revision 7)

    </span>
   </th>
  </tr>
 </thead>

 <tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
  <tr>

   <td colspan="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">void KoResourceItemChooser::contextMenuRequested ( const QPoint& pos )</pre></td>

  </tr>
 </tbody>



 
 

 <tbody>

  <tr>
    <th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2"></font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td>
    <th bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font size="2">842</font></th>
    <td bgcolor="#c5ffc4" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">            <span class="n">removeTagAction</span><span class="o">-></span><span class="n">setText</span><span class="p">(</span><span class="n">i18n</span><span class="p">(</span><span class="s">"Remove from </span><span class="se">\"</span><span class="s">%1</span><span class="se">\"</span><span class="s">."</span><span class="p">).</span><span class="n">arg</span><span class="p">(</span><span class="n">curTag</span><span class="p">));</span></pre></td>
  </tr>

 </tbody>

</table>

  <pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">List the argument in the i18n call, like
i18n("Remove from \"%1\".", curTag).
That way the translators see what %1 is.

Though in this case this might not help that much, given that curTag is not really descriptive. You might want to add a comment to this string, using i18nc instead, like this
i18nc("remove this item from the group with the tag curTag", "Remove from \"%1\".", curTag) or similar</pre>
 </blockquote>





</blockquote>
<pre style="margin-left: 1em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Changed it to plain i18n("Remove from this tag"); and I think that looks good enough in the menu, imho, and is possibly easier on translators too since some languages would need to have the subject/tag shuffled to other positions.</pre>
<br />




<p>- Sascha</p>


<br />
<p>On May 27th, 2013, 7:23 p.m. UTC, Sascha Suelzer 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 Calligra.</div>
<div>By Sascha Suelzer.</div>


<p style="color: grey;"><i>Updated May 27, 2013, 7:23 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;">With this patch, the tag categories the user can define for various resources will update for any resource chooser of the same type.
Examples: 
Defining a new tag in the preset popup combobox will also create the respective tag entry in the preset docker one.
If both choosers would display the same tag category, and the user adds a resource to the category in one chooser, the view of the other would reflect the change as well.

Both these things are achieved with a new set of signals and slots regarding tag category creation and modification.

Other changes:
Refactored KoResourceFiltering a bit to make intent more clear and functionality a bit more fine grained, also fixed the naming for its private support class members from m_foo to foo since the fields are all public.
Tag categories are now ordered in an alphabetical manner at all times.

--------------------------------

Remarks:

I am not really sure if KoResourceModel should be the class for the signals:
signals:
    void tagBoxEntryModified();
    void tagBoxEntryAdded(QString tag);
    void tagBoxEntryRemoved(QString tag);

It seems to me that perhaps all of this tagging and filtering stuff should go into the adapter directly, perhaps? But The KoResourceItemChoosers would still require the notifications and the model is pretty much the only bridge, so maybe the place is okay after all.

I also want to refactor some of the new code I introduced to make it look nicer, but I wanted to get this review request out for now so it is know that it is being worked on, since this builds on the former shortcomings of 
https://git.reviewboard.kde.org/r/110429/</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;">Only tested for Krita, everything seems to work as it should.</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>krita/plugins/paintops/libbrush/kis_brush_server.cpp <span style="color: grey">(5e4db8d)</span></li>

 <li>krita/ui/kis_palette_manager.cpp <span style="color: grey">(568859a)</span></li>

 <li>krita/ui/ko_favorite_resource_manager.h <span style="color: grey">(fbfa86f)</span></li>

 <li>krita/ui/ko_favorite_resource_manager.cpp <span style="color: grey">(2481ce1)</span></li>

 <li>krita/ui/widgets/kis_preset_chooser.h <span style="color: grey">(5df3b56)</span></li>

 <li>krita/ui/widgets/kis_preset_chooser.cpp <span style="color: grey">(9f07c8a)</span></li>

 <li>libs/widgets/KoResourceFiltering.h <span style="color: grey">(9f8f967)</span></li>

 <li>libs/widgets/KoResourceFiltering.cpp <span style="color: grey">(a62a873)</span></li>

 <li>libs/widgets/KoResourceItemChooser.h <span style="color: grey">(d26f5a5)</span></li>

 <li>libs/widgets/KoResourceItemChooser.cpp <span style="color: grey">(a2750b5)</span></li>

 <li>libs/widgets/KoResourceModel.h <span style="color: grey">(3ccb28b)</span></li>

 <li>libs/widgets/KoResourceModel.cpp <span style="color: grey">(a9cb212)</span></li>

 <li>libs/widgets/KoResourceServer.h <span style="color: grey">(1ab4ad6)</span></li>

 <li>libs/widgets/KoResourceServerAdapter.h <span style="color: grey">(02ab31e)</span></li>

 <li>libs/widgets/KoResourceServerAdapter.cpp <span style="color: grey">(f1dc50f)</span></li>

 <li>libs/widgets/KoResourceServerObserver.h <span style="color: grey">(52bc7fc)</span></li>

 <li>libs/widgets/KoResourceTagging.h <span style="color: grey">(0624096)</span></li>

 <li>libs/widgets/KoResourceTagging.cpp <span style="color: grey">(b678000)</span></li>

</ul>

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







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








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