Version: (using KDE KDE 3.0.9) Installed from: Compiled From Sources Compiler: gcc (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7) OS: Linux Steps to reproduce: 1. Open HelpCenter. 2. Access help from any application (HelpCenter will gain focus but it won't change to the help topic for the application -- perhaps it would be much better to open a new instance of HelpCenter).
Oops, it's not even getting focus anymore (this could well be focus policy setting dependent)
Subject: kdebase/khelpcenter CVS commit by raabe: - Show the proper help page for an application even if khelpcenter is already running. CCMAIL:50484-done@bugs.kde.org M +8 -8 application.cpp 1.11 M +7 -7 mainwindow.cpp 1.34 M +3 -0 navigatorappitem.cpp 1.12 --- kdebase/khelpcenter/application.cpp #1.10:1.11 @@ -27,11 +27,5 @@ using namespace KHC; Application::Application() : KUniqueApplication() { - KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); - - KURL url; - if ( args->count() ) - url = args->url( 0 ); - - MainWindow *mainWindow = new MainWindow( url ); + MainWindow *mainWindow = new MainWindow; setMainWidget( mainWindow ); mainWindow->show(); @@ -41,4 +34,11 @@ Application::Application() : KUniqueAppl int Application::newInstance() { + KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); + + KURL url; + if ( args->count() ) + url = args->url( 0 ); + static_cast<MainWindow *>( mainWidget() )->slotOpenURL( url.url() ); + if ( isRestored() ) { RESTORE( MainWindow ); --- kdebase/khelpcenter/mainwindow.cpp #1.33:1.34 @@ -128,10 +128,5 @@ MainWindow::MainWindow(const KURL &url) History::self().installMenuBarHook( this ); - if ( url.isEmpty() ) { - slotShowHome(); - } else { - openURL( url ); - mNavigator->selectItem( url ); - } + slotOpenURL( url.url() ); statusBarMessage(i18n("Ready")); @@ -261,5 +256,10 @@ void MainWindow::statusBarMessage(const void MainWindow::slotOpenURL(const QString &url) { + if ( url.isEmpty() ) { + slotShowHome(); + } else { openURL( KURL( url ) ); + mNavigator->selectItem( url ); + } } --- kdebase/khelpcenter/navigatorappitem.cpp #1.11:1.12 @@ -73,4 +73,7 @@ void NavigatorAppItem::setOpen(bool open void NavigatorAppItem::populate( bool recursive ) { + if ( mPopulated ) + return; + KServiceGroup::Ptr root = KServiceGroup::group(mRelpath); if (!root) {