diff options
| author | Mavridis Philippe <mavridisf@gmail.com> | 2025-04-09 15:31:05 +0300 |
|---|---|---|
| committer | Mavridis Philippe <mavridisf@gmail.com> | 2025-04-14 19:14:53 +0300 |
| commit | 1c42c490993492fd52fbbb79ceba7470778c6275 (patch) | |
| tree | dbdf7af2c364943f70bd079bdcf429943db37995 /kpdf/shell/dcop.h | |
| parent | 8fc0d1697439a9d020a8a7c0deb504b71b20a671 (diff) | |
| download | tdegraphics-1c42c490.tar.gz tdegraphics-1c42c490.zip | |
KPDF Shell: Instances can now be reused
This commit adds support for reusing existing KPDF instances to display externally opened documents in new tabs instead of new windows.
The feature depends on whether the corresponding option is checked and on whether KPDF is invoked with any URLs.
This commit adds a DCOP interface which contains tab-related methods.
Also breakoff tabs are now launched in a new instance instead of creating a new Shell widget in the same app, as this causes problems with the KPDFShellDCOPInterface. As a useful bonus, the new "--new-instance" CLI switch is now available to users and scripts.
Signed-off-by: Mavridis Philippe <mavridisf@gmail.com>
(cherry picked from commit 77ebecd92cef8d8c368ffb9cee3c856888456546)
Diffstat (limited to 'kpdf/shell/dcop.h')
| -rw-r--r-- | kpdf/shell/dcop.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/kpdf/shell/dcop.h b/kpdf/shell/dcop.h new file mode 100644 index 00000000..8b352c97 --- /dev/null +++ b/kpdf/shell/dcop.h @@ -0,0 +1,27 @@ +/*************************************************************************** + * Copyright (C) 2025 by Philippe Mavridis <mavridisf@gmail.com> * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + ***************************************************************************/ + +#ifndef KPDF_SHELL_IFACE_H +#define KPDF_SHELL_IFACE_H + +#include <dcopobject.h> +#include <kurl.h> + +class KPDFShellDCOPIface : virtual public DCOPObject +{ + K_DCOP + + k_dcop: + virtual void openURL(const KURL & url) = 0; + virtual void addTab() = 0; + virtual void removeTab() = 0; + virtual const KURL currentTabURL() = 0; +}; + +#endif // KPDF_SHELL_IFACE_H
\ No newline at end of file |
