Sophie

Sophie

distrib > Mandriva > 2006.0 > i586 > media > main-src > by-pkgid > a6bc312ce50b5c8d0c51736e58ac32bc > files > 398

kdebase-3.4.2-55mdk.src.rpm

--- kdebase-3.1.2/khelpcenter/mainwindow.cpp--	2003-05-27 11:46:53.000000000 +0200
+++ kdebase-3.1.2/khelpcenter/mainwindow.cpp	2003-05-27 11:51:35.000000000 +0200
@@ -63,7 +63,7 @@ using namespace KHC;
 #include "mainwindow.moc"
 
 MainWindow::MainWindow(const KURL &url)
-    : KMainWindow(0, "MainWindow")
+    : KMainWindow(0, "MainWindow"), DCOPObject( "KHelpCenterIface" )
 {
     QSplitter *splitter = new QSplitter(this);
 
@@ -92,7 +92,7 @@ MainWindow::MainWindow(const KURL &url)
 
     mNavigator = new Navigator( mDoc, splitter, "nav");
     connect(mNavigator, SIGNAL(itemSelected(const QString &)),
-            SLOT(openURL(const QString &)));
+            SLOT(slotOpenURL(const QString &)));
     connect(mNavigator, SIGNAL(glossSelected(const GlossaryEntry &)),
             SLOT(slotGlossSelected(const GlossaryEntry &)));
 
@@ -134,7 +134,7 @@ void MainWindow::setupActions()
                                      SLOT( lastSearch() ),
                                      actionCollection(), "lastsearch" );
     mLastSearchAction->setEnabled( false );
- 
+
     History::self().setupActions( actionCollection() );
 }
 
@@ -158,7 +158,7 @@ void MainWindow::slotOpenURLRequest( con
     kdDebug( 1400 ) << "MainWindow::slotOpenURLRequest(): " << url.url() << endl;
 
     bool own = false;
-    
+
     QString proto = url.protocol().lower();
     if ( proto == "help" || proto == "glossentry" || proto == "about" ||
 	 proto == "man" || proto == "info" || proto == "cgi" )
@@ -169,12 +169,12 @@ void MainWindow::slotOpenURLRequest( con
 	if (res->isValid() && res->accuracy() > 40 && res->mimeType() == html)
 	    own = true;
     }
-    
+
     if (!own) {
 	new KRun( url );
 	return;
     }
-    
+
     stop();
 
     mDoc->browserExtension()->setURLArgs( args );
@@ -205,6 +205,11 @@ void MainWindow::statusBarMessage(const 
 
 void MainWindow::openURL(const QString &url)
 {
+    slotOpenURL( url );
+}
+
+void MainWindow::slotOpenURL(const QString &url)
+{
     openURL( KURL( url ) );
 }
 
--- kdebase-3.1.2/khelpcenter/mainwindow.h--	2003-05-27 11:47:00.000000000 +0200
+++ kdebase-3.1.2/khelpcenter/mainwindow.h	2003-05-27 11:49:52.000000000 +0200
@@ -7,6 +7,8 @@
 #include <kio/job.h>
 #include <kurl.h>
 #include <kparts/browserextension.h>
+#include <dcopclient.h>
+#include <dcopobject.h>
 
 #include "navigator.h"
 #include "glossary.h"
@@ -18,22 +20,23 @@ namespace KHC {
 
 class View;
 
-class MainWindow : public KMainWindow
+class MainWindow : public KMainWindow, public DCOPObject
 {
     Q_OBJECT
+    K_DCOP
   public:
     static KURL homeURL();
 
     MainWindow(const KURL &url = KURL() );
     ~MainWindow();
-
+  k_dcop:
+     void openURL(const QString &url);
   public slots:
     void slotStarted(KIO::Job *job);
     void slotInfoMessage(KIO::Job *, const QString &);
-    void openURL(const QString &url);
-    void slotGlossSelected(const GlossaryEntry &entry);                           
     void slotOpenURLRequest( const KURL &url,
                              const KParts::URLArgs &args);
+    void slotGlossSelected(const GlossaryEntry &entry);
     void documentCompleted();
     void print();
     void statusBarMessage(const QString &m);
--- kdebase-3.1.2/khelpcenter/Makefile.am--	2003-05-27 11:46:47.000000000 +0200
+++ kdebase-3.1.2/khelpcenter/Makefile.am	2003-05-27 11:51:32.000000000 +0200
@@ -27,7 +27,7 @@ libkhelpcenter_common_la_SOURCES = navig
 	infonode.cpp searchwidget.cpp klanguagebutton.cpp searchengine.cpp \
 	docmetainfo.cpp docentrytraverser.cpp searchformatter.cpp \
 	glossary.cpp toc.cpp mainwindow.cpp docentry.cpp htmlsearch.cpp \
-	history.cpp application.cpp searchwidget.skel
+	history.cpp application.cpp searchwidget.skel mainwindow.skel
 
 kcm_helpcenter_la_LDFLAGS = $(KDE_RPATH) -module -avoid-version \
                             $(all_libraries) -no-undefined