[Okular-devel] Review Request: Ask "Save annotation changes?" if there are unsaved annotations that cannot be saved locally

Albert Astals Cid tsdgeos at terra.es
Wed May 23 21:41:14 UTC 2012


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/105020/#review14104
-----------------------------------------------------------

Ship it!


Ship It!

- Albert Astals Cid


On May 23, 2012, 9:37 p.m., Fabio D'Urso wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/105020/
> -----------------------------------------------------------
> 
> (Updated May 23, 2012, 9:37 p.m.)
> 
> 
> Review request for Okular and Albert Astals Cid.
> 
> 
> Description
> -------
> 
> Recent patches introduced a case (PDF file with existing native annotations and without /Encrypt) in which annotation changes are not saved locally.
> This patch turns Okular into a ReadWritePart and checks for such annotation changes in queryClose().
> 
> Annotation editing is always disabled if we're loaded as ReadOnlyPart, no matter the document type.
> I can change it, if necessary, to prevent annotation editing only in PDF files with existing native annotations and without /Encrypt. I didn't do that because I think that this behavior can be confusing for users.
> 
> I added the KParts/ReadWritePart ServiceType only in okular_part.desktop (which only handles .okular archives) so that other apps don't think that we are a real editor for all supported formats.
> 
> 
> Diffs
> -----
> 
>   core/document.h cd36ae7f19c4fad7f192073bc0806901e9b29a85 
>   core/document.cpp e27b7906a8576f68c5a50b360ebe9019f643617f 
>   core/document_p.h ac24cf9d7995e95560899f546248685f05da9b90 
>   core/observer.h 266993ce99927f1629d964e0bd597786c991428e 
>   okular_part.desktop 9307253d7d4a543db06a6912ccc61cdd0aeaa365 
>   part.h 39cdb721877283380af1b30c85f564a91f183de0 
>   part.cpp 4c6aac8eab36b7e3f430afae92109d2e4ff3c75d 
>   shell/shell.h 850e7e37fa9780e301cc33ae084cd57f7967d871 
>   shell/shell.cpp af4aa25f602b2749b8d9112174562525a76cc40c 
> 
> Diff: http://git.reviewboard.kde.org/r/105020/diff/
> 
> 
> Testing
> -------
> 
> It works for me.
> 
> Expected result:
> - It's possible to edit annotations if we're loaded as ReadWritePart (eg by Okular native shell). If you annotate a PDF file with existing annotations and without /Encrypt, you also get a "Save changes?" prompt if you try to close the document (by pressing Quit, reloading, opening another file, or following a link to another document) and you haven't saved yet.
> - It's not possible to edit annotations at all if we're loaded as ReadOnlyPart (eg from Konqueror), not even non-native ones. The relevant GUI items are grayed out.
> 
> 
> Thanks,
> 
> Fabio D'Urso
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/okular-devel/attachments/20120523/fe972637/attachment.html>


More information about the Okular-devel mailing list