Commit graph

6059 commits

Author SHA1 Message Date
Albert Astals Cid ac9c9210f4 Merge remote-tracking branch 'origin/KDE/4.9'
Conflicts:
	VERSION
	core/document.cpp
	core/version.h
	ui/pageview.h
2012-09-08 17:25:46 +02:00
Albert Astals Cid aea2ec8f75 Return 0 not false for pointers 2012-09-08 17:22:01 +02:00
Jan Binder aa6ed8afc0 Replace deprecated QMatrix by QTransform
REVIEW: 105737
2012-09-08 17:06:02 +02:00
Sandro Mani 21fd5cfb0d Add option to show complete file path in window title
BUGS: 296870
REVIEW: 106345
FIXED-IN: 4.10.0
2012-09-08 15:33:42 +02:00
Albert Astals Cid a716b3e4e0 kill all the deprecated functions now that we've change ABI anyway 2012-09-06 19:10:03 +02:00
Albert Astals Cid 23d474e6a9 I'll increase the number myself since tokoe seems to ingore my mails
CCMAIL: tokoe@kde.org
2012-09-06 18:59:26 +02:00
Tobias Koenig d3e0dadcac Introduce notifyCurrentPageChanged callback DocumentObserver interface 2012-09-06 08:46:10 +02:00
Sandro Mani 636d4e1c75 Allow customization of scroll page keybindings
REVIEW: 106293
BUGS: 304291
FIXED-IN: 4.10.0
2012-09-05 22:12:11 +02:00
Jaydeep Solanki 6d6a3bfce5 Open a new Shell when opening a new file
BUGS: 166645
FIXED-IN: 4.10.0
REVIEW: 105965
GUI
2012-09-04 20:04:01 +02:00
Mailson Menezes ceea13e108 Always have the correct viewport when zooming
Whenever the scrollbar value changes we request a new pixmap so we
always have an up to date viewport.
Unfortunately that can lead to unnecessary calls when zooming. That's
because the zoom event changes the value of each scrollbar but not all
at once. Instead one scrollbar value is changed after the other (leading
to two requests).
The problem here is that when the first request is made just one of the
scrollbars have its updated value while the other still carries the old
one. Previously that wasn't a big deal but now we depend on the correct
scrollbar values to get the visible viewport and thus request only the
visible tiles (and its whereabouts).
Without that change we're making requests to tiles that are not actually
visible and this only gets worse as the zoom level gets higher.
2012-09-03 13:14:20 -03:00
Albert Astals Cid 88a1a1aa19 Since Tobias ignores my emails i'll add the copyright header myself
CCMAIL: tokoe@kde.org
2012-08-31 00:53:46 +02:00
Sandro Mani 7d18d176bc When there is only one page, "Opposite pages" should have no effect
FIXED-IN: 4.10.0
BUGS: 305194
2012-08-30 01:03:16 +02:00
Albert Astals Cid 7407ccb80a Update versions 2012-08-29 12:50:42 +02:00
Sandro Mani 56dd5278d2 Fix Tools->review inconsistency when switching tool
BUGS: 304621
FIXED-IN: 4.9.1
(cherry picked from commit a2dd088ebd)
2012-08-27 21:01:17 +02:00
Sandro Mani a2dd088ebd Fix Tools->review inconsistency when switching tool
BUGS: 304621
FIXED-IN: 4.9.1
2012-08-27 21:00:23 +02:00
Mailson Menezes fe9d9118a2 Adjust normalized rect upon tiles manager creation
Must be the smallest normalized rect containing all visible tiles
2012-08-26 18:27:38 -03:00
Mailson Menezes 9b70d1875a Remove debug painting off tiles manager
The extra painting is for debug purposes only. It may change depending
on what the developer wants to fix and should not go upstream.
2012-08-26 18:25:15 -03:00
Mailson Menezes 116e4f9b80 Remove annoying warning
Comparison between signed and unsigned values.
2012-08-26 14:39:35 -03:00
Mailson Menezes 96f325896e Keep track of visible region even when not using tiles
The visible region was set in the PixmapRequest only a tiles manager was
available. Because of that the generator could check if it was supposed
to used tiles by simply checking if its normalized rect was null.
However is good to know the visible region even when a tiles manager is
not present. This way if the request is big enough to start a tiles
manager we already know the visible region and can change the
PixmapRequest accordingly.
2012-08-24 14:02:07 -03:00
Mailson Menezes 0053b9c015 Remove unused property from PixmapObject
This property was added before the tiles manager was created.
2012-08-24 14:02:07 -03:00
Mailson Menezes 2d5b51ff88 Fix crash when changing between memory profiles 2012-08-24 14:01:54 -03:00
Mailson Menezes 42350c87df Properly destruct TilesManager 2012-08-24 13:54:29 -03:00
Mailson Menezes 3c79206ce2 Fix bug of not showing tiles in low profile mode 2012-08-24 13:54:29 -03:00
Fabio D'Urso 77af86fddc Do not show the save changes prompt twice if the main window is closed
Call m_part->closeUrl with promptToSave=false in the Shell dtor, so that
the save changes prompt is not shown again (it's already shown because
of Shell::queryClose)
2012-08-22 13:20:32 +02:00
Fabio D'Urso 6d011cd2f0 Do not show the save changes prompt twice if the main window is closed
Call m_part->closeUrl with promptToSave=false in the Shell dtor, so that
the save changes prompt is not shown again (it's already shown because
of Shell::queryClose)
2012-08-22 00:42:47 +02:00
Albert Astals Cid 09067debaf Make --unique also raise the window
BUGS: 304526
FIXED-IN: 4.10.0
2012-08-22 00:41:31 +02:00
Tobias Koenig 811e3b2539 Switch from poster image to video player after video has started playing
If we switch immediately after the play() trigger, a black frame is visible
for a moment, which looks ugly.
2012-08-21 09:38:27 +02:00
Albert Astals Cid 02b04e7e9b Make the openRecent just be open recent
Stop being too smart for own our good, try to merge open and openRecent actions in just one action
confuses the hell out of people, so let's KISS and just make open recent be open recent
BUGS: 302358
BUGS: 251335
FIXED-IN: 4.10.0
2012-08-21 00:35:41 +02:00
Mailson Menezes ac40c31f0a Improve pre-rendering
Pre-render previous page only if the viewport is near the top of the
current page.
2012-08-20 00:47:33 -03:00
Mailson Menezes 1bfe8610c9 Do not evict visible tiles
Also avoid trying to evict more tiles if the tiles manager is empty (all
tiles were previously removed)
2012-08-20 00:47:33 -03:00
Mailson Menezes 3c71dbbcf3 Document changes introduced by the tiles manager 2012-08-19 20:35:25 -03:00
Mailson Menezes d2f236e82f Document Tile and TilesManager 2012-08-19 18:56:54 -03:00
Mailson Menezes 66500e05b8 Check the incoming PixmapRequest before using it 2012-08-19 16:00:15 -03:00
Mailson Menezes 11b848cad9 Only use tiles if the generator supports it
Add the new virtual method Generator::supportsTiles (defaults to false)
2012-08-19 15:10:27 -03:00
Tobias Koenig 8dbd83ab2a Implement support for poster image of videos in PDF documents
With this commit Okular will show a so called poster image for PDF documents
containing movie annotations. The image will be a screenshot of the first frame
of the video.

BUGS: 301603
REVIEW: 105890
FIXED-IN: 4.10.0
2012-08-19 12:23:47 +02:00
Mailson Menezes d3a0fa057a Split tiles before the request
The splitting was only executed after the pixmap arrived the tiles
manager. That was bad and likely to lead to an unnecessary rendering in
the case of a big tile that would be split after all.

This also fixes a bug where some tiles weren't updated.
2012-08-18 17:31:16 -03:00
Albert Astals Cid aa042bd0f4 Close the url on shell destruction
Otherwise we end up in a busy loop on part deletion if there are pending requests
Should not happen but if this fixes it don't see the need to lose time investigating
why given the number of todo things
2012-08-18 18:38:28 +02:00
Albert Astals Cid d41f00e4bb Close the url on shell destruction
Otherwise we end up in a busy loop on part deletion if there are pending requests
Should not happen but if this fixes it don't see the need to lose time investigating
why given the number of todo things
2012-08-18 18:36:30 +02:00
Mailson Menezes 851a503e81 Move tiles manager to a private header 2012-08-17 15:23:58 -03:00
Mailson Menezes 401c3f7e5d Add rotation support to tiles manager 2012-08-17 14:30:53 -03:00
Mailson Menezes 3f1a186d0a Fix annotation positioning when using tiles
Most of the positioning calculations were taking into account the 'crop'
argument (which is a NormalizedRect) to execute some translations.

If not using tiles the value of crop were always the normalized bounding
box of the page, relative to the page itself. So translating by it is
essentially a noop.

When using tiles this argument represents the normalized viewport,
relative to the page. Although useful for the tiles manager, translating
by 'crop' is not necessary for any of those operations.
2012-08-16 17:00:49 -03:00
Mailson Menezes 62d85380af Draw annotations and highlights with tiles manager
Fix a crash when drawing annotations and highlights on a tile.
2012-08-16 17:00:49 -03:00
Mailson Menezes 67c59c2c44 Fix underflow on memory cleanup in tiles manager 2012-08-15 15:25:36 -03:00
Tobias Koenig 719a0df886 Use different RMB menus in page view and review pane
Since the review pane has different requirements than the page view, this
change introduces a mode parameter to the AnnotationPopup ctor.

REVIEW: 106045
2012-08-15 19:21:25 +02:00
Tobias Koenig 58eb957f26 Support multiple annotations in RMB menu
Provide the actions for all annotations in the RMB menu, if multiple
annotations are located on top of each other.

BUGS: 300942
REVIEW: 106035
FIXED-IN: 4.10.0
2012-08-15 17:24:11 +02:00
Mailson Menezes 3c09b93713 Merge branch 'master' into tiled-rendering
Conflicts:
	core/document.cpp
2012-08-15 11:44:22 -03:00
Mailson Menezes 3d630fbb2a Remove unused tiles 2012-08-13 01:09:38 -03:00
Albert Astals Cid 035c32996e Do not delete the Part on the Shell destructor
The machinery in KParts/QObject is already doing it and this way we don't get the
KXMLGUIClient::~KXMLGUIClient: 0x15637528 deleted without having been removed from the factory first. This will leak standalone popupmenus and could lead to crashes.
warning

I'm not sure if calling this a kdelibs bug yet or not though :D

BUGS: 261538
FIXED-IN: 4.9.1
2012-08-12 13:56:01 +02:00
Albert Astals Cid 4eee1f3479 Do not delete the Part on the Shell destructor
The machinery in KParts/QObject is already doing it and this way we don't get the
KXMLGUIClient::~KXMLGUIClient: 0x15637528 deleted without having been removed from the factory first. This will leak standalone popupmenus and could lead to crashes.
warning

I'm not sure if calling this a kdelibs bug yet or not though :D

BUGS: 261538
FIXED-IN: 4.9.1
2012-08-12 13:50:41 +02:00
Mailson Menezes b33b2cffc7 Pre-render nearby tiles
Pre-render tiles that are nearby the current viewport and also the last
tiles of the previous page and the first tiles of the next page.
2012-08-10 16:04:23 -03:00