Index: src/mainwindowideal.cpp
===================================================================
RCS file: /home/kde/kdevelop/src/mainwindowideal.cpp,v
retrieving revision 1.25
diff -u -3 -p -r1.25 mainwindowideal.cpp
--- src/mainwindowideal.cpp	28 Apr 2003 15:13:45 -0000	1.25
+++ src/mainwindowideal.cpp	8 May 2003 20:43:28 -0000
@@ -59,7 +59,7 @@
 #include "settingswidget.h"
 #include "statusbar.h"
 #include "kpopupmenu.h"
-
+#include "documentationpart.h"
 
 #include "toplevel.h"
 #include "mainwindowshare.h"
@@ -546,8 +546,15 @@ void MainWindowIDEAl::slotBufferSelected
 }
 
 void MainWindowIDEAl::slotPartAdded(KParts::Part* part) {
+    if( !part ) return;
+
+    if( QString(part->name()) == "DocumentationPart" ){
+        connect( part, SIGNAL( fileNameChanged(const KURL&) ),
+                 this, SLOT(slotDocChanged(const KURL&) ) );
+        return;
+    }
 
-    if ( !part || !part->inherits("KTextEditor::Document") )
+    if ( /*!part || */!part->inherits("KTextEditor::Document") )
         return;
 
 //    connect( part, SIGNAL(textChanged()), this, SLOT(slotTextChanged()) );
@@ -626,6 +633,14 @@ void MainWindowIDEAl::slotNewStatus()
             m_tabWidget->changeTab( rw_part->widget(), rw_part->url().fileName() );
         }
     }
+}
+
+void MainWindowIDEAl::slotDocChanged(const KURL& url)
+{
+    QObject * senderobj = const_cast<QObject*>( sender() );
+    DocumentationPart* doc = dynamic_cast<DocumentationPart*>( senderobj );
+    if( !doc ) return;
+    m_tabWidget->changeTab( doc->widget(), url.fileName() );
 }
 
 /* // Disabled until I know it doesn't break anything to remove it
Index: src/mainwindowideal.h
===================================================================
RCS file: /home/kde/kdevelop/src/mainwindowideal.h,v
retrieving revision 1.9
diff -u -3 -p -r1.9 mainwindowideal.h
--- src/mainwindowideal.h	28 Apr 2003 15:13:45 -0000	1.9
+++ src/mainwindowideal.h	8 May 2003 20:43:28 -0000
@@ -99,6 +99,7 @@ private slots:
   void slotPartAdded(KParts::Part*);
 //  void slotTextChanged();
 //  void slotUpdateModifiedFlags();
+  void slotDocChanged(const KURL& url);
   void slotNewStatus();
   void slotBottomTabsChanged();
   void slotRightTabsChanged();
Index: src/documentationpart.h
===================================================================
RCS file: /home/kde/kdevelop/src/documentationpart.h,v
retrieving revision 1.7
diff -u -3 -p -r1.7 documentationpart.h
--- src/documentationpart.h	21 Feb 2003 00:03:24 -0000	1.7
+++ src/documentationpart.h	8 May 2003 20:43:28 -0000
@@ -19,7 +19,7 @@ public:
   static QString resolveEnvVarsInURL(const QString& url);
 
 signals:
-  void fileNameChanged();
+  void fileNameChanged(const KURL& url);
 
 private slots:
  
Index: src/documentationpart.cpp
===================================================================
RCS file: /home/kde/kdevelop/src/documentationpart.cpp,v
retrieving revision 1.12
diff -u -3 -p -r1.12 documentationpart.cpp
--- src/documentationpart.cpp	3 Feb 2003 10:15:40 -0000	1.12
+++ src/documentationpart.cpp	8 May 2003 20:43:28 -0000
@@ -180,6 +180,7 @@ bool DocumentationPart::openURL(const KU
 {
   QString path = resolveEnvVarsInURL(url.url());
   KURL newUrl(path);
+  emit fileNameChanged(newUrl);
   return KHTMLPart::openURL(newUrl);
 }
 
