[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/work/kviewshell-0.7
From:       Stefan Kebekus <kebekus () kde ! org>
Date:       2006-10-05 10:42:09
Message-ID: 1160044929.050784.20032.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 592675 by kebekus:

make --unique work again


 M  +2 -2      doc/kviewshell/kdvi-search.el  
 M  +2 -2      kviewshell/shell/Makefile.am  
 M  +1 -7      kviewshell/shell/kmultipage.cpp  
 M  +1 -5      kviewshell/shell/kmultipage.h  
 D             kviewshell/shell/kmultipageInterface.h  
 M  +1 -1      kviewshell/shell/kviewpart.cpp  
 M  +6 -5      kviewshell/shell/kviewpart.h  
 M  +2 -2      kviewshell/shell/main.cpp  


--- branches/work/kviewshell-0.7/doc/kviewshell/kdvi-search.el #592674:592675
@@ -50,8 +50,8 @@
 	     (dvi-file (concat (file-name-sans-extension master-file) ".dvi"))
 	     ;;; current source file name.
 	     (filename (expand-file-name (buffer-file-name))))
-	(start-process "kdvi"
-		       "kdvi-output" "kdvi" ;;; src-args
+	(start-process "kviewshell"
+		       "kdvi-output" "kviewshell" ;;; src-args
 		      ;;; args for -sourceposition:
 		       "--unique" (concat "file:" dvi-file "#src:" current-line filename)
 		       )))))
--- branches/work/kviewshell-0.7/kviewshell/shell/Makefile.am #592674:592675
@@ -1,5 +1,4 @@
 INCLUDES= $(all_includes)
-include_HEADERS = kmultipageInterface.h
 
 ####### Files
 
@@ -39,6 +38,8 @@
 kviewerpart_la_SOURCES = bookmarkList.cpp \
 	exportDialog.cpp \
 	kviewpart.cpp \
+	kviewpartInterface.cpp \
+	kviewpartInterface.skel \
 	marklist.cpp \
 	presentationwidget.cpp \
 	searchWidget.cpp \
@@ -53,7 +54,6 @@
 
 
 libkmultipage_la_SOURCES = kmultipage.cpp \
-	kmultipageInterface.skel \
 	renderedDocumentPagePrinter.cpp \
 	kvsprefs.kcfgc \
 	kprintDialogPage_pageoptions.cpp
--- branches/work/kviewshell-0.7/kviewshell/shell/kmultipage.cpp #592674:592675
@@ -29,14 +29,8 @@
 
 
 KMultiPage::KMultiPage(QObject* parent, const char* name)
-  : DCOPObject("kmultipage"), KParts::Plugin(parent, name)
+  : KParts::Plugin(parent, name)
 {
-  // For reasons which I don't understand, the initialization of the
-  // DCOPObject above does not work properly, the name is ignored. It
-  // works fine if we repeat the name here. -- Stefan Kebekus
-  // This is because of the virtual inheritance. Get rid of it (but it's BC, and \
                this is a lib...) -- DF
-  setObjId("kmultipage");
-
   parentWdg = 0;
 }
 
--- branches/work/kviewshell-0.7/kviewshell/shell/kmultipage.h #592674:592675
@@ -4,7 +4,6 @@
 
 #include "dataView.h"
 #include "documentRenderer.h"
-#include "kmultipageInterface.h"
 
 #include <kparts/plugin.h>
 #include <kurl.h>
@@ -24,8 +23,7 @@
 @author Wilfried Huss, Stefan Kebekus
 */
 
-// TODO remove virtual inheritance for KDE 4. It's the reason for the strange \
                DCOPObject construction
-class KMultiPage : public KParts::Plugin, public DataView, virtual public \
kmultipageInterface +class KMultiPage : public KParts::Plugin, public DataView
 {
   Q_OBJECT
 
@@ -377,8 +375,6 @@
   /** @brief emit this signal to show a message in the status bar */
   void setStatusBarText(const QString&);
 
-// Interface definition end --------------------------------------------------
-
 protected:
   /** @brief Allocates and initializes a KPrinter structure
 
--- branches/work/kviewshell-0.7/kviewshell/shell/kviewpart.cpp #592674:592675
@@ -68,7 +68,7 @@
 
 KViewPart::KViewPart(QWidget* parentWidget, const char* widgetName, QObject* parent,
                      const char* name, const QStringList& args)
-  : KParts::ReadWritePart(parent, name)
+  : DCOPObject("kviewpartInterface"), KParts::ReadWritePart(parent, name), \
kviewpartInterface(this)  
 {
   //
--- branches/work/kviewshell-0.7/kviewshell/shell/kviewpart.h #592674:592675
@@ -5,6 +5,7 @@
 #include "documentPageCache.h"
 #include "history.h"
 #include "hyperlink.h"
+#include "kviewpartInterface.h"
 #include "marklist.h"
 #include "pageSize.h"
 #include "pageView.h"
@@ -40,7 +41,7 @@
 class TableOfContents;
 
 
-class KViewPart: public KParts::ReadWritePart
+class KViewPart: public KParts::ReadWritePart, virtual public kviewpartInterface
 {
   Q_OBJECT
 
@@ -62,11 +63,11 @@
   KParts::KReadWritePart */
   virtual bool saveFile();
 
-  /** Methods which are associated with the DCOP functionality of the
-     kmultipage. This method can be implemented by the multipage,
-     e.g. to jump to a certain location. */
-  virtual void jumpToReference(const QString& /*reference*/);
+  void jumpToReference(const QString& /*reference*/);
 
+  /* Returns the name of the file loaded. */
+  QString fileName() {return m_file;}
+
 signals:
   void zoomChanged(const QString &);
   void pageChanged(const QString &);
--- branches/work/kviewshell-0.7/kviewshell/shell/main.cpp #592674:592675
@@ -126,7 +126,7 @@
           QDataStream arg(data, IO_WriteOnly);
           bool result;
           arg << qualPath.stripWhiteSpace();
-          if (!app.dcopClient()->call( *it, "kmultipage", "is_file_loaded(QString)", \
data, replyType, replyData)) +          if (!app.dcopClient()->call( *it, \
                "kviewpartInterface", "is_file_loaded(QString)", data, replyType, \
                replyData))
             kdError(kvs::shell) << "There was an error using DCOP." << endl;
           else
           {
@@ -136,7 +136,7 @@
               reply >> result;
               if (result == true)
               {
-                if (app.dcopClient()->send(*it, "kmultipage", \
"jumpToReference(QString)", args->url(0).ref()) == true) +                if \
(app.dcopClient()->send(*it, "kviewpartInterface", "jumpToReference(QString)", \
args->url(0).ref()) == true)  {
                   app.dcopClient()->detach();
                   return 0;


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic