Commit graph

7651 commits

Author SHA1 Message Date
Oliver Sander 5fdbecf446 Simplify method FilePrinter::psPaperSize
The method FilePrinter::psPaperSize used to contain a long
list of hard-coded paper sizes for the different paper formats.
This patch makes the method get the same information
from QPrinter directly, which is much simpler and more
robust, too.

Note that the method is not actually used anywhere in okular,
though, so this change is purely cosmetic.

REVIEW: 130043
2017-07-05 20:37:36 +02:00
Albert Astals Cid 1a5e20e22b Merge remote-tracking branch 'origin/Applications/17.04' 2017-07-02 18:01:14 +02:00
Albert Astals Cid 3b5f19fd9d Shell: Fix sync "Show menubar" action status
No need to sync it when Shell uses a native menubar
2017-07-02 18:00:04 +02:00
l10n daemon script 1658d3b64e GIT_SILENT made messages (after extraction) 2017-06-30 03:08:40 +02:00
l10n daemon script 451bb151c2 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-06-20 05:47:44 +02:00
l10n daemon script 5af987dac0 GIT_SILENT made messages (after extraction) 2017-06-20 05:05:53 +02:00
Albert Astals Cid 515410c055 GIT_SILENT Upgrade KDE Applications version to 17.04.2. 2017-06-05 21:00:09 +02:00
Montel Laurent c1e60e5539 Minor 2017-06-02 07:47:56 +02:00
Gilbert Assaf 786ec88526 Bug 236688 - Sort pages according to TOC in CHM Files
All pages in a CHM File are now ordered accordingly to TOC Data. If a page is not in TOC, it will be added at the end.

Testing Done:
I created a small example chm file to test this. I can provide the file, if someone would like to have it.

Bugs closed: 236688

Reviewed at https://git.reviewboard.kde.org/r/130078/
2017-05-31 13:13:48 +02:00
Gilbert Assaf ff1647ce68 CHM: zooming changes the font size
Transfers zoom handling from KHTML to KHTMLView and QImage.
This way the font now actually increases when you zoom in and zoom handling is more in line with the other generators.

Bugs closed: 164198

Reviewed at https://git.reviewboard.kde.org/r/130127/
2017-05-31 13:12:41 +02:00
Gilbert Assaf e876640c21 Bug 262265 chmlib should not send qFatal if encoding could not be guessed
Okular sends a 'qFatal()', if no encoding could be guessed. This will also create a core dump crashing Okular and all open document in this instance.

Bugs closed: 262265

Reviewed at https://git.reviewboard.kde.org/r/130106/
2017-05-31 13:02:20 +02:00
Gilbert Assaf 357f198c1e kio_msits emits mimetype again
kio_msits emitting mimetype function ported to QT5. A kio slave should always emit the mimetype (see kio slave api doc).

Reviewed at https://git.reviewboard.kde.org/r/130113/
2017-05-31 12:54:25 +02:00
Albert Astals Cid dc85379ce1 Merge remote-tracking branch 'origin/Applications/17.04' 2017-05-21 23:38:14 +02:00
Tobias Deiminger 574fad92c8 Initialize cursor in PageView scrollbars with ArrowCursor
BUG: 334798
REVIEW: 130131
2017-05-21 23:37:04 +02:00
l10n daemon script bb8c12d1eb 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-05-21 05:48:05 +02:00
l10n daemon script 34edbb7711 GIT_SILENT made messages (after extraction) 2017-05-21 05:10:30 +02:00
l10n daemon script 767a1c0eac 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-05-21 04:36:10 +02:00
l10n daemon script 58d23a20ae GIT_SILENT made messages (after extraction) 2017-05-12 04:56:11 +02:00
l10n daemon script bfe1f62eb5 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-05-12 04:21:17 +02:00
l10n daemon script ef9ea64bc3 GIT_SILENT made messages (after extraction) 2017-05-12 02:59:10 +02:00
Friedrich W. H. Kossebau 2779bb6c0c Don't repeat work of KAboutData::setApplicationData(), set window icon 2017-05-08 15:17:48 +02:00
Albert Astals Cid 90c7d1c769 GIT_SILENT Upgrade KDE Applications version to 17.04.1. 2017-05-08 13:01:46 +02:00
Andreas Sturmlechner 1177c2e1a8 Merge branch 'Applications/17.04' 2017-04-23 00:11:28 +02:00
Andreas Sturmlechner 3ed10b8ccf Fix typo 2017-04-22 12:55:48 +02:00
Andreas Sturmlechner decb01292e Drop unused DBusAddons
REVIEW: 130099
2017-04-22 12:55:37 +02:00
l10n daemon script cd1d36df29 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-04-22 05:08:45 +02:00
l10n daemon script 94fbca1c95 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-04-22 04:06:38 +02:00
l10n daemon script a25642c178 GIT_SILENT made messages (after extraction) 2017-04-22 02:52:16 +02:00
l10n daemon script 91e740c236 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-04-17 04:01:59 +02:00
Albert Astals Cid 4e04c12d18 Merge remote-tracking branch 'origin/Applications/17.04' 2017-04-13 19:19:34 +02:00
Tobias Deiminger 69dca1e7dd Fix segfault when document is closed while annotation is selected
Prevent MouseAnnotation from accessing PageViewItem widgets any longer
after PageView deletes them in PageView::notifySetup().

BUGS: 378696
REVIEW: 130087
2017-04-13 19:17:56 +02:00
Albert Astals Cid b23df4ef98 GIT_SILENT Update version 2017-04-12 14:33:35 +02:00
Albert Astals Cid 53c9eda733 GIT_SILENT Upgrade KDE Applications version to 17.04.0. 2017-04-12 13:41:25 +02:00
l10n daemon script dc104a44dc 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-04-09 05:11:50 +02:00
l10n daemon script cce5cf2592 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-04-09 04:02:44 +02:00
Albert Astals Cid a3521045e6 Merge remote-tracking branch 'origin/Applications/17.04' 2017-04-06 22:15:10 +02:00
Albert Astals Cid dd71abcf47 cmake: Remove endif that doesn't match opening if
Thanfully they fixed this crazyness a while ago
2017-04-06 22:14:01 +02:00
Albert Astals Cid ecbfe4151e GIT_SILENT Upgrade KDE Applications version to 17.03.90. 2017-04-05 21:57:09 +02:00
Albert Astals Cid d28d4e3e4f Merge remote-tracking branch 'origin/Applications/17.04' 2017-03-23 01:34:41 +01:00
Albert Astals Cid 3672c3222f Compile++
Meh me for not compiling after doing a minor change
2017-03-23 01:32:48 +01:00
Albert Astals Cid 8b1c423d1a Merge remote-tracking branch 'origin/Applications/17.04' 2017-03-23 01:24:47 +01:00
Gilbert Assaf a2aceadc13 Allow to create bookmarks from the TOC
BUGS: 190203
REVIEWS: 129999
2017-03-23 01:22:08 +01:00
Albert Astals Cid 3df3c758c8 GIT_SILENT Upgrade KDE Applications version to 17.03.80. 2017-03-20 23:47:03 +01:00
Albert Astals Cid a0595e97df GIT_SILENT increase version a bit 2017-03-20 23:38:05 +01:00
Albert Astals Cid f95952e95c GIT_SILENT Upgrade KDE Applications version to 17.07.70. 2017-03-20 23:21:26 +01:00
Albert Astals Cid 7a9209569c Fix regression in previous commit about going to next page 2017-03-20 00:35:05 +01:00
Oliver Sander 618072f8a2 Change pages in presentation mode by swiping on touch screen
REVIEW: 130012
BUGS: 354012
2017-03-20 00:32:53 +01:00
Albert Astals Cid 63a08bc01a Enable -Wsuggest-override 2017-03-19 23:27:04 +01:00
Tobias Deiminger 0957abc39a Add annotation resize functionality
Usage:
If you left-click an annotation, it gets selected. Resize handles appear on the selection rectangle. When cursor is moved over one of the 8 resize handles on the corners/edges, the cursor shape changes to indicate resize mode. Everywhere else on the annotation means "move", just as it was before resize feature was added. Pressing ESC or clicking an area outside the annotation cancels a selection. Pressing Del deletes a selected annotation.

Feature is only applicable for annotation types AText, AStamp and AGeom.

Implementation:
It works by eventually changing AnnotationPrivate::m_boundary and notifying generator (i.e. poppler) about that change. Annotation state handling is shifted out of PageView into a new class MouseAnnotation (ui/pageviewmouseannotation.cpp). Some functionality not related to resizing but to annotation interaction in general is also shifted to class MouseAnnotation, to build a single place of responsiblity.

Other changes:
Add method Document::adjustPageAnnotation, backed by a QUndoCommand.
class Okular::AdjustAnnotationCommand.
Add Annotation::adjust and Annotation::canBeResized methods.
Draw resize handles in PagePainter::paintCroppedPageOnPainter.

Resize and move work
-for types AText, AStamp and AGeom
-on all pages of document
-when viewport position changes
-when zoom level changes
-for all page rotations (0°, 90°, 180°, 270°)

Selection is canceled
-when currently selected annotation is deleted
-on mouse click outside of currently selected annotation
-ESC is pressed

Viewport is shifted when mouse cursor during move/resize comes close to viewport border.
Resize to negative is prevented.
Tiny annotations are still selectable.
If mouse is moved over an annotation type that we can focus, and the annotation is not yet focused, mouse cursor shape changes to arrow.
If mouse cursor rests over an annotation A, while annotation B is focused, a tooltip for annotation A is shown.
Selected Annotation is deleted when Del is pressed.

Test for regressions:
-Annotation interaction (focus, move, resize, start playback, ...) are only done in mode EnumMouseMode::Browse.
-If mouse is moved over an annotation type where we can start an action, mouse cursor shape changes to pointing hand.
-If mouse is moved over an annotation type that we can't interact with, mouse cursor shape stays a open hand.
-If mouse cursor rests over an annotation of any type, a tooltip for that annotation is shown.
-Grab/move scroll area (on left click + mouse move) is prevented, if mouse is over focused annotation, or over AMovie/AScreen/AFileAttachment annotation.
-A double click on a annotation starts the "annotator".

REVIEW: 127366
BUG: 177778
BUG: 314843
BUG: 358060
2017-03-19 23:18:17 +01:00
Oliver Sander 3859fba07d Remove dependency on KActivities on Windows.
REVIEW: 130022
REVIEW: 126378
2017-03-18 01:58:47 +01:00