Commit graph

546 commits

Author SHA1 Message Date
Albert Astals Cid 9adbd054e4 Do not resetSearch if we're closing down
It's useless as it will be reset anyway on the close down procedure
and it will cause a crash if you are unlucky.

Reason:
  * In the document observers qset pageview comes before
  * We are closing and notifySetup with an empty vector
  * pageview empties its vector in notifySetip
  * part sees the notifySetup and resets the search
  * resetting the search calls another notifySetup with the non empty page vector
    that will be deleted asap when we go back to the first notifySetup

There are another billion ways to fix this:
 * Don't allow nested notifySetup
 * Clear the running searches before sending the first notifySetup
 * Empty the pagesVector before sending the first notifySetup
 * etc

But i feel this is the less invasive one (even if it may not be the most technically correct)

BUGS: 329582
FIXED-IN: 4.12.1
2014-01-05 01:32:19 +01:00
Jon Mease 43246c563b Viewport transition refinements for Find and Undo/Redo actions
REVIEW: 114060

This patch introduces viewport transitions for undo/redo actions on annotations and forms.  When an annotation/form action is undone/redone but the associated annotation/form is not currently visible, the viewport is updated to center on the undo/redo action. If the annotation/form is visible, the viewport is not updated.

The viewport transitions for the Find action have also been updated to this same algorithm.  Previously the viewport was moved to center on each matching search term even if the search term was already visible in the viewport. This lead to unnecessary viewport transitions if the search term matched several items in a single paragraph for example.

These proposed changes to the viewport transition behavior are consistent with the find and undo behavior of many existing applications including Kate, Open Office, and Foxit PDF Reader.
2013-12-29 23:27:30 +01:00
Albert Astals Cid 56c6b61311 Merge remote-tracking branch 'origin/KDE/4.11' into KDE/4.12 2013-11-28 00:06:13 +01:00
Albert Astals Cid 9c3165d214 Going back and forward in history may also change the page
So notify those that care about tha page and not about the viewport
2013-11-28 00:05:24 +01:00
Fabio D'Urso ad589985e1 Remove some unused #includes 2013-10-14 20:42:34 +02:00
Albert Astals Cid 3f1ec4cee7 Fix fictionbook loading
Prefer the backends that declare explicit support for a mime over the ones that get the support by inheritance
In the fictionbook case it was happening that application/x-fictionbook+xml inherits text plain
so when we ask for the fictionbook backend, we get both
the one that says
MimeType=application/x-fictionbook+xml;
and the one that says
MimeType=text/plain;
and then it happens that the second has bigger X-KDE-Priority

By prefering the ones that explicitely declare support for a mime we "fix" this

OTOH we may want to explore showing the backend selector if there's more than one by default

FIXED-IN: 4.11.0
2013-08-06 22:31:13 +02:00
Fabio D'Urso 77daa9627b Fix the issue exposed by the previous patch
Cherry-picked from a556126816

The patch de-singletons the PageController class.

The PageController is now per-document and it gets deleted when the
document is closed.

As consequence of this, the RotationJob's done signal will not be
delivered if the document has been closed, and thus this fixes the
crash.
2013-07-30 21:13:08 +02:00
Mailson Menezes d61c690bc0 Merge remote-tracking branch 'origin/KDE/4.10' 2013-06-24 21:56:56 -03:00
Mailson Menezes ff1168901f Fix issue of creating an annotation on tiles mode
Sometimes annotations created on tiles mode were not shown immediately.

What requestPixmaps do is given a PixmapRequest, change its
normalizedRect attribute so the rect is tile aligned. However
refreshPixmaps was creating a PixmapRequest with the rect already tile
aligned and then delivering the PixmapRequest to requestPixmaps, which
would trye to take the requested rectangle and change it so it is also
tile aligned. Since the PixmapRequest delivered by refreshPixmaps was
already aligned, the requested rectangle was inflated by the tile
alignment procedure. After that the generated request becomes bigger
than the defined threshold and is discarded. This patch actually
removes the tile alignment logic from refreshPixmaps and let only the
requestPixmaps handle this.
2013-06-24 21:53:59 -03:00
Yuri Chornoivan 3b73357d2f Fix some typos found by Krazy2 2013-06-24 13:46:16 +03:00
Albert Astals Cid e159522131 Merge remote-tracking branch 'origin/KDE/4.10'
Conflicts:
	core/document.cpp
2013-06-23 18:45:09 +02:00
Albert Astals Cid 15eb104d75 Don't preload pages if the generator is not Threaded
BUG: 318048
FIXED-IN: 4.10.5
2013-06-23 18:43:33 +02:00
Jon Mease b7ce9114c5 Undo support for PDF forms
Together with the already commited support for undo in annotations fixes 177501
BUGS: 177501
REVIEW: 110589
FIXED-IN: 4.11.0
2013-06-03 22:46:41 +02:00
Jon Mease 2ae9e58bb4 Merge window.text, contents and inplaceText annotation properties
BUG: 319442
REVIEW: 110391
2013-05-14 09:43:27 +02:00
Fabio D'Urso c95e8afc43 Merge remote-tracking branch 'origin/KDE/4.10'
Conflicts:
	core/document.cpp
2013-04-26 00:07:09 +02:00
Fabio D'Urso 9812f5277e Do *not* swap width and height in DocumentPrivate::refreshPixmaps
They must not be swapped, because generators already swap them on their
own, and swapping them twice results in distorted pixmaps.

BUG: 318829
FIXED-IN: 4.10.3
2013-04-25 23:57:06 +02:00
Albert Astals Cid f24445a6e2 Merge remote-tracking branch 'origin/KDE/4.10' 2013-04-17 22:13:34 +02:00
Albert Astals Cid f7b742af0d Rename the variable
Makes it easier to understand, imho
2013-04-17 22:13:02 +02:00
Albert Astals Cid 2abe5fa9ef Do yet another attempt at finding the correct mimetype
Makes
okular http://wwwimages.adobe.com/www.adobe.com/content/dam/Adobe/en/products/digital-editions/assets/welcome.epub
work
2013-04-17 22:00:02 +02:00
Albert Astals Cid f03d68128b Merge remote-tracking branch 'origin/KDE/4.10'
Conflicts:
	generators/spectre/okularApplication_ghostview.desktop
2013-04-17 21:03:13 +02:00
Albert Astals Cid a6d53df7ac fix indent 2013-04-17 21:02:32 +02:00
Jon Mease 3c6140b616 Fix Undo / Redo of annotation creation doesn't properly handle page rotation and adds undo unit tests
BUG: 318091
REVIEW: 109989
2013-04-13 22:54:47 +02:00
Albert Astals Cid 076e0cfaf8 More the commands to a different file 2013-04-06 00:39:35 +02:00
Albert Astals Cid d0fd156dc9 Minor tweaks 2013-04-06 00:28:39 +02:00
Jon Mease 78faf1e68f Add undo/redo support for annotations
REVIEW: 107442
2013-04-06 00:22:48 +02:00
Albert Astals Cid 541650a4f4 Remove the concept of observer/view id
Just use the pointer as id :-)

This is BIC and SIC, increase the soversion now to makes sure we don't forget in the future

Patch based in an earlier patch by Bogdan Cristea <cristeab@gmail.com>
REVIEW: 109115
2013-02-24 23:01:02 +01:00
Thomas Fischer 96c69528d4 Show paper size names like "ISO/DIN A4" instead of just paper size in numbers
REVIEW: 107350
2012-12-31 11:14:54 +01:00
Fabio D'Urso c69be76122 Added comment to tell when the condition fixed by the previous patch happens 2012-12-12 23:32:03 +01:00
Mailson Menezes 466e402d9e Remove assertion of request normalized rect
normalizedRect is null if the requested page is not visible

BUG: 311238
2012-12-12 23:24:31 +01:00
Pino Toscano 4e171fbbfe add missing ';' 2012-11-16 01:21:02 +01:00
Mailson Menezes ce7d96dd96 Assert the request have a valid normalized rect 2012-11-15 21:11:45 -03:00
Mailson Menezes 7528fb8c88 Change TilesManager::tilesAt use
- The second parameter has changed to an enum
 - Now Page::tilesAt only returns tiles with pixmaps
2012-11-15 20:41:17 -03:00
Mailson Menezes 66e93136f9 Limit zoom to 400% if document doesn't support tiles 2012-11-15 20:24:51 -03:00
Albert Astals Cid 12b6d1c3d3 Kill the ZoomFactor config
It was only used to return 1, that was then used in
CHMGenerator::textPage, that code still looks a bit fishy, but that was already there, it's just now that looks a bit more fishier
2012-11-15 23:45:01 +01:00
Fabio D'Urso d3eb739814 Merged TilesManager::setWidth and setHeight into a single setSize method 2012-11-11 21:39:23 +01:00
Fabio D'Urso 2b4de7c934 Generator interface: Use the existing setFeature method to report tiled rendering capability
instead of adding a new supportsTiles() virtual method
2012-11-10 17:04:14 +01:00
Albert Astals Cid bb9508e2f4 Be const my friend 2012-11-09 01:10:43 +01:00
Mailson Menezes f56c5a8ac9 Merge branch 'master' into tiled-rendering 2012-11-08 20:51:01 -03:00
Fabio D'Urso 437ddad588 Hide tiles manager within okularcore
Only the Tile class (tile.h) is visible from the outside
2012-11-08 20:26:17 -03:00
Fabio D'Urso e12966b259 Removed possibility to have a tiles manager per observer
Now only the PageView can have a tiles manager.
2012-11-08 20:52:01 +01:00
Fabio D'Urso bdbd03f5c9 Misc minor changes in DocumentPrivate::cleanupPixmapMemory
1) Fixed underflow when memoryDiff > memoryToFree
2) Use current viewport's page number instead of any visible page as
   page from which distances are calculated
3) Renamed currentVieport to visibleRect, because the currentVieport is
   a different thing
2012-11-08 19:35:22 +01:00
Mailson Menezes f91f55d117 Split tile structure in Tile and TileNode
The new class TileNode represents a node in the tree structure
whereas Tile is just a data structure to store the pixmap and tile rect
and is used outside tiles manager.
2012-11-08 14:44:57 -03:00
Mailson Menezes da54ffdd8e Improve the evicting algorithm
The miss counter was taken away. Now the algorithm relies on the
distance between the tiles and the viewport.

Also the visibleRect() and setVisibleRect() methods were removed from
TilesManager since we now pass this information to
TilesManager::cleanupPixmapMemory()
2012-11-08 10:58:08 -03:00
Mailson Menezes c13ad1afc3 Rewrite debug messages
Fabio D'Urso suggested to rewrite the debug messages showed when a tiles
manager is started to a less scary one.
2012-11-08 09:02:33 -03:00
Mailson Menezes a61e1e0834 Fix annotations bug
The annotations created in tiles mode were not shown unless the user
changed the zoom level.
2012-10-25 09:24:11 -03:00
Tobias Koenig 563ad0458e Extend Document::processAction() to handle RenditionActions
REVIEW: 106608
2012-10-22 13:04:02 +02:00
Mailson Menezes b87d0f6c5b Fix bug where outdated requests were used on tiles manager
Requests created before the tiles manager has started aren't meant to be
used.
2012-10-18 01:38:44 -03:00
Bogdan Cristea 7ce6990098 Separate settings in core and non core
Will make it easier to make separate apps based on the core in the future
Note this will most probably break your settings if you are not running a very up to date kdelibs (4.9 or 4.10)
so be careful on updating
REVIEW: 104947
2012-10-16 00:28:29 +02:00
Albert Astals Cid ea08b46308 Remove code i did not want to commit
The part with the todo wasn't meant to be commited yet
2012-09-26 23:28:58 +02:00
Albert Astals Cid ed02ecfb60 Remove the disable threading option
It was added ages ago when our threading code was not perfect, but should be top notch now so this makes not any sense
2012-09-25 21:18:10 +02:00
Albert Astals Cid 385933205a Change code so there is no a return inside three ifs 2012-09-25 12:53:35 +02:00
Albert Astals Cid 4befd95ef8 sendGeneratorRequest -> sendGeneratorPixmapRequest 2012-09-25 11:09:34 +02:00
Mailson Menezes ca89ffe96c Avoid making unnecessary requests
Some requests may take a while to process in a highly zoomed region.
Since those requests are not yet finished, other requests to the same
region are likely to be made (specially if the user is scrolling fast)
and the generator will have to render the same region repeatedly.

Also when changing zoom rapidly some pixmaps can arrive at the tiles
manager when another request has already been posted. This pixmap is not
necessary anymore and should be discarded (the tiles manager will get a
new pixmap anyway).
2012-09-24 22:41:57 -03:00
Albert Astals Cid d917fe1e12 Unify the forward and backward search methods
Same functionality 60 lines of duplicated code less to maintain
2012-09-25 00:14:10 +02:00
Tobias Koenig d3e0dadcac Introduce notifyCurrentPageChanged callback DocumentObserver interface 2012-09-06 08:46:10 +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 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 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 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
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 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
Mailson Menezes 032f03a0e8 Track memory usage of tiles 2012-07-16 18:19:02 -03:00
Mailson Menezes 9c09eb938e Use tiles only when it's necessary
In other words: don't use tiles when the page is not big enough
2012-07-16 18:19:01 -03:00
Fabio D'Urso 569c9b84ce Before preloading pixmaps check that they fit in cache 2012-07-10 00:57:49 +02:00
Fabio D'Urso 00afec8617 Refactoring of cleanupPixmapMemory
memoryToFree calculation now lives in DocumentPrivate::calculateMemoryToFree()
2012-07-10 00:57:17 +02:00
Fabio D'Urso 1feb549d3d Clean pixmap cache in order of descreasing distance from current viewport
Previously it was cleaned in FIFO order

I also moved the pixmap selection logic in a separate function, that
will be needed in the next patches.

Note: This behaviour is yet not optimal for the thumbnails panel,
because it is allowed to be at a page different than the current
viewport
2012-07-10 00:56:19 +02:00
Mailson Menezes 48d105672f Use NormalizedRect instead of VisiblePageRect on PixmapRequest 2012-07-08 15:24:20 -03:00
Albert Astals Cid cd8485c7bc Make the freeSwap out param optional 2012-06-24 23:53:01 +02:00
Fabio D'Urso 3c2d2e1b7a Better memory limit tuning in greedy mode to avoid triggering the OOM if swap is full
Using Albert's new formula
2012-06-24 21:05:14 +02:00
Albert Astals Cid 0e01e11717 Do not update the last update time on failure
Because the code *should* work so it failing is exceptional and we don't want to cache the value
2012-06-24 20:08:18 +02:00
Albert Astals Cid fb5a178311 Fix underflwo in memoryToFree found by Fabio 2012-06-24 19:03:38 +02:00
Albert Astals Cid 444e6b7b19 Fix underflow in getFreeMemory()
It actually serves three purposes:
a) Make sure all the values are there (this should be always true, but doesn't hurt making sure) because if SwapFree was there but SwapTotal was not, it'd be a mess
b) add up things in order so we don't underflow, currently the code did process stuff as it came in the file, and it happens that SwapTotal appears before SwapFree in /proc/meminfo so it actually did  "MemFree:" + "Buffers:" + "Cached:" - "SwapTotal:" + "SwapFree:", which can underflow if "MemFree:" + "Buffers:" + "Cached:" < "SwapTotal:"
c) Do not underflow at all, so if  "MemFree:" + "Buffers:" + "Cached:" +  "SwapFree:" < "SwapTotal:" we return 0 correctly not a zillion of free memory

Aurélien you might want to update gwenviews copy of this code (there's a few other bugfixes we did a while ago you didn't update either)

CCMAIL: agateau@kde.org

BUGS: 291129
2012-06-20 00:37:37 +02:00
Albert Astals Cid 791a4ac39e Fix spacing 2012-06-20 00:37:36 +02:00
Albert Astals Cid e7a4e3b392 Remove misleading comment 2012-06-20 00:37:36 +02:00
Fabio D'Urso 939891c9dd Renamed Document::SaveCapability members I added ten minutes ago
Forms -> SaveFormsCapability
Annotations -> SaveAnnotationsCapability
2012-06-14 00:31:17 +02:00
Fabio D'Urso 7c3c28fdf6 Fixed unclear text
Also turns a if-if sequence in a if-elseif to make more evident that
we never show both messages.
2012-06-13 23:45:56 +02:00
Fabio D'Urso 23eb083b00 Show a warning if annotations will not be saved to PDF.
The only affected generator is poppler (because it's the only one with
saving support).
Since version 0.20, Poppler can save annotations to PDF. If the user is
using an older version, this patch warns him that annotations are not
saved.
2012-06-13 22:59:55 +02:00
Mailson Menezes a405c079f4 Rendered image is at the same size of viewport
Previously we were rendering the current viewport but the image provided
by poppler was as big as the scaled page.
2012-06-09 14:39:06 -03:00
Fabio D'Urso 5930478352 Keep original filename when creating a .okular archive from a .okular archive
This patch makes sure that the file saved in the .okular file keeps
the original filename (and, in particular, the extension) even if the
user is re-exporting a .okular archive as .okular archive. Before this
patch, the file boundled in the .okular archive would be named like the
.okular file it was exported from (eg foo.okular instead of foo.pdf).
Note: Okular had no problems in reopening it, but advanced users
unpacking the ZIP file obtained a .okular file which is actually a
native file, and not an okular archive.
2012-06-07 18:59:39 +02:00
Fabio D'Urso 9a11294b12 Sort bookmarks from the same page in viewport order 2012-06-05 00:49:16 +02:00
Fabio D'Urso 86c92ffec2 Fixes against causes of annotation data loss + Improved GUI message logic
1) If the user had previously annotated the document with an old okular
version and the document contains existing annotations and no /Encrypt
(ie the case where annotation changes are no longer saved locally), make
Document::saveDocumentInfo write the original unmodified local
annotations back to XML, so that it seems that the original file was not
changed. If the user makes annotation changes, code from previous
patches already asks him to save them to a different document on close.

2) Ask "Save changes?" if the user has modified annotations in a .okular
archive.
BUG: 300197

3) Turned a "sorry" message in a "information" (with dontshowthisagain),
because now we also have the "Save changes?" prompt to inform the user.

4) Suppressed all annotation-related message boxes on document opening
2012-06-05 00:49:01 +02:00
Mailson Menezes 83282971d8 Render current viewport only 2012-05-29 14:06:02 -03:00
Fabio D'Urso e3f1c388de Ask "Save annotation changes?" if there are unsaved annotations that cannot be saved locally
This patch turns Okular into a ReadWritePart. Annotation editing is always
disabled if we're loaded as ReadOnlyPart, no matter the document type.

REVIEW: 105020
2012-05-23 23:43:44 +02:00
Fabio D'Urso 04935266d2 Fix wrong text 2012-05-23 00:52:20 +02:00
Fabio D'Urso b3782d82a1 Fallback behavior for documents whose generator provides native annotation editing support without saveAs support
The only affected generator is poppler. Note that:
Document has /Encrypt <=iff=> SaveInterface supportsOption(SaveChanges) is false

This patch enforces the following behavior (and warns the user the first time
he edits an annotation).

- If the document has /Encrypt, warn that "Save as" is not available, but it's
possible to export as okular archive. New annotations will be automatically
saved to XML as usual.
Note that the previous patch already made all existing annotations uneditable,
because there's no way to save them.

- If the document has no /Encrypt and there are existing external annotations,
warn that changes won't be saved automatically. The user needs to "Save as" or
changes will be lost.

- If the document has no /Encrypt and there aren't existing external
annotations, don't show any warning. New annotations will be automatically saved
to XML as usual and to file if "Save as" is pressed.
2012-05-17 23:51:00 +02:00
Fabio D'Urso b33d71ef81 Enable edit/removal of external annotations if the generator supports it 2012-05-17 23:50:55 +02:00
Fabio D'Urso 157638f2f9 Added Annotation::BeingMoved flag to avoid refreshing pixmaps while moving annotations 2012-05-17 23:50:39 +02:00
Fabio D'Urso f6fa2a5614 Disable GUI operations on certain types of annotations
Modification and removal of *external* annotations are disabled by this
patch. Note that this change doesn't remove any functionality, because they
have never been implemented (AnnotationProxy is defined by the previous
patch).

The #if0'd blocks will be enabled by a future patch that provides fallback
behavior for generators that don't support saving changes.
2012-05-17 23:50:10 +02:00
Fabio D'Urso ec9f068d77 Added AnnotationProxy to SaveInterface
Based on Pino Toscano's earlier work
2012-05-17 23:49:58 +02:00
Fabio D'Urso 07c57bb2ab Dead code removed (PagePrivate::modifyAnnotation)
The first if ("modified already") is always taken
2012-05-17 23:49:54 +02:00
Tobias Koenig 4639ded310 Implement autostart support for movie annotations
Evaluate MovieActions to implement autostart behavior for movie annotations.

REVIEW:104271
2012-04-03 14:18:10 +02:00
Albert Astals Cid d3d8025ef1 Merge remote-tracking branch 'origin/KDE/4.8'
Conflicts:
	VERSION
	core/version.h
2012-03-09 00:29:48 +01:00
Albert Astals Cid bf47b97cc2 Do not return 0 in getFreeMemory for the first two seconds 2012-03-09 00:26:51 +01:00
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 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 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 2fd4100cbd Coding style fixes 2011-10-23 14:22:58 +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 0e29008150 Initial commit of the 'ViewerInterface' and of a first implementation. 2011-09-10 18:15:52 +01:00
Albert Astals Cid 258cd6562a Core work for Reset Forms Action support
Heavily inspired in Guillermo Amaral patches
CCMAIL: gamaral@kde.org
2011-08-25 02:24:38 +02:00
Montel Laurent f9f65979f5 Normalize signals/slots 2011-07-31 21:22:04 +02:00
Kevin Kofler e001fbab55 Fix landscape documents getting printed in portrait format if "Landscape" is selected in the print dialog (the default).
Partly based on a patch by Falk from KDE bug #181290.

BUG: 181290
REVIEW: 101513
2011-07-28 01:41:48 +02:00
David Palacio db7d8ff608 Test if the file is readable if it is a regular file.
*REVIEW: 6667

svn path=/trunk/KDE/kdegraphics/okular/; revision=1230523
2011-05-05 20:51:05 +00:00
Pino Toscano 96ae09cfde ignore setViewport() for page numbers out of the document
CCBUG: 266133

svn path=/trunk/KDE/kdegraphics/okular/; revision=1220028
2011-02-12 14:49:32 +00:00
Pino Toscano 40d20ca58d in each page, add a pointer to the owner document
svn path=/trunk/KDE/kdegraphics/okular/; revision=1217914
2011-01-29 15:38:18 +00:00
Albert Astals Cid 6f3667b9d7 forwardport r1216334 okular/branches/KDE/4.6/kdegraphics/okular/core/document.cpp:
use prettyUrl to get a prettier url

svn path=/trunk/KDE/kdegraphics/okular/; revision=1216336
2011-01-22 18:46:56 +00:00
Albert Astals Cid fab89241b2 Implement memory functions for freebsd
Patch by Alberto Villa
BUGS: 218418

svn path=/trunk/KDE/kdegraphics/okular/; revision=1207422
2010-12-18 01:07:33 +00:00
Pino Toscano ba0dd22f71 when archiving, resolve the symlink if the document path is that
CCBUG: 245243

svn path=/trunk/KDE/kdegraphics/okular/; revision=1161859
2010-08-10 23:49:30 +00:00
Albert Astals Cid 4e551e6867 Improve error message
svn path=/trunk/KDE/kdegraphics/okular/; revision=1148688
2010-07-11 15:32:43 +00:00
Albert Astals Cid 25f95bbc9f duplicate code is evil
svn path=/trunk/KDE/kdegraphics/okular/; revision=1115314
2010-04-15 22:26:58 +00:00
Albert Astals Cid 3583f6010a move from virtual to slot to not kick ABI in the nuts
svn path=/trunk/KDE/kdegraphics/okular/; revision=1114947
2010-04-14 23:33:14 +00:00
Albert Astals Cid 0f0cacd63a add a way to generators give a bit more info of why printing failed
and implement it in the pdf generator, others welcome to implement the function
for other generators

svn path=/trunk/KDE/kdegraphics/okular/; revision=1114944
2010-04-14 23:07:27 +00:00
Glen Kaukola 45c82f8636 Krazy: Check for spelling errors
svn path=/trunk/KDE/kdegraphics/okular/; revision=1110329
2010-04-02 18:49:13 +00:00
Pino Toscano 7a88256b35 use abs() before comparing to the current time, otherwise the comparison will always fail when the midnight passes
svn path=/trunk/KDE/kdegraphics/okular/; revision=1105306
2010-03-19 19:52:38 +00:00
Albert Astals Cid 667e07a343 setAttribute with doubles is evil as it uses the current locale and we don't want that, use QString::number
BUGS: 211990

svn path=/trunk/KDE/kdegraphics/okular/; revision=1050633
2009-11-17 19:37:57 +00:00
Albert Astals Cid b9d749bc0d Commit "Document information" patch by Luigi Toscano, 8 months without a nack from any devel and i like it, so let's commit it
Luigi's mail says
********
The attached patch changes a bit the handling of document informations 
and the informations shown in the info page.
- document path is added to the information and a button allows you to 
toggle between to file name (default) and the complete path;
- the number of the page is added to the information set by 
documentInfo() and not by the properties dialog (so the latter will not 
modify datas);
- the order of the information shown is the fixed now (see 
orderedProperties).
*********

Then there are a few things of my own since some const here and there and adding three values to Key enum

Also it fixes wish 208999
BUGS: 208999

svn path=/trunk/KDE/kdegraphics/okular/; revision=1049872
2009-11-16 00:46:33 +00:00
Albert Astals Cid 4041eb7f5b empty the pixmaps queue stack before doing the loop waiting for executing pixmap requests to empty, otherwise a single shot timed call to sendGeneratorRequest can kick us in the back cause bad things to happen, ranging from crashes to the app waiting forever in the loop
Patch provided by pino and tested by me
BUG: 212066

svn path=/trunk/KDE/kdegraphics/okular/; revision=1047671
2009-11-11 19:36:58 +00:00
Albert Astals Cid a79fe451fd check the search we are doing is still alive, otherwise doesn't make sense to keep on doing it and even more doing so might make us crash
svn path=/trunk/KDE/kdegraphics/okular/; revision=1045410
2009-11-06 00:19:10 +00:00
Albert Astals Cid 0b1124c4a8 do not accept new pixmap requests if we are shutting down
svn path=/trunk/KDE/kdegraphics/okular/; revision=1041420
2009-10-27 23:38:13 +00:00
Albert Astals Cid 10ba02cbd5 in case we have a new enough poppler give a better error message when we can't save files with /Encrypt
BUGS: 208119

svn path=/trunk/KDE/kdegraphics/okular/; revision=1037771
2009-10-19 23:00:52 +00:00
Pino Toscano 90074bef90 check the actual mime type names and not their pointers
BUG: 210882

svn path=/trunk/KDE/kdegraphics/okular/; revision=1037414
2009-10-19 00:20:18 +00:00
Albert Astals Cid 27830a988e Add a [hidden] config option to set hinting to fonts
Defaults to disabled
Made the dvi and pdf backends honor the hinting setting

svn path=/trunk/KDE/kdegraphics/okular/; revision=1032936
2009-10-08 21:55:51 +00:00
Albert Astals Cid b55024cfd7 Do not start a search if it's already running
BUGS: 203142

svn path=/trunk/KDE/kdegraphics/okular/; revision=1009822
2009-08-10 22:28:54 +00:00
Armin Berres 555cb3c9a1 add synctex support for pdf files
svn path=/trunk/KDE/kdegraphics/okular/; revision=1003016
2009-07-27 14:15:33 +00:00
Pino Toscano df230edd3a fix signal/slot connection
svn path=/trunk/KDE/kdegraphics/okular/; revision=990840
2009-07-03 12:51:56 +00:00
Pino Toscano b2472bef0d check that the rotation page notification really refers to a page of a document
fixes crash when rotating documents opened in one of more than one okular tabs in konqueror

svn path=/trunk/KDE/kdegraphics/okular/; revision=989681
2009-06-30 17:21:55 +00:00
Pino Toscano dc7583eb8b Add the concept of "next destination" next to the "next viewport" one.
This allows a resolution, if set, of that named destination when opening a document.
CCBUG: 192032

svn path=/trunk/KDE/kdegraphics/okular/; revision=967542
2009-05-13 14:24:30 +00:00
Pino Toscano 42afd676d9 handle relative file names in source reference links correctly
svn path=/trunk/KDE/kdegraphics/okular/; revision=942963
2009-03-23 01:22:17 +00:00
Pino Toscano 4d48c59a34 now that we have a small "progress" animation next to the search line edit in the find bar, there's no need for the "searching for ..." dialog
feedback about this new "notification" is much welcome
CCBUG: 155858

svn path=/trunk/KDE/kdegraphics/okular/; revision=926301
2009-02-15 00:38:24 +00:00
Patrick Spendrin 3330a5f992 fix crash in okular - forward port r923029
svn path=/trunk/KDE/kdegraphics/okular/; revision=923031
2009-02-08 02:36:04 +00:00
Pino Toscano e449fd1ef0 on document closing, clear the fifo with allocated text pages
(fixes potential crash because of references to potentially non-existing pages in the next open document)

svn path=/trunk/KDE/kdegraphics/okular/; revision=923020
2009-02-08 01:32:49 +00:00
Pino Toscano 3b905e3cf4 undefine the internal macros at the end
svn path=/trunk/KDE/kdegraphics/okular/; revision=908738
2009-01-10 11:32:54 +00:00
Pino Toscano 46a2bb5273 When the loaded document is empty, consider its loading as failed.
(Added a TODO for a proper UI message.)
BUG: 179447

svn path=/trunk/KDE/kdegraphics/okular/; revision=904821
2009-01-03 10:17:15 +00:00
Pino Toscano cba63bd669 Pass the plugin keyword when creating generators.
This should make the Ruby binding work again.

BUG: 177537

svn path=/trunk/KDE/kdegraphics/okular/; revision=895926
2008-12-12 00:16:20 +00:00
Pino Toscano 769a70956f add more checks against invalid viewports
fix crash when activating some of the toc items in the testcase of #176513 (still it would be nice to know why they are "void" items"...)

svn path=/trunk/KDE/kdegraphics/okular/; revision=890803
2008-11-30 11:28:08 +00:00
Pino Toscano 52a666f073 When starting an incremental search, do not consider the start page "done" if there was a match in it.
svn path=/trunk/KDE/kdegraphics/okular/; revision=890800
2008-11-30 11:02:02 +00:00
Patrick Spendrin d7c9bcb596 under windows there is no gid yet
svn path=/trunk/KDE/kdegraphics/okular/; revision=885793
2008-11-17 22:16:28 +00:00
Pino Toscano e5b13e2d5b claim support for application/vnd.kde.okular-archive in the correct way, ie via .desktop files
thanks Albert for waking me up

svn path=/trunk/KDE/kdegraphics/okular/; revision=884982
2008-11-16 13:19:35 +00:00
Pino Toscano 938ed4acfa claim support of the new application/vnd.kde.okular-archive mimetype, and check it where appropriate
svn path=/trunk/KDE/kdegraphics/okular/; revision=884851
2008-11-16 01:17:48 +00:00
Pino Toscano b6c5ba1bc8 Add API to load and save "document archives", ie an .okular archive with document and metadata (currently annotations).
Few missing to be done in it:
- more checks when saving
- make it use a proper mimetype

CCBUG: 151614

svn path=/trunk/KDE/kdegraphics/okular/; revision=884597
2008-11-15 14:15:31 +00:00
Pino Toscano acab77c691 add a loadDocumentInfo() variant that takes the file name to read stuff from, and make the non-parameters one calling the new one
svn path=/trunk/KDE/kdegraphics/okular/; revision=884461
2008-11-15 00:34:03 +00:00
Laurent Montel c2fc9836e8 Fix iterator
svn path=/trunk/KDE/kdegraphics/okular/; revision=882957
2008-11-11 18:48:40 +00:00
Pino Toscano 9d8c52b5eb Shuffle a bit the way documents are opened:
- when there are no backends for handling the document mimetype, try harder using the mimetype from the file content only
- when the backend fails loading, try again with the backend that handles the mimetype of the file content
BUG: 166034

svn path=/trunk/KDE/kdegraphics/okular/; revision=881991
2008-11-09 14:21:20 +00:00
Pino Toscano 5542445f04 replace the home-made placeholder replacements with KMacroExpander+KShell, and use KProcess
svn path=/trunk/KDE/kdegraphics/okular/; revision=873601
2008-10-19 19:40:17 +00:00
Pino Toscano 4da5b7a105 Add a configuration page for the text editor used for source references links (that is, the ones used also for inverse search).
Factor out the editor commands structure.

svn path=/trunk/KDE/kdegraphics/okular/; revision=873570
2008-10-19 18:01:16 +00:00
Pino Toscano 97335bf267 simple optimization in the Google-like search: split the search terms just once
svn path=/trunk/KDE/kdegraphics/okular/; revision=873283
2008-10-19 10:07:48 +00:00
Pino Toscano e0f2e1dd13 disable the "no results found" dialog when searching. search users should use the proper signal to get the search result (and do proper feedback)
CCBUG: 155858

svn path=/trunk/KDE/kdegraphics/okular/; revision=870011
2008-10-11 15:03:46 +00:00