D29538: [KJots] Add StandardNoteActionManager

Igor Poboiko noreply at phabricator.kde.org
Fri May 8 17:44:21 BST 2020


poboiko created this revision.
poboiko added a reviewer: dvratil.
Herald added a project: KDE PIM.
poboiko requested review of this revision.

REVISION SUMMARY
  This adds a class that stores note-related actions. Currently those are:
  
  - Create Note
  - Lock / Unlock
  - Change Color
  
  It also provides access to `Akonadi::StandardActionManager`, which allows to reuse the standard actions for:
  
  - Book creation (`akonadi_collection_create`)
  - Note / Book removal (`akonadi_item_delete`, `akonadi_collection_delete`)
  - Copy link address (`akonadi_item_copy`, `akonadi_collection_copy`) - this is slightly buggy, see D29484: [StandardActionManager] Don't add PendingCutRole when copying <https://phabricator.kde.org/D29484>
  - ...and some other actions like "create resource" in the future
  
  This was written with possible triple-column UI (like KMail / KAddressBook has) in mind, where item / collection views could be separated.
  
  This slightly changes the behavior:
  
  - "Delete selection" action (allowed to delete notes and books simultaneously) was removed
  - "Delete Note / Book" are now disabled if note / book is locked
  - They also now show confirmation dialog
  - A slight change in terminology (instead of "Page" I suggest just using "Note"; TODO: need to do it consistently)

TEST PLAN
  Tested changed actions, they seem to be functional

REPOSITORY
  R573 KJots

BRANCH
  standard-action-manager (branched from master)

REVISION DETAIL
  https://phabricator.kde.org/D29538

AFFECTED FILES
  src/CMakeLists.txt
  src/kjotslockjob.cpp
  src/kjotslockjob.h
  src/kjotspartui.rc
  src/kjotstreeview.cpp
  src/kjotstreeview.h
  src/kjotsui.rc
  src/kjotswidget.cpp
  src/kjotswidget.h
  src/kontact_plugin/kjots_plugin.cpp
  src/noteshared/CMakeLists.txt
  src/noteshared/notecreatorandselector.cpp
  src/noteshared/standardnoteactionmanager.cpp
  src/noteshared/standardnoteactionmanager.h

To: poboiko, dvratil
Cc: kde-pim, fbampaloukas, dcaliste, dvasin, rodsevich, winterz, vkrause, mlaurent, knauss, dvratil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20200508/d72b020d/attachment.htm>


More information about the kde-pim mailing list