aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdriaan de Groot <adridg@FreeBSD.org>2019-10-31 19:25:25 +0000
committerAdriaan de Groot <adridg@FreeBSD.org>2019-10-31 19:25:25 +0000
commit1c7313872980b41150553546dfe9758ad118e2f2 (patch)
treea01a68932af9f016527ca268dab15a6be0dfc595
parent938f7e0e5d79cf5df76b2200d25facfab1b3aa21 (diff)
downloadports-1c7313872980b41150553546dfe9758ad118e2f2.tar.gz
ports-1c7313872980b41150553546dfe9758ad118e2f2.zip
Fix `konsole --new-tab` with patches from upstream.
`konsole --new-tab` is supposed to open a new tab in the current konsole (assuming there's only one konsole open), but it was opening a whole new top-level window instead. Needs patches in dbus services and konsole. Obtained from: Tomaz Canabrava (upstream maintainer)
Notes
Notes: svn path=/head/; revision=516192
-rw-r--r--devel/kf5-kdbusaddons/Makefile1
-rw-r--r--devel/kf5-kdbusaddons/files/patch-src_kdbusservice.cpp23
-rw-r--r--x11/konsole/Makefile1
-rw-r--r--x11/konsole/files/patch-src_main.cpp13
4 files changed, 38 insertions, 0 deletions
diff --git a/devel/kf5-kdbusaddons/Makefile b/devel/kf5-kdbusaddons/Makefile
index 420c77afda43..c271476177e0 100644
--- a/devel/kf5-kdbusaddons/Makefile
+++ b/devel/kf5-kdbusaddons/Makefile
@@ -2,6 +2,7 @@
PORTNAME= kdbusaddons
DISTVERSION= ${KDE_FRAMEWORKS_VERSION}
+PORTREVISION= 1
CATEGORIES= devel kde kde-frameworks
MAINTAINER= kde@FreeBSD.org
diff --git a/devel/kf5-kdbusaddons/files/patch-src_kdbusservice.cpp b/devel/kf5-kdbusaddons/files/patch-src_kdbusservice.cpp
new file mode 100644
index 000000000000..4e3cadceeb7d
--- /dev/null
+++ b/devel/kf5-kdbusaddons/files/patch-src_kdbusservice.cpp
@@ -0,0 +1,23 @@
+diff --git a/src/kdbusservice.cpp b/src/kdbusservice.cpp
+--- src/kdbusservice.cpp
++++ src/kdbusservice.cpp
+@@ -129,6 +130,18 @@
+ } else {
+ d->serviceName += QLatin1Char('-') + QString::number(QCoreApplication::applicationPid());
+ }
++ } else if (options & KDBusService::Unique) {
++ auto reply = bus->registeredServiceNames();
++ if (!reply.isValid()) {
++ return;
++ }
++
++ for (const auto& serviceName : reply.value()) {
++ if (serviceName.startsWith(d->serviceName)) {
++ d->serviceName = serviceName;
++ return;
++ }
++ }
+ }
+ }
+
+
diff --git a/x11/konsole/Makefile b/x11/konsole/Makefile
index e46f8972a3d2..8154e40b94cb 100644
--- a/x11/konsole/Makefile
+++ b/x11/konsole/Makefile
@@ -2,6 +2,7 @@
PORTNAME= konsole
DISTVERSION= ${KDE_APPLICATIONS_VERSION}
+PORTREVISION= 1
CATEGORIES= x11 kde kde-applications # kde kde-applications-applications
MAINTAINER= kde@FreeBSD.org
diff --git a/x11/konsole/files/patch-src_main.cpp b/x11/konsole/files/patch-src_main.cpp
new file mode 100644
index 000000000000..ed28776d6705
--- /dev/null
+++ b/x11/konsole/files/patch-src_main.cpp
@@ -0,0 +1,13 @@
+diff --git a/src/main.cpp b/src/main.cpp
+index 06f3ce491dbf58270ab5df38794903dab002bf39..b477109fd1a6bf4315efe21dcaaf89570fbd392d 100644
+--- src/main.cpp
++++ src/main.cpp
+@@ -167,6 +167,8 @@ extern "C" int Q_DECL_EXPORT kdemain(int argc, char *argv[])
+ if (!Konsole::KonsoleSettings::useSingleInstance()
+ && !parser->isSet(QStringLiteral("new-tab"))) {
+ startupOption = KDBusService::Multiple;
++ } else if (Konsole::KonsoleSettings::useSingleInstance()) {
++ startupOption = KDBusService::Unique;
+ }
+
+ atexit(deleteQApplication);