Bug#525621: Help for KDE 3 apps no longer works (patch included)
Package: kdelibs
Version: 4:3.5.10.dfsg.1-2
Severity: normal
Tags: patch
Hi,
Now that debian has switched to KDE 4, the standard "Help -> Handbook" menu
entries fail for KDE 3 applications, typically with an error such as
"Could not find service 'khelpcenter'".
If you wish to explicitly reproduce this bug, you can install regina-normal,
run the program regina-kde, and try Help -> Regina Handbook. However, I
expect the same thing will happen for almost any KDE 3 app.
It seems that KDE 4's help centre is indeed able to read KDE 3's docbook
help files; it's just a matter of pointing KDE 3 applications to the
correct help viewer. The ubuntu people fixed this in jaunty by patching
KApplication::invokeHelp() -- the relevant patch is
kubuntu_98_fix_khc_invocation.diff, and I have included it below.
I would be grateful if debian could apply this to its kdelibs packages
also -- this would be a great help for the usability of KDE 3 apps,
by restoring easy access to documentation.
Thanks - Ben.
diff -Nur -x '*.orig' -x '*~' kdelibs-3.5.10.dfsg.1/kdecore/kapplication.cpp kdelibs-3.5.10.dfsg.1.new/kdecore/kapplication.cpp
--- kdelibs-3.5.10.dfsg.1/kdecore/kapplication.cpp 2008-08-19 20:18:18.000000000 +0200
+++ kdelibs-3.5.10.dfsg.1.new/kdecore/kapplication.cpp 2009-01-18 16:25:42.000000000 +0100
@@ -2236,20 +2236,14 @@
url = QString("help:/%1/index.html").arg(appname);
QString error;
- if ( !dcopClient()->isApplicationRegistered("khelpcenter") )
- {
- if (startServiceByDesktopName("khelpcenter", url, &error, 0, 0, startup_id, false))
- {
- if (Tty != kapp->type())
- QMessageBox::critical(kapp->mainWidget(), i18n("Could not Launch Help Center"),
- i18n("Could not launch the KDE Help Center:\n\n%1").arg(error), i18n("&OK"));
- else
- kdWarning() << "Could not launch help:\n" << error << endl;
- return;
- }
- }
- else
- DCOPRef( "khelpcenter", "KHelpCenterIface" ).send( "openUrl", url, startup_id );
+ // TODO this should check if cmd has a .desktop file, and use data from it, together
+ // with sending more ASN data
+ if (kdeinitExec("khelpcenter", url, &error, NULL, startup_id ))
+ if (Tty != kapp->type())
+ QMessageBox::critical(kapp->mainWidget(), i18n("Could not Launch Help Center"),
+ i18n("Could not launch the KDE Help Center:\n\n%1").arg(error), i18n("&OK"));
+ else
+ kdWarning() << "Could not launch help:\n" << error << endl;
}
#endif
Reply to: