Commit graph

202 commits

Author SHA1 Message Date
Michael Eden 031b794ec8 Expose 'change colors' through dbus interface
Summary:
This exposes the Okular's functionality of changing the document's colors
through its d-bus interface. This is mainly useful for scripting Okular to
switch to a 'day mode' or 'night mode'.

[Example] Switching themes of two applications with one hotkey:

{F5905771}

Reviewers: #okular, aacid

Reviewed By: #okular, aacid

Subscribers: okular-devel

Tags: #okular

Differential Revision: https://phabricator.kde.org/D13471
2018-06-26 13:05:45 +02:00
Dileep Sankhla 09b7b079ac Option to exit after printing
Summary:
When running okular with the parameter --print to directly open the print mode, it doesn't exit after acknowledging the print dialog. Hence adding --print_and_exit option exits Okular after acknowledging the print dialog and thus is useful for the command line batch processing or a Dolphin service as the issue suggests.

FEATURE: 318998

Test Plan:
1. open a file in Okular using the parameter --print. It will open Okular in print mode with the print dialog
2. Either print the file or cancel the print dialog
3. You will find that Okular stays open
4. Now using this patch, see for available options with the --help parameter. You will find --print_and_exit option
5. Now open a file in Okular using the parameter --print_and_exit. It will open Okular in print mode with the print dialog
6. Either print the file or cancel the print dialog
7. You will find that Okular closes after acknowledging the dialog

Reviewers: aacid, #okular, ngraham

Subscribers: ltoscano, ngraham, aacid, #okular

Tags: #okular

Differential Revision: https://phabricator.kde.org/D10249
2018-03-03 17:36:50 +01:00
Albert Astals Cid 559836c392 Give warnings when the file is modified externally
Summary:
Unfortunately, poppler (the only backed that supports saving) is not able
to save properly if the file is modified by a third party while it is opened

So we give the user a warning saying things went wrong and give him the option
to not reload/close, that way if there was something very important in the annotations
she added she can try to save them (even if by copy&paste the contents to a third program)

Reviewers: rkflx

Reviewed By: rkflx

Subscribers: ngraham, rkflx, ltoscano, #okular

Tags: #okular

Differential Revision: https://phabricator.kde.org/D8863
2017-11-20 14:53:17 +01:00
Albert Astals Cid 19b7e3c112 The work in this branch was sponsored by LiMux
give them some credit in the headers
2017-11-16 09:58:31 +01:00
Albert Astals Cid c14fbe5eb6 Remove SaveAsDontShowWarning
It was only used in tests as a way to "hide" warning dialogs, now we have a proper way to
close them, this way we make sure that dialogs are should when they should not not when they should not
2017-10-30 11:12:00 +01:00
Albert Astals Cid b2673a58b1 When saving a file that had password we will reload it
Also tweak error messages a bit
2017-10-26 18:58:34 +02:00
Albert Astals Cid 54bcb44559 Merge remote-tracking branch 'origin/master' into dont-use-docdata-for-annots-and-forms 2017-10-23 16:03:18 +02:00
Kevin Ottens a5da013a4d Add a "share" menu to Okular
Summary: This is implemented using the Purpose framework.

BUG: 173896

Reviewers: aacid

Subscribers: #okular

Tags: #okular

Differential Revision: https://phabricator.kde.org/D8244
2017-10-18 16:55:21 +02:00
Albert Astals Cid a93661e892 Merge remote-tracking branch 'origin/master' into dont-use-docdata-for-annots-and-forms 2017-09-27 15:01:57 +02:00
Alexey Demennikov a57ffdbd95 added the "remove this bookmark" to bookmarks section
Summary:
**FEATURE**: 357626
Remove bookmark from popup menu added

Reviewers: #okular, aacid

Reviewed By: #okular, aacid

Subscribers: aacid

Tags: #okular

Differential Revision: https://phabricator.kde.org/D7848
2017-09-16 22:15:54 +02:00
Albert Astals Cid 04ed10d3ea Merge remote-tracking branch 'origin/master' into dont-use-docdata-for-annots-and-forms 2017-09-11 19:51:51 +02:00
Albert Astals Cid a6aea95608 Do not start reloading again if we're reloading
If you press and hold F5 we try to reload multiple times, which isn't a nice idea, let's finish one before starting the next
2017-08-31 01:09:32 +02:00
Albert Astals Cid 8ca27ef393 Fix crash when closing
Unregister the part dbus object when it gets destroyed

Also fixes a crash if you try to inspect okular with qdbusviewer after having closed the a part/tab

BUGS: 384142
2017-08-31 00:13:05 +02:00
Albert Astals Cid 3672c3222f Compile++
Meh me for not compiling after doing a minor change
2017-03-23 01:32:48 +01:00
Gilbert Assaf a2aceadc13 Allow to create bookmarks from the TOC
BUGS: 190203
REVIEWS: 129999
2017-03-23 01:22:08 +01:00
Albert Astals Cid 191a37fb52 Q_DECL_OVERRIDE -> override 2017-03-02 20:39:24 +01:00
Aleix Pol c75a2e52d9 Make context menu on a bookmark menu action work again
Solves a todo from porting to kf5

Reviewed by Albert Astals
2016-10-29 12:23:25 +02:00
Olivier CHURLAUD 741c616c7a Port most of part.cpp out of KDELibsSupport
minor: Change header cases : <qicon.h> becomes <QIcon>
2016-07-15 21:14:50 +02:00
Martin T. H. Sandsmark c8e3c0eb01 Port part away from deprecated KArchive methods 2016-07-11 23:52:42 +02:00
Martin T. H. Sandsmark 48d52d9bd1 Add missing override declarations 2016-07-11 22:40:15 +02:00
Martin T. H. Sandsmark 439ced872d Port away from signal/slot keyword
When building okular without kdelibs4support it apparently builds with
-DQT_NO_SIGNALS_SLOTS_KEYWORDS.
2016-07-11 19:34:08 +02:00
Albert Astals Cid 8445660539 Merge remote-tracking branch 'origin/master' into frameworks 2015-10-18 22:29:00 +02:00
Albert Astals Cid ce7f81fc06 Make the sidebar work on widget pointers and not ints
This way we don't need to worry if we add more widgets in the middle
2015-09-16 01:18:17 +02:00
Albert Astals Cid d8f9800d28 Make the drawing tools be actions instead of tool buttons
3 benefits:
 * We can set the shortcut in the edit shortcuts dialog as before
 * Shortcuts can be activated without showing the topbar as before
 * Drawing in the toppbar is exactly as the other actions
2015-08-22 22:17:40 +02:00
Montel Laurent 014b712359 Use explicit. Q_DECL_OVERRIDE 2015-08-18 15:27:20 +02:00
Saheb Preet Singh bf673495fb added layers on the left sidebar 2015-05-27 19:26:56 +05:30
Montel Laurent d780d15ea9 Merge remote-tracking branch 'origin/master' into frameworks
Conflicts:
	autotests/mainshelltest.cpp
	part.cpp
	part.h
	shell/shell.cpp
2015-03-17 08:47:52 +01:00
Saheb Preet Singh 1eafe4feb1 New shortcut to resize window to fit page
FIXED-IN: KDE Applications 15.08
BUGS: 326844
REVIEW: 115283
2015-03-17 00:20:11 +01:00
Jonathan Doman 1cfb007b63 Fix session restore/save with multiple tabs
BUGS: 335852
REVIEW: 122570
2015-03-16 23:55:57 +01:00
Lukáš Tinkl fd6a35486e port KUrl -> QUrl 2015-01-29 20:55:57 +01:00
Montel Laurent 5da7c5f77d port to qCDebug. Autogenerate export headers 2014-10-27 22:35:06 +01:00
Frederik Gladhorn 3581fb6245 Port to QTemporaryFile 2014-09-18 00:30:39 +02:00
Frederik Gladhorn e28dbc6c00 Port to QMime
compressedMimeFor now already does the inheritance check, so another
check was removed.
2014-09-11 16:32:43 +02:00
Fabio D'Urso 8a1acdcd6a Non-blocking docdata/ migration message 2014-09-11 16:12:51 +02:00
Fabio D'Urso ba9491bccd Save dialog: use .okular as default format if there's data that can't be saved natively 2014-09-11 14:32:59 +02:00
Fabio D'Urso 4cfea5e4c4 Added test to check save to native and to .okular features 2014-09-08 16:59:14 +02:00
Fabio D'Urso 288f87f1a5 Merge branch 'master' into dont-use-docdata-for-annots-and-forms
Conflicts:
	core/document.cpp
	core/document_p.h
	part.cpp
	part.h
2014-09-08 14:58:55 +02:00
Frederik Gladhorn b79e706e56 Merge remote-tracking branch 'origin/master' into frameworks
Conflicts:
	generators/dvi/generator_dvi.cpp
	generators/ooo/generator_ooo.cpp
	part.cpp
	shell/main.cpp
	shell/shell.cpp
	shell/shell.h
	shell/shellutils.h
	tests/CMakeLists.txt
	ui/propertiesdialog.cpp
2014-08-14 13:35:43 +02:00
Albert Astals Cid fba90677fc Fine tune mime type detection used for opening files
If the argument mimetype and filepath mimetype disagree, first try to use the filepath mimetype and if that fails use the argument one. On top of that if text/plain is the first, first try with content mimetype since the text backend never fails to open a file

I can now open https://bugs.freedesktop.org/attachment.cgi?id=99508 (which is served as text/plain) and PS files with .txt extension (bug 325044)

REVIEW: 119737
BUGS: 325044
FIXED-IN: 4.14.0
2014-08-13 23:51:48 +02:00
Vishesh Handa 46cf7e46a5 Port away from KUrl::List 2014-08-13 13:07:44 +02:00
Vishesh Handa 077689c4d3 Port KAction and KMenu 2014-08-13 12:45:40 +02:00
Frederik Gladhorn 08840a9168 Remove old KPart factory 2014-08-10 22:02:36 +02:00
Frederik Gladhorn ac15a7075e More QUrl porting 2014-08-10 20:36:41 +02:00
Frederik Gladhorn 0c7a45c7a5 Disable lots of stuff and compile
The text generator is the only one compiled now.
This version links for me but then doesn't find its KPart on startup.

TTS has been completely disabled as well as some other things like the
about dialog.
2014-08-10 14:42:54 +02:00
Frederik Gladhorn 96b0e27c44 QAction, more includes fixed 2014-08-10 01:08:54 +02:00
Frederik Gladhorn 4ce837a7ac Qt5 porting 2014-08-09 21:29:06 +02:00
Fabio D'Urso 6691401ea6 Fix file swapping after saving to a remote URL 2014-05-11 18:52:15 +02:00
Fabio D'Urso 68d5f0af89 Better error handling (ie avoid inconsistencies) in case of reload/swapping errors 2014-05-11 18:52:15 +02:00
Fabio D'Urso 43a3756e1c Hot-swap backing file instead of reloading (if the generator supports it) 2014-05-11 18:52:15 +02:00
Fabio D'Urso 005cf7f082 Load new file instead of the old one after Save As 2014-05-11 18:52:14 +02:00