diff options
| author | craig <craig@11d20701-8431-0410-a711-e3c959e3b870> | 2012-01-18 21:40:59 +0000 |
|---|---|---|
| committer | craig <craig@11d20701-8431-0410-a711-e3c959e3b870> | 2012-01-18 21:40:59 +0000 |
| commit | 88de2d21f5857354baf6efd80c4103e896d53cbe (patch) | |
| tree | 39ea45e38b6529219ed6d7bfa9e35f134ee14f74 /scribus | |
| parent | ee0934d391fd8bce3702706d8d46deeed48e795f (diff) | |
| download | scribus-88de2d21f5857354baf6efd80c4103e896d53cbe.tar.gz scribus-88de2d21f5857354baf6efd80c4103e896d53cbe.tar.xz scribus-88de2d21f5857354baf6efd80c4103e896d53cbe.zip | |
#4828: Allow undo/redo of moving pages
git-svn-id: svn://scribus.net/branches/Version14x/Scribus@17212 11d20701-8431-0410-a711-e3c959e3b870
Diffstat (limited to 'scribus')
| -rw-r--r-- | scribus/actionmanager.cpp | 6 | ||||
| -rw-r--r-- | scribus/masterpagepalette.cpp | 2 | ||||
| -rw-r--r-- | scribus/pagepalette.cpp | 6 | ||||
| -rw-r--r-- | scribus/plugins/scriptplugin/cmddoc.cpp | 2 | ||||
| -rw-r--r-- | scribus/plugins/scriptplugin/cmdpage.cpp | 2 | ||||
| -rw-r--r-- | scribus/scribus.cpp | 58 | ||||
| -rw-r--r-- | scribus/scribus.h | 12 | ||||
| -rw-r--r-- | scribus/scribusdoc.cpp | 104 | ||||
| -rw-r--r-- | scribus/scribusdoc.h | 13 | ||||
| -rw-r--r-- | scribus/scribusview.cpp | 7 | ||||
| -rw-r--r-- | scribus/scribusview.h | 1 | ||||
| -rw-r--r-- | scribus/undomanager.cpp | 10 | ||||
| -rw-r--r-- | scribus/undomanager.h | 1 |
13 files changed, 141 insertions, 83 deletions
diff --git a/scribus/actionmanager.cpp b/scribus/actionmanager.cpp index adfc5bd..438c2c2 100644 --- a/scribus/actionmanager.cpp +++ b/scribus/actionmanager.cpp @@ -534,9 +534,9 @@ void ActionManager::initPageMenuActions() connect( (*scrActions)["pageInsert"], SIGNAL(triggered()), mainWindow, SLOT(slotNewPageM()) ); connect( (*scrActions)["pageImport"], SIGNAL(triggered()), mainWindow, SLOT(slotPageImport()) ); - connect( (*scrActions)["pageDelete"], SIGNAL(triggered()), mainWindow, SLOT(DeletePage()) ); - connect( (*scrActions)["pageCopy"], SIGNAL(triggered()), mainWindow, SLOT(CopyPage()) ); - connect( (*scrActions)["pageMove"], SIGNAL(triggered()), mainWindow, SLOT(MovePage()) ); + connect( (*scrActions)["pageDelete"], SIGNAL(triggered()), mainWindow, SLOT(deletePage()) ); + connect( (*scrActions)["pageCopy"], SIGNAL(triggered()), mainWindow, SLOT(copyPage()) ); + connect( (*scrActions)["pageMove"], SIGNAL(triggered()), mainWindow, SLOT(movePage()) ); connect( (*scrActions)["pageApplyMasterPage"], SIGNAL(triggered()), mainWindow, SLOT(ApplyMasterPage()) ); connect( (*scrActions)["pageCopyToMasterPage"], SIGNAL(triggered()), mainWindow, SLOT(duplicateToMasterPage()) ); connect( (*scrActions)["pageManageMargins"], SIGNAL(triggered()), mainWindow, SLOT(changePageMargins()) ); diff --git a/scribus/masterpagepalette.cpp b/scribus/masterpagepalette.cpp index 668d5dc..c22a51d 100644 --- a/scribus/masterpagepalette.cpp +++ b/scribus/masterpagepalette.cpp @@ -153,7 +153,7 @@ void MasterPagesPalette::deleteMasterPage() if (currentDoc->appMode == modeEditClip) currentView->requestMode(submodeEndNodeEdit); - currentDoc->scMW()->DeletePage2(currentDoc->MasterNames[sMuster]); + currentDoc->scMW()->deletePage2(currentDoc->MasterNames[sMuster]); //<<CB TODO Move back into ScribusDoc::deleteMasterPage(); //This must happen after the pages have been reformed (view/doc) currentDoc->rebuildMasterNames(); diff --git a/scribus/pagepalette.cpp b/scribus/pagepalette.cpp index 001e2ce..163673e 100644 --- a/scribus/pagepalette.cpp +++ b/scribus/pagepalette.cpp @@ -620,8 +620,8 @@ PagePalette::PagePalette(QWidget* parent) : ScrPaletteBase( parent, "SP", false, connect(this, SIGNAL(EditTemp(QString)), m_scMW, SLOT(manageMasterPages(QString))); connect(pageView, SIGNAL(UseTemp(QString, int)), m_scMW, SLOT(Apply_MasterPage(QString, int))); connect(pageView, SIGNAL(NewPage(int, QString)), m_scMW, SLOT(slotNewPageP(int, QString))); - connect(Trash, SIGNAL(DelPage(int)), m_scMW, SLOT(DeletePage2(int))); - connect(pageView, SIGNAL(DelPage(int)), m_scMW, SLOT(DeletePage2(int))); + connect(Trash, SIGNAL(DelPage(int)), m_scMW, SLOT(deletePage2(int))); + connect(pageView, SIGNAL(DelPage(int)), m_scMW, SLOT(deletePage2(int))); connect(this, SIGNAL(gotoPage(int)), m_scMW, SLOT(selectPagesFromOutlines(int))); } @@ -647,7 +647,7 @@ void PagePalette::deleteMasterPage(QString tmp) int storedViewYCoor = currView->verticalScrollBar()->value(); currView->Doc->setMasterPageMode(true); - currView->Doc->scMW()->DeletePage2(currView->Doc->MasterNames[tmp]); + currView->Doc->scMW()->deletePage2(currView->Doc->MasterNames[tmp]); //<<CB TODO Move back into ScribusDoc::deleteMasterPage(); //This must happen after the pages have been reformed (view/doc) currView->Doc->rebuildMasterNames(); diff --git a/scribus/plugins/scriptplugin/cmddoc.cpp b/scribus/plugins/scriptplugin/cmddoc.cpp index 52187e4..7486357 100644 --- a/scribus/plugins/scriptplugin/cmddoc.cpp +++ b/scribus/plugins/scriptplugin/cmddoc.cpp @@ -360,7 +360,7 @@ PyObject* scribus_deletemasterpage(PyObject* /* self */, PyObject* args) } bool oldMode = ScCore->primaryMainWindow()->doc->masterPageMode(); ScCore->primaryMainWindow()->doc->setMasterPageMode(true); - ScCore->primaryMainWindow()->DeletePage2(ScCore->primaryMainWindow()->doc->MasterNames[masterPageName]); + ScCore->primaryMainWindow()->deletePage2(ScCore->primaryMainWindow()->doc->MasterNames[masterPageName]); ScCore->primaryMainWindow()->doc->setMasterPageMode(oldMode); // Py_INCREF(Py_None); // return Py_None; diff --git a/scribus/plugins/scriptplugin/cmdpage.cpp b/scribus/plugins/scriptplugin/cmdpage.cpp index 52ad3f2..f5361e4 100644 --- a/scribus/plugins/scriptplugin/cmdpage.cpp +++ b/scribus/plugins/scriptplugin/cmdpage.cpp @@ -81,7 +81,7 @@ PyObject *scribus_deletepage(PyObject* /* self */, PyObject* args) PyErr_SetString(PyExc_IndexError, QObject::tr("Page number out of range.","python error").toLocal8Bit().constData()); return NULL; } - ScCore->primaryMainWindow()->DeletePage2(e); + ScCore->primaryMainWindow()->deletePage2(e); // Py_INCREF(Py_None); // return Py_None; Py_RETURN_NONE; diff --git a/scribus/scribus.cpp b/scribus/scribus.cpp index f6c7ea2..1505862 100644 --- a/scribus/scribus.cpp +++ b/scribus/scribus.cpp @@ -5701,10 +5701,7 @@ void ScribusMainWindow::slotNewPageP(int wo, QString templ) else doc->addPageToSection(wo+1, where, 1); doc->changed(); - if (outlinePalette->isVisible()) - outlinePalette->BuildTree(); - pagePalette->rebuildPages(); - view->DrawNew(); + updateGUIAfterPagesChanged(); } /** Erzeugt eine neue Seite */ @@ -5830,11 +5827,8 @@ void ScribusMainWindow::addNewPages(int wo, int where, int numPages, double heig //Use wo, the dialog currently returns a page Index +1 due to old numbering scheme, function now does the -1 as required doc->changed(); doc->addPageToSection(wo, where, numPages); - pagePalette->rebuildPages(); - view->reformPages(mov); - view->DrawNew(); - if (outlinePalette->isVisible()) - outlinePalette->BuildTree(); + doc->reformPages(); + updateGUIAfterPagesChanged(); undoManager->setUndoEnabled(true); @@ -6857,28 +6851,28 @@ void ScribusMainWindow::setItemHoch(int h) } //CB-->Doc partly -void ScribusMainWindow::DeletePage2(int pg) +void ScribusMainWindow::deletePage2(int pg) { if (HaveDoc && doc->appMode == modeEditClip) view->requestMode(submodeEndNodeEdit); view->Deselect(true); if (doc->Pages->count() == 1) return; - DeletePage(pg+1, pg+1); + deletePage(pg+1, pg+1); } -void ScribusMainWindow::DeletePage() +void ScribusMainWindow::deletePage() { if (HaveDoc && doc->appMode == modeEditClip) view->requestMode(submodeEndNodeEdit); view->Deselect(true); DelPages *dia = new DelPages(this, doc->currentPage()->pageNr()+1, doc->Pages->count()); if (dia->exec()) - DeletePage(dia->getFromPage(), dia->getToPage()); + deletePage(dia->getFromPage(), dia->getToPage()); delete dia; } -void ScribusMainWindow::DeletePage(int from, int to) +void ScribusMainWindow::deletePage(int from, int to) { UndoTransaction* activeTransaction = NULL; assert( from > 0 ); @@ -6946,14 +6940,11 @@ void ScribusMainWindow::DeletePage(int from, int to) doc->removePageFromSection(a); } undoManager->setUndoEnabled(false); // ugly hack to disable object moving when undoing page deletion - view->reformPages(); + view->reformPagesView(); undoManager->setUndoEnabled(true); // ugly hack continues view->GotoPage(qMin(doc->Pages->count()-1, oldPg)); - view->DrawNew(); - if (outlinePalette->isVisible()) - outlinePalette->BuildTree(); + updateGUIAfterPagesChanged(); doc->rebuildMasterNames(); - pagePalette->rebuildPages(); pagePalette->rebuildMasters(); if (activeTransaction) { @@ -6963,7 +6954,7 @@ void ScribusMainWindow::DeletePage(int from, int to) } } -void ScribusMainWindow::MovePage() +void ScribusMainWindow::movePage() { if (HaveDoc && doc->appMode == modeEditClip) view->requestMode(submodeEndNodeEdit); @@ -6977,17 +6968,13 @@ void ScribusMainWindow::MovePage() if (from != wo || (wie == 2 && to != signed(doc->Pages->count()) ) ) { doc->movePage(from-1, to, wo-1, wie); - view->reformPages(); - view->DrawNew(); - pagePalette->rebuildPages(); - if (outlinePalette->isVisible()) - outlinePalette->BuildTree(); + updateGUIAfterPagesChanged(); } } delete dia; } -void ScribusMainWindow::CopyPage() +void ScribusMainWindow::copyPage() { if (HaveDoc && doc->appMode == modeEditClip) view->requestMode(submodeEndNodeEdit); @@ -7000,10 +6987,7 @@ void ScribusMainWindow::CopyPage() int wo = dia->getWherePage(); doc->copyPage(pageNumberToCopy, wo, whereToInsert, copyCount); view->Deselect(true); - view->DrawNew(); - pagePalette->rebuildPages(); - if (outlinePalette->isVisible()) - outlinePalette->BuildTree(); + updateGUIAfterPagesChanged(); } delete dia; } @@ -8485,7 +8469,7 @@ void ScribusMainWindow::manageMasterPages(QString temp) storedViewScale = view->scale(); MasterPagesPalette *dia = new MasterPagesPalette(this, doc, view, temp); //connect(dia, SIGNAL(createNew(int)), this, SLOT(slotNewMasterPage(int))); - connect(dia, SIGNAL(removePage(int )), this, SLOT(DeletePage2(int ))); + connect(dia, SIGNAL(removePage(int )), this, SLOT(deletePage2(int ))); //connect(dia, SIGNAL(loadPage(QString, int, bool)), this, SLOT(loadPage(QString, int, bool))); connect(dia, SIGNAL(finished()), this, SLOT(manageMasterPagesEnd())); scrActions["pageInsert"]->setEnabled(false); @@ -8734,7 +8718,7 @@ void ScribusMainWindow::restoreDeletePage(SimpleState *state, bool isUndo) uint id = static_cast<uint>(duo->getUId()); undoManager->replaceObject(doc->Pages->at(pagenr - 1)->getUId(), duo); state->set("DUMMY_ID", id); - DeletePage(pagenr, pagenr); + deletePage(pagenr, pagenr); } if (!pageName.isEmpty() && !oldPageMode) { @@ -8793,7 +8777,7 @@ void ScribusMainWindow::restoreAddPage(SimpleState *state, bool isUndo) if (HaveDoc && doc->appMode == modeEditClip) view->requestMode(submodeEndNodeEdit); view->Deselect(true); - DeletePage(delFrom, delTo); + deletePage(delFrom, delTo); } else { @@ -9834,3 +9818,11 @@ void ScribusMainWindow::enableTextActions(QMap<QString, QPointer<ScrAction> > *a scrMenuMgr->setMenuEnabled("InsertSpace", enabled); scrMenuMgr->setMenuEnabled("InsertLigature", enabled); } + +void ScribusMainWindow::updateGUIAfterPagesChanged() +{ + view->DrawNew(); + pagePalette->rebuildPages(); + if (outlinePalette->isVisible()) + outlinePalette->BuildTree(); +} diff --git a/scribus/scribus.h b/scribus/scribus.h index a9e5f58..37251ae 100644 --- a/scribus/scribus.h +++ b/scribus/scribus.h @@ -376,17 +376,17 @@ public slots: void slotNewPage(int w, const QString& masterPageName=QString::null, bool mov = true); void duplicateToMasterPage(); /** \brief Loescht die aktuelle Seite */ - void DeletePage(); + void deletePage(); /** * \brief Delete pages * @param from First page to delete * @param to Last page to delete */ - void DeletePage(int from, int to); - void DeletePage2(int pg); + void deletePage(int from, int to); + void deletePage2(int pg); /** \brief Verschiebt Seiten */ - void MovePage(); - void CopyPage(); + void movePage(); + void copyPage(); void changePageMargins(); /*! \author Craig Bradney @@ -545,6 +545,8 @@ public slots: void enableTextActions(QMap<QString, QPointer<ScrAction> > *actionMap, bool enabled, const QString& fontName=QString::null); //! \brief allow SE to get the SM for edit stlyes StyleManager *styleMgr() const {return styleManager;}; + //! \brief drawnew, call palettes to update for new page layout + void updateGUIAfterPagesChanged(); signals: void TextStyle(const ParagraphStyle&); diff --git a/scribus/scribusdoc.cpp b/scribus/scribusdoc.cpp index 746eacf..ed2a538 100644 --- a/scribus/scribusdoc.cpp +++ b/scribus/scribusdoc.cpp @@ -1426,8 +1426,10 @@ void ScribusDoc::restore(UndoState* state, bool isUndo) } else if (ss->contains("OLD_MASTERPAGE")) restoreMasterPageApplying(ss, isUndo); - else if (ss->contains("COPY_PAGE")) - restorePageCopy(ss, isUndo); + else if (ss->contains("PAGE_COPY")) + restoreCopyPage(ss, isUndo); + else if (ss->contains("PAGE_MOVE")) + restoreMovePage(ss, isUndo); else if (ss->contains("PAGE_CHANGEPROPS")) { if (isUndo) @@ -1944,40 +1946,90 @@ void ScribusDoc::deletePage(const int pageNumber) setCurrentPage(Pages->at(pageNumber!=0?0:1)); Page* page = Pages->takeAt(pageNumber); delete page; + reformPages(); changed(); } -void ScribusDoc::movePage(const int from, const int to, const int ziel, const int art) +void ScribusDoc::movePage(const int fromPage, const int toPage, const int dest, const int position) { - QList<Page*> Buf; - int zz = ziel; - Buf.clear(); - for (int a = from; a < to; ++a) + QList<Page*> pageList; + int numPages = dest; + for (int i = fromPage; i < toPage; ++i) { - Buf.append(Pages->takeAt(from)); - if (a <= zz) - --zz; + pageList.append(Pages->takeAt(fromPage)); + if (i <= numPages) + --numPages; } - int bufCount=Buf.count(); - switch (art) + int pageListCount=pageList.count(); + switch (position) { - case 0: - for (int b = 0; b < bufCount; ++b) - Pages->insert(zz++, Buf.at(b)); + case 0: //Before Page + for (int j = 0; j < pageListCount; ++j) + Pages->insert(numPages++, pageList.at(j)); break; - case 1: - for (int b = 0; b < bufCount; ++b) - Pages->insert(++zz, Buf.at(b)); + case 1: //After Page + for (int j = 0; j < pageListCount; ++j) + Pages->insert(++numPages, pageList.at(j)); break; - case 2: - for (int b = 0; b < bufCount; ++b) - Pages->append(Buf.at(b)); + case 2: //To End + for (int j = 0; j < pageListCount; ++j) + Pages->append(pageList.at(j)); break; } + + if (UndoManager::undoEnabled()) + { + SimpleState *ss = new SimpleState(Um::MovePage, "", Um::IDocument); + ss->set("PAGE_MOVE", "page_move"); + ss->set("PAGE_MOVE_FROM", fromPage); + ss->set("PAGE_MOVE_TO", toPage); + ss->set("PAGE_MOVE_DEST", dest); + ss->set("PAGE_MOVE_NEWPOS", position); + undoManager->action(this, ss, DocName, Um::IDocument); + } + reformPages(); + if (m_View && m_ScMW ) + { + m_View->reformPagesView(); + m_ScMW->updateGUIAfterPagesChanged(); + } changed(); } +void ScribusDoc::restoreMovePage(SimpleState *state, bool isUndo) +{ + int fromPage = state->getInt("PAGE_MOVE_FROM"); + int toPage = state->getInt("PAGE_MOVE_TO"); + int position = state->getInt("PAGE_MOVE_NEWPOS"); + int dest = state->getInt("PAGE_MOVE_DEST"); + + if (isUndo) + { + int newPageDest=fromPage; + int newPageFrom=0; + int newPageTo =0; + int newPosition=0; + int pagesMoved=toPage-fromPage; + switch (position) + { + case 0: //Before Page + newPageFrom=dest-pagesMoved; + break; + case 1: //After Page + newPageFrom=dest-pagesMoved+1; + break; + case 2: //To End + newPageFrom=Pages->count()-pagesMoved; + break; + } + newPageTo=newPageFrom+pagesMoved; + movePage(newPageFrom, newPageTo, newPageDest, newPosition); + } + else + movePage(fromPage, toPage, dest, position); +} + int ScribusDoc::addAutomaticTextFrame(const int pageNumber) { @@ -3428,7 +3480,7 @@ void ScribusDoc::restoreMasterPageApplying(SimpleState *state, bool isUndo) } -void ScribusDoc::restorePageCopy(SimpleState *state, bool isUndo) +void ScribusDoc::restoreCopyPage(SimpleState *state, bool isUndo) { int pnum = state->getInt("PAGE_NUM"); int extPage = state->getInt("EXISTING_PAGE"); @@ -3444,7 +3496,7 @@ void ScribusDoc::restorePageCopy(SimpleState *state, bool isUndo) destLocation=DocPages.count(); for (int i = 0; i < copyCount; ++i) { - m_ScMW->DeletePage(destLocation, destLocation); + m_ScMW->deletePage(destLocation, destLocation); if (whereTo == 2) --destLocation; } @@ -5078,7 +5130,7 @@ void ScribusDoc::copyPage(int pageNumberToCopy, int existingPage, int whereToIns { UndoTransaction copyTransaction(undoManager->beginTransaction(getUName(), Um::IDocument, Um::CopyPage, "", Um::ICreate)); SimpleState *ss = new SimpleState(Um::Copy, "", Um::ICreate); - ss->set("COPY_PAGE", "copy_page"); + ss->set("PAGE_COPY", "page_copy"); ss->set("PAGE_NUM", pageNumberToCopy); ss->set("EXISTING_PAGE", existingPage); ss->set("WHERE_TO", whereToInsert); @@ -5177,8 +5229,10 @@ void ScribusDoc::copyPage(int pageNumberToCopy, int existingPage, int whereToIns destination->initialMargins.Right = from->initialMargins.Right; } } + reformPages(); // FIXME: stop using m_View - m_View->reformPages(); + if (m_View) + m_View->reformPagesView(); if (itemBuffer.count() > 0) { int lcount = 0; diff --git a/scribus/scribusdoc.h b/scribus/scribusdoc.h index b364469..48ec7b9 100644 --- a/scribus/scribusdoc.h +++ b/scribus/scribusdoc.h @@ -179,12 +179,12 @@ public: void setLocationBasedPageLRMargins(uint pageIndex); /** * @brief Move page(s) within the document - * @param from page index - * @param to page index - * @param ziel target to move to (page index) - * @param art Before, After or at the end + * @param fromPage page index + * @param toPage page index + * @param count target to move to (page index) + * @param position Before, After or at the end */ - void movePage(const int from, const int to, const int ziel, const int art); + void movePage(const int fromPage, const int toPage, const int dest, const int position); /** * @brief Copy a page (pageNumberToCopy) copyCount times, whereToInsert(before or after) the existingPage or at the end. @@ -554,7 +554,8 @@ public: * @brief Undo function for applying a master page */ void restoreMasterPageApplying(SimpleState *state, bool isUndo); - void restorePageCopy(SimpleState *state, bool isUndo); + void restoreCopyPage(SimpleState *state, bool isUndo); + void restoreMovePage(SimpleState *state, bool isUndo); /** * @brief Undo function for grouping/ungrouping */ diff --git a/scribus/scribusview.cpp b/scribus/scribusview.cpp index f4f0226..40a59b5 100644 --- a/scribus/scribusview.cpp +++ b/scribus/scribusview.cpp @@ -2523,7 +2523,7 @@ void ScribusView::setRulerPos(int x, int y) } -//CB This MUST now be called AFTER a call to doc->addPage or doc->addMasterPage as it +//CB This MUST now be called AFTER a call to doc->addOage or doc->addMasterPage as it //does NOT create a page anymore. Page* ScribusView::addPage(int nr, bool mov) { @@ -2555,6 +2555,11 @@ Page* ScribusView::addPage(int nr, bool mov) void ScribusView::reformPages(bool moveObjects) { Doc->reformPages(moveObjects); + reformPagesView(); +} + +void ScribusView::reformPagesView() +{ if (!m_ScMW->scriptIsRunning()) setContentsPos(qRound((Doc->currentPage()->xOffset()-10 - 0*Doc->minCanvasCoordinate.x()) * m_canvas->scale()), qRound((Doc->currentPage()->yOffset()-10 - 0*Doc->minCanvasCoordinate.y()) * m_canvas->scale())); if (!Doc->isLoading()) diff --git a/scribus/scribusview.h b/scribus/scribusview.h index 7e5561c..034b736 100644 --- a/scribus/scribusview.h +++ b/scribus/scribusview.h @@ -167,6 +167,7 @@ public: Page* addPage(int nr, bool mov = true); void reformPages(bool moveObjects = true); + void reformPagesView(); void updateLayerMenu(); void showMasterPage(int nr); void hideMasterPage(); diff --git a/scribus/undomanager.cpp b/scribus/undomanager.cpp index 86550d5..6384908 100644 --- a/scribus/undomanager.cpp +++ b/scribus/undomanager.cpp @@ -931,10 +931,6 @@ void UndoManager::languageChange() UndoManager::EditShape = tr("Edit shape"); UndoManager::ChangeShapeType = tr("Change shape type"); UndoManager::ResetContourLine = tr("Reset contour line"); - UndoManager::AddPage = tr("Add page"); - UndoManager::AddPages = tr("Add pages"); - UndoManager::DeletePage = tr("Delete page"); - UndoManager::DeletePages = tr("Delete pages"); UndoManager::ChangePageProps = tr("Change page properties"); UndoManager::AddLayer = tr("Add layer"); UndoManager::DuplicateLayer = tr("Duplicate layer %1"); @@ -969,7 +965,12 @@ void UndoManager::languageChange() UndoManager::RemoveAllGuides = tr("Remove all guides"); UndoManager::RemoveAllPageGuides = tr("Remove page guides"); UndoManager::Copy = tr("Copy"); + UndoManager::AddPage = tr("Add page"); UndoManager::CopyPage = tr("Copy page"); + UndoManager::DeletePage = tr("Delete page"); + UndoManager::MovePage = tr("Move page"); + UndoManager::AddPages = tr("Add pages"); + UndoManager::DeletePages = tr("Delete pages"); UndoManager::ToOutlines = tr("Convert to outlines"); UndoManager::EditText = tr("Edit text"); UndoManager::ClearImage = tr("Clear image frame content"); @@ -1188,6 +1189,7 @@ QString UndoManager::ClearImage = ""; QString UndoManager::ClearContent = ""; QString UndoManager::LinkTextFrame = ""; QString UndoManager::UnlinkTextFrame = ""; +QString UndoManager::MovePage = ""; /*** Icons for UndoObjects *******************************************/ diff --git a/scribus/undomanager.h b/scribus/undomanager.h index a11ffbf..bdd798f 100644 --- a/scribus/undomanager.h +++ b/scribus/undomanager.h @@ -600,6 +600,7 @@ public: static QString ClearContent; static QString LinkTextFrame; static QString UnlinkTextFrame; + static QString MovePage; /*@}*/ /** |
