Commit graph

9653 commits

Author SHA1 Message Date
l10n daemon script fa8854ba19 GIT_SILENT made messages (after extraction) 2022-02-05 00:42:10 +00:00
Nicolas Fella a6c8d6dac3 Simplify printing code
Remove pointless null check, we know printDialog isn't null since we create it right before

Create PrintDialog on the stack

We create and destroy it all within one function

This way we get guaranteed cleanup for free
2022-02-04 13:26:09 +01:00
Yuri Chornoivan ca5ed34888 Sync the docs with the current interface 2022-02-02 09:51:27 +02:00
Nate Graham 3c98dcdb0c Improve Bookmark action icons and text
This commit updates the "remove bookmark" actions to use the more
specific "bookmark-remove" icon, rather than the more general
"list-remove" icon or the older "edit-delete-bookmarks" icon which does
not exist in the Breeze icon theme. For compatibility's sake, a fallback
is added to try "edit-delete-bookmarks" if "bookmark-remove" is not
found in the active icon theme.

It also uses a longer but clearer string for the "remove all bokmarks"
context menu item.
2022-02-01 19:58:42 +00:00
Nate Graham 4dd3dc3f39 Improve UI for Bookmarks sidebar page buttons
Currently there are two tiny icons-only buttons with very similar icons
(which may even be identical in some icon themes). One of them is
checkable, and the other one triggers an immediate action. And there is
lots of unused space to the right of them.

This commit overhauls them in the following way:
- The toggle button becomes a checkbox with visible text, and is
  inverted; now when checked, it shows all bookmarks
- The checkbox moves above the view and search field, to communicate
  that it affects everything below it
- The button to add a bookmark gets some visible text

This should make the UI much clearer, at the cost of one extra line of
vertical space from the bookmarks list.
2022-02-01 19:58:42 +00:00
Nate Graham 01557c16c4 Put an "Add Bookmark" button on the Bookmarks sidebar
Previously, the only ways to add a bookmark were with the menu item or
keyboard shortcut. This commit adds a button at the bottom of the
bookmarks sidebar to do the same thing, which seems like a logical place
for such functionality.

setupViewerActions() was moved to earlier in the setup process to ensure
that m_addBookmark is assigned by the time the bookmarks sidebar is
created, since it gets passed that action in its constructor.

BUG: 357625
FIXED-IN: 21.12
2022-02-01 19:58:42 +00:00
Albert Astals Cid 218edc6f4a Merge remote-tracking branch 'origin/release/21.12' 2022-01-29 11:47:52 +01:00
Albert Astals Cid 5d1d412092 Fix opening epub files with non ascii names on Windows
epub_open wants an utf8 in Windows

It probably also wants utf8 in Linux, but the qPrintable already gives
us an utf8 in most of the normal Linux locales, so don't touch that

BUGS: 448274
2022-01-29 00:42:15 +00:00
Albert Astals Cid feef900250 Make sure helper apps we start are in path
QProcess will happily start things in CWD which is not what we want
2022-01-28 22:51:20 +00:00
Albert Astals Cid 9cded33c83 Fix incorrect spacing sequence
\% is not a valid C escape character, we just want % here
2022-01-28 22:50:55 +00:00
Heiko Becker db9dd90925 GIT_SILENT Update Appstream for new release
(cherry picked from commit 715fd1ac36)
2022-01-28 23:45:01 +01:00
Heiko Becker 715fd1ac36 GIT_SILENT Update Appstream for new release 2022-01-28 23:44:37 +01:00
Heiko Becker 570ff9ba97 GIT_SILENT Upgrade release service version to 21.12.2. 2022-01-28 22:41:35 +01:00
Albert Astals Cid 8a36e7350d Make Utils::realDpi work on QWindow not on QWidget
Small step towards the goal of okularcore not linking to QWidgets
2022-01-27 19:25:30 +01:00
Albert Astals Cid 5025330a6d mobile: Remove PlaceholderMessage copy, We require KF 5.85 for mobile 2022-01-26 14:31:14 +01:00
Albert Astals Cid a9c7834a4f mobile: Update imports to the minimum required versions on the cmake side 2022-01-26 14:26:47 +01:00
Fabio Bas da5fdc151b XPS: fix multipiece image loading
Turns out some files contain images saved in the xps archive as a directory containing multiple pieces, the first one being the image itself and the second one being empty.
Of course this is quite a weird way to save an image, but it seems that it still is valid and other viewers are able to load it correctly.
This change fixes the loading of multipiece images.

(cherry picked from commit 3506fb2ea8)
2022-01-26 13:50:40 +01:00
Fabio Bas 3506fb2ea8 XPS: fix multipiece image loading
Turns out some files contain images saved in the xps archive as a directory containing multiple pieces, the first one being the image itself and the second one being empty.
Of course this is quite a weird way to save an image, but it seems that it still is valid and other viewers are able to load it correctly.
This change fixes the loading of multipiece images.
2022-01-26 11:08:53 +00:00
Nicolas Fella 3e2e5cc95e Simplify form action handling
Instead of going widget -> controller -> pageview -> document do
widget -> document directly.
2022-01-24 16:00:19 +01:00
Albert Astals Cid a8e5f6e9f7 PDF: Allow signing unsigned signature fields 2022-01-24 13:18:36 +01:00
Albert Astals Cid d59967d8e1 Merge remote-tracking branch 'origin/release/21.12' 2022-01-24 12:53:23 +01:00
Albert Astals Cid fa6743aa04 Support the PDF Print named action
Also stop casting directly from a poppler enum to an okular enum, it's
not cool

BUGS: 448791
2022-01-23 22:20:46 +00:00
Albert Astals Cid 3e919b4287 Fix saving to okular archive on Windows
BUGS: 431717
2022-01-23 22:20:13 +00:00
Carl Schwan c9e09be0a9 Improve mobile drawer
Before:

![image](/uploads/cd0af949c3929eae5fbe68c6916e565b/image.png)

![image](/uploads/e121ddfc21aa6fb01e81f80cde7270d8/image.png)

After:

![image](/uploads/93ef9afc24d1712a20fa64bd06ad09fb/image.png)

![image](/uploads/721cca28cce0a9ab2e409774070a439b/image.png)

@mart
2022-01-19 22:33:21 +00:00
Albert Astals Cid e6483c98fc Merge remote-tracking branch 'origin/release/21.12' 2022-01-19 17:21:07 +01:00
Albert Astals Cid 6795ae7f2c Fix previewing embedded files on Windows
BUGS: 448735
2022-01-19 15:03:41 +00:00
Leonid Soshinskiy cc0e128561 fb2: fix duplicating book title, annotation, cover etc. 2022-01-06 09:57:43 +00:00
Albert Astals Cid bc9ca92885 if -> ifdef 2022-01-06 00:04:29 +01:00
Lenny Soshinskiy 2b837e08a0 fb2: show keywords in DocumentInfo 2022-01-05 15:16:55 +00:00
Albert Astals Cid f03bbfa89d PDF: Allow signing documents that need password to open them
We need the password since in the middle of the signing process we need to reopen
the document we just created to do some final modifications
2022-01-05 13:59:37 +00:00
Albert Astals Cid df4a7ef4e9 Merge remote-tracking branch 'origin/release/21.12' 2022-01-05 14:01:09 +01:00
Albert Astals Cid e2ac1dcd1e PDF: Fix memory leak when the file has Optional Content links 2022-01-04 16:42:35 +00:00
Yuri Chornoivan 3400e8aee6 Remove extra spaces in FB2 paragraphs
BUG: 359059
2022-01-04 12:08:43 +00:00
Heiko Becker 11448b94b1 GIT_SILENT Update Appstream for new release
(cherry picked from commit 8a09492a9a)
2022-01-04 01:06:53 +01:00
Albert Astals Cid 44c86de7e4 Fix two Signature issues on multipage/multisignature documents
First issue:
 - The "document is totally signed" was based on the last signature of
   the last page (that had signatures) that is not correct and needs to
   be based in the last signature by date

 - The "Rev #" number was based on the signature on the page, so if we
   had two pages with one signature each the model showed "Rev 1" for
   both

It adds new API which is not awesome in a stable branch, but the first
issue is important enough that warrants this to go to the stable branch
2022-01-03 23:38:23 +01:00
Heiko Becker 8a09492a9a GIT_SILENT Update Appstream for new release 2022-01-03 22:29:30 +01:00
Heiko Becker 5d9ffdee01 GIT_SILENT Upgrade release service version to 21.12.1. 2022-01-03 22:12:44 +01:00
Albert Astals Cid b38b2dfe52 Merge remote-tracking branch 'origin/release/21.12' 2022-01-03 21:54:22 +01:00
Albert Astals Cid e7eb937d28 Fix opening some password protected documents
e.g. the ones in poppler issue 824

The PDF spec doesn't say (or I couldn't find it) how a user entered
string is converted to the byte array needed for password checking, so
we try both latin1 and utf8
2022-01-03 18:26:49 +00:00
Albert Astals Cid 46bc21bfd9 CI: Debian has removed clazy from testing, use the one in unstable for now
Disable a few new warnings in clang-tidy

bugprone-implicit-widening-of-multiplication-result and
bugprone-easily-swappable-parameters seem like would be nice to fix, but
no time now
2022-01-03 17:03:46 +01:00
l10n daemon script e2a5beef51 GIT_SILENT made messages (after extraction) 2022-01-01 00:42:10 +00:00
Albert Astals Cid d6870ae2ff Remove deprecated Generator::documentMetaData 2021-12-29 18:49:56 +01:00
Albert Astals Cid a2576dc746 Act on core/ TODOs that are not binary compatible
I'm going to need to break binary compatibility to add a new feature
so may as well cleanup all the TODOs regarding that

Changes:
 * Moving a few destructors to the header
 * Removing a few unnecessary & in params
 * Adding a few necessary & in params
 * Making print return an enum instead of a bool and then having another
   function that returns the enum
 * Make Generator::requestFontData be a virtual
 * Remove unused enum
 * Remove a few filePrinter unneeded functions
 * Remove unused TextDocumentGenerator::addMetaData signal
2021-12-29 09:35:25 +00:00
Albert Astals Cid 8681bc0223 Okular Mobile: Require Qt 5.15.2
Removes the smooth property of PageItem since it was never set and clazy
was complaining about it not having a NOTIFY signal

Remove two signals that already exist in parent class

Fix C++11 detach in range-loop
2021-12-28 09:06:01 +00:00
Albert Astals Cid 1e8824eca9 Merge remote-tracking branch 'origin/release/21.12' 2021-12-27 23:29:17 +01:00
Albert Astals Cid e145f27970 Fix uninitialized memory read when opening the settings
==25792== Conditional jump or move depends on uninitialised value(s)
==25792==    at 0xFC1F7C2: PreferredScreenSelector::preferredScreen() const (dlgpresentation.cpp:215)
==25792==    by 0xFC1F422: PreferredScreenSelector::repopulateList() (dlgpresentation.cpp:163)
==25792==    by 0xFC1F23F: PreferredScreenSelector::PreferredScreenSelector(QWidget*) (dlgpresentation.cpp:151)
==25792==    by 0xFC1EFBB: DlgPresentation::DlgPresentation(QWidget*) (dlgpresentation.cpp:128)
==25792==    by 0xFC15825: PreferencesDialog::PreferencesDialog(QWidget*, KConfigSkeleton*, Okular::EmbedMode) (preferencesdialog.cpp:45)
==25792==    by 0xFC4A522: Okular::Part::slotPreferences() (part.cpp:2834)
2021-12-27 21:55:24 +00:00
Albert Astals Cid 5e474c3e88 Merge remote-tracking branch 'origin/release/21.12' 2021-12-26 23:08:23 +01:00
Albert Astals Cid 2a041d4845 Fix crash when adding stamps to the quick annotations
BUGS: 447409
2021-12-26 22:34:16 +01:00
Albert Astals Cid 3792d8d560 Tweak default UI
It's desktop unless you're building for Android where the default it's
mobile.

You can still manually specify which UI you want and you'll get that
regardless of the platform

Only require KParts if we're building the desktop UI

Two small changes in CI:
 * Stop pretending we have a macOS CI
 * Add Android CI
    - libkexiv2, khtml and kjs would be nice but we don't have Android builds
      yet
2021-12-17 22:03:35 +00:00
ivan tkachenko 031f937113
Add auto generated files to .gitignore
GIT_SILENT
2021-12-17 01:40:21 +03:00