Commit graph

1223 commits

Author SHA1 Message Date
Albert Astals Cid 4d8ba36488 Add greedy preloading option
Based on a patch by Sebastian Rose <s.rose@semkath.de>
REVIEW: 103129
BUGS: 184196
2012-03-09 00:12:20 +01:00
Albert Astals Cid 3e3a504d3c Allow the renaming of bookmark "parent" items (i.e. file names)
Patch heavily inspired on a patch by Constantin Serban-Radoi <costashsrc@gmail.com>
2012-03-08 23:26:44 +01:00
Albert Astals Cid 5e6e54dbb0 Do not delete m_annowindows directly
If we do that slotAnnotationWindowDestroyed bites us and the list gets out of sync
2012-03-07 23:51:36 +01:00
Jonathan Marten 06326f7311 Allow the page number selector to be added to the toolbar
Ok, this is not really the review Jonathan did, i did rewrite the code partially because i did not really
want to have a new observer, but the code is heavily inspired in his patch.

Also the page number selector is not in the toolbar as the review had, it'd be silly to have it in both places
by default, so if you want to have it you have to go, edit the toolbar and add the "Page Number" action to it.

REVIEW: 103427
BUGS: 279128
FIXED-IN: 4.9.0
2012-01-31 19:54:15 +01:00
Albert Astals Cid 2d857f8727 Set the correct buddy for the label
FIXED-IN: 4.8.1
BUGS: 292209
2012-01-22 19:02:27 +01:00
Dario Freddi ca1c209ec0 Since KDE 4.8, suppressing screen power management also inhibits the screensaver. Removing relevant now redundant code paths which are no longer needed since 4.8
REVIEW:103723
(cherry picked from commit 551d00a972)
2012-01-18 21:36:22 +01:00
Dario Freddi bc182d3a00 Make Okular inhibit sleep and screen power management when in Presentation mode
REVIEW:103713
(cherry picked from commit 1a31dffca9)
2012-01-18 01:14:57 +01:00
Albert Astals Cid b2dfb910e8 Small rework of AnnotWindow
* We do not keep them around any more time than needed (they are cheap to create)
 * AnnotWindow::slotsaveWindowText calls m_document->modifyPageAnnotation so
   edition of inline notes happens immediately
2012-01-17 23:46:37 +01:00
Albert Astals Cid 52d118fc4b Reduce the uses of mAnnotations.first(), less confusing 2012-01-17 23:06:06 +01:00
Albert Astals Cid 948ea54026 Decided i don't want to use a QPair here, just use a struct with two fields 2012-01-17 23:01:26 +01:00
Albert Astals Cid 7884c879a7 Qt decided to start passing invalid indexes to mapFromSource, do not crash on them
BUGS: 291278
FIXED-IN: 4.8.0
2012-01-16 21:09:10 +01:00
Elvis Stansvik d066fb0004 Remember collapse state of sidebar when file is auto-reloaded
BUGS: 289010
REVIEW: 103517
2011-12-28 00:49:44 +01:00
Stephen Anthony cdc1b0c78d Several variables aren't 'const' in PageView::slotRelayoutPages when they probably should be
REVIEW: 103486
2011-12-26 00:48:03 +01:00
Stephen Anthony a6dba2434f Improve facing pages (center first page) mode when document contains only 1 or 2 pages
REVIEW: 103424
2011-12-21 01:44:33 +01:00
Albert Astals Cid ac79610a8b Set a focus proxy in case this widget ends up with focus
Should never happen, but as it is the "main" widget of the part it might end up there if someone just says part->mainwidget->setfocus or something like that
At least this way the focus does not go down the drain and ends up in the sidebar list, which is not optimal but is better than getting the keyboard focus lost
2011-12-16 00:27:51 +01:00
Albert Astals Cid 8df96e9e64 ThumbnailListPrivate does not handle keypresses
So don't give it the focus while using tab to change focus
2011-12-16 00:23:33 +01:00
Albert Astals Cid ed052f4fa1 l00p -> loop :D 2011-12-13 19:52:48 +01:00
Albert Astals Cid 73ab9e8e75 make some stuff const 2011-12-13 19:52:48 +01:00
Albert Astals Cid 89e2611f32 Stop playing videos when they are no longer visible
This mimics Adobe Reader behaviour
BUGS: 286932
FIXED-IN: 4.8.0
2011-12-13 19:52:48 +01:00
Albert Astals Cid 83a052b3ac Revert 604187b7a3 and 258cd6562a
I did not have time to finish the poppler work and even if this will probably be good for using the poppler work, this adds new API and I don't want to commit to this since having a proper look at making it work
Sorry i failed to fulfill my promise
2011-12-11 22:20:45 +01:00
Michel Ludwig a7021f5677 Correctly repaint the page view in all circumstances when closing the currently shown document 2011-12-07 22:05:36 +00:00
Stephen Anthony ac85f27474 Modify behaviour for 'facing pages' mode to have pages touch at the center
REVIEW: 103194
2011-12-04 12:44:51 +01:00
Yuri Chornoivan 9dab469366 Fix typos: occured -> occurred. 2011-11-25 07:36:23 +02:00
Frederik Schwarzer 40ac3d889b Make strings more user friendly. 2011-11-25 00:14:38 +01:00
Michel Ludwig b8389cac7a Ensure that the zoom combo box is enabled when a new current item is set.
Due to a limitation(?) in the handling of combo boxes, they have to be enabled
whenever a new current item is set.
2011-11-24 21:28:07 +00:00
Geoffry Song 4877786a78 Revert "Grey out copy option for empty text selections"
This reverts commit 34b2e1bab5.

this was a mistake (it also adds a new string)
2011-11-23 19:12:20 -05:00
Geoffry Song 888043991d fix a crash when rightclicking outside a page in text selection mode 2011-11-23 18:59:41 -05:00
Geoffry Song 34b2e1bab5 Grey out copy option for empty text selections 2011-11-23 18:47:35 -05:00
Albert Astals Cid 94daa325b2 Remove this code since it totally breaks okular itself
CCMAIL: michel.ludwig@gmail.com
2011-11-14 17:49:20 +01:00
Albert Astals Cid 0cb5a67ef1 Fix repainting for repaints with small regions
Makes this statement similar to the one that uses pe->rect() instead of pe->region().rects()

You can test it by:
 * Opening a document with okular
 * Scroll down a bit so that you are not on the top of the viewing area
 * Open the review tool
 * Move the review tool around
 * See how it leaves unrepainted garbage
 * See how this patch fixes it
(cherry picked from commit 9f654a0029)
2011-11-14 17:23:00 +01:00
Michel Ludwig ab436aaaf5 Better move the calls to 'viewport()->update()' relating to the ViewerInterface inside the PageView class. 2011-11-07 21:07:10 +00:00
Michel Ludwig 1be2696cc3 Allow for more control over when source locations are shown graphically.
The method 'showSourceLocation' has been extended with a new parameter which
controls whether the given source location is shown graphically. A new method
'clearLastShownSourceLocation' has been added; and a corresponding implementation
is provided.
2011-11-05 09:18:08 +00:00
Albert Astals Cid 0c4ed4c08a Make PageView::notifyViewportChanged call "itself" with a queued connection
This increases the UI responsiveness on opening PDF that are slow to render
This is because we can only have one thread using the pdf because of
poppler, if we do not queue this call, it will immediately try to generate
the pixmap for this page ending up in the thread for rendering being started.
But then while we are still opening the file we will ask if the file
has embedded files, and this means accessing poppler again and we will be
stuck there because the rendering thread has still not finished. This way by
delaying the execution until we return to the event loop we guarantee
all short queries that are done while opening the file are done already and
we won't block the UI
2011-11-02 22:49:22 +01:00
Michel Ludwig 00b01aa987 Add method 'setLastSourceLocationViewport( const Okular::DocumentViewport& vp )' to PageView
Undo changes to the class 'DocumentViewport'.
2011-11-01 21:13:20 +00:00
Michel Ludwig 872c537f44 Merge branch 'master' into viewerinterface 2011-11-01 21:12:40 +00:00
Michel Ludwig a823df5c8f Some more changes according to the review. 2011-10-31 21:44:21 +00:00
Jiri Baum 412e3e739e table selection tool - semi-automatic dividers
BUGS: 283440
REVIEW: 102788
2011-10-31 16:33:03 +01:00
Niels Ole Salscheider 40620cb44f fix escaping / unescaping of latex formula in html code
REVIEW: 102984
2011-10-29 15:03:30 +02:00
Michel Ludwig 2fd4100cbd Coding style fixes 2011-10-23 14:22:58 +01:00
Michel Ludwig f431e98bb8 Change the action states according to whether a document is shown or not 2011-10-23 10:17:04 +01:00
Michel Ludwig 1bed158f68 Correctly "clear" the page view when closing a document 2011-10-18 21:36:42 +01:00
Michel Ludwig e8e0237ca0 Add the possibility to show sources location graphically on the rendered pages.
Note that currently the rotation of pages is not taken into account as one still has
to find a unique way of handling this.
2011-10-17 20:56:45 +01:00
Michel Ludwig d29099b39c Only activate a subset of the available features when the part is launched in viewer mode.
In viewer mode the part will now use a different XML GUI file (part-viewermode.rc).
Also, some actions won't be created, e.g. those used for exporting stuff, for
launching presentation mode, or for selecting parts of the document. The captions
of the configuration dialogs also contain the word 'viewer' then.
2011-10-12 20:36:01 +01:00
Michel Ludwig 1a5f2be05c Merge branch 'master' into viewerinterface 2011-10-12 20:16:46 +01:00
Albert Astals Cid 94d4035acb Add the table selection tool to the selection toolbar icon 2011-10-12 16:35:04 +02:00
Albert Astals Cid 901abc0baf Rever addition of rectExtractText that is used only in one place 2011-10-12 16:31:21 +02:00
Albert Astals Cid 760c86642f Replace two for more with foreach 2011-10-12 16:16:50 +02:00
Albert Astals Cid 5d06d5b31e use foreach to iterate over d->tableSelectionParts 2011-10-12 16:04:23 +02:00
Albert Astals Cid 2795f61341 Make two params for TableSelectionPart const & 2011-10-12 15:59:05 +02:00
Albert Astals Cid a16aa7cff0 struct fields are already public 2011-10-12 15:57:39 +02:00