r16348 by craig - Fix oops in versioning changes

scribus-commit scribus-commit at lists.scribus.net
Sat Feb 12 11:15:39 CET 2011


Author: craig
Date: Sat Feb 12 10:15:38 2011
New Revision: 16348

URL: http://scribus.info/websvn/listing.php?repname=Scribus&sc=1&rev=16348
Log:
Fix oops in versioning changes

Modified:
    trunk/Scribus/CMakeLists.txt
    trunk/Scribus/scribus/CMakeLists.txt
    trunk/Scribus/scribus/canvasmode_edit.cpp
    trunk/Scribus/scribus/prefsstructs.h
    trunk/Scribus/scribus/scribusdoc.cpp
    trunk/Scribus/scribus/scribusdoc.h
    trunk/Scribus/scribus/ui/about.cpp

Modified: trunk/Scribus/CMakeLists.txt
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16348&path=/trunk/Scribus/CMakeLists.txt
==============================================================================
--- trunk/Scribus/CMakeLists.txt (original)
+++ trunk/Scribus/CMakeLists.txt Sat Feb 12 10:15:38 2011
@@ -242,7 +242,7 @@
 ELSE(WANT_VERSIONING)
     SET(SHAREDIR "share/${MAIN_DIR_NAME}/")
 ENDIF(WANT_VERSIONING)
-DEFINITIONS("-DSHAREDIR=\\\"${CMAKE_INSTALL_PREFIX}/${SHAREDIR}\\\"")
+ADD_DEFINITIONS("-DSHAREDIR=\\\"${CMAKE_INSTALL_PREFIX}/${SHAREDIR}\\\"")
 
 #SHARE - use the default on Apple as TAG_VERSION is empty
 IF(WIN32 OR OS2)

Modified: trunk/Scribus/scribus/CMakeLists.txt
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16348&path=/trunk/Scribus/scribus/CMakeLists.txt
==============================================================================
--- trunk/Scribus/scribus/CMakeLists.txt (original)
+++ trunk/Scribus/scribus/CMakeLists.txt Sat Feb 12 10:15:38 2011
@@ -471,6 +471,7 @@
   hnjalloc.c
   hyphen.c
   hyphenator.cpp
+  indexmanager.cpp
   ioapi.c
   KarbonCurveFit.cpp
   langmgr.cpp

Modified: trunk/Scribus/scribus/canvasmode_edit.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16348&path=/trunk/Scribus/scribus/canvasmode_edit.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode_edit.cpp (original)
+++ trunk/Scribus/scribus/canvasmode_edit.cpp Sat Feb 12 10:15:38 2011
@@ -822,6 +822,15 @@
 //	m_view->stopDragTimer();
 	if ((GetItem(&currItem)) && (m->button() == Qt::RightButton) && (!m_doc->DragP))
 	{
+		if (currItem->asTextFrame())
+		{
+			QString rcWord=currItem->itemText.wordAt(currItem->CPos);
+			qDebug()<<rcWord;
+			if (m->modifiers() & Qt::ShiftModifier)
+				m_doc->indexManager()->removeWord(rcWord, currItem->OwnPage);
+			else
+				m_doc->indexManager()->addWord(rcWord, currItem->OwnPage);
+		}
 		createContextMenu(currItem, mousePointDoc.x(), mousePointDoc.y());
 		return;
 	}

Modified: trunk/Scribus/scribus/prefsstructs.h
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16348&path=/trunk/Scribus/scribus/prefsstructs.h
==============================================================================
--- trunk/Scribus/scribus/prefsstructs.h (original)
+++ trunk/Scribus/scribus/prefsstructs.h Sat Feb 12 10:15:38 2011
@@ -16,6 +16,7 @@
 #include <QList>
 #include <QSet>
 #include <QHash>
+#include <QVariant>
 #include "pagestructs.h"
 #include "pdfoptions.h"
 #include "scfonts.h"
@@ -396,6 +397,14 @@
 	int compressionLevel; //!< Cache image compression level (see QImage)
 };
 
+struct IndexPrefs
+{
+	//Index Map
+	//Map of Index Names, containing a Map of words/phrases with a list of page numbers
+	QMap<QString, QMap<QString, QList<int> > > indexMap;
+	QMap<QString, QVariant> indexVMap;
+};
+
 
 struct ApplicationPrefs
 {
@@ -442,6 +451,7 @@
 	//Added for Doc Only
 	DocumentInformation docInfo;
 	DocumentSectionMap docSectionMap;
+	IndexPrefs indexPrefs;
 };
 
 #endif

Modified: trunk/Scribus/scribus/scribusdoc.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16348&path=/trunk/Scribus/scribus/scribusdoc.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusdoc.cpp (original)
+++ trunk/Scribus/scribus/scribusdoc.cpp Sat Feb 12 10:15:38 2011
@@ -368,6 +368,8 @@
 	m_itemsChanged.connectObserver(m_docUpdater);
 	m_pagesChanged.connectObserver(m_docUpdater);
 
+	m_indexManager = new IndexManager(docPrefsData.indexPrefs.indexMap,docPrefsData.indexPrefs.indexVMap);
+
 	PrefsManager *prefsManager = PrefsManager::instance();
 	docPrefsData.colorPrefs.DCMSset = prefsManager->appPrefs.colorPrefs.DCMSset;
 	docPrefsData.pdfPrefs.SolidProf = docPrefsData.colorPrefs.DCMSset.DefaultSolidColorRGBProfile;
@@ -481,6 +483,8 @@
 	m_masterPageMode=true; // quick hack to force the change of pointers in setMasterPageMode();
 	setMasterPageMode(false);
 	addSymbols();
+
+	docPrefsData.indexPrefs.indexMap.insert("Index", QMap<QString, QList<int> >());
 }
 
 

Modified: trunk/Scribus/scribus/scribusdoc.h
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16348&path=/trunk/Scribus/scribus/scribusdoc.h
==============================================================================
--- trunk/Scribus/scribus/scribusdoc.h (original)
+++ trunk/Scribus/scribus/scribusdoc.h Sat Feb 12 10:15:38 2011
@@ -40,6 +40,7 @@
 #include "scribusapi.h"
 #include "colormgmt/sccolormgmtengine.h"
 #include "documentinformation.h"
+#include "indexmanager.h"
 #include "observable.h"
 #include "page.h"
 #include "pageitem.h"
@@ -224,6 +225,9 @@
 	void setSections(DocumentSectionMap dsm) { docPrefsData.docSectionMap=dsm; }
 	const QMap<QString, int> & usedFonts() { return UsedFonts; }
 
+	QMap<QString, QMap<QString, QList<int> > >& indexMap() { return docPrefsData.indexPrefs.indexMap; }
+	IndexManager* indexManager() { return m_indexManager; }
+
 	const ApplicationPrefs& prefsData() { return docPrefsData; }
 	void setNewPrefs(const ApplicationPrefs& prefsData, const ApplicationPrefs& oldPrefsData, bool resizePages, bool resizeMasterPages, bool resizePageMargins, bool resizeMasterPageMargins);
 
@@ -1049,6 +1053,7 @@
 	ScGuardedObject<ScribusDoc> m_guardedObject;
 	Serializer *m_serializer;
 	QString currentEditedSymbol;
+	IndexManager* m_indexManager;
 	
 public: // Public attributes
 	bool is12doc; //public for now, it will be removed later

Modified: trunk/Scribus/scribus/ui/about.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=16348&path=/trunk/Scribus/scribus/ui/about.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/about.cpp (original)
+++ trunk/Scribus/scribus/ui/about.cpp Sat Feb 12 10:15:38 2011
@@ -331,7 +331,7 @@
 		result = tr("Previous Translation Contributors:");
 	else
 	{
-		std::cout << "please add the untranslated title \"" << qPrintable(title) << "\" to About::trAuthorTitle()" << std::endl;
+		std::cout << "please add the untranslated title \"" << qPrintable(title) << "\" to About::trTranslationTitle()" << std::endl;
 		result = title;
 	}
 	return result;




More information about the scribus-commit mailing list