<table><tr><td style="">poboiko created this revision.<br />poboiko added a reviewer: dvratil.<br />Herald added a project: KDE PIM.<br />poboiko requested review of this revision.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D29538">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>This adds a class that stores note-related actions. Currently those are:</p>

<ul class="remarkup-list">
<li class="remarkup-list-item">Create Note</li>
<li class="remarkup-list-item">Lock / Unlock</li>
<li class="remarkup-list-item">Change Color</li>
</ul>

<p>It also provides access to <tt style="background: #ebebeb; font-size: 13px;">Akonadi::StandardActionManager</tt>, which allows to reuse the standard actions for:</p>

<ul class="remarkup-list">
<li class="remarkup-list-item">Book creation (<tt style="background: #ebebeb; font-size: 13px;">akonadi_collection_create</tt>)</li>
<li class="remarkup-list-item">Note / Book removal (<tt style="background: #ebebeb; font-size: 13px;">akonadi_item_delete</tt>, <tt style="background: #ebebeb; font-size: 13px;">akonadi_collection_delete</tt>)</li>
<li class="remarkup-list-item">Copy link address (<tt style="background: #ebebeb; font-size: 13px;">akonadi_item_copy</tt>, <tt style="background: #ebebeb; font-size: 13px;">akonadi_collection_copy</tt>) - this is slightly buggy, see <a href="https://phabricator.kde.org/D29484" style="background-color: #e7e7e7;
          border-color: #e7e7e7;
          border-radius: 3px;
          padding: 0 4px;
          font-weight: bold;
          color: black;text-decoration: none;">D29484: [StandardActionManager] Don't add PendingCutRole when copying</a></li>
<li class="remarkup-list-item">...and some other actions like "create resource" in the future</li>
</ul>

<p>This was written with possible triple-column UI (like KMail / KAddressBook has) in mind, where item / collection views could be separated.</p>

<p>This slightly changes the behavior:</p>

<ul class="remarkup-list">
<li class="remarkup-list-item">"Delete selection" action (allowed to delete notes and books simultaneously) was removed</li>
<li class="remarkup-list-item">"Delete Note / Book" are now disabled if note / book is locked</li>
<li class="remarkup-list-item">They also now show confirmation dialog</li>
<li class="remarkup-list-item">A slight change in terminology (instead of "Page" I suggest just using "Note"; TODO: need to do it consistently)</li>
</ul></div></div><br /><div><strong>TEST PLAN</strong><div><p>Tested changed actions, they seem to be functional</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R573 KJots</div></div></div><br /><div><strong>BRANCH</strong><div><div>standard-action-manager (branched from master)</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D29538">https://phabricator.kde.org/D29538</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>src/CMakeLists.txt<br />
src/kjotslockjob.cpp<br />
src/kjotslockjob.h<br />
src/kjotspartui.rc<br />
src/kjotstreeview.cpp<br />
src/kjotstreeview.h<br />
src/kjotsui.rc<br />
src/kjotswidget.cpp<br />
src/kjotswidget.h<br />
src/kontact_plugin/kjots_plugin.cpp<br />
src/noteshared/CMakeLists.txt<br />
src/noteshared/notecreatorandselector.cpp<br />
src/noteshared/standardnoteactionmanager.cpp<br />
src/noteshared/standardnoteactionmanager.h</div></div></div><br /><div><strong>To: </strong>poboiko, dvratil<br /><strong>Cc: </strong>kde-pim, fbampaloukas, dcaliste, dvasin, rodsevich, winterz, vkrause, mlaurent, knauss, dvratil<br /></div>