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




<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 15, 2013, 11:04 p.m.</i></p>



<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Changes</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;">Added some instructions about how to use the interface since it is not very intuitive at this point.
Updated the issues.</pre>
  </td>
 </tr>
</table>




<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description  (updated)</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;">Hi. :)

I've attached a patch that improves the way the user can organize
resources into named sets that can be added, deleted and chosen from a
drop down menu that I've added to KoResourceItemChooser. This made the
changes available to the paintoppreset choosers, the gradient choosers
and the pattern choosers.

Usage right now is:
Resource dockers and popups start with an unfiltered view, in this view
the tag search bar at the bottom is disabled.

To add a tag category, press the plus button and enter a name for the tag.

This creates an empty view and enables the search text box at the bottom.

Entering partial or full names of presets will show these presets in the
box, the search is case sensitive.

Putting an exclamation mark in front of a term will exclude the term from
the set.

Pressing enter saves the set and will clear the search box, so we don't end
up with something like erase,sketch,fur,!paint,smudge_1,smudge_2,... etc

Once a set is defined, it can be used as a search term as well.
For example:
We've created a set that contains all erasers and is called 'erasers'.
If we switch to a different set and type [erasers] in the search box then
all the items of that set will be added to the current set, exclusions work
the same way.

============================================================================
Remarks about the patch:

Currently only adding and deleting categories is supported, renaming them
is in the code but lacks an UI feature, which I was unable to implement.
(I wanted the unfiltered view to be immutable and tried dis and enabling
the editable state of the drop down box based on which index was active,
but that introduced a segfault.)
All in all the UI parts I've written aren't exactly amazing, maybe
someone more experienced can take care of that? I can do it but it'd be
slow since I have very little experience with that. 

I have removed the `show all' checkbox in the paintop preset docker and
all references to that functionality since it made filtering a bit more
complicated as well as just not making too much sense with the
improvements to the tagging system.

I have also removed the proxy adapter in KisPresetChooser since it
didn't do anything useful after these changes, yet required attention
since it overloaded some now improved functions.

Current shortcomings of the system, most of them are UI related:

- Since I used the already existing KoResourceTagging class to handle all
 the tagging bits, and ultimately save tags to disk, in alphabetical
 order, restarting Krita, and thus repopulating the combo boxes also
 fills them in alphabetical order and not in the order they might have
 been defined by the user.

- No way to assign resources to tags with the mouse. Textual filtering
 works but isn't exactly friendly for pin point single changes.
 A right click -> add resource to tag x would be friendlier.

- Some brush naming schemes can make things too complicated.
  e.g. Brush1, Brush10, Brush11, Brush12 and only Brush1 should be tagged.

- Adding a new tag in a pop-up chooser closes the popup since I used an 
 input dialog after failing to implement it with combobox editing.

- Combo boxes aren't updated for all item choosers of the same kind.
 For example adding a few categories in the preset docker does not update
 the combo box in the preset chooser popup that can be found in the toolbar.

I also had a crash at one point in time where some brush presets got
changed around in master and clicking some resources in the brush preset
box crashed the program, but I was not able to reproduce that after a
clean rebuild of my local workspace and changing presets around
externally, so it might not be an issue, but I'm including it for
completeness sake.
</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;">I have only tested for Krita, no problems I could detect.</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/extensions/dockers/dockerplugintemplate/presetdocker_dock.h <span style="color: grey">(43fe4e3)</span></li>

 <li>krita/plugins/extensions/dockers/dockerplugintemplate/presetdocker_dock.cpp <span style="color: grey">(08466cf)</span></li>

 <li>krita/plugins/extensions/dockers/presetdocker/presetdocker_dock.h <span style="color: grey">(2a92777)</span></li>

 <li>krita/plugins/extensions/dockers/presetdocker/presetdocker_dock.cpp <span style="color: grey">(097ebd3)</span></li>

 <li>krita/ui/forms/wdgpaintoppresets.ui <span style="color: grey">(c2560a5)</span></li>

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

 <li>krita/ui/kis_config.cc <span style="color: grey">(ae51c5c)</span></li>

 <li>krita/ui/kis_paintop_box.cc <span style="color: grey">(17cf40b)</span></li>

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

 <li>krita/ui/widgets/kis_paintop_presets_chooser_popup.h <span style="color: grey">(69880ee)</span></li>

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

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

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

 <li>krita/ui/widgets/kis_preset_selector_strip.cpp <span style="color: grey">(068c745)</span></li>

 <li>libs/widgets/CMakeLists.txt <span style="color: grey">(4e6e362)</span></li>

 <li>libs/widgets/KoResourceFiltering.h <span style="color: grey">(PRE-CREATION)</span></li>

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

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

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

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

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

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

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

</ul>

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







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




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