Commit graph

5683 commits

Author SHA1 Message Date
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
Albert Astals Cid e338160109 orderedProperties should contain keys (i.e. tagnames) not titles
Otherwise we are not showing "custom" generator properties like PDF format version number, encryption, etc
2012-07-02 12:03:45 +02:00
Albert Astals Cid 9cb9e4e017 Do not use deprecated API to get the pdf version 2012-07-02 11:54:39 +02:00
Albert Astals Cid 48651d22dd warning-- 2012-07-02 11:50:32 +02:00
Yuri Chornoivan 15084ea0d8 Add sections about inverse search configuration. 2012-07-01 17:21:40 +03:00
Albert Astals Cid 98a073558a Normalize ligatures on text export too
BUGS: 302634
FIXED-IN: 4.9.0
2012-06-28 00:13:00 +02:00
Albert Astals Cid ff92bac005 Bump devel version to 0.15.70 2012-06-25 22:03:43 +02: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
Script Kiddy dc6823c135 SVN_SILENT made messages (.desktop file) 2012-06-24 10:17:10 +02:00
Script Kiddy 73c95bfe1e SVN_SILENT made messages (.desktop file) 2012-06-21 10:36:30 +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 c254653d10 Fix Section 4.5 ("The Bookmarks Menu")
Removed further occurrences of "bookmarked page".
2012-06-19 20:14:18 +02:00
Albert Astals Cid ae207b060a I'm the current maintainer 2012-06-19 19:35:25 +02:00
Yuri Chornoivan dcf302f58e Fix spacing in Credits. 2012-06-19 18:15:20 +03:00
Yuri Chornoivan 5fbd626834 Fix Section 4.5 according to Fabio D'Urso proposals. 2012-06-19 18:13:30 +03:00
Yuri Chornoivan fb64471435 Add a section about bookmarks to documentation. 2012-06-19 18:02:49 +03:00
Yuri Chornoivan afd1cd5d66 Add missing menu item to the documentation. 2012-06-19 09:28:31 +03:00
Yuri Chornoivan 4f9095879f Update Okular documentation to version 0.15. 2012-06-18 21:49:11 +03: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 0acab905f3 Added Fabio D'Urso in the about box credits tab 2012-06-14 00:12:16 +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
Script Kiddy c13e81cccd SVN_SILENT made messages (.desktop file) 2012-06-13 10:08:23 +02:00
Script Kiddy d41c8bd1c7 SVN_SILENT made messages (.desktop file) 2012-06-12 17:04:54 +02:00
Pino Toscano 7e8aed4376 add the svg of the annotation tool icons
as of Eugene Trounev sent them to me more than three years ago, just gz-compressing them now;
followup of b811186781

(apparently I forgot to commit them at that time)
2012-06-10 22:04:27 +02:00
Fabio D'Urso 42c4e4c5db TextAnnotation stamp: fix icon name mismatch in DOM methods with poppler 0.20.1
Fixes the situation where Poppler thinks "Note" and omits the icon
attribute, Okular sees nothing and defaults to "Comment".
2012-06-10 18:28:47 +02:00
Albert Astals Cid 07495549bb Bump versions 2012-06-07 22:49:10 +02:00
Fabio D'Urso c5391e4643 Restore default "Note" stamp for linked text annotations
It was "Note" before d2fa4c9, but it was changed to "Comment" for
compatibility reasons. Setting it to "Note", this time in UI code,
doesn't break d2fa4c9 and restores the default icon users are used to.
2012-06-07 18:59:45 +02: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 dee51ee71b Disable presentation-related actions if presentation mode is not open
- Keep "Toggle drawing mode", "Erase Drawings" and "Switch blackscreen
  mode" actions disabled unless the presentation mode is open.
- Uncheck blackscreen mode on presentation exit
2012-06-07 18:59:38 +02:00
Fabio D'Urso 3a383f64fd Store and render presentation drawings at UI level instead of involving core.
This prevents spurious annotation warnings from being shown in
presentation mode.
BUG: 300938
2012-06-07 18:58:52 +02:00
Fabio D'Urso c8bc6dabeb Fixes in presentation page switch logic
Do not assume that oldPage == m_document->viewport().pageNumber, because
it's false if we are processing a viewport change notification.
It caused presentation drawings to turn into persistent annotations,
when switching page from the main okular window.

In general, this patch also tidies up PresentationWidget::changePage a bit:
 - Removed redundant checks: they are always true
 - Removed duplicated code that performed the page opening actions:
     Previously the first slide and the other ones followed different code
     paths, both doing the same things. I unified them.

I also changed slotNextPage so that it never sets m_frameIndex = -1, because
it confuses changePage and makes it skip page closing actions.
2012-06-07 18:58:50 +02:00
Albert Astals Cid f96839c123 Do not crash on file from bug 300477
You also need a new (as of now unreleaed) version of libepub
BUGS: 300477
FIXED-IN: 4.9.0
2012-06-06 00:01:06 +02:00
Fabio D'Urso 9a11294b12 Sort bookmarks from the same page in viewport order 2012-06-05 00:49:16 +02:00
Albert Astals Cid 07c4a16da5 Make it possible to type a page number and press enter in Print Preview
Do not close Print Preview if enter is pressed
2012-06-05 00:49:15 +02:00
Fabio D'Urso ac695d448d Do not close the document in Shell::queryClose()
Because if we do, Shell::saveProperties will find it closed and won't
save the session correctly.

BUG: 300985
2012-06-05 00:49:03 +02:00
Fabio D'Urso 4d06efb64d Do not crash if the user attempts to draw on the presentation summary frame 2012-06-05 00:49:02 +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
Fabio D'Urso a6922a4430 Don't produce unusable file if user presses "Save As" on a .okular archive
Make "Save As" behave like "Export as Document Archive" if we are
saving a .okular file.
BUG: 258475
2012-06-05 00:48:58 +02:00
Fabio D'Urso 7087f20f23 poppler gen: Removed block of old debug and TODO comments 2012-06-05 00:48:56 +02:00
Fabio D'Urso 8ce3978caa poppler gen: Show inplace text annotations' contents with poppler 0.18 2012-06-05 00:48:55 +02:00
Fabio D'Urso d0a05bc301 poppler gen: The "Hide annotations" print option has no effect on windows. Don't show it 2012-06-05 00:48:53 +02:00
Fabio D'Urso e130068726 Show latex button when the annotation popup window is opened
Check for latex contents after creating the MovableTitle, bacause it's in
MovableTitle ctor where the containsLatex signal is connected.
2012-06-05 00:48:52 +02:00
Fabio D'Urso d2fa4c9bf3 TextAnnotation stamp fix
- Make "Comment" the default stamp instead of "Note" (because we used to omit
   the "icon" in the exported DOM if it was "Comment")
 - Don't omit the icon name anymore
2012-06-05 00:48:50 +02: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