[rkward-cvs] [rkward] rkward: Work around the startup-wrapper eating the DESKTOP_STARTUP_ID, instead of passing it to rkward.frontend

Thomas Friedrichsmeier thomas.friedrichsmeier at ruhr-uni-bochum.de
Sat Dec 6 21:58:28 UTC 2014


Git commit 4d411e445cda80357e44b5eb45b23f391eedcc27 by Thomas Friedrichsmeier.
Committed on 06/12/2014 at 21:57.
Pushed by tfry into branch 'master'.

Work around the startup-wrapper eating the DESKTOP_STARTUP_ID, instead of passing it to rkward.frontend

M  +1    -5    rkward/rkward.desktop
M  +2    -0    rkward/rkward_startup_wrapper.cpp

http://commits.kde.org/rkward/4d411e445cda80357e44b5eb45b23f391eedcc27

diff --git a/rkward/rkward.desktop b/rkward/rkward.desktop
index 669af6c..be55546 100644
--- a/rkward/rkward.desktop
+++ b/rkward/rkward.desktop
@@ -23,12 +23,8 @@ Comment[sk]=GUI pre R-project
 Comment[uk]=Графічний інтерфейс проекту R
 Comment[x-test]=xxGUI for the R-projectxx
 Icon=rkward
-Exec=rkward -caption "%c" %i
+Exec=STARTUP_ID_COPY=${DESKTOP_STARTUP_ID} rkward -caption "%c" %i
 Terminal=false
 Type=Application
 X-DocPath=rkward/index.html
 Categories=Qt;KDE;Science;Math;NumericalAnalysis;
-# Startup notification broken, as startup id is not passed to rkward.frontend.
-# It may be possible to fix this in Qt 5.4. See https://git.reviewboard.kde.org/r/121230/
-StartupNotify=false
-# vi: encoding=utf-8
diff --git a/rkward/rkward_startup_wrapper.cpp b/rkward/rkward_startup_wrapper.cpp
index 0307e7a..2a723d5 100644
--- a/rkward/rkward_startup_wrapper.cpp
+++ b/rkward/rkward_startup_wrapper.cpp
@@ -99,6 +99,8 @@ int main (int argc, char *argv[]) {
 	QApplication app (argc, argv);
 	QStringList args = app.arguments ();
 	if (!args.isEmpty ()) args.pop_front ();	// The command itself
+	qputenv ("DESKTOP_STARTUP_ID", qgetenv ("STARTUP_ID_COPY"));	// for startup notifications (set via rkward.desktop)
+	qputenv ("STARTUP_ID_COPY", "");
 
 	// Parse arguments that need handling in the wrapper
 	bool usage = false;





More information about the rkward-tracker mailing list