svn commit: r516192 - in head: devel/kf5-kdbusaddons devel/kf5-kdbusaddons/files x11/konsole x11/konsole/files
Adriaan de Groot
adridg at FreeBSD.org
Thu Oct 31 19:25:26 UTC 2019
Author: adridg
Date: Thu Oct 31 19:25:25 2019
New Revision: 516192
URL: https://svnweb.freebsd.org/changeset/ports/516192
Log:
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)
Added:
head/devel/kf5-kdbusaddons/files/
head/devel/kf5-kdbusaddons/files/patch-src_kdbusservice.cpp (contents, props changed)
head/x11/konsole/files/
head/x11/konsole/files/patch-src_main.cpp (contents, props changed)
Modified:
head/devel/kf5-kdbusaddons/Makefile
head/x11/konsole/Makefile
Modified: head/devel/kf5-kdbusaddons/Makefile
==============================================================================
--- head/devel/kf5-kdbusaddons/Makefile Thu Oct 31 19:12:04 2019 (r516191)
+++ head/devel/kf5-kdbusaddons/Makefile Thu Oct 31 19:25:25 2019 (r516192)
@@ -2,6 +2,7 @@
PORTNAME= kdbusaddons
DISTVERSION= ${KDE_FRAMEWORKS_VERSION}
+PORTREVISION= 1
CATEGORIES= devel kde kde-frameworks
MAINTAINER= kde at FreeBSD.org
Added: head/devel/kf5-kdbusaddons/files/patch-src_kdbusservice.cpp
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/devel/kf5-kdbusaddons/files/patch-src_kdbusservice.cpp Thu Oct 31 19:25:25 2019 (r516192)
@@ -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;
++ }
++ }
+ }
+ }
+
+
Modified: head/x11/konsole/Makefile
==============================================================================
--- head/x11/konsole/Makefile Thu Oct 31 19:12:04 2019 (r516191)
+++ head/x11/konsole/Makefile Thu Oct 31 19:25:25 2019 (r516192)
@@ -2,6 +2,7 @@
PORTNAME= konsole
DISTVERSION= ${KDE_APPLICATIONS_VERSION}
+PORTREVISION= 1
CATEGORIES= x11 kde kde-applications # kde kde-applications-applications
MAINTAINER= kde at FreeBSD.org
Added: head/x11/konsole/files/patch-src_main.cpp
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/x11/konsole/files/patch-src_main.cpp Thu Oct 31 19:25:25 2019 (r516192)
@@ -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);
More information about the svn-ports-head
mailing list