Summary: | Help not displayed for application when helpcenter already open. | ||
---|---|---|---|
Product: | [Applications] khelpcenter | Reporter: | Alan Borgolotto <aborgolotto> |
Component: | general | Assignee: | Cornelius Schumacher <schumacher> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
Alan Borgolotto
2002-11-09 20:11:23 UTC
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) { |