Commit graph

9643 commits

Author SHA1 Message Date
Volker Krause 50d0703ae0 Enable readability-braces-around-statements 2022-03-09 23:29:56 +01:00
Volker Krause f28764e59c Attempt to fix the MSVC build 2022-03-08 14:22:43 +01:00
Jiří Wolker f24aa63a97 Create welcome screen
This screen is similar to the one in Ark, but also shows you a list of
recently-opened documents.
2022-03-08 04:24:45 +00:00
Andreas Naumann 293337d994 Set QT_PLUGIN_PATH
The MR
  1. adds a note, that the tests in the build tree depend on the install tree.
  2. extends the QT_PLUGIN_PATH with KDE_INSTALL_FULL_QTPLUGINDIR in cmake before creating the tests. That removes the need to source prefix.sh before calling cmake.
2022-03-07 23:09:02 +00:00
Nicolas Fella d1ecad897c Implement keystroke commit events
When a form field loses focus a special keystroke event with
willCommit=true is sent.

This is based on work by Joao Netto <joaonetto901@gmail.com>
2022-03-07 22:14:26 +00:00
Albert Astals Cid 1aa175cf3f Support SaveAs action
If a new enough (unreleases as of now) poppler is available

BUGS: 451010
2022-03-06 19:16:27 +00:00
Nicolas Fella 1d64fea660 Port away from KToolInvokation 2022-03-03 21:54:28 +01:00
Nicolas Fella 5e8beb532a Set correct textfield value on keystroke
event.value is the old value, we need to set the new value here

Modifying event.value is not supported when not committing
2022-03-02 23:20:14 +01:00
Albert Astals Cid 2c2acbb8e0 Increase Okular5Core soversion for the 22.04 release
We have changed lots of ABI things since 21.12
2022-03-01 16:21:29 +01:00
snooxx 💤 0ce3887a3c Add missing clang-format commit to .git-blame-ignore-revs
After 19d98d6a reformatted Okular's codebase with `clang-format`, that
commit was marked to be ignored by `git blame` by adding it to
`.git-blame-ignore-revs` in 4fb45522.

Later, !296 was merged but still needed reformatting, which was done in
b09e23f6. However, the latter commit was still missing from
`.git-blame-ignore-revs`, so let's add it.

Test Plan:
All commits mentioning `clang-format` which reformatted the codebase are
now included in `.git-blame-ignore-revs`.
2022-02-27 18:14:45 +00:00
Heiko Becker fe5847155c GIT_SILENT Update Appstream for new release
(cherry picked from commit b2d872c79f)
2022-02-27 19:11:13 +01:00
Albert Astals Cid 27c8919a42 Merge remote-tracking branch 'origin/release/21.12' 2022-02-27 12:09:58 +01:00
l10n daemon script dcebd0756e GIT_SILENT made messages (after extraction) 2022-02-27 00:43:22 +00:00
Nicolas Fella fd1c312d57 Fix keystroke events
event.value is the value before editing, not after
2022-02-24 23:39:28 +00:00
Nicolas Fella 03d83eb22d Don't create keystroke event when cursor moves
Currently we send a keystroke when the cursor moves but the text doesn't change.

Acrobat doesn't do it so let's do the same
2022-02-24 22:12:13 +01:00
Nicolas Fella 6c8cafbb1c Simplify keystroke event handling
Make it more similar to how we handle the format event.

We pass the new value to processKeystrokeAction, that calls the script
and sets the new value for the form object according to the result. If
needed the widget is refreshed to reflect the new text
2022-02-24 16:10:22 +01:00
Nicolas Fella ae8251a145 Don't clear focus when setting formwidget visible
Otherwise setVisibility(true) removes the focus
2022-02-24 15:36:43 +01:00
Albert Astals Cid f234bdf494 Put the Android extra linking cmake code behind a variable
The env variable check doesn't work on binary-factory for some reason so
use an actual variable that will be given by Craft
2022-02-24 14:12:34 +01:00
Albert Astals Cid d6b1524987 Android: More tweaks to make sure plugins are shipped 2022-02-23 17:43:02 +01:00
Huu-Tinh Pham 57829d1d81 added fallback icon for thumbnail sync context menu
The sync icon was missing when using the Breeze Icon pack.
Now a sync icon and a refresh icon is used for this thumbnail sync action.
2022-02-23 15:31:12 +00:00
snooxx 💤 9432565ede Fix broken page MiniBar
The `MiniBar` normally used to display page numbers and to provide
navigation buttons regressed since 01557c16c4 to only show an empty
non-functional button called "Page Number", along with multiple
warnings:
`QObject::connect(MiniBar, QAction): invalid nullptr parameter`

This is caused by moving `setupViewerActions()` to a place where
`m_miniBar` is not initialized yet, even though it has a runtime
`connect`-dependency on it.

By moving `setupViewerActions()` back, the `MiniBar` starts working
again. Now the `m_addBookmark` action, which is created in that
function, is not available anymore to be passed to the constructor of
`BookmarkList`. To avoid moving the setup of the latter away from the
rest of the sidebar code, only assigning the action to the bookmark
button contained in the `BookmarkList` is deferred to
`setupViewerActions()`.

As requested, any accidental future `nullptr`-access will be handled by
crashing, even in Release builds, by omitting any checks.

BUG: 450347

Test Plan:

Page numbers show up again in toolbar, no more `connect` warnings.
2022-02-22 23:16:34 +00:00
Albert Astals Cid 818b714252 Fix wrong default font string for annotation tools 2022-02-22 14:38:44 +01:00
Albert Astals Cid 0197a78fb5 Part::queryClose: Don't ask the user if he wants to save file types we can't save
BUGS: 449976
2022-02-22 13:20:37 +00:00
Yuri Chornoivan a2cb0c3844 Add TTS voice selection option to the docs 2022-02-20 21:23:52 +02:00
Yuri Chornoivan 8ea9f482ce Add editor-cmd option to the docs 2022-02-19 23:08:02 +02:00
Andreas Naumann 147a638619 Adds option editor-cmd to the commandline
Adds the option "editor-cmd" for the [feature request](https://bugs.kde.org/show_bug.cgi?id=263732) .

BUG: 263732
2022-02-18 13:33:28 +00:00
Huu-Tinh Pham a3fde02232 Onetime sync thumbnail
Added context menu entry to quick sync thumbnails with the current page. This is handy in case the user is not using "Link the thumbnails with the page" and wants quick sync thumbnails without changing settings or search for the page in the thumbnails view.

Before
![image](/uploads/389216ce4720f1891ddc4f2bf8ee14ea/image.png)

After
![image](/uploads/b4804d11992695d3a6be6642c9d7ac16/image.png)
2022-02-18 12:12:41 +00:00
Albert Astals Cid 4cd6bfd30e mobile: Add Signature Viewing UI
Move a few files from part/ to gui/ since they are also used by the
mobile/ frontend
2022-02-18 08:32:13 +00:00
Yuri Chornoivan 28e362b6a1 Simplify the string for the 'Search for...' action
BUG: 450334
2022-02-17 15:09:42 +02:00
Jeremy Whiting 1be2290358 Allow user to select tts voice in addition to engine.
To make tts more user friendly allow user to select which
voice is used for tts playback.
2022-02-14 08:20:14 -07:00
l10n daemon script b461c459d1 GIT_SILENT made messages (after extraction) 2022-02-14 02:08:21 +00:00
l10n daemon script 3102761c51 GIT_SILENT made messages (after extraction) 2022-02-14 00:42:06 +00:00
l10n daemon script b7eb345562 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2022-02-11 02:51:27 +00:00
l10n daemon script 848e344301 GIT_SILENT made messages (after extraction) 2022-02-11 02:11:44 +00:00
l10n daemon script c014232697 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2022-02-11 01:43:34 +00:00
l10n daemon script 18fab8e19b GIT_SILENT made messages (after extraction) 2022-02-11 00:42:43 +00:00
Albert Astals Cid a3fbd52739 Tell the user if he tries to save an Okular Archive with the wrong extension 2022-02-10 22:26:31 +00:00
l10n daemon script 9cdc390f53 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2022-02-05 02:50:16 +00:00
l10n daemon script ac3c081b42 GIT_SILENT made messages (after extraction) 2022-02-05 02:11:15 +00:00
l10n daemon script 5115d6db24 SVN_SILENT made messages (.desktop file) - always resolve ours
In case of conflict in i18n, keep the version of the branch "ours"
To resolve a particular conflict, "git checkout --ours path/to/file.desktop"
2022-02-05 01:43:36 +00:00
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