Commit graph

7886 commits

Author SHA1 Message Date
David Edmundson 1a3dc7d8e0 Fix highlight/annotation clipping with Qt scaling
Summary:
pixelValue/pixelValue will give us a normalised value.

Normalised values shouldn't be modified by a device pixel ratio.
We want scaledRect not dScaledRect.

BUG: 386110

Test Plan:
Searched for text. Zoomed in, panned about
Created annotations, they still seemed to work

Subscribers: #okular

Tags: #okular

Differential Revision: https://phabricator.kde.org/D8832
2017-11-23 23:04:16 +00:00
l10n daemon script 3e2e5d2b36 GIT_SILENT made messages (after extraction) 2017-11-21 02:59:25 +01:00
Albert Astals Cid 6c9659d0a2 Merge remote-tracking branch 'origin/Applications/17.12' 2017-11-20 14:53:50 +01:00
Albert Astals Cid 559836c392 Give warnings when the file is modified externally
Summary:
Unfortunately, poppler (the only backed that supports saving) is not able
to save properly if the file is modified by a third party while it is opened

So we give the user a warning saying things went wrong and give him the option
to not reload/close, that way if there was something very important in the annotations
she added she can try to save them (even if by copy&paste the contents to a third program)

Reviewers: rkflx

Reviewed By: rkflx

Subscribers: ngraham, rkflx, ltoscano, #okular

Tags: #okular

Differential Revision: https://phabricator.kde.org/D8863
2017-11-20 14:53:17 +01:00
Heiko Becker 8502c41a9c Merge remote-tracking branch 'origin/Applications/17.12' 2017-11-19 20:53:41 +01:00
Heiko Becker f099d5fa2a generators: Use a specific description for libzip
Summary:
It appears it's copied and pasted from LibCHM and while it's indeed
needed to support displaying CHM files, it's a library of its
own.

Reviewers: #okular

Tags: #okular

Differential Revision: https://phabricator.kde.org/D8879
2017-11-18 12:22:43 +01:00
l10n daemon script 7eaa3cb659 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2017-11-17 06:38:51 +01:00
l10n daemon script d6e1a6808d GIT_SILENT made messages (after extraction) 2017-11-17 05:44:04 +01:00
l10n daemon script cc24d1c3ed SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2017-11-17 05:05:54 +01:00
l10n daemon script a497d3bbec GIT_SILENT made messages (after extraction) 2017-11-17 03:26:49 +01:00
Albert Astals Cid 9c352ca67c Workaround to build with older Qt
As explained in the comment we can do with using an older Qt since what this adds is really a small nicety in a corner case
2017-11-16 15:35:50 +01:00
Albert Astals Cid 7d5ee41f30 We need Qt 5.8
Because of QUndoStack::resetClean
2017-11-16 15:26:24 +01:00
Albert Astals Cid 2bf5a2d81a Merge remote-tracking branch 'origin/Applications/17.12' 2017-11-16 15:05:26 +01:00
Albert Astals Cid 3957683d76 Merge branch 'dont-use-docdata-for-annots-and-forms' into Applications/17.12 2017-11-16 15:00:23 +01:00
Albert Astals Cid 1420c9411e Save or Discard dialog: show only the file name and not the full url 2017-11-16 12:03:23 +01:00
Albert Astals Cid 19b7e3c112 The work in this branch was sponsored by LiMux
give them some credit in the headers
2017-11-16 09:58:31 +01:00
Albert Astals Cid 481676dced Do not show "Continue" while on Save format warning
It makes no sense, only on Save As makes sense
2017-11-15 14:10:36 +01:00
Albert Astals Cid f63aa211dc test: Actually do the migration instead of faking it 2017-11-15 12:09:17 +01:00
Albert Astals Cid 2da30e747d Fix crash on saving time if some of the existing annotations where removed
Also rename a variable to make it more clear what it does
2017-11-15 11:53:14 +01:00
Albert Astals Cid e29892fda4 some review tweaks 2017-11-15 11:20:25 +01:00
Albert Astals Cid 37097a0c38 Some text tweaking suggested in the phabricator review 2017-11-15 10:08:20 +01:00
Albert Astals Cid d63c0ed50e okular archive -> okular document archive 2017-11-15 10:00:40 +01:00
Albert Astals Cid d7457e3569 Fix double dialog in closing sometimes
sometimes = when you opened a .okular containing a png and an annotation and then saved as to just png

Found by the autotest that stopped passing \o/
2017-11-15 09:46:36 +01:00
Albert Astals Cid 0b31ee995a Merge remote-tracking branch 'origin/Applications/17.12' 2017-11-14 22:27:37 +01:00
Alexander Trufanov e91bf07bcf Try to display a malformed image if feasible
Differential Revision: https://phabricator.kde.org/D8415
2017-11-14 22:27:00 +01:00
Albert Astals Cid 2102843273 Use the undo stack to set the modified bit
This way it's much easier to track whether we are modified or not
2017-11-14 14:52:02 +01:00
Alexander Trufanov 4b2ba6a7af Try to display a malformed image if feasible
Differential Revision: https://phabricator.kde.org/D8415
2017-11-14 14:24:45 +03:00
Albert Astals Cid 8e80a4f570 Account for Okular::PagePrivate::findEquivalentForm failing
It should never fail but it's better if we have the backup for not crashing at least if it does
2017-11-14 09:57:38 +01:00
Albert Astals Cid 302c38672f Make Document::swapBackingFileArchive use swapBackingFile 2017-11-14 09:49:32 +01:00
Albert Astals Cid 1ed2522b53 tweak can't save in this format warning message with suggestion from Burkhard 2017-11-13 23:23:32 +01:00
Albert Astals Cid bd724e4944 Get the okular archive mime translation name from kcoreaddons
Instead of asking the translators to translate it again
2017-11-13 18:12:34 +01:00
Albert Astals Cid ea1815be13 Also note the modified status (*) on the tab name 2017-11-13 17:59:45 +01:00
Albert Astals Cid eea5127e73 We also support opening Okular archive files 2017-11-13 17:30:54 +01:00
Albert Astals Cid 34f40b2c6f Tweak migrationMessage text a bit 2017-11-13 15:35:06 +01:00
Albert Astals Cid de948c4d71 We need to increase the part.rc version number
Since we added the "Save" menu option
2017-11-13 14:49:08 +01:00
Albert Astals Cid 055f2db76d Set back the autogenerated annotation unique name on saving
The the original unique name was empty. Otherwise we can't find the annotation after save/reload because the annotation name is still empty and a new random id is assigned
2017-11-13 14:41:05 +01:00
Albert Astals Cid 210a6ced5a Tweak saveAs + file with password text 2017-11-13 10:37:35 +01:00
Albert Astals Cid 3e423eeb7c Add missing test file 2017-11-13 10:16:25 +01:00
Albert Astals Cid 3c99a280f3 Add the file url to the save text
Makes more clear we're going to be saving over it
2017-11-13 10:10:46 +01:00
Albert Astals Cid 43cd93a36b GIT_SILENT Upgrade KDE Applications version to 18.03.70. 2017-11-13 09:03:34 +01:00
Albert Astals Cid a3d1bb8cad Increase version for next release 2017-11-13 01:08:51 +01:00
Albert Astals Cid 41d378aef9 GIT_SILENT Upgrade KDE Applications version to 17.11.80. 2017-11-13 01:07:57 +01:00
Elvis Angelaccio 40afb82926 Don't use exec() to open dialogs
Summary:
exec() is blocking and should not be used if possible.

Currently it makes impossible to interact with a 2nd okular window
if the first window has the Properties or Embedded Files dialog open.

It also causes a double delete crash when closing okular via dbus
while either of those dialogs is open.

We can use open() instead which does not block the event loop and fixes
both the problems.

Test Plan:
1. Open the Properties or Embedded Files dialog, then close okular via dbus.
2. Open two okular windows, then open the Properties or Embedded Files dialog in one of them and try to use the other window.

Reviewers: #okular

Tags: #okular

Differential Revision: https://phabricator.kde.org/D8704
2017-11-12 12:17:02 +01:00
Albert Astals Cid a2f5560c00 PDF: Support the poppler 0.62 renderToImage with update callback
Summary:
This way pages that take more than 500ms to render get updated every so often so that the
user can see that the program didn't hang, it's just that it's taking long to render

Tags:
incremental rendering, partial updates

BUGS: 344081

Subscribers: #okular

Tags: #okular

Differential Revision: https://phabricator.kde.org/D8379
2017-11-09 17:28:54 +01:00
Burkhard Lück 01ce40b955 Update okular docbook
add info about alternative method to delete an annotation
add info about resize feature for annotations (text modified from commit log)
replace outdated rating.png with new bookmarks.png
add info about available bookmark actions in the table of Contents

Differential Revision: https://phabricator.kde.org/D8677
2017-11-07 11:01:59 +01:00
Albert Astals Cid 433d1eac23 Initialize copyJob just in case 2017-11-06 10:02:20 +01:00
Albert Astals Cid 9d450161b2 Use new style connects 2017-11-06 10:02:09 +01:00
Albert Astals Cid d2d7a880b1 Minor style adjustment 2017-11-06 09:28:04 +01:00
Albert Astals Cid 099d3cfcc8 Update @since to 1.3
Let's see if we can squeeze it in
2017-11-06 06:10:13 +01:00
Albert Astals Cid ae4f0671bf Unsplit some lines in tests 2017-11-06 06:05:22 +01:00