r15407 by craig - 9312: Fix layout option as new and old doc setup were not using the same variable to store this
scribus-commit
scribus-commit at lists.scribus.net
Mon Aug 9 21:49:01 CEST 2010
Author: craig
Date: Mon Aug 9 19:49:01 2010
New Revision: 15407
URL: http://scribus.info/websvn/listing.php?repname=Scribus&sc=1&rev=15407
Log:
9312: Fix layout option as new and old doc setup were not using the same variable to store this
Modified:
trunk/Scribus/scribus/canvasmode.cpp
trunk/Scribus/scribus/plugins/fileloader/scribus12format/scribus12format.cpp
trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format_save.cpp
trunk/Scribus/scribus/plugins/fileloader/scribus13format/scribus13format.cpp
trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
trunk/Scribus/scribus/plugins/scripter/api_document.cpp
trunk/Scribus/scribus/scribus.cpp
trunk/Scribus/scribus/scribusdoc.cpp
trunk/Scribus/scribus/scribusdoc.h
trunk/Scribus/scribus/ui/inspage.cpp
trunk/Scribus/scribus/ui/margindialog.cpp
trunk/Scribus/scribus/ui/masterpagepalette.cpp
trunk/Scribus/scribus/ui/newtemp.cpp
trunk/Scribus/scribus/ui/pagepalette.cpp
trunk/Scribus/scribus/ui/prefs.cpp
trunk/Scribus/scribus/ui/prefs_documentsetup.cpp
trunk/Scribus/scribus/ui/printdialog.cpp
trunk/Scribus/scribus/ui/reformdoc.cpp
trunk/Scribus/scribus/ui/tabdocument.cpp
trunk/Scribus/scribus/ui/tabpdfoptions.cpp
Modified: trunk/Scribus/scribus/canvasmode.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=15407&path=/trunk/Scribus/scribus/canvasmode.cpp
==============================================================================
--- trunk/Scribus/scribus/canvasmode.cpp (original)
+++ trunk/Scribus/scribus/canvasmode.cpp Mon Aug 9 19:49:01 2010
@@ -795,7 +795,7 @@
if ((buttonModifiers & Qt::ShiftModifier) && !(buttonModifiers & Qt::ControlModifier) && !(buttonModifiers & Qt::AltModifier))
pg--;
else
- pg -= m_doc->pageSets()[m_doc->currentPageLayout].Columns;
+ pg -= m_doc->pageSets()[m_doc->pagePositioning()].Columns;
if (pg > -1)
m_view->GotoPage(pg);
}
@@ -811,7 +811,7 @@
if ((buttonModifiers & Qt::ShiftModifier) && !(buttonModifiers & Qt::ControlModifier) && !(buttonModifiers & Qt::AltModifier))
pg++;
else
- pg += m_doc->pageSets()[m_doc->currentPageLayout].Columns;
+ pg += m_doc->pageSets()[m_doc->pagePositioning()].Columns;
if (pg < static_cast<int>(m_doc->Pages->count()))
m_view->GotoPage(pg);
}
Modified: trunk/Scribus/scribus/plugins/fileloader/scribus12format/scribus12format.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=15407&path=/trunk/Scribus/scribus/plugins/fileloader/scribus12format/scribus12format.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus12format/scribus12format.cpp (original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus12format/scribus12format.cpp Mon Aug 9 19:49:01 2010
@@ -281,15 +281,15 @@
m_Doc->setPageOrientation(dc.attribute("ORIENTATION", "0").toInt());
m_Doc->setPageSize(dc.attribute("PAGESIZE"));
m_Doc->FirstPnum = dc.attribute("FIRSTNUM", "1").toInt();
- m_Doc->currentPageLayout=dc.attribute("BOOK", "0").toInt();
+ m_Doc->setPagePositioning(dc.attribute("BOOK", "0").toInt());
int fp;
if (dc.attribute("FIRSTLEFT", "0").toInt() == 1)
fp = 0;
else
fp = 1;
- if (m_Doc->currentPageLayout == 0)
+ if (m_Doc->pagePositioning() == 0)
fp = 0;
- m_Doc->setPageSetFirstPage(m_Doc->currentPageLayout, fp);
+ m_Doc->setPageSetFirstPage(m_Doc->pagePositioning(), fp);
m_Doc->setUsesAutomaticTextFrames(dc.attribute("AUTOTEXT").toInt());
m_Doc->PageSp=dc.attribute("AUTOSPALTEN").toInt();
m_Doc->PageSpa=ScCLocale::toDoubleC(dc.attribute("ABSTSPALTEN"));
Modified: trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=15407&path=/trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp (original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp Mon Aug 9 19:49:01 2010
@@ -268,7 +268,7 @@
{
readDocAttributes(m_Doc, attrs);
layerToSetActive = attrs.valueAsInt("ALAYER", 0);
- if (m_Doc->currentPageLayout == 0)
+ if (m_Doc->pagePositioning() == 0)
firstPage = 0;
else
{
@@ -559,7 +559,7 @@
//Will of course be replaced by per page settings although we still probably need a document default
if (!hasPageSets)
{
- m_Doc->setPageSetFirstPage(m_Doc->currentPageLayout, firstPage);
+ m_Doc->setPageSetFirstPage(m_Doc->pagePositioning(), firstPage);
//->Prefs m_Doc->pageSets[m_Doc->currentPageLayout].FirstPage = firstPage;
// m_Doc->pageSets[m_Doc->currentPageLayout].GapHorizontal = dc.attribute("GapHorizontal", "0").toDouble();
// m_Doc->pageSets[m_Doc->currentPageLayout].GapVertical = 0.0;
@@ -731,7 +731,7 @@
m_Doc->setPageSize(attrs.valueAsString("PAGESIZE"));
m_Doc->setPageOrientation(attrs.valueAsInt("ORIENTATION", 0));
m_Doc->FirstPnum = attrs.valueAsInt("FIRSTNUM", 1);
- m_Doc->currentPageLayout = attrs.valueAsInt("BOOK", 0);
+ m_Doc->setPagePositioning(attrs.valueAsInt("BOOK", 0));
m_Doc->setUsesAutomaticTextFrames( attrs.valueAsInt("AUTOTEXT") );
m_Doc->PageSp = attrs.valueAsInt("AUTOSPALTEN");
@@ -977,7 +977,7 @@
{
//->Prefs doc->pageSets.append(pageS);
doc->appendToPageSets(pageS);
- if ((doc->pageSets().count()-1 == doc->currentPageLayout) && ((doc->pageGapHorizontal() < 0) && (doc->pageGapVertical() < 0)))
+ if ((doc->pageSets().count()-1 == doc->pagePositioning()) && ((doc->pageGapHorizontal() < 0) && (doc->pageGapVertical() < 0)))
{
doc->setPageGapHorizontal(attrs.valueAsDouble("GapHorizontal", 0.0));
doc->setPageGapVertical(attrs.valueAsDouble("GapBelow", 0.0));
Modified: trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format_save.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=15407&path=/trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format_save.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format_save.cpp (original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format_save.cpp Mon Aug 9 19:49:01 2010
@@ -91,7 +91,7 @@
docu.writeAttribute("ORIENTATION" , m_Doc->pageOrientation());
docu.writeAttribute("PAGESIZE" , m_Doc->pageSize());
docu.writeAttribute("FIRSTNUM" , m_Doc->FirstPnum);
- docu.writeAttribute("BOOK" , m_Doc->currentPageLayout);
+ docu.writeAttribute("BOOK" , m_Doc->pagePositioning());
if(m_Doc->usesAutomaticTextFrames())
docu.writeAttribute("AUTOTEXT", 1);
docu.writeAttribute("AUTOSPALTEN" ,m_Doc->PageSp);
Modified: trunk/Scribus/scribus/plugins/fileloader/scribus13format/scribus13format.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=15407&path=/trunk/Scribus/scribus/plugins/fileloader/scribus13format/scribus13format.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus13format/scribus13format.cpp (original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus13format/scribus13format.cpp Mon Aug 9 19:49:01 2010
@@ -248,9 +248,9 @@
m_Doc->setPageSize(dc.attribute("PAGESIZE"));
m_Doc->setPageOrientation(dc.attribute("ORIENTATION", "0").toInt());
m_Doc->FirstPnum = dc.attribute("FIRSTNUM", "1").toInt();
- m_Doc->currentPageLayout=dc.attribute("BOOK", "0").toInt();
+ m_Doc->setPagePositioning(dc.attribute("BOOK", "0").toInt());
int fp;
- if (m_Doc->currentPageLayout == 0)
+ if (m_Doc->pagePositioning() == 0)
fp = 0;
else
{
@@ -261,7 +261,7 @@
}
if (DOC.namedItem("PageSets").isNull())
{
- m_Doc->setPageSetFirstPage(m_Doc->currentPageLayout, fp);
+ m_Doc->setPageSetFirstPage(m_Doc->pagePositioning(), fp);
// m_Doc->pageSets[m_Doc->currentPageLayout].GapHorizontal = dc.attribute("GapHorizontal", "0").toDouble();
// m_Doc->pageSets[m_Doc->currentPageLayout].GapVertical = 0.0;
// m_Doc->pageSets[m_Doc->currentPageLayout].GapBelow = dc.attribute("GapVertical", "40").toDouble();
@@ -479,7 +479,7 @@
}
//->Prefs m_Doc->pageSets.append(pageS);
m_Doc->appendToPageSets(pageS);
- if (m_Doc->pageSets().count()-1 == m_Doc->currentPageLayout)
+ if (m_Doc->pageSets().count()-1 == m_Doc->pagePositioning())
{
m_Doc->setPageGapHorizontal(ScCLocale::toDoubleC(PgsAttr.attribute("GapHorizontal"), 0.0));
m_Doc->setPageGapVertical(ScCLocale::toDoubleC(PgsAttr.attribute("GapBelow"), 0.0));
@@ -1199,7 +1199,7 @@
dc.setAttribute("ORIENTATION",m_Doc->pageOrientation());
dc.setAttribute("PAGESIZE",m_Doc->pageSize());
dc.setAttribute("FIRSTNUM",m_Doc->FirstPnum);
- dc.setAttribute("BOOK", m_Doc->currentPageLayout);
+ dc.setAttribute("BOOK", m_Doc->pagePositioning());
if(m_Doc->usesAutomaticTextFrames())
dc.setAttribute("AUTOTEXT",1);
dc.setAttribute("AUTOSPALTEN",m_Doc->PageSp);
Modified: trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=15407&path=/trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp (original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format.cpp Mon Aug 9 19:49:01 2010
@@ -268,7 +268,7 @@
{
readDocAttributes(m_Doc, attrs);
layerToSetActive = attrs.valueAsInt("ALAYER", 0);
- if (m_Doc->currentPageLayout == 0)
+ if (m_Doc->pagePositioning() == 0)
firstPage = 0;
else
{
@@ -570,7 +570,7 @@
//Will of course be replaced by per page settings although we still probably need a document default
if (!hasPageSets)
{
- m_Doc->setPageSetFirstPage(m_Doc->currentPageLayout, firstPage);
+ m_Doc->setPageSetFirstPage(m_Doc->pagePositioning(), firstPage);
//->Prefs m_Doc->pageSets[m_Doc->currentPageLayout].FirstPage = firstPage;
// m_Doc->pageSets[m_Doc->currentPageLayout].GapHorizontal = dc.attribute("GapHorizontal", "0").toDouble();
// m_Doc->pageSets[m_Doc->currentPageLayout].GapVertical = 0.0;
@@ -736,7 +736,7 @@
m_Doc->setPageSize(attrs.valueAsString("PAGESIZE"));
m_Doc->setPageOrientation(attrs.valueAsInt("ORIENTATION", 0));
m_Doc->FirstPnum = attrs.valueAsInt("FIRSTNUM", 1);
- m_Doc->currentPageLayout = attrs.valueAsInt("BOOK", 0);
+ m_Doc->setPagePositioning(attrs.valueAsInt("BOOK", 0));
m_Doc->setUsesAutomaticTextFrames( attrs.valueAsInt("AUTOTEXT") );
m_Doc->PageSp = attrs.valueAsInt("AUTOSPALTEN");
@@ -982,7 +982,7 @@
{
// doc->pageSets.append(pageS);
doc->appendToPageSets(pageS);
- if ((doc->pageSets().count()-1 == doc->currentPageLayout) && ((doc->pageGapHorizontal() < 0) && (doc->pageGapVertical() < 0)))
+ if ((doc->pageSets().count()-1 == doc->pagePositioning()) && ((doc->pageGapHorizontal() < 0) && (doc->pageGapVertical() < 0)))
{
doc->setPageGapHorizontal(attrs.valueAsDouble("GapHorizontal", 0.0));
doc->setPageGapVertical(attrs.valueAsDouble("GapBelow", 0.0));
Modified: trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=15407&path=/trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp (original)
+++ trunk/Scribus/scribus/plugins/fileloader/scribus150format/scribus150format_save.cpp Mon Aug 9 19:49:01 2010
@@ -94,7 +94,7 @@
docu.writeAttribute("ORIENTATION" , m_Doc->pageOrientation());
docu.writeAttribute("PAGESIZE" , m_Doc->pageSize());
docu.writeAttribute("FIRSTNUM" , m_Doc->FirstPnum);
- docu.writeAttribute("BOOK" , m_Doc->currentPageLayout);
+ docu.writeAttribute("BOOK" , m_Doc->pagePositioning());
if(m_Doc->usesAutomaticTextFrames())
docu.writeAttribute("AUTOTEXT", 1);
docu.writeAttribute("AUTOSPALTEN" ,m_Doc->PageSp);
Modified: trunk/Scribus/scribus/plugins/scripter/api_document.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=15407&path=/trunk/Scribus/scribus/plugins/scripter/api_document.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/scripter/api_document.cpp (original)
+++ trunk/Scribus/scribus/plugins/scripter/api_document.cpp Mon Aug 9 19:49:01 2010
@@ -274,7 +274,7 @@
void Margins::set(double lr, double tpr, double btr, double rr)
{
MarginStruct margins(tpr, lr, btr, rr);
- ScCore->primaryMainWindow()->doc->resetPage(ScCore->primaryMainWindow()->doc->currentPageLayout, &margins);
+ ScCore->primaryMainWindow()->doc->resetPage(ScCore->primaryMainWindow()->doc->pagePositioning(), &margins);
ScCore->primaryMainWindow()->view->reformPages();
ScCore->primaryMainWindow()->doc->setModified(true);
ScCore->primaryMainWindow()->view->GotoPage(ScCore->primaryMainWindow()->doc->currentPageNumber());
Modified: trunk/Scribus/scribus/scribus.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=15407&path=/trunk/Scribus/scribus/scribus.cpp
==============================================================================
--- trunk/Scribus/scribus/scribus.cpp (original)
+++ trunk/Scribus/scribus/scribus.cpp Mon Aug 9 19:49:01 2010
@@ -1378,7 +1378,7 @@
if ((buttonModifiers & Qt::ShiftModifier) && !(buttonModifiers & Qt::ControlModifier) && !(buttonModifiers & Qt::AltModifier))
pg--;
else
- pg -= doc->pageSets()[doc->currentPageLayout].Columns;
+ pg -= doc->pageSets()[doc->pagePositioning()].Columns;
if (pg > -1)
view->GotoPage(pg);
}
@@ -1394,7 +1394,7 @@
if ((buttonModifiers & Qt::ShiftModifier) && !(buttonModifiers & Qt::ControlModifier) && !(buttonModifiers & Qt::AltModifier))
pg++;
else
- pg += doc->pageSets()[doc->currentPageLayout].Columns;
+ pg += doc->pageSets()[doc->pagePositioning()].Columns;
if (pg < static_cast<int>(doc->Pages->count()))
view->GotoPage(pg);
}
@@ -5424,7 +5424,7 @@
ss->set("BASED", basedOn->join("|"));
else
{
- int setcol = doc->pageSets()[doc->currentPageLayout].Columns;
+ int setcol = doc->pageSets()[doc->pagePositioning()].Columns;
if (setcol == 1)
ss->set("BASED", CommonStrings::trMasterPageNormal);
else if (setcol == 2)
@@ -5446,7 +5446,7 @@
QStringList base;
if (basedOn == NULL)
{
- int setcol = doc->pageSets()[doc->currentPageLayout].Columns;
+ int setcol = doc->pageSets()[doc->pagePositioning()].Columns;
if (setcol == 1)
base.append( CommonStrings::trMasterPageNormal);
else if (setcol == 2)
@@ -5480,7 +5480,7 @@
view->updatesOn(false);
for (cc = 0; cc < numPages; ++cc)
{
- slotNewPage(wot, base[(wot+doc->pageSets()[doc->currentPageLayout].FirstPage) % doc->pageSets()[doc->currentPageLayout].Columns], mov); //Avoid the master page application with QString::null
+ slotNewPage(wot, base[(wot+doc->pageSets()[doc->pagePositioning()].FirstPage) % doc->pageSets()[doc->pagePositioning()].Columns], mov); //Avoid the master page application with QString::null
// slotNewPage(wot, QString::null, mov); //Avoid the master page application with QString::null
//CB: #8212: added overrideMasterPageSizing, but keeping default to true for other calls for now, off for calls from InsPage
if (overrideMasterPageSizing)
@@ -5539,11 +5539,11 @@
view->Deselect(true);
int pageLocationIndex=-1;
int pageLocationCount=0;
- if (doc->currentPageLayout != singlePage)
+ if (doc->pagePositioning() != singlePage)
{
QStringList locationEntries;
QList<PageSet> pageSet(doc->pageSets());
- for(QStringList::Iterator pNames = pageSet[doc->currentPageLayout].pageNames.begin(); pNames != pageSet[doc->currentPageLayout].pageNames.end(); ++pNames )
+ for(QStringList::Iterator pNames = pageSet[doc->pagePositioning()].pageNames.begin(); pNames != pageSet[doc->pagePositioning()].pageNames.end(); ++pNames )
{
locationEntries << CommonStrings::translatePageSetLocString(*pNames);
}
@@ -5551,7 +5551,7 @@
pageLocationCount=locationEntries.count();
}
- CopyPageToMasterPageDialog copyDialog(doc->MasterNames.count(), doc->pageSets()[doc->currentPageLayout].pageNames, pageLocationIndex, this);
+ CopyPageToMasterPageDialog copyDialog(doc->MasterNames.count(), doc->pageSets()[doc->pagePositioning()].pageNames, pageLocationIndex, this);
if (copyDialog.exec())
{
bool copyFromMaster=false;
@@ -6741,7 +6741,7 @@
if (doc->masterPageMode())
{
int lp=0;
- if (doc->currentPageLayout != singlePage)
+ if (doc->pagePositioning() != singlePage)
lp = dia->pageOrder();
doc->changePageMargins(dia->top(), dia->bottom(),
dia->left(), dia->right(),
Modified: trunk/Scribus/scribus/scribusdoc.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=15407&path=/trunk/Scribus/scribus/scribusdoc.cpp
==============================================================================
--- trunk/Scribus/scribus/scribusdoc.cpp (original)
+++ trunk/Scribus/scribus/scribusdoc.cpp Mon Aug 9 19:49:01 2010
@@ -187,7 +187,6 @@
Items(0), MasterItems(), DocItems(), FrameItems(),
m_Selection(new Selection(this, true)),
PageSp(1), PageSpa(0),
- currentPageLayout(0),
FirstPnum(1),
useRaster(false),
PageColors(this, true),
@@ -236,6 +235,7 @@
docUnitRatio=unitGetRatioFromIndex(docPrefsData.docSetupPrefs.docUnitIndex);
docPrefsData.docSetupPrefs.pageHeight=0;
docPrefsData.docSetupPrefs.pageWidth=0;
+ docPrefsData.docSetupPrefs.pagePositioning=0;
maxCanvasCoordinate=(FPoint(docPrefsData.displayPrefs.scratch.Left + docPrefsData.displayPrefs.scratch.Right, docPrefsData.displayPrefs.scratch.Top + docPrefsData.displayPrefs.scratch.Bottom)),
init();
docPrefsData.pdfPrefs.bleeds = docPrefsData.docSetupPrefs.bleeds;
@@ -272,7 +272,6 @@
Items(0), MasterItems(), DocItems(), FrameItems(),
m_Selection(new Selection(this, true)),
PageSp(pagesSetup.columnCount), PageSpa(pagesSetup.columnDistance),
- currentPageLayout(pagesSetup.pageArrangement),
FirstPnum(pagesSetup.firstPageNumber),
useRaster(false),
PageColors(this, true),
@@ -329,6 +328,7 @@
docPrefsData.pdfPrefs.bleeds = docPrefsData.docSetupPrefs.bleeds;
docPrefsData.pdfPrefs.useDocBleeds = true;
docPrefsData.docSetupPrefs.pageOrientation=pagesSetup.orientation;
+ docPrefsData.docSetupPrefs.pagePositioning=pagesSetup.pageArrangement;
Print_Options.firstUse = true;
}
@@ -564,7 +564,7 @@
docPrefsData.docSetupPrefs.pageOrientation = orientation;
docPrefsData.docSetupPrefs.pageSize = defaultPageSize;
FirstPnum = firstPageNumber;
- currentPageLayout = fp;
+ docPrefsData.docSetupPrefs.pagePositioning = fp;
setName(documentName);
HasCMS = false;
if (!pdfOptions().UseLPI)
@@ -1479,7 +1479,7 @@
docPrefsData.docSetupPrefs.margins.set(t, l, b ,r);
PageSp = sp;
PageSpa = ab;
- currentPageLayout = fp;
+ docPrefsData.docSetupPrefs.pagePositioning = fp;
automaticTextFrames = atf;
//CB Moved from scribus.cpp. Overrides the defaults...
@@ -1493,7 +1493,7 @@
{
if (newMargins!=0)
docPrefsData.docSetupPrefs.margins = *newMargins;
- currentPageLayout = fp;
+ docPrefsData.docSetupPrefs.pagePositioning = fp;
}
@@ -3357,7 +3357,7 @@
Ap->initialMargins.Top = Mp->Margins.Top;
Ap->initialMargins.Bottom = Mp->Margins.Bottom;
- if (pageSets()[currentPageLayout].Columns == 1)
+ if (pageSets()[docPrefsData.docSetupPrefs.pagePositioning].Columns == 1)
{
Ap->initialMargins.Left = Mp->Margins.Left;
Ap->initialMargins.Right = Mp->Margins.Right;
@@ -3619,7 +3619,7 @@
setLoading(true);
targetPage->copySizingProperties(sourcePage, sourcePage->Margins);
//Grab the left page setting for the current document layout from the dialog, and increment, singlePage==1 remember.
- if (currentPageLayout != singlePage)
+ if (docPrefsData.docSetupPrefs.pagePositioning != singlePage)
{
int lp = leftPage;
if (lp == 0)
@@ -4892,7 +4892,7 @@
{
QMap<uint, oldPageVar> pageTable;
struct oldPageVar oldPg;
- int counter = pageSets()[currentPageLayout].FirstPage;
+ int counter = pageSets()[docPrefsData.docSetupPrefs.pagePositioning].FirstPage;
int rowcounter = 0;
double maxYPos=0.0, maxXPos=0.0;
double currentXPos=docPrefsData.displayPrefs.scratch.Left, currentYPos=docPrefsData.displayPrefs.scratch.Top, lastYPos=Pages->at(0)->initialHeight();
@@ -4919,7 +4919,7 @@
Seite->Margins.Right = Seite->initialMargins.Right;
Seite->Margins.Left = Seite->initialMargins.Left;
}
- else if ((Seite->LeftPg > 1) && (Seite->LeftPg < pageSets()[currentPageLayout].Columns))
+ else if ((Seite->LeftPg > 1) && (Seite->LeftPg < pageSets()[docPrefsData.docSetupPrefs.pagePositioning].Columns))
{
Seite->Margins.Left = Seite->initialMargins.Left;
Seite->Margins.Right = Seite->initialMargins.Left;
@@ -4936,7 +4936,7 @@
Seite->setHeight(Seite->initialHeight());
Seite->setXOffset(currentXPos);
Seite->setYOffset(currentYPos);
- if (counter < pageSets()[currentPageLayout].Columns-1)
+ if (counter < pageSets()[docPrefsData.docSetupPrefs.pagePositioning].Columns-1)
{
// currentXPos += Seite->width() + pageSets[currentPageLayout].GapHorizontal;
currentXPos += Seite->width() + docPrefsData.displayPrefs.pageGapHorizontal;
@@ -4955,7 +4955,7 @@
else
{
currentXPos = docPrefsData.displayPrefs.scratch.Left;
- if (pageSets()[currentPageLayout].Columns > 1)
+ if (pageSets()[docPrefsData.docSetupPrefs.pagePositioning].Columns > 1)
currentYPos += qMax(lastYPos, Seite->height())+docPrefsData.displayPrefs.pageGapVertical;
// currentYPos += qMax(lastYPos, Seite->height())+pageSets[currentPageLayout].GapVertical;
else
@@ -4967,11 +4967,11 @@
Seite->Margins.Left = Seite->initialMargins.Left;
}
counter++;
- if (counter > pageSets()[currentPageLayout].Columns-1)
+ if (counter > pageSets()[docPrefsData.docSetupPrefs.pagePositioning].Columns-1)
{
counter = 0;
rowcounter++;
- if (rowcounter > pageSets()[currentPageLayout].Rows-1)
+ if (rowcounter > pageSets()[docPrefsData.docSetupPrefs.pagePositioning].Rows-1)
{
// currentYPos += GapVertical;
// currentYPos += pageSets[currentPageLayout].GapBelow;
@@ -5067,7 +5067,7 @@
{
bleedData.Bottom = baseValues.Bottom;
bleedData.Top = baseValues.Top;
- if (pageSets()[currentPageLayout].Columns == 1)
+ if (pageSets()[docPrefsData.docSetupPrefs.pagePositioning].Columns == 1)
{
bleedData.Right = baseValues.Right;
bleedData.Left = baseValues.Left;
@@ -5613,7 +5613,7 @@
//TODO make a fucntion to do this margin stuff and use elsewhere too
destination->initialMargins.Top = from->initialMargins.Top;
destination->initialMargins.Bottom = from->initialMargins.Bottom;
- if (pageSets()[currentPageLayout].Columns == 1)
+ if (pageSets()[docPrefsData.docSetupPrefs.pagePositioning].Columns == 1)
{
destination->initialMargins.Left = from->initialMargins.Left;
destination->initialMargins.Right = from->initialMargins.Right;
@@ -5687,7 +5687,7 @@
void ScribusDoc::setLocationBasedPageLRMargins(const uint pageIndex)
{
- int setcol=pageSets()[currentPageLayout].Columns;
+ int setcol=pageSets()[docPrefsData.docSetupPrefs.pagePositioning].Columns;
if (setcol==1)
{
Page* pageToAdjust=DocPages.at(pageIndex);
@@ -5777,7 +5777,7 @@
int myCol=columnOfPage(pageIndex);
if (myCol==0) //Left hand page
return LeftPage;
- else if (myCol>= pageSets()[currentPageLayout].Columns-1) // Right hand page
+ else if (myCol>= pageSets()[docPrefsData.docSetupPrefs.pagePositioning].Columns-1) // Right hand page
return RightPage;
else //Middle pages
return MiddlePage;
@@ -5785,8 +5785,8 @@
int ScribusDoc::columnOfPage(int pageIndex) const
{
- int setcol=pageSets()[currentPageLayout].Columns;
- return ((pageIndex % setcol) + pageSets()[currentPageLayout].FirstPage) % setcol;
+ int setcol=pageSets()[docPrefsData.docSetupPrefs.pagePositioning].Columns;
+ return ((pageIndex % setcol) + pageSets()[docPrefsData.docSetupPrefs.pagePositioning].FirstPage) % setcol;
}
@@ -10596,7 +10596,7 @@
void ScribusDoc::createDefaultMasterPages()
{
- int setcol = pageSets()[currentPageLayout].Columns;
+ int setcol = pageSets()[docPrefsData.docSetupPrefs.pagePositioning].Columns;
if (setcol == 1)
{
addMasterPage(0, CommonStrings::trMasterPageNormal);
@@ -10632,7 +10632,7 @@
void ScribusDoc::createNewDocPages(int pageCount)
{
- int setcol = pageSets()[currentPageLayout].Columns;
+ int setcol = pageSets()[docPrefsData.docSetupPrefs.pagePositioning].Columns;
int createCount=qMax(pageCount,1);
if (setcol == 1)
{
Modified: trunk/Scribus/scribus/scribusdoc.h
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=15407&path=/trunk/Scribus/scribus/scribusdoc.h
==============================================================================
--- trunk/Scribus/scribus/scribusdoc.h (original)
+++ trunk/Scribus/scribus/scribusdoc.h Mon Aug 9 19:49:01 2010
@@ -200,6 +200,8 @@
void setCurCheckProfile(const QString& s) { docPrefsData.verifierPrefs.curCheckProfile=s; }
int pageOrientation() const { return docPrefsData.docSetupPrefs.pageOrientation; }
void setPageOrientation(int o) { docPrefsData.docSetupPrefs.pageOrientation=o; }
+ int pagePositioning() const { return docPrefsData.docSetupPrefs.pagePositioning; }
+ void setPagePositioning(int p) { docPrefsData.docSetupPrefs.pagePositioning=p; }
double pageHeight() const { return docPrefsData.docSetupPrefs.pageHeight; }
double pageWidth() const { return docPrefsData.docSetupPrefs.pageWidth; }
const QString& pageSize() const { return docPrefsData.docSetupPrefs.pageSize; }
@@ -1059,8 +1061,8 @@
double PageSp;
/** \brief Distance of Columns */
double PageSpa;
- /** \brief current Pagelayout */
- int currentPageLayout;
+ ///** \brief current Pagelayout */
+ //int currentPageLayout;
/** \brief Erste Seitennummer im Dokument */
int FirstPnum;
/** \brief Flag fuer Rasterbenutzung */
Modified: trunk/Scribus/scribus/ui/inspage.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=15407&path=/trunk/Scribus/scribus/ui/inspage.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/inspage.cpp (original)
+++ trunk/Scribus/scribus/ui/inspage.cpp Mon Aug 9 19:49:01 2010
@@ -69,7 +69,7 @@
masterPageLayout->setAlignment( Qt::AlignTop );
masterPageLayout->setSpacing( 5 );
masterPageLayout->setMargin( 5 );
- if (currentDoc->currentPageLayout == 0)
+ if (currentDoc->pagePositioning() == 0)
{
QComboBox* pageData = new QComboBox(masterPageGroup);
for (QMap<QString,int>::Iterator it = currentDoc->MasterNames.begin(); it != currentDoc->MasterNames.end(); ++it)
@@ -85,7 +85,7 @@
else
{
int row = 0;
- for (int mp = 0; mp < currentDoc->pageSets()[currentDoc->currentPageLayout].pageNames.count(); ++mp)
+ for (int mp = 0; mp < currentDoc->pageSets()[currentDoc->pagePositioning()].pageNames.count(); ++mp)
{
QComboBox* pageData = new QComboBox(masterPageGroup);
// for (QMap<QString,int>::Iterator it = currentDoc->MasterNames.begin(); it != currentDoc->MasterNames.end(); ++it)
@@ -108,7 +108,7 @@
}
else if (mp == 1)
{
- if (currentDoc->pageSets()[currentDoc->currentPageLayout].pageNames.count() > 2)
+ if (currentDoc->pageSets()[currentDoc->pagePositioning()].pageNames.count() > 2)
{
bool conNam = currentDoc->MasterNames.contains( CommonStrings::trMasterPageNormalMiddle);
for (QMap<QString,int>::Iterator it = currentDoc->MasterNames.begin(); it != currentDoc->MasterNames.end(); ++it)
@@ -143,7 +143,7 @@
}
else if (mp == 2)
{
- if (currentDoc->pageSets()[currentDoc->currentPageLayout].pageNames.count() > 3)
+ if (currentDoc->pageSets()[currentDoc->pagePositioning()].pageNames.count() > 3)
{
bool conNam = currentDoc->MasterNames.contains( CommonStrings::trMasterPageNormalMiddle);
for (QMap<QString,int>::Iterator it = currentDoc->MasterNames.begin(); it != currentDoc->MasterNames.end(); ++it)
@@ -192,7 +192,7 @@
if (currentDoc->MasterNames.contains( CommonStrings::trMasterPageNormalRight))
setCurrentComboItem(pageData, CommonStrings::trMasterPageNormalRight);
}
- QString transLabel = currentDoc->pageSets()[currentDoc->currentPageLayout].pageNames[mp];
+ QString transLabel = currentDoc->pageSets()[currentDoc->pagePositioning()].pageNames[mp];
QLabel* pageLabel = new QLabel(CommonStrings::translatePageSetLocString(transLabel), masterPageGroup);
pageLabel->setBuddy(pageData);
masterPageLayout->addWidget(pageLabel, row, 0 );
Modified: trunk/Scribus/scribus/ui/margindialog.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=15407&path=/trunk/Scribus/scribus/ui/margindialog.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/margindialog.cpp (original)
+++ trunk/Scribus/scribus/ui/margindialog.cpp Mon Aug 9 19:49:01 2010
@@ -88,14 +88,14 @@
moveObjects->setChecked( true );
dsGroupBox7Layout->addWidget( moveObjects, 3, 0, 1, 4 );
Links=0;
- if ((doc->currentPageLayout != singlePage) && (doc->masterPageMode()))
+ if ((doc->pagePositioning() != singlePage) && (doc->masterPageMode()))
{
TextLabel3 = new QLabel( tr( "Type:" ), dsGroupBox7 );
dsGroupBox7Layout->addWidget( TextLabel3, 4, 0, 1, 2 );
Links = new QComboBox( dsGroupBox7 );
QStringList::Iterator pNames;
QList<PageSet> pageSet(doc->pageSets());
- for(pNames = pageSet[doc->currentPageLayout].pageNames.begin(); pNames != pageSet[doc->currentPageLayout].pageNames.end(); ++pNames )
+ for(pNames = pageSet[doc->pagePositioning()].pageNames.begin(); pNames != pageSet[doc->pagePositioning()].pageNames.end(); ++pNames )
{
//Links->insertItem((*pNames));
Links->addItem(CommonStrings::translatePageSetLocString((*pNames)));
@@ -113,7 +113,7 @@
GroupRand = new MarginWidget(this, tr( "Margin Guides" ), &doc->currentPage()->initialMargins, doc->unitIndex(), false, false);
GroupRand->setPageWidthHeight(doc->currentPage()->width(), doc->currentPage()->height());
- GroupRand->setFacingPages(!(doc->currentPageLayout == singlePage), doc->locationOfPage(doc->currentPage()->pageNr()));
+ GroupRand->setFacingPages(!(doc->pagePositioning() == singlePage), doc->locationOfPage(doc->currentPage()->pageNr()));
GroupRand->setMarginPreset(doc->currentPage()->marginPreset);
dialogLayout->addWidget( GroupRand );
Modified: trunk/Scribus/scribus/ui/masterpagepalette.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=15407&path=/trunk/Scribus/scribus/ui/masterpagepalette.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/masterpagepalette.cpp (original)
+++ trunk/Scribus/scribus/ui/masterpagepalette.cpp Mon Aug 9 19:49:01 2010
@@ -209,7 +209,7 @@
int nr = currentDoc->Pages->count();
Page* from = currentDoc->Pages->at(inde);
Page* destination = currentDoc->addMasterPage(nr, MasterPageName);
- if (currentDoc->currentPageLayout != singlePage)
+ if (currentDoc->pagePositioning() != singlePage)
{
int lp = dia->Links->currentIndex();
if (lp == 0)
@@ -222,7 +222,7 @@
}
destination->initialMargins.Top = from->initialMargins.Top;
destination->initialMargins.Bottom = from->initialMargins.Bottom;
- if (currentDoc->pageSets()[currentDoc->currentPageLayout].Columns == 1)
+ if (currentDoc->pageSets()[currentDoc->pagePositioning()].Columns == 1)
{
destination->initialMargins.Left = from->initialMargins.Left;
destination->initialMargins.Right = from->initialMargins.Right;
@@ -331,7 +331,7 @@
MasterPageNameWrong |= MasterPageName.isEmpty();
}
currentDoc->setCurrentPage(currentDoc->addMasterPage(nr, MasterPageName));
- if (currentDoc->currentPageLayout != singlePage)
+ if (currentDoc->pagePositioning() != singlePage)
{
int lp = dia->Links->currentIndex();
if (lp == 0)
Modified: trunk/Scribus/scribus/ui/newtemp.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=15407&path=/trunk/Scribus/scribus/ui/newtemp.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/newtemp.cpp (original)
+++ trunk/Scribus/scribus/ui/newtemp.cpp Mon Aug 9 19:49:01 2010
@@ -42,7 +42,7 @@
Layout2->addWidget( Frage );
Layout2->addWidget( Answer );
QueryLayout->addLayout( Layout2 );
- if (doc->currentPageLayout != singlePage)
+ if (doc->pagePositioning() != singlePage)
{
Layout3 = new QHBoxLayout;
Layout3->setSpacing( 5 );
@@ -50,7 +50,7 @@
Links = new QComboBox( this );
QStringList::Iterator pNames;
QList<PageSet> pageSet(doc->pageSets());
- for(pNames = pageSet[doc->currentPageLayout].pageNames.begin(); pNames != pageSet[doc->currentPageLayout].pageNames.end(); ++pNames )
+ for(pNames = pageSet[doc->pagePositioning()].pageNames.begin(); pNames != pageSet[doc->pagePositioning()].pageNames.end(); ++pNames )
{
//Links->insertItem((*pNames));
Links->addItem(CommonStrings::translatePageSetLocString((*pNames)));
Modified: trunk/Scribus/scribus/ui/pagepalette.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=15407&path=/trunk/Scribus/scribus/ui/pagepalette.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/pagepalette.cpp (original)
+++ trunk/Scribus/scribus/ui/pagepalette.cpp Mon Aug 9 19:49:01 2010
@@ -713,7 +713,7 @@
void PagePalette::handleFirstPage(int fp)
{
// currView->Doc->pageSets()[currView->Doc->currentPageLayout].FirstPage = fp;
- currView->Doc->setPageSetFirstPage(currView->Doc->currentPageLayout, fp);
+ currView->Doc->setPageSetFirstPage(currView->Doc->pagePositioning(), fp);
currView->reformPages();
currView->DrawNew();
currView->GotoPage(currView->Doc->currentPageNumber());
@@ -760,13 +760,13 @@
return;
}
pageLayout->updateLayoutSelector(currView->Doc->pageSets());
- pageLayout->selectItem(currView->Doc->currentPageLayout);
- pageLayout->firstPage->setCurrentIndex(currView->Doc->pageSets()[currView->Doc->currentPageLayout].FirstPage);
+ pageLayout->selectItem(currView->Doc->pagePositioning());
+ pageLayout->firstPage->setCurrentIndex(currView->Doc->pageSets()[currView->Doc->pagePositioning()].FirstPage);
pageView->MaxC = currView->Doc->DocPages.count()-1;
- int counter = currView->Doc->pageSets()[currView->Doc->currentPageLayout].FirstPage;
- int cols = currView->Doc->pageSets()[currView->Doc->currentPageLayout].Columns;
- int rows = (currView->Doc->DocPages.count()+counter) / currView->Doc->pageSets()[currView->Doc->currentPageLayout].Columns;
- if (((currView->Doc->DocPages.count()+counter) % currView->Doc->pageSets()[currView->Doc->currentPageLayout].Columns) != 0)
+ int counter = currView->Doc->pageSets()[currView->Doc->pagePositioning()].FirstPage;
+ int cols = currView->Doc->pageSets()[currView->Doc->pagePositioning()].Columns;
+ int rows = (currView->Doc->DocPages.count()+counter) / currView->Doc->pageSets()[currView->Doc->pagePositioning()].Columns;
+ if (((currView->Doc->DocPages.count()+counter) % currView->Doc->pageSets()[currView->Doc->pagePositioning()].Columns) != 0)
rows++;
int rowcounter = 0;
int colmult, rowmult, coladd, rowadd;
@@ -802,7 +802,7 @@
pageView->rowadd = rowadd;
pageView->rowmult = rowmult;
pageView->firstP = counter;
- pageView->cols = currView->Doc->pageSets()[currView->Doc->currentPageLayout].Columns;
+ pageView->cols = currView->Doc->pageSets()[currView->Doc->pagePositioning()].Columns;
pageList.clear();
for (int a = 0; a < currView->Doc->DocPages.count(); ++a)
{
@@ -819,7 +819,7 @@
else
pageView->setRowHeight(rowcounter*rowmult+rowadd, pix.height()+5);
counter++;
- if (counter > currView->Doc->pageSets()[currView->Doc->currentPageLayout].Columns-1)
+ if (counter > currView->Doc->pageSets()[currView->Doc->pagePositioning()].Columns-1)
{
counter = 0;
rowcounter++;
Modified: trunk/Scribus/scribus/ui/prefs.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=15407&path=/trunk/Scribus/scribus/ui/prefs.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/prefs.cpp (original)
+++ trunk/Scribus/scribus/ui/prefs.cpp Mon Aug 9 19:49:01 2010
@@ -416,7 +416,6 @@
prefsManager->appPrefs.docSetupPrefs.bleeds.Left = tabDocument->marginGroup->leftBleed();
prefsManager->appPrefs.docSetupPrefs.bleeds.Right = tabDocument->marginGroup->rightBleed();
prefsManager->appPrefs.pageSets[tabDocument->choosenLayout].FirstPage = tabDocument->docLayout->firstPage->currentIndex();
-
prefsManager->setUniconvExecutable(tabExtTools->newUniconvTool());
prefsManager->setImageEditorExecutable(tabExtTools->newImageTool());
prefsManager->setExtBrowserExecutable(tabExtTools->newExtBrowserTool());
Modified: trunk/Scribus/scribus/ui/prefs_documentsetup.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=15407&path=/trunk/Scribus/scribus/ui/prefs_documentsetup.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/prefs_documentsetup.cpp (original)
+++ trunk/Scribus/scribus/ui/prefs_documentsetup.cpp Mon Aug 9 19:49:01 2010
@@ -37,21 +37,25 @@
pageSizeLinkToolButton->hide();
}
- pageWidthSpinBox->setMaximum(16777215);
- pageHeightSpinBox->setMaximum(16777215);
- languageChange();
-
-
pageLayoutButtonGroup->setId(singlePageRadioButton,0);
pageLayoutButtonGroup->setId(doublePageRadioButton,1);
pageLayoutButtonGroup->setId(threeFoldRadioButton,2);
pageLayoutButtonGroup->setId(fourFoldRadioButton,3);
+ singlePageRadioButton->setChecked(true);
+ layoutFirstPageIsComboBox->clear();
+ layoutFirstPageIsComboBox->addItem(" ");
+ layoutFirstPageIsComboBox->setCurrentIndex(0);
+ layoutFirstPageIsComboBox->setEnabled(false);
+
+ pageWidthSpinBox->setMaximum(16777215);
+ pageHeightSpinBox->setMaximum(16777215);
+ languageChange();
connect(pageSizeComboBox, SIGNAL(activated(const QString &)), this, SLOT(setPageSize()));
connect(pageOrientationComboBox, SIGNAL(activated(int)), this, SLOT(setPageOrientation(int)));
connect(pageWidthSpinBox, SIGNAL(valueChanged(double)), this, SLOT(setPageWidth(double)));
connect(pageHeightSpinBox, SIGNAL(valueChanged(double)), this, SLOT(setPageHeight(double)));
- connect(pageLayoutButtonGroup, SIGNAL(buttonReleased(int)), this, SLOT(pageLayoutChanged(int)));
+ connect(pageLayoutButtonGroup, SIGNAL(buttonClicked(int)), this, SLOT(pageLayoutChanged(int)));
connect(pageUnitsComboBox, SIGNAL(activated(int)), this, SLOT(unitChange()));
connect(undoCheckBox, SIGNAL(toggled(bool)), this, SLOT(slotUndo(bool)));
}
@@ -136,7 +140,6 @@
pageH = prefsData->docSetupPrefs.pageHeight;
pageWidthSpinBox->setValue(pageW * unitRatio);
pageHeightSpinBox->setValue(pageH * unitRatio);
-
pageSets=prefsData->pageSets;
switch (prefsData->docSetupPrefs.pagePositioning)
{
@@ -188,10 +191,12 @@
{
prefsData->docSetupPrefs.pageSize=prefsPageSizeName;
prefsData->docSetupPrefs.pageOrientation=pageOrientationComboBox->currentIndex();
+ prefsData->docSetupPrefs.docUnitIndex=pageUnitsComboBox->currentIndex();
prefsData->docSetupPrefs.pageWidth=pageW;
prefsData->docSetupPrefs.pageHeight=pageH;
prefsData->docSetupPrefs.pagePositioning=pageLayoutButtonGroup->checkedId();
prefsData->pageSets[prefsData->docSetupPrefs.pagePositioning].FirstPage=layoutFirstPageIsComboBox->currentIndex();
+
prefsData->docSetupPrefs.margins=marginsWidget->margins();
prefsData->docSetupPrefs.bleeds=bleedsWidget->margins();
prefsData->docSetupPrefs.saveCompressed=saveCompressedCheckBox->isChecked();
@@ -209,12 +214,21 @@
void Prefs_DocumentSetup::setupPageSets()
{
int i=layoutFirstPageIsComboBox->currentIndex();
+ int currIndex=pageLayoutButtonGroup->checkedId()<0?0:pageLayoutButtonGroup->checkedId();
layoutFirstPageIsComboBox->clear();
- int currIndex=pageLayoutButtonGroup->checkedId()<0?0:pageLayoutButtonGroup->checkedId();
- if (currIndex>=0 && currIndex<pageSets.count())
+ if (currIndex>0 && currIndex<pageSets.count())
+ {
+ layoutFirstPageIsComboBox->setEnabled(true);
for(QStringList::Iterator pNames = pageSets[currIndex].pageNames.begin(); pNames != pageSets[currIndex].pageNames.end(); ++pNames )
layoutFirstPageIsComboBox->addItem(CommonStrings::translatePageSetLocString(*pNames));
- layoutFirstPageIsComboBox->setCurrentIndex(i<0?0:i);
+ layoutFirstPageIsComboBox->setCurrentIndex(i<0?0:i);
+ }
+ else
+ {
+ layoutFirstPageIsComboBox->addItem(" ");
+ layoutFirstPageIsComboBox->setCurrentIndex(0);
+ layoutFirstPageIsComboBox->setEnabled(false);
+ }
}
void Prefs_DocumentSetup::setupPageSizes(struct ApplicationPrefs *prefsData)
@@ -241,7 +255,7 @@
{
setupPageSets();
marginsWidget->setFacingPages(!(i == singlePage));
- layoutFirstPageIsComboBox->setCurrentIndex(pageSets[pageLayoutButtonGroup->checkedId()].FirstPage);
+ //layoutFirstPageIsComboBox->setCurrentIndex(pageSets[pageLayoutButtonGroup->checkedId()].FirstPage);
}
void Prefs_DocumentSetup::setPageWidth(double w)
Modified: trunk/Scribus/scribus/ui/printdialog.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=15407&path=/trunk/Scribus/scribus/ui/printdialog.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/printdialog.cpp (original)
+++ trunk/Scribus/scribus/ui/printdialog.cpp Mon Aug 9 19:49:01 2010
@@ -98,7 +98,7 @@
SepArt->addItem(sep[prop]);
SepArt->addItems(spots);
- if (m_doc->currentPageLayout != 0)
+ if (m_doc->pagePositioning() != 0)
{
BleedTxt3->setText( tr( "Inside:" ) );
BleedTxt4->setText( tr( "Outside:" ) );
Modified: trunk/Scribus/scribus/ui/reformdoc.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=15407&path=/trunk/Scribus/scribus/ui/reformdoc.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/reformdoc.cpp (original)
+++ trunk/Scribus/scribus/ui/reformdoc.cpp Mon Aug 9 19:49:01 2010
@@ -116,7 +116,7 @@
cmsTab = addItem( tr("Color Management"), loadIcon("blend.png"), tabColorManagement);
}
- setDS(doc->currentPageLayout);
+ setDS(doc->pagePositioning());
// signals and slots connections
connect(tabPage->docLayout, SIGNAL( selectedLayout(int) ), this, SLOT( setDS(int) ) );
@@ -141,7 +141,7 @@
{
ApplicationPrefs* prefsData=&(PrefsManager::instance()->appPrefs);
tabPage->restoreDefaults(currDoc);
- tabView->restoreDefaults(prefsData, currDoc->guidesPrefs(), currDoc->currentPageLayout, *currDoc->scratch());
+ tabView->restoreDefaults(prefsData, currDoc->guidesPrefs(), currDoc->pagePositioning(), *currDoc->scratch());
tabView->gapHorizontal->setValue(currDoc->pageGapHorizontal()); // * unitRatio);
tabView->gapVertical->setValue(currDoc->pageGapVertical()); // * unitRatio);
tabView->setPaperColor(currDoc->paperColor());
Modified: trunk/Scribus/scribus/ui/tabdocument.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=15407&path=/trunk/Scribus/scribus/ui/tabdocument.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/tabdocument.cpp (original)
+++ trunk/Scribus/scribus/ui/tabdocument.cpp Mon Aug 9 19:49:01 2010
@@ -258,8 +258,8 @@
prefsPageSizeName = doc->pageSize();
// setOrien(prefsData->PageOri);
- docLayout->selectItem(doc->currentPageLayout);
- docLayout->firstPage->setCurrentIndex(doc->pageSets()[doc->currentPageLayout].FirstPage);
+ docLayout->selectItem(doc->pagePositioning());
+ docLayout->firstPage->setCurrentIndex(doc->pageSets()[doc->pagePositioning()].FirstPage);
pageOrientationComboBox->setCurrentIndex(doc->pageOrientation());
unitCombo->setCurrentIndex(doc->unitIndex());
pageWidth->setValue(doc->pageWidth() * unitRatio);
Modified: trunk/Scribus/scribus/ui/tabpdfoptions.cpp
URL: http://scribus.info/websvn/diff.php?repname=Scribus&rev=15407&path=/trunk/Scribus/scribus/ui/tabpdfoptions.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/tabpdfoptions.cpp (original)
+++ trunk/Scribus/scribus/ui/tabpdfoptions.cpp Mon Aug 9 19:49:01 2010
@@ -1387,7 +1387,7 @@
EDirection_2_2->setCurrentIndex(EffVal[0].Di);
SetEffOpts(EffectType->currentIndex());
}
- if (mdoc->currentPageLayout != 0)
+ if (mdoc->pagePositioning() != 0)
{
BleedTxt3->setText( tr( "Inside:" ) );
BleedTxt4->setText( tr( "Outside:" ) );
More information about the scribus-commit
mailing list