r13876 by cbradney - More preferences variable renaming
scribus-commit
scribus-commit at lists.scribus.net
Wed Aug 26 05:46:07 CEST 2009
Revision: 13876
Author: cbradney
Date: 2009-08-18T21:15:22.839796Z
Commit message: More preferences variable renaming
Changeset:
M /trunk/Scribus/scribus/ui/prefs.cpp
M /trunk/Scribus/scribus/ui/preferencesdialog.cpp
M /trunk/Scribus/scribus/scribusdoc.cpp
M /trunk/Scribus/scribus/scpainterex_cairo.cpp
M /trunk/Scribus/scribus/plugins/aiimplugin/importai.cpp
M /trunk/Scribus/scribus/ui/storyeditor.cpp
M /trunk/Scribus/scribus/scribusview.cpp
M /trunk/Scribus/scribus/ui/newfile.cpp
M /trunk/Scribus/scribus/plugins/scriptplugin/scriptercore.cpp
M /trunk/Scribus/scribus/ui/tabdisplay.cpp
M /trunk/Scribus/scribus/ui/loremipsum.cpp
M /trunk/Scribus/scribus/prefsmanager.cpp
M /trunk/Scribus/scribus/scribus.cpp
M /trunk/Scribus/scribus/scribusview.h
M /trunk/Scribus/scribus/plugins/psimport/importps.cpp
M /trunk/Scribus/scribus/plugins/xfigimplugin/importxfig.cpp
M /trunk/Scribus/scribus/prefsstructs.h
M /trunk/Scribus/scribus/plugins/scriptplugin/runscriptdialog.cpp
M /trunk/Scribus/scribus/plugins/saveastemplateplugin/satemplate.cpp
M /trunk/Scribus/scribus/ui/scrpalettebase.cpp
M /trunk/Scribus/scribus/plugins/cvgimplugin/importcvg.cpp
M /trunk/Scribus/scribus/ui/prefs_userinterface.h
M /trunk/Scribus/scribus/ui/tabgeneral.cpp
M /trunk/Scribus/scribus/ui/tabdocument.cpp
M /trunk/Scribus/scribus/scribuscore.cpp
M /trunk/Scribus/scribus/plugins/scriptplugin/pconsole.cpp
M /trunk/Scribus/scribus/ui/tabprinter.cpp
Diffs:
Index: scribus/scribuscore.cpp
===================================================================
--- scribus/scribuscore.cpp (revision 13875)
+++ scribus/scribuscore.cpp (revision 13876)
@@ -132,7 +132,7 @@
}
else
{
- if (PrefsManager::instance()->appPrefs.ui_ShowStartupDialog)
+ if (PrefsManager::instance()->appPrefs.uiPrefs.showStartupDialog)
scribus->startUpDialog();
else
scribus->setFocus();
@@ -358,7 +358,7 @@
QString pfad = ScPaths::instance().libDir();
pfad += "profiles/";
profDirs = ScPaths::getSystemProfilesDirs();
- profDirs.prepend( prefsManager->appPrefs.ProfileDir );
+ profDirs.prepend( prefsManager->appPrefs.pathPrefs.colorProfiles );
profDirs.prepend( pfad );
for(int i = 0; i < profDirs.count(); i++)
{
Index: scribus/scribusdoc.cpp
===================================================================
--- scribus/scribusdoc.cpp (revision 13875)
+++ scribus/scribusdoc.cpp (revision 13876)
@@ -125,7 +125,7 @@
loading(false),
modified(false),
ActiveLayer(0),
- docUnitIndex(prefsData.docUnitIndex),
+ docUnitIndex(prefsData.docSetupPrefs.docUnitIndex),
docUnitRatio(unitGetRatioFromIndex(docUnitIndex)),
rotMode(0),
automaticTextFrames(0),
@@ -222,7 +222,7 @@
m_docUpdater(NULL)
{
init();
- bleeds = prefsData.bleeds;
+ bleeds = prefsData.docSetupPrefs.bleeds;
PDF_Options.bleeds = bleeds;
Print_Options.firstUse = true;
}
@@ -265,7 +265,7 @@
m_Selection(new Selection(this, true)),
pageWidth(pagesize.width()), pageHeight(pagesize.height()),
pageMargins(margins),
- marginPreset(prefsData.marginPreset),
+ marginPreset(prefsData.docSetupPrefs.marginPreset),
pageSets(prefsData.pageSets),
PageSp(pagesSetup.columnCount), PageSpa(pagesSetup.columnDistance),
currentPageLayout(pagesSetup.pageArrangement),
@@ -335,7 +335,7 @@
{
pageSets[pagesSetup.pageArrangement].FirstPage = pagesSetup.firstPageLocation;
init();
- bleeds = prefsData.bleeds;
+ bleeds = prefsData.docSetupPrefs.bleeds;
PDF_Options.bleeds = bleeds;
Print_Options.firstUse = true;
}
Index: scribus/scpainterex_cairo.cpp
===================================================================
--- scribus/scpainterex_cairo.cpp (revision 13875)
+++ scribus/scpainterex_cairo.cpp (revision 13876)
@@ -508,4 +508,4 @@
r.setRight( right );
r.setBottom( bottom );
r.setTop( top );
-}
\ No newline at end of file
+}
Index: scribus/scribusview.h
===================================================================
--- scribus/scribusview.h (revision 13875)
+++ scribus/scribusview.h (revision 13876)
@@ -483,7 +483,7 @@
inline bool ScribusView::moveTimerElapsed()
{
- return (m_moveTimer.elapsed() > Prefs->ui_MouseMoveTimeout);
+ return (m_moveTimer.elapsed() > Prefs->uiPrefs.mouseMoveTimeout);
}
Index: scribus/prefsmanager.cpp
===================================================================
--- scribus/prefsmanager.cpp (revision 13875)
+++ scribus/prefsmanager.cpp (revision 13876)
@@ -183,7 +183,7 @@
}
*/
- appPrefs.ui_WheelJump = 40;
+ appPrefs.uiPrefs.wheelJump = 40;
/** Set Default window position and size to sane default values which should work on every screen */
// appPrefs.mainWinSettings.xPosition = 0;
// appPrefs.mainWinSettings.yPosition = 0;
@@ -228,11 +228,11 @@
appPrefs.typographicSettings.valueStrikeThruWidth = -1;
appPrefs.typographicSettings.valueBaseGrid = 14.4;
appPrefs.typographicSettings.offsetBaseGrid = 0.0;
- appPrefs.ui_Theme = "";
+ appPrefs.uiPrefs.style = "";
appPrefs.grayscaleIcons = false; // can be a little slower on startup.. but its a nice effect to play with
appPrefs.showToolTips = true;
appPrefs.showMouseCoordinates = true;
- appPrefs.ui_MouseMoveTimeout = 150;
+ appPrefs.uiPrefs.mouseMoveTimeout = 150;
appPrefs.stickyTools = false;
//FIXME
//Black here causes issues when a colour set is loaded without "Black" in it.
@@ -282,7 +282,7 @@
appPrefs.toolSettings.scaleX = 1;
appPrefs.toolSettings.scaleY = 1;
appPrefs.guidesSettings.before = true;
- appPrefs.docUnitIndex = 0;
+ appPrefs.docSetupPrefs.docUnitIndex = 0;
appPrefs.toolSettings.polyC = 4;
appPrefs.toolSettings.polyF = 0.5;
appPrefs.toolSettings.polyS = false;
@@ -294,25 +294,25 @@
appPrefs.GCRMode = false;
appPrefs.RecentDocs.clear();
appPrefs.RecentScrapbooks.clear();
- appPrefs.ui_RecentDocCount = 5;
+ appPrefs.uiPrefs.recentDocCount = 5;
appPrefs.doCopyToScrapbook = true;
appPrefs.persistentScrapbook = false;
appPrefs.numScrapbookCopies = 10;
appPrefs.marginColored = false;
- appPrefs.pageSize = "A4";
- appPrefs.pageOrientation = 0;
+ appPrefs.docSetupPrefs.pageSize = "A4";
+ appPrefs.docSetupPrefs.pageOrientation = 0;
PageSize a4("A4");
- appPrefs.PageWidth = a4.width();
- appPrefs.PageHeight = a4.height();
- appPrefs.margins.Top = 40;
- appPrefs.margins.Bottom = 40;
- appPrefs.margins.Left = 40;
- appPrefs.margins.Right = 40;
- appPrefs.marginPreset = 0;
- appPrefs.bleeds.Top = 0;
- appPrefs.bleeds.Left = 0;
- appPrefs.bleeds.Right = 0;
- appPrefs.bleeds.Bottom = 0;
+ appPrefs.docSetupPrefs.pageWidth = a4.width();
+ appPrefs.docSetupPrefs.pageHeight = a4.height();
+ appPrefs.docSetupPrefs.margins.Top = 40;
+ appPrefs.docSetupPrefs.margins.Bottom = 40;
+ appPrefs.docSetupPrefs.margins.Left = 40;
+ appPrefs.docSetupPrefs.margins.Right = 40;
+ appPrefs.docSetupPrefs.marginPreset = 0;
+ appPrefs.docSetupPrefs.bleeds.Top = 0;
+ appPrefs.docSetupPrefs.bleeds.Left = 0;
+ appPrefs.docSetupPrefs.bleeds.Right = 0;
+ appPrefs.docSetupPrefs.bleeds.Bottom = 0;
appPrefs.toolSettings.scaleType = true;
appPrefs.toolSettings.aspectRatio = true;
appPrefs.toolSettings.lowResType = 1;
@@ -333,10 +333,10 @@
appPrefs.DisScale = dpi / 72.0;
// appPrefs.DisScale = 1.0;
- appPrefs.DocDir = ScPaths::getUserDocumentDir();
- appPrefs.ProfileDir = "";
- appPrefs.ScriptDir = "";
- appPrefs.documentTemplatesDir = "";
+ appPrefs.pathPrefs.documents = ScPaths::getUserDocumentDir();
+ appPrefs.pathPrefs.colorProfiles = "";
+ appPrefs.pathPrefs.scripts = "";
+ appPrefs.pathPrefs.documentTemplates = "";
appPrefs.CustomColorSets.clear();
appPrefs.PrPr_Mode = false;
appPrefs.Gcr_Mode = true;
@@ -414,14 +414,14 @@
pageS.pageNames.append(CommonStrings::pageLocMiddleRight);
pageS.pageNames.append(CommonStrings::pageLocRight);
appPrefs.pageSets.append(pageS);
- appPrefs.FacingPages = singlePage;
+ appPrefs.docSetupPrefs.pagePositioning = singlePage;
appPrefs.askBeforeSubstituite = true;
appPrefs.haveStylePreview = true;
// lorem ipsum defaults
appPrefs.useStandardLI = false;
appPrefs.paragraphsLI = 10;
- appPrefs.ui_ShowStartupDialog = true;
- appPrefs.ui_UseSmallWidgets = false;
+ appPrefs.uiPrefs.showStartupDialog = true;
+ appPrefs.uiPrefs.useSmallWidgets = false;
initDefaultCheckerPrefs(&appPrefs.checkerProfiles);
appPrefs.curCheckProfile = CommonStrings::PostScript;
appPrefs.PDF_Options.Thumbnails = false;
@@ -519,9 +519,9 @@
void PrefsManager::initDefaultGUIFont(const QFont& guiFont)
{
- appPrefs.ui_ApplicationFontSize = guiFont.pointSize();
+ appPrefs.uiPrefs.applicationFontSize = guiFont.pointSize();
appPrefs.STEfont = guiFont.toString();
- appPrefs.ui_PaletteFontSize = appPrefs.ui_ApplicationFontSize;
+ appPrefs.uiPrefs.paletteFontSize = appPrefs.uiPrefs.applicationFontSize;
}
void PrefsManager::initArrowStyles()
@@ -885,7 +885,7 @@
{
mw->setDefaultPrinter(appPrefs.PrinterName, appPrefs.PrinterFile, appPrefs.PrinterCommand);
- uint max = qMin(appPrefs.ui_RecentDocCount, appPrefs.RecentDocs.count());
+ uint max = qMin(appPrefs.uiPrefs.recentDocCount, appPrefs.RecentDocs.count());
for (uint m = 0; m < max; ++m)
{
QFileInfo fd(appPrefs.RecentDocs[m]);
@@ -921,7 +921,7 @@
PrefsContext* userprefsContext = prefsFile->getContext("user_preferences");
if (userprefsContext)
{
- appPrefs.ui_Language = userprefsContext->get("gui_language","");
+ appPrefs.uiPrefs.language = userprefsContext->get("gui_language","");
appPrefs.mainWinState = QByteArray::fromBase64(userprefsContext->get("mainwinstate","").toAscii());
//continue here...
//Prefs."blah blah" =...
@@ -951,7 +951,7 @@
appPrefs.mainWinSettings.maximized = ScCore->primaryMainWindow()->isMaximized();
appPrefs.mainWinState = ScCore->primaryMainWindow()->saveState();
appPrefs.RecentDocs.clear();
- uint max = qMin(appPrefs.ui_RecentDocCount, ScCore->primaryMainWindow()->RecentDocs.count());
+ uint max = qMin(appPrefs.uiPrefs.recentDocCount, ScCore->primaryMainWindow()->RecentDocs.count());
for (uint m = 0; m < max; ++m)
{
appPrefs.RecentDocs.append(ScCore->primaryMainWindow()->RecentDocs[m]);
@@ -975,7 +975,7 @@
PrefsContext* userprefsContext = prefsFile->getContext("user_preferences");
if (userprefsContext)
{
- userprefsContext->set("gui_language", appPrefs.ui_Language);
+ userprefsContext->set("gui_language", appPrefs.uiPrefs.language);
userprefsContext->set("mainwinstate", QString::fromAscii(appPrefs.mainWinState.toBase64()));
//continue here...
//Prefs."blah blah" =...
@@ -1011,17 +1011,17 @@
const QString PrefsManager::documentDir()
{
- return appPrefs.DocDir;
+ return appPrefs.pathPrefs.documents;
}
void PrefsManager::setDocumentDir(const QString& dirname)
{
- appPrefs.DocDir = dirname;
+ appPrefs.pathPrefs.documents = dirname;
}
int PrefsManager::mouseWheelJump() const
{
- return appPrefs.ui_WheelJump;
+ return appPrefs.uiPrefs.wheelJump;
}
//Changed to return false when we have no fonts
@@ -1033,7 +1033,7 @@
void PrefsManager::setShowStartupDialog(const bool showDialog)
{
- appPrefs.ui_ShowStartupDialog=showDialog;
+ appPrefs.uiPrefs.showStartupDialog=showDialog;
}
const ColorList& PrefsManager::colorSet()
@@ -1190,12 +1190,12 @@
const QString& PrefsManager::uiLanguage() const
{
- return appPrefs.ui_Language;
+ return appPrefs.uiPrefs.language;
}
const QString& PrefsManager::guiStyle() const
{
- return appPrefs.ui_Theme;
+ return appPrefs.uiPrefs.style;
}
const QString& PrefsManager::guiSystemStyle() const
@@ -1205,12 +1205,12 @@
const int& PrefsManager::guiFontSize() const
{
- return appPrefs.ui_ApplicationFontSize;
+ return appPrefs.uiPrefs.applicationFontSize;
}
const int& PrefsManager::paletteFontSize() const
{
- return appPrefs.ui_PaletteFontSize;
+ return appPrefs.uiPrefs.paletteFontSize;
}
bool PrefsManager::showPageShadow() const
@@ -1226,18 +1226,18 @@
QDomElement elem=docu.documentElement();
elem.setAttribute("VERSION","1.3.5");
QDomElement dc=docu.createElement("GUI");
- dc.setAttribute("UI_THEME",appPrefs.ui_Theme);
- dc.setAttribute("UI_WHEELJUMP",appPrefs.ui_WheelJump);
- dc.setAttribute("UI_MOUSEMOVETIMEOUT", appPrefs.ui_MouseMoveTimeout);
- dc.setAttribute("UI_APPLICATIONFONTSIZE",appPrefs.ui_ApplicationFontSize);
- dc.setAttribute("UI_PALETTEFONTSIZE",appPrefs.ui_PaletteFontSize);
+ dc.setAttribute("UI_THEME",appPrefs.uiPrefs.style);
+ dc.setAttribute("UI_WHEELJUMP",appPrefs.uiPrefs.wheelJump);
+ dc.setAttribute("UI_MOUSEMOVETIMEOUT", appPrefs.uiPrefs.mouseMoveTimeout);
+ dc.setAttribute("UI_APPLICATIONFONTSIZE",appPrefs.uiPrefs.applicationFontSize);
+ dc.setAttribute("UI_PALETTEFONTSIZE",appPrefs.uiPrefs.paletteFontSize);
dc.setAttribute("GRAB",appPrefs.guidesSettings.grabRad);
- dc.setAttribute("UNIT",appPrefs.docUnitIndex);
- dc.setAttribute("UI_RECENTDOCCOUNT", appPrefs.ui_RecentDocCount);
- dc.setAttribute("DOC", appPrefs.DocDir);
- dc.setAttribute("PROFILES", appPrefs.ProfileDir);
- dc.setAttribute("SCRIPTS", appPrefs.ScriptDir);
- dc.setAttribute("TEMPLATES", appPrefs.documentTemplatesDir);
+ dc.setAttribute("UNIT",appPrefs.docSetupPrefs.docUnitIndex);
+ dc.setAttribute("UI_RECENTDOCCOUNT", appPrefs.uiPrefs.recentDocCount);
+ dc.setAttribute("DOC", appPrefs.pathPrefs.documents);
+ dc.setAttribute("PROFILES", appPrefs.pathPrefs.colorProfiles);
+ dc.setAttribute("SCRIPTS", appPrefs.pathPrefs.scripts);
+ dc.setAttribute("TEMPLATES", appPrefs.pathPrefs.documentTemplates);
dc.setAttribute("SHOWGUIDES", static_cast<int>(appPrefs.guidesSettings.guidesShown));
dc.setAttribute("showcolborders", static_cast<int>(appPrefs.guidesSettings.colBordersShown));
dc.setAttribute("FRV", static_cast<int>(appPrefs.guidesSettings.framesShown));
@@ -1259,8 +1259,8 @@
dc.setAttribute("STECOLOR", appPrefs.STEcolor.name());
dc.setAttribute("STEFONT", appPrefs.STEfont);
dc.setAttribute("STYLEPREVIEW", static_cast<int>(appPrefs.haveStylePreview));
- dc.setAttribute("UI_SHOWSTARTUPDIALOG", static_cast<int>(appPrefs.ui_ShowStartupDialog));
- dc.setAttribute("UI_USESMALLWIDGETS", static_cast<int>(appPrefs.ui_UseSmallWidgets));
+ dc.setAttribute("UI_SHOWSTARTUPDIALOG", static_cast<int>(appPrefs.uiPrefs.showStartupDialog));
+ dc.setAttribute("UI_USESMALLWIDGETS", static_cast<int>(appPrefs.uiPrefs.useSmallWidgets));
dc.setAttribute("ToolTips", static_cast<int>(appPrefs.showToolTips));
dc.setAttribute("showMouseCoordinates", static_cast<int>(appPrefs.showMouseCoordinates));
dc.setAttribute("stickyTools", static_cast<int>(appPrefs.stickyTools));
@@ -1391,22 +1391,22 @@
dc75.setAttribute("NAMES", static_cast<int>(appPrefs.SepalN));
elem.appendChild(dc75);
QDomElement dc76=docu.createElement("DOKUMENT");
- dc76.setAttribute("PAGESIZE",appPrefs.pageSize);
- dc76.setAttribute("AUSRICHTUNG",appPrefs.pageOrientation);
- dc76.setAttribute("BREITE",ScCLocale::toQStringC(appPrefs.PageWidth));
- dc76.setAttribute("HOEHE",ScCLocale::toQStringC(appPrefs.PageHeight));
- dc76.setAttribute("RANDO",ScCLocale::toQStringC(appPrefs.margins.Top));
- dc76.setAttribute("RANDU",ScCLocale::toQStringC(appPrefs.margins.Bottom));
- dc76.setAttribute("RANDL",ScCLocale::toQStringC(appPrefs.margins.Left));
- dc76.setAttribute("RANDR",ScCLocale::toQStringC(appPrefs.margins.Right));
- dc76.setAttribute("PRESET",appPrefs.marginPreset);
- dc76.setAttribute("DOPPEL", appPrefs.FacingPages);
+ dc76.setAttribute("PAGESIZE",appPrefs.docSetupPrefs.pageSize);
+ dc76.setAttribute("AUSRICHTUNG",appPrefs.docSetupPrefs.pageOrientation);
+ dc76.setAttribute("BREITE",ScCLocale::toQStringC(appPrefs.docSetupPrefs.pageWidth));
+ dc76.setAttribute("HOEHE",ScCLocale::toQStringC(appPrefs.docSetupPrefs.pageHeight));
+ dc76.setAttribute("RANDO",ScCLocale::toQStringC(appPrefs.docSetupPrefs.margins.Top));
+ dc76.setAttribute("RANDU",ScCLocale::toQStringC(appPrefs.docSetupPrefs.margins.Bottom));
+ dc76.setAttribute("RANDL",ScCLocale::toQStringC(appPrefs.docSetupPrefs.margins.Left));
+ dc76.setAttribute("RANDR",ScCLocale::toQStringC(appPrefs.docSetupPrefs.margins.Right));
+ dc76.setAttribute("PRESET",appPrefs.docSetupPrefs.marginPreset);
+ dc76.setAttribute("DOPPEL", appPrefs.docSetupPrefs.pagePositioning);
dc76.setAttribute("AutoSave", static_cast<int>(appPrefs.AutoSave));
dc76.setAttribute("AutoSaveTime", appPrefs.AutoSaveTime);
- dc76.setAttribute("BleedTop", ScCLocale::toQStringC(appPrefs.bleeds.Top));
- dc76.setAttribute("BleedLeft", ScCLocale::toQStringC(appPrefs.bleeds.Left));
- dc76.setAttribute("BleedRight", ScCLocale::toQStringC(appPrefs.bleeds.Right));
- dc76.setAttribute("BleedBottom", ScCLocale::toQStringC(appPrefs.bleeds.Bottom));
+ dc76.setAttribute("BleedTop", ScCLocale::toQStringC(appPrefs.docSetupPrefs.bleeds.Top));
+ dc76.setAttribute("BleedLeft", ScCLocale::toQStringC(appPrefs.docSetupPrefs.bleeds.Left));
+ dc76.setAttribute("BleedRight", ScCLocale::toQStringC(appPrefs.docSetupPrefs.bleeds.Right));
+ dc76.setAttribute("BleedBottom", ScCLocale::toQStringC(appPrefs.docSetupPrefs.bleeds.Bottom));
elem.appendChild(dc76);
QDomElement pageSetAttr = docu.createElement("PageSets");
QList<PageSet>::Iterator itpgset;
@@ -1757,35 +1757,43 @@
if (dc.tagName()=="GUI")
{
if (dc.hasAttribute("STILT"))
- appPrefs.ui_Theme = dc.attribute("STILT");
+ appPrefs.uiPrefs.style = dc.attribute("STILT");
else
- appPrefs.ui_Theme = dc.attribute("UI_THEME","Default");
+ appPrefs.uiPrefs.style = dc.attribute("UI_THEME","Default");
if (dc.hasAttribute("RAD"))
- appPrefs.ui_WheelJump = dc.attribute("RAD").toInt();
+ appPrefs.uiPrefs.wheelJump = dc.attribute("RAD").toInt();
else
- appPrefs.ui_WheelJump = dc.attribute("UI_WHEELJUMP").toInt();
+ appPrefs.uiPrefs.wheelJump = dc.attribute("UI_WHEELJUMP").toInt();
if (dc.hasAttribute("MOVT"))
- appPrefs.ui_MouseMoveTimeout = dc.attribute("MOVT").toInt();
+ appPrefs.uiPrefs.mouseMoveTimeout = dc.attribute("MOVT").toInt();
else
- appPrefs.ui_MouseMoveTimeout = dc.attribute("UI_MOUSEMOVETIMEOUT", "150").toInt();
- appPrefs.guidesSettings.grabRad = dc.attribute("GRAB", "4").toInt();
- appPrefs.docUnitIndex = dc.attribute("UNIT", "0").toInt();
+ appPrefs.uiPrefs.mouseMoveTimeout = dc.attribute("UI_MOUSEMOVETIMEOUT", "150").toInt();
if (dc.hasAttribute("APF"))
- appPrefs.ui_ApplicationFontSize = dc.attribute("APF").toInt();
+ appPrefs.uiPrefs.applicationFontSize = dc.attribute("APF").toInt();
else
- appPrefs.ui_ApplicationFontSize = dc.attribute("UI_APPLICATIONFONTSIZE", "12").toInt();
+ appPrefs.uiPrefs.applicationFontSize = dc.attribute("UI_APPLICATIONFONTSIZE", "12").toInt();
if (dc.hasAttribute("PFS"))
- appPrefs.ui_PaletteFontSize = dc.attribute("PFS").toInt();
+ appPrefs.uiPrefs.paletteFontSize = dc.attribute("PFS").toInt();
else
- appPrefs.ui_PaletteFontSize = dc.attribute("UI_PALETTEFONTSIZE", "10").toInt();
+ appPrefs.uiPrefs.paletteFontSize = dc.attribute("UI_PALETTEFONTSIZE", "10").toInt();
if (dc.hasAttribute("RCD"))
- appPrefs.ui_RecentDocCount = dc.attribute("RCD").toInt();
+ appPrefs.uiPrefs.recentDocCount = dc.attribute("RCD").toInt();
else
- appPrefs.ui_RecentDocCount = dc.attribute("UI_RECENTDOCCOUNT","5").toUInt();
- appPrefs.DocDir = dc.attribute("DOC","");
- appPrefs.ProfileDir = dc.attribute("PROFILES","");
- appPrefs.ScriptDir = dc.attribute("SCRIPTS","");
- appPrefs.documentTemplatesDir = dc.attribute("TEMPLATES","");
+ appPrefs.uiPrefs.recentDocCount = dc.attribute("UI_RECENTDOCCOUNT","5").toUInt();
+ if (dc.hasAttribute("StartUp"))
+ appPrefs.uiPrefs.showStartupDialog = dc.attribute("StartUp").toInt();
+ else
+ appPrefs.uiPrefs.showStartupDialog = static_cast<bool>(dc.attribute("UI_SHOWSTARTUPDIALOG", "1").toInt());
+ if (dc.hasAttribute("UseSmallWidgets"))
+ appPrefs.uiPrefs.useSmallWidgets = dc.attribute("UseSmallWidgets").toInt();
+ else
+ appPrefs.uiPrefs.useSmallWidgets = static_cast<bool>(dc.attribute("UI_USESMALLWIDGETS", "0").toInt());
+ appPrefs.pathPrefs.documents = dc.attribute("DOC","");
+ appPrefs.pathPrefs.colorProfiles = dc.attribute("PROFILES","");
+ appPrefs.pathPrefs.scripts = dc.attribute("SCRIPTS","");
+ appPrefs.pathPrefs.documentTemplates = dc.attribute("TEMPLATES","");
+ appPrefs.docSetupPrefs.docUnitIndex = dc.attribute("UNIT", "0").toInt();
+ appPrefs.guidesSettings.grabRad = dc.attribute("GRAB", "4").toInt();
appPrefs.guidesSettings.guidesShown = static_cast<bool>(dc.attribute("SHOWGUIDES", "1").toInt());
appPrefs.guidesSettings.colBordersShown = static_cast<bool>(dc.attribute("showcolborders", "0").toInt());
appPrefs.guidesSettings.framesShown = static_cast<bool>(dc.attribute("FRV", "1").toInt());
@@ -1799,14 +1807,7 @@
appPrefs.guidesSettings.showBleed = static_cast<bool>(dc.attribute("showBleed", "1").toInt());
appPrefs.guidesSettings.rulerMode = static_cast<bool>(dc.attribute("rulerMode", "1").toInt());
appPrefs.haveStylePreview = static_cast<bool>(dc.attribute("STYLEPREVIEW", "1").toInt());
- if (dc.hasAttribute("StartUp"))
- appPrefs.ui_ShowStartupDialog = dc.attribute("StartUp").toInt();
- else
- appPrefs.ui_ShowStartupDialog = static_cast<bool>(dc.attribute("UI_SHOWSTARTUPDIALOG", "1").toInt());
- if (dc.hasAttribute("UseSmallWidgets"))
- appPrefs.ui_UseSmallWidgets = dc.attribute("UseSmallWidgets").toInt();
- else
- appPrefs.ui_UseSmallWidgets = static_cast<bool>(dc.attribute("UI_USESMALLWIDGETS", "0").toInt());
+
appPrefs.scratch.Bottom = ScCLocale::toDoubleC(dc.attribute("ScratchBottom"), 20.0);
appPrefs.scratch.Left = ScCLocale::toDoubleC(dc.attribute("ScratchLeft"), 100.0);
appPrefs.scratch.Right = ScCLocale::toDoubleC(dc.attribute("ScratchRight"), 100.0);
@@ -1997,22 +1998,22 @@
}
if (dc.tagName() == "DOKUMENT")
{
- appPrefs.pageSize = dc.attribute("PAGESIZE","A4");
- appPrefs.pageOrientation = dc.attribute("AUSRICHTUNG", "0").toInt();
- appPrefs.PageWidth = ScCLocale::toDoubleC(dc.attribute("BREITE"), 595.0);
- appPrefs.PageHeight = ScCLocale::toDoubleC(dc.attribute("HOEHE"), 842.0);
- appPrefs.margins.Top = ScCLocale::toDoubleC(dc.attribute("RANDO"), 9.0);
- appPrefs.margins.Bottom = ScCLocale::toDoubleC(dc.attribute("RANDU"), 40.0);
- appPrefs.margins.Left = ScCLocale::toDoubleC(dc.attribute("RANDL"), 9.0);
- appPrefs.margins.Right = ScCLocale::toDoubleC(dc.attribute("RANDR"), 9.0);
- appPrefs.marginPreset = dc.attribute("PRESET", "0").toInt();
- appPrefs.FacingPages = dc.attribute("DOPPEL", "0").toInt();
+ appPrefs.docSetupPrefs.pageSize = dc.attribute("PAGESIZE","A4");
+ appPrefs.docSetupPrefs.pageOrientation = dc.attribute("AUSRICHTUNG", "0").toInt();
+ appPrefs.docSetupPrefs.pageWidth = ScCLocale::toDoubleC(dc.attribute("BREITE"), 595.0);
+ appPrefs.docSetupPrefs.pageHeight = ScCLocale::toDoubleC(dc.attribute("HOEHE"), 842.0);
+ appPrefs.docSetupPrefs.margins.Top = ScCLocale::toDoubleC(dc.attribute("RANDO"), 9.0);
+ appPrefs.docSetupPrefs.margins.Bottom = ScCLocale::toDoubleC(dc.attribute("RANDU"), 40.0);
+ appPrefs.docSetupPrefs.margins.Left = ScCLocale::toDoubleC(dc.attribute("RANDL"), 9.0);
+ appPrefs.docSetupPrefs.margins.Right = ScCLocale::toDoubleC(dc.attribute("RANDR"), 9.0);
+ appPrefs.docSetupPrefs.marginPreset = dc.attribute("PRESET", "0").toInt();
+ appPrefs.docSetupPrefs.pagePositioning = dc.attribute("DOPPEL", "0").toInt();
appPrefs.AutoSave = static_cast<bool>(dc.attribute("AutoSave", "0").toInt());
appPrefs.AutoSaveTime = dc.attribute("AutoSaveTime", "600000").toInt();
- appPrefs.bleeds.Top = ScCLocale::toDoubleC(dc.attribute("BleedTop"), 0.0);
- appPrefs.bleeds.Left = ScCLocale::toDoubleC(dc.attribute("BleedLeft"), 0.0);
- appPrefs.bleeds.Right = ScCLocale::toDoubleC(dc.attribute("BleedRight"), 0.0);
- appPrefs.bleeds.Bottom = ScCLocale::toDoubleC(dc.attribute("BleedBottom"), 0.0);
+ appPrefs.docSetupPrefs.bleeds.Top = ScCLocale::toDoubleC(dc.attribute("BleedTop"), 0.0);
+ appPrefs.docSetupPrefs.bleeds.Left = ScCLocale::toDoubleC(dc.attribute("BleedLeft"), 0.0);
+ appPrefs.docSetupPrefs.bleeds.Right = ScCLocale::toDoubleC(dc.attribute("BleedRight"), 0.0);
+ appPrefs.docSetupPrefs.bleeds.Bottom = ScCLocale::toDoubleC(dc.attribute("BleedBottom"), 0.0);
}
if (dc.tagName()=="PageSets")
{
@@ -2043,7 +2044,7 @@
PGSN = PGSN.nextSibling();
}
appPrefs.pageSets.append(pageS);
- if ((appPrefs.pageSets.count() == appPrefs.FacingPages) && ((appPrefs.GapHorizontal < 0) && (appPrefs.GapVertical < 0)))
+ if ((appPrefs.pageSets.count() == appPrefs.docSetupPrefs.pagePositioning) && ((appPrefs.GapHorizontal < 0) && (appPrefs.GapVertical < 0)))
{
appPrefs.GapHorizontal = ScCLocale::toDoubleC(PgsAttr.attribute("GapHorizontal"), 0.0);
appPrefs.GapVertical = ScCLocale::toDoubleC(PgsAttr.attribute("GapBelow"), 40.0);
@@ -2380,15 +2381,15 @@
}
appPrefs.DColors.ensureBlackAndWhite();
appPrefs.ui_SystemTheme = qApp->style()->objectName();
- if (appPrefs.ui_Theme.length() > 0)
+ if (appPrefs.uiPrefs.style.length() > 0)
{
- qApp->setStyle(QStyleFactory::create(appPrefs.ui_Theme));
+ qApp->setStyle(QStyleFactory::create(appPrefs.uiPrefs.style));
// Plain wrong, a style may set a palette different from the standard palette
// Eg : Windows XP and Windows Vista styles
// qApp->setPalette(qApp->style()->standardPalette());
}
QFont apf = qApp->font();
- apf.setPointSize(appPrefs.ui_ApplicationFontSize);
+ apf.setPointSize(appPrefs.uiPrefs.applicationFontSize);
qApp->setFont(apf);
return true;
}
Index: scribus/prefsstructs.h
===================================================================
--- scribus/prefsstructs.h (revision 13875)
+++ scribus/prefsstructs.h (revision 13876)
@@ -151,20 +151,48 @@
double constrain;
};
+//User Interface
+struct UIPrefs
+{
+ int mouseMoveTimeout; //! Mouse move timeout for move/resize operations
+ int wheelJump; //! Distance to jump with mouse wheel scrolling
+ int applicationFontSize; //! Font size to use in the application, apart from pÃalettes
+ int paletteFontSize; //! Fotn size to use in the palettes
+ QString style; //! Currently used QStyle name
+ int recentDocCount; //! Number of recent documents to remember
+ QString language; //! Language of the user interface
+ bool useSmallWidgets; //! Use small widgets in the palettes
+ bool showStartupDialog; //! Whether to show the startup dialog or not
+};
+
+//Paths
+struct PathPrefs
+{
+ QString documents; //! Default document location
+ QString colorProfiles; //! Default color profile location
+ QString scripts; //! Default script location
+ QString documentTemplates; //! Default document template location
+};
+
+//Document Setup
+struct DocumentSetupPrefs
+{
+ QString pageSize; //! Default page size of a document
+ int pageOrientation; //! Default orientation of the page
+ double pageWidth; //! Width of a page
+ double pageHeight; //! Height of a page
+ MarginStruct margins; //! Margins for a page
+ MarginStruct bleeds; //! Bleeds for a page
+ int marginPreset; //! Use a preset ratio margin setup
+ int pagePositioning; //! Show pages in 1,2,3,4 pages side by side on screen
+ int docUnitIndex; //! The index of the default unit
+};
+
struct ApplicationPrefs
{
- //User Interface
- int ui_MouseMoveTimeout; //! Mouse move timeout for move/resize operations
- int ui_WheelJump; //! Distance to jump with mouse wheel scrolling
- int ui_ApplicationFontSize; //! Font size to use in the application, apart from pÃalettes
- int ui_PaletteFontSize; //! Fotn size to use in the palettes
- QString ui_Theme; //! Currently used QStyle name
- int ui_RecentDocCount; //! Number of recent documents to remember
- QString ui_Language; //! Language of the user interface
- bool ui_UseSmallWidgets; //! Use small widgets in the palettes
- bool ui_ShowStartupDialog; //! Whether to show the startup dialog or not
- //Paths
- //Document Setup
+ UIPrefs uiPrefs;
+ PathPrefs pathPrefs;
+ DocumentSetupPrefs docSetupPrefs;
//Guides
//Typography
//Item Tools
@@ -207,12 +235,12 @@
toolPrefs toolSettings;
CheckerPrefsList checkerProfiles;
QString curCheckProfile;
- int docUnitIndex;
+
windowPrefs mainWinSettings;
QByteArray mainWinState;
- MarginStruct bleeds;
+
PDFOptions PDF_Options;
ObjAttrVector defaultItemAttributes;
ToCSetupVector defaultToCSetups;
@@ -231,13 +259,7 @@
QString PrinterName;
QString PrinterFile;
QString PrinterCommand;
- QString pageSize;
- int pageOrientation;
- double PageWidth;
- double PageHeight;
- MarginStruct margins;
- int marginPreset;
- int FacingPages;
+
int MinWordLen;
int HyCount;
QString Language;
@@ -246,10 +268,7 @@
bool Automatic;
bool AutoCheck;
- QString DocDir;
- QString ProfileDir;
- QString ScriptDir;
- QString documentTemplatesDir;
+
QMap<QString,QString> GFontSub;
bool AutoSave;
int AutoSaveTime;
Index: scribus/scribusview.cpp
===================================================================
--- scribus/scribusview.cpp (revision 13875)
+++ scribus/scribusview.cpp (revision 13876)
@@ -4689,7 +4689,7 @@
else
{
int dX=0,dY=0;
- int moveBy=(w->delta() < 0) ? Prefs->ui_WheelJump : -Prefs->ui_WheelJump;
+ int moveBy=(w->delta() < 0) ? Prefs->uiPrefs.wheelJump : -Prefs->uiPrefs.wheelJump;
if ((w->orientation() != Qt::Vertical) || ( w->modifiers() == Qt::ShiftModifier ))
dX = moveBy;
else
Index: scribus/ui/tabdocument.cpp
===================================================================
--- scribus/ui/tabdocument.cpp (revision 13875)
+++ scribus/ui/tabdocument.cpp (revision 13876)
@@ -35,7 +35,7 @@
: QWidget(parent)
{
ApplicationPrefs* prefsData=&(PrefsManager::instance()->appPrefs);
- unitRatio = unitGetRatioFromIndex(prefsData->docUnitIndex);
+ unitRatio = unitGetRatioFromIndex(prefsData->docSetupPrefs.docUnitIndex);
tabLayout_7 = new QHBoxLayout( this );
tabLayout_7->setSpacing( 5 );
@@ -65,7 +65,7 @@
pageSizeComboBox = new QComboBox(GroupSize);
- PageSize *ps=new PageSize(prefsData->pageSize);
+ PageSize *ps=new PageSize(prefsData->docSetupPrefs.pageSize);
pageSizeComboBox->addItems(ps->sizeTRList());
pageSizeComboBox->addItem( CommonStrings::trCustomPageSize );
pageSizeComboBox->setEditable(false);
@@ -102,14 +102,14 @@
Layout5_2->setSpacing( 5 );
Layout5_2->setMargin( 0 );
- pageWidth = new ScrSpinBox( 1, 16777215, GroupSize, prefsData->docUnitIndex );
+ pageWidth = new ScrSpinBox( 1, 16777215, GroupSize, prefsData->docSetupPrefs.docUnitIndex );
pageWidth->setMinimumSize( QSize( 90, 20 ) );
GZText3 = new QLabel( tr( "&Width:" ), GroupSize );
GZText3->setBuddy(pageWidth);
Layout5_2->addWidget( GZText3 );
Layout5_2->addWidget( pageWidth );
- pageHeight = new ScrSpinBox( 1, 16777215, GroupSize, prefsData->docUnitIndex );
+ pageHeight = new ScrSpinBox( 1, 16777215, GroupSize, prefsData->docSetupPrefs.docUnitIndex );
pageHeight->setMinimumSize( QSize( 90, 20 ) );
GZText4 = new QLabel( tr( "&Height:" ), GroupSize );
GZText4->setBuddy(pageHeight);
@@ -137,7 +137,7 @@
dsLayout4pv->addWidget( GroupSize );
- marginGroup = new MarginWidget(this, tr( "Margin Guides" ), &(prefsData->margins), prefsData->docUnitIndex, reform);
+ marginGroup = new MarginWidget(this, tr( "Margin Guides" ), &(prefsData->docSetupPrefs.margins), prefsData->docSetupPrefs.docUnitIndex, reform);
dsLayout4pv->addWidget( marginGroup );
@@ -210,29 +210,29 @@
disconnect(pageHeight, SIGNAL(valueChanged(double)), this, SLOT(setPageHeight(double)));
disconnect(pageOrientationComboBox, SIGNAL(activated(int)), this, SLOT(setOrien(int)));
disconnect(pageSizeComboBox, SIGNAL(activated(const QString &)), this, SLOT(setPageSize()));
- unitRatio = unitGetRatioFromIndex(prefsData->docUnitIndex);
+ unitRatio = unitGetRatioFromIndex(prefsData->docSetupPrefs.docUnitIndex);
// setSize(prefsData->pageSize);
- if (prefsData->pageSize == CommonStrings::customPageSize)
+ if (prefsData->docSetupPrefs.pageSize == CommonStrings::customPageSize)
setCurrentComboItem(pageSizeComboBox, CommonStrings::trCustomPageSize);
else
- setCurrentComboItem(pageSizeComboBox, prefsData->pageSize);
- prefsPageSizeName = prefsData->pageSize;
+ setCurrentComboItem(pageSizeComboBox, prefsData->docSetupPrefs.pageSize);
+ prefsPageSizeName = prefsData->docSetupPrefs.pageSize;
// setOrien(prefsData->pageOrientation);
- docLayout->selectItem(prefsData->FacingPages);
- docLayout->firstPage->setCurrentIndex(prefsData->pageSets[prefsData->FacingPages].FirstPage);
- pageOrientationComboBox->setCurrentIndex(prefsData->pageOrientation);
- unitCombo->setCurrentIndex(prefsData->docUnitIndex);
- pageWidth->setValue(prefsData->PageWidth * unitRatio);
- pageHeight->setValue(prefsData->PageHeight * unitRatio);
- pageW = prefsData->PageWidth;
- pageH = prefsData->PageHeight;
- marginGroup->setNewMargins(prefsData->margins);
- marginGroup->setPageWidthHeight(prefsData->PageWidth, prefsData->PageHeight);
+ docLayout->selectItem(prefsData->docSetupPrefs.pagePositioning);
+ docLayout->firstPage->setCurrentIndex(prefsData->pageSets[prefsData->docSetupPrefs.pagePositioning].FirstPage);
+ pageOrientationComboBox->setCurrentIndex(prefsData->docSetupPrefs.pageOrientation);
+ unitCombo->setCurrentIndex(prefsData->docSetupPrefs.docUnitIndex);
+ pageWidth->setValue(prefsData->docSetupPrefs.pageWidth * unitRatio);
+ pageHeight->setValue(prefsData->docSetupPrefs.pageHeight * unitRatio);
+ pageW = prefsData->docSetupPrefs.pageWidth;
+ pageH = prefsData->docSetupPrefs.pageHeight;
+ marginGroup->setNewMargins(prefsData->docSetupPrefs.margins);
+ marginGroup->setPageWidthHeight(prefsData->docSetupPrefs.pageWidth, prefsData->docSetupPrefs.pageHeight);
marginGroup->setPageSize(prefsPageSizeName);
- marginGroup->setNewBleeds(prefsData->bleeds);
- marginGroup->setMarginPreset(prefsData->marginPreset);
+ marginGroup->setNewBleeds(prefsData->docSetupPrefs.bleeds);
+ marginGroup->setMarginPreset(prefsData->docSetupPrefs.marginPreset);
GroupAS->setChecked( prefsData->AutoSave );
ASTime->setValue(prefsData->AutoSaveTime / 1000 / 60);
connect(pageWidth, SIGNAL(valueChanged(double)), this, SLOT(setPageWidth(double)));
Index: scribus/ui/loremipsum.cpp
===================================================================
--- scribus/ui/loremipsum.cpp (revision 13875)
+++ scribus/ui/loremipsum.cpp (revision 13876)
@@ -361,4 +361,4 @@
name=LanguageManager::instance()->getAbbrevFromLang(li->text(0), true, false);
return availableLorems[name];
-}
\ No newline at end of file
+}
Index: scribus/ui/prefs.cpp
===================================================================
--- scribus/ui/prefs.cpp (revision 13875)
+++ scribus/ui/prefs.cpp (revision 13876)
@@ -66,7 +66,7 @@
prefsManager=PrefsManager::instance();
ApplicationPrefs* prefsData=&(prefsManager->appPrefs);
ap = (ScribusMainWindow*)parent;
- docUnitIndex = prefsData->docUnitIndex;
+ docUnitIndex = prefsData->docSetupPrefs.docUnitIndex;
unitRatio = unitGetRatioFromIndex(docUnitIndex);
@@ -114,8 +114,8 @@
DocFonts,
prefsData->PDF_Options.PresentVals,
docUnitIndex,
- prefsData->PageHeight,
- prefsData->PageWidth,
+ prefsData->docSetupPrefs.pageHeight,
+ prefsData->docSetupPrefs.pageWidth,
0 );
addItem( tr("PDF Export"), loadIcon("acroread32.png"), tabPDF);
@@ -151,7 +151,7 @@
setupGui();
addPlugins();
- setDS(prefsData->FacingPages);
+ setDS(prefsData->docSetupPrefs.pagePositioning);
resize( minimumSizeHint() );
prefsSelection->arrangeIcons();
@@ -201,7 +201,7 @@
tabGeneral->restoreDefaults(prefsData);
tabDocument->restoreDefaults(prefsData);
tabPrinter->restoreDefaults(prefsData);
- tabView->restoreDefaults(prefsData, prefsData->guidesSettings, prefsData->pageSets, prefsData->FacingPages, prefsData->scratch);
+ tabView->restoreDefaults(prefsData, prefsData->guidesSettings, prefsData->pageSets, prefsData->docSetupPrefs.pagePositioning, prefsData->scratch);
tabView->gapHorizontal->setValue(prefsData->GapHorizontal); // * unitRatio);
tabView->gapVertical->setValue(prefsData->GapVertical); // * unitRatio);
tabScrapbook->restoreDefaults(prefsData);
@@ -222,8 +222,8 @@
DocFonts,
prefsData->PDF_Options.PresentVals,
docUnitIndex,
- prefsData->PageHeight,
- prefsData->PageWidth,
+ prefsData->docSetupPrefs.pageHeight,
+ prefsData->docSetupPrefs.pageWidth,
0, false);
if (ScCore->haveCMS())
@@ -343,23 +343,21 @@
{
double prefsUnitRatio = unitGetRatioFromIndex(tabDocument->unitCombo->currentIndex());
- prefsManager->appPrefs.ui_ApplicationFontSize = tabGeneral->GFsize->value();
- prefsManager->appPrefs.ui_PaletteFontSize = tabGeneral->GTFsize->value();
+ prefsManager->appPrefs.uiPrefs.applicationFontSize = tabGeneral->GFsize->value();
+ prefsManager->appPrefs.uiPrefs.paletteFontSize = tabGeneral->GTFsize->value();
ScQApp->neverSplash(!tabGeneral->showSplashCheckBox->isChecked());
- prefsManager->appPrefs.ui_ShowStartupDialog = tabGeneral->startUpDialog->isChecked();
- prefsManager->appPrefs.ui_WheelJump = tabGeneral->wheelJumpSpin->value();
- prefsManager->appPrefs.ui_MouseMoveTimeout = tabGeneral->spinTimeout->value();
- prefsManager->appPrefs.ui_RecentDocCount = tabGeneral->recentDocs->value();
- prefsManager->appPrefs.DocDir = QDir::fromNativeSeparators( tabGeneral->Docs->text() );
- prefsManager->appPrefs.ProfileDir = QDir::fromNativeSeparators( tabGeneral->ProPfad->text() );
- prefsManager->appPrefs.ScriptDir = QDir::fromNativeSeparators( tabGeneral->ScriptPfad->text() );
- prefsManager->appPrefs.documentTemplatesDir = QDir::fromNativeSeparators( tabGeneral->DocumentTemplateDir->text() );
- prefsManager->appPrefs.ui_Language=tabGeneral->selectedGUILang;
- prefsManager->appPrefs.ui_Theme = tabGeneral->GUICombo->currentText();
- prefsManager->appPrefs.ui_UseSmallWidgets = tabGeneral->useSmallWidgetsCheck->isChecked();
+ prefsManager->appPrefs.uiPrefs.showStartupDialog = tabGeneral->startUpDialog->isChecked();
+ prefsManager->appPrefs.uiPrefs.wheelJump = tabGeneral->wheelJumpSpin->value();
+ prefsManager->appPrefs.uiPrefs.mouseMoveTimeout = tabGeneral->spinTimeout->value();
+ prefsManager->appPrefs.uiPrefs.recentDocCount = tabGeneral->recentDocs->value();
+ prefsManager->appPrefs.pathPrefs.documents = QDir::fromNativeSeparators( tabGeneral->Docs->text() );
+ prefsManager->appPrefs.pathPrefs.colorProfiles = QDir::fromNativeSeparators( tabGeneral->ProPfad->text() );
+ prefsManager->appPrefs.pathPrefs.scripts = QDir::fromNativeSeparators( tabGeneral->ScriptPfad->text() );
+ prefsManager->appPrefs.pathPrefs.documentTemplates = QDir::fromNativeSeparators( tabGeneral->DocumentTemplateDir->text() );
+ prefsManager->appPrefs.uiPrefs.language=tabGeneral->selectedGUILang;
+ prefsManager->appPrefs.uiPrefs.style = tabGeneral->GUICombo->currentText();
+ prefsManager->appPrefs.uiPrefs.useSmallWidgets = tabGeneral->useSmallWidgetsCheck->isChecked();
-// prefsManager->appPrefs.pageSets[tabDocument->choosenLayout].GapHorizontal = tabView->gapHorizontal->value() / prefsUnitRatio;
-// prefsManager->appPrefs.pageSets[tabDocument->choosenLayout].GapBelow = tabView->gapVertical->value() / prefsUnitRatio;
prefsManager->appPrefs.GapHorizontal = tabView->gapHorizontal->value() / prefsUnitRatio;
prefsManager->appPrefs.GapVertical = tabView->gapVertical->value() / prefsUnitRatio;
prefsManager->appPrefs.marginColored = tabView->checkUnprintable->isChecked();
@@ -400,21 +398,21 @@
&prefsManager->appPrefs.toolSettings.polyR,
&prefsManager->appPrefs.toolSettings.polyCurvature);
- prefsManager->appPrefs.pageSize = tabDocument->prefsPageSizeName;
- prefsManager->appPrefs.pageOrientation = tabDocument->pageOrientationComboBox->currentIndex();
- prefsManager->appPrefs.PageWidth = tabDocument->pageW;
- prefsManager->appPrefs.PageHeight = tabDocument->pageH;
+ prefsManager->appPrefs.docSetupPrefs.pageSize = tabDocument->prefsPageSizeName;
+ prefsManager->appPrefs.docSetupPrefs.pageOrientation = tabDocument->pageOrientationComboBox->currentIndex();
+ prefsManager->appPrefs.docSetupPrefs.pageWidth = tabDocument->pageW;
+ prefsManager->appPrefs.docSetupPrefs.pageHeight = tabDocument->pageH;
- prefsManager->appPrefs.margins.Top = tabDocument->marginGroup->top();
- prefsManager->appPrefs.margins.Bottom = tabDocument->marginGroup->bottom();
- prefsManager->appPrefs.margins.Left = tabDocument->marginGroup->left();
- prefsManager->appPrefs.margins.Right = tabDocument->marginGroup->right();
- prefsManager->appPrefs.marginPreset = tabDocument->marginGroup->getMarginPreset();
- prefsManager->appPrefs.FacingPages = tabDocument->choosenLayout;
- prefsManager->appPrefs.bleeds.Bottom = tabDocument->marginGroup->bottomBleed();
- prefsManager->appPrefs.bleeds.Top = tabDocument->marginGroup->topBleed();
- prefsManager->appPrefs.bleeds.Left = tabDocument->marginGroup->leftBleed();
- prefsManager->appPrefs.bleeds.Right = tabDocument->marginGroup->rightBleed();
+ prefsManager->appPrefs.docSetupPrefs.margins.Top = tabDocument->marginGroup->top();
+ prefsManager->appPrefs.docSetupPrefs.margins.Bottom = tabDocument->marginGroup->bottom();
+ prefsManager->appPrefs.docSetupPrefs.margins.Left = tabDocument->marginGroup->left();
+ prefsManager->appPrefs.docSetupPrefs.margins.Right = tabDocument->marginGroup->right();
+ prefsManager->appPrefs.docSetupPrefs.marginPreset = tabDocument->marginGroup->getMarginPreset();
+ prefsManager->appPrefs.docSetupPrefs.pagePositioning = tabDocument->choosenLayout;
+ prefsManager->appPrefs.docSetupPrefs.bleeds.Bottom = tabDocument->marginGroup->bottomBleed();
+ prefsManager->appPrefs.docSetupPrefs.bleeds.Top = tabDocument->marginGroup->topBleed();
+ 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->setImageEditorExecutable(tabExtTools->newImageTool());
@@ -439,7 +437,7 @@
prefsManager->appPrefs.useStandardLI = tabMiscellaneous->useStandardLI->isChecked();
prefsManager->appPrefs.paragraphsLI = tabMiscellaneous->paragraphsLI->value();
- prefsManager->appPrefs.docUnitIndex = tabDocument->unitCombo->currentIndex();
+ prefsManager->appPrefs.docSetupPrefs.docUnitIndex = tabDocument->unitCombo->currentIndex();
prefsManager->appPrefs.toolSettings.defFont = tabTools->fontComboText->currentText();
prefsManager->appPrefs.toolSettings.defSize = tabTools->sizeComboText->currentText().left(2).toInt() * 10;
Index: scribus/ui/newfile.cpp
===================================================================
--- scribus/ui/newfile.cpp (revision 13875)
+++ scribus/ui/newfile.cpp (revision 13876)
@@ -94,10 +94,10 @@
prefsManager=PrefsManager::instance();
m_tabSelected = 0;
m_onStartup = startUp;
- m_unitIndex = prefsManager->appPrefs.docUnitIndex;
+ m_unitIndex = prefsManager->appPrefs.docSetupPrefs.docUnitIndex;
m_unitRatio = unitGetRatioFromIndex(m_unitIndex);
m_unitSuffix = unitGetSuffixFromIndex(m_unitIndex);
- m_orientation = prefsManager->appPrefs.pageOrientation;
+ m_orientation = prefsManager->appPrefs.docSetupPrefs.pageOrientation;
setWindowTitle( tr( "New Document" ) );
setWindowIcon(QIcon(loadIcon("AppIcon.png")));
TabbedNewDocLayout = new QVBoxLayout( this );
@@ -128,7 +128,7 @@
if (startUp)
{
startUpDialog = new QCheckBox( tr( "Do not show this dialog again" ), this );
- startUpDialog->setChecked(!prefsManager->appPrefs.ui_ShowStartupDialog);
+ startUpDialog->setChecked(!prefsManager->appPrefs.uiPrefs.showStartupDialog);
Layout1->addWidget( startUpDialog );
}
QSpacerItem* spacer = new QSpacerItem( 2, 2, QSizePolicy::Expanding, QSizePolicy::Minimum );
@@ -224,7 +224,7 @@
TextLabel1 = new QLabel( tr( "&Size:" ), pageSizeGroupBox );
pageSizeGroupBoxLayout->addWidget( TextLabel1, 0, 1 );
- PageSize ps(prefsManager->appPrefs.pageSize);
+ PageSize ps(prefsManager->appPrefs.docSetupPrefs.pageSize);
pageSizeComboBox = new QComboBox( pageSizeGroupBox );
pageSizeComboBox->addItems(ps.sizeTRList());
pageSizeComboBox->addItem( CommonStrings::trCustomPageSize );
@@ -237,7 +237,7 @@
pageOrientationComboBox->addItem( tr( "Portrait" ) );
pageOrientationComboBox->addItem( tr( "Landscape" ) );
pageOrientationComboBox->setEditable(false);
- pageOrientationComboBox->setCurrentIndex(prefsManager->appPrefs.pageOrientation);
+ pageOrientationComboBox->setCurrentIndex(prefsManager->appPrefs.docSetupPrefs.pageOrientation);
TextLabel2->setBuddy(pageOrientationComboBox);
pageSizeGroupBoxLayout->addWidget( pageOrientationComboBox, 1, 2 );
@@ -259,15 +259,15 @@
firstPage = new ScComboBox( pageSizeGroupBox );
firstPage->clear();
pageSizeGroupBoxLayout->addWidget( firstPage, 4, 2 );
- selectItem(prefsManager->appPrefs.FacingPages);
- firstPage->setCurrentIndex(prefsManager->appPrefs.pageSets[prefsManager->appPrefs.FacingPages].FirstPage);
+ selectItem(prefsManager->appPrefs.docSetupPrefs.pagePositioning);
+ firstPage->setCurrentIndex(prefsManager->appPrefs.pageSets[prefsManager->appPrefs.docSetupPrefs.pagePositioning].FirstPage);
- MarginStruct marg(prefsManager->appPrefs.margins);
+ MarginStruct marg(prefsManager->appPrefs.docSetupPrefs.margins);
marginGroup = new MarginWidget(newDocFrame, tr( "Margin Guides" ), &marg, m_unitIndex );
- marginGroup->setPageWidthHeight(prefsManager->appPrefs.PageWidth, prefsManager->appPrefs.PageHeight);
- marginGroup->setFacingPages(!(prefsManager->appPrefs.FacingPages == singlePage));
- widthSpinBox->setValue(prefsManager->appPrefs.PageWidth * m_unitRatio);
- heightSpinBox->setValue(prefsManager->appPrefs.PageHeight * m_unitRatio);
+ marginGroup->setPageWidthHeight(prefsManager->appPrefs.docSetupPrefs.pageWidth, prefsManager->appPrefs.docSetupPrefs.pageHeight);
+ marginGroup->setFacingPages(!(prefsManager->appPrefs.docSetupPrefs.pagePositioning == singlePage));
+ widthSpinBox->setValue(prefsManager->appPrefs.docSetupPrefs.pageWidth * m_unitRatio);
+ heightSpinBox->setValue(prefsManager->appPrefs.docSetupPrefs.pageHeight * m_unitRatio);
QStringList pageSizes=ps.sizeList();
int sizeIndex=pageSizes.indexOf(ps.nameTR());
if (sizeIndex!=-1)
@@ -275,11 +275,11 @@
else
pageSizeComboBox->setCurrentIndex(pageSizeComboBox->count()-1);
marginGroup->setPageSize(pageSizeComboBox->currentText());
- setDocLayout(prefsManager->appPrefs.FacingPages);
- setSize(prefsManager->appPrefs.pageSize);
- setOrientation(prefsManager->appPrefs.pageOrientation);
- marginGroup->setNewBleeds(prefsManager->appPrefs.bleeds);
- marginGroup->setMarginPreset(prefsManager->appPrefs.marginPreset);
+ setDocLayout(prefsManager->appPrefs.docSetupPrefs.pagePositioning);
+ setSize(prefsManager->appPrefs.docSetupPrefs.pageSize);
+ setOrientation(prefsManager->appPrefs.docSetupPrefs.pageOrientation);
+ marginGroup->setNewBleeds(prefsManager->appPrefs.docSetupPrefs.bleeds);
+ marginGroup->setMarginPreset(prefsManager->appPrefs.docSetupPrefs.marginPreset);
optionsGroupBox = new QGroupBox( newDocFrame );
optionsGroupBox->setTitle( tr( "Options" ) );
@@ -398,7 +398,7 @@
recentDocLayout->setSpacing(5);
recentDocListBox = new QListWidget(recentDocFrame);
recentDocLayout->addWidget(recentDocListBox);
- uint max = qMin(prefsManager->appPrefs.ui_RecentDocCount, recentDocList.count());
+ uint max = qMin(prefsManager->appPrefs.uiPrefs.recentDocCount, recentDocList.count());
for (uint m = 0; m < max; ++m)
recentDocListBox->addItem( QDir::convertSeparators(recentDocList[m]) );
}
Index: scribus/ui/prefs_userinterface.h
===================================================================
--- scribus/ui/prefs_userinterface.h (revision 13875)
+++ scribus/ui/prefs_userinterface.h (revision 13876)
@@ -18,6 +18,9 @@
public:
Prefs_UserInterface(QWidget* parent=0);
~Prefs_UserInterface();
+
+// setValues();
+
};
#endif // PREFS_USERINTERFACE_H
Index: scribus/ui/tabdisplay.cpp
===================================================================
--- scribus/ui/tabdisplay.cpp (revision 13875)
+++ scribus/ui/tabdisplay.cpp (revision 13876)
@@ -62,7 +62,7 @@
void TabDisplay::restoreDefaults(struct ApplicationPrefs *prefsData, struct guidesPrefs &guidesSettings, QList<PageSet> &pageSets, int pageLayout, MarginStruct &scratch)
{
- docUnitIndex = prefsData->docUnitIndex;
+ docUnitIndex = prefsData->docSetupPrefs.docUnitIndex;
double unitRatio = unitGetRatioFromIndex(docUnitIndex);
DisScale = prefsData->DisScale;
Index: scribus/ui/tabprinter.cpp
===================================================================
--- scribus/ui/tabprinter.cpp (revision 13875)
+++ scribus/ui/tabprinter.cpp (revision 13876)
@@ -41,7 +41,7 @@
void TabPrinter::restoreDefaults(struct ApplicationPrefs *prefsData)
{
- docUnitIndex = prefsData->docUnitIndex;
+ docUnitIndex = prefsData->docSetupPrefs.docUnitIndex;
unitRatio = unitGetRatioFromIndex(docUnitIndex);
QString unitSuffix = unitGetSuffixFromIndex(docUnitIndex);
bleedTop->setNewUnit(docUnitIndex);
Index: scribus/ui/tabgeneral.cpp
===================================================================
--- scribus/ui/tabgeneral.cpp (revision 13875)
+++ scribus/ui/tabgeneral.cpp (revision 13876)
@@ -71,21 +71,21 @@
void TabGeneral::restoreDefaults(struct ApplicationPrefs *prefsData)
{
- selectedGUILang = prefsData->ui_Language;
+ selectedGUILang = prefsData->uiPrefs.language;
setCurrentComboItem(guiLangCombo, LanguageManager::instance()->getLangFromAbbrev(selectedGUILang));
- setCurrentComboItem(GUICombo, prefsData->ui_Theme);
- GFsize->setValue( prefsData->ui_ApplicationFontSize );
- GTFsize->setValue( prefsData->ui_PaletteFontSize); // temp solution
- wheelJumpSpin->setValue( prefsData->ui_WheelJump );
- spinTimeout->setValue(prefsData->ui_MouseMoveTimeout);
- recentDocs->setValue( prefsData->ui_RecentDocCount );
- Docs->setText(QDir::convertSeparators(prefsData->DocDir));
- ProPfad->setText(QDir::convertSeparators(prefsData->ProfileDir));
- ScriptPfad->setText(QDir::convertSeparators(prefsData->ScriptDir));
- DocumentTemplateDir->setText(QDir::convertSeparators(prefsData->documentTemplatesDir));
- startUpDialog->setChecked(prefsData->ui_ShowStartupDialog);
+ setCurrentComboItem(GUICombo, prefsData->uiPrefs.style);
+ GFsize->setValue( prefsData->uiPrefs.applicationFontSize );
+ GTFsize->setValue( prefsData->uiPrefs.paletteFontSize); // temp solution
+ wheelJumpSpin->setValue( prefsData->uiPrefs.wheelJump );
+ spinTimeout->setValue(prefsData->uiPrefs.mouseMoveTimeout);
+ recentDocs->setValue( prefsData->uiPrefs.recentDocCount );
+ Docs->setText(QDir::convertSeparators(prefsData->pathPrefs.documents));
+ ProPfad->setText(QDir::convertSeparators(prefsData->pathPrefs.colorProfiles));
+ ScriptPfad->setText(QDir::convertSeparators(prefsData->pathPrefs.scripts));
+ DocumentTemplateDir->setText(QDir::convertSeparators(prefsData->pathPrefs.documentTemplates));
+ startUpDialog->setChecked(prefsData->uiPrefs.showStartupDialog);
showSplashCheckBox->setChecked( !ScQApp->neverSplashExists() );
- useSmallWidgetsCheck->setChecked(prefsData->ui_UseSmallWidgets);
+ useSmallWidgetsCheck->setChecked(prefsData->uiPrefs.useSmallWidgets);
}
void TabGeneral::setSelectedGUILang( const QString &newLang )
Index: scribus/ui/scrpalettebase.cpp
===================================================================
--- scribus/ui/scrpalettebase.cpp (revision 13875)
+++ scribus/ui/scrpalettebase.cpp (revision 13876)
@@ -53,7 +53,7 @@
prefsContextName(QString::null),
visibleOnStartup(false)
{
- if (PrefsManager::instance()->appPrefs.ui_UseSmallWidgets)
+ if (PrefsManager::instance()->appPrefs.uiPrefs.useSmallWidgets)
{
setStyleSheet(" QToolButton { margin: 0px; padding: 0px; font-size: 10px; } \
QToolButton:pressed { padding-top: 2px; padding-left: 2px } \
@@ -119,7 +119,7 @@
void ScrPaletteBase::setFontSize()
{
QFont newfont(font());
- newfont.setPointSize(PrefsManager::instance()->appPrefs.ui_PaletteFontSize);
+ newfont.setPointSize(PrefsManager::instance()->appPrefs.uiPrefs.paletteFontSize);
setFont(newfont);
}
Index: scribus/ui/storyeditor.cpp
===================================================================
--- scribus/ui/storyeditor.cpp (revision 13875)
+++ scribus/ui/storyeditor.cpp (revision 13876)
@@ -3216,7 +3216,7 @@
QString LoadEnc = "";
QString fileName = "";
PrefsContext* dirs = prefsManager->prefsFile->getContext("dirs");
- QString wdir = dirs->get("story_save", prefsManager->appPrefs.DocDir);
+ QString wdir = dirs->get("story_save", prefsManager->appPrefs.pathPrefs.documents);
CustomFDialog dia(this, wdir, tr("Save as"), tr("Text Files (*.txt);;All Files(*)"), fdShowCodecs);
qApp->processEvents();
if (dia.exec() != QDialog::Accepted)
Index: scribus/ui/preferencesdialog.cpp
===================================================================
--- scribus/ui/preferencesdialog.cpp (revision 13875)
+++ scribus/ui/preferencesdialog.cpp (revision 13876)
@@ -195,6 +195,6 @@
prefsManager=PrefsManager::instance();
ApplicationPrefs* prefsData=&(prefsManager->appPrefs);
mainWin = (ScribusMainWindow*)parent();
- docUnitIndex = prefsData->docUnitIndex;
+ docUnitIndex = prefsData->docSetupPrefs.docUnitIndex;
unitRatio = unitGetRatioFromIndex(docUnitIndex);
}
Index: scribus/scribus.cpp
===================================================================
--- scribus/scribus.cpp (revision 13875)
+++ scribus/scribus.cpp (revision 13876)
@@ -1994,7 +1994,7 @@
{
bool docSet = false;
PrefsContext* docContext = prefsManager->prefsFile->getContext("docdirs", false);
- NewDoc* dia = new NewDoc(this, RecentDocs, true, ScCore->getGuiLanguage(), PrefsManager::instance()->appPrefs.documentTemplatesDir);
+ NewDoc* dia = new NewDoc(this, RecentDocs, true, ScCore->getGuiLanguage(), PrefsManager::instance()->appPrefs.pathPrefs.documentTemplates);
if (dia->exec())
{
if (dia->tabSelected() == NewDoc::NewDocumentTab)
@@ -2316,7 +2316,7 @@
void ScribusMainWindow::newFileFromTemplate()
{
- nftdialog* nftdia = new nftdialog(this, ScCore->getGuiLanguage(), PrefsManager::instance()->appPrefs.documentTemplatesDir);
+ nftdialog* nftdia = new nftdialog(this, ScCore->getGuiLanguage(), PrefsManager::instance()->appPrefs.pathPrefs.documentTemplates);
if (nftdia->exec())
{
if (nftdia->nftGui->currentDocumentTemplate)
@@ -3426,7 +3426,7 @@
scrMenuMgr->removeMenuItem((*it), recentFileMenuName);
scrRecentFileActions.clear();
- uint max = qMin(prefsManager->appPrefs.ui_RecentDocCount, RecentDocs.count());
+ uint max = qMin(prefsManager->appPrefs.uiPrefs.recentDocCount, RecentDocs.count());
QString strippedName, localName;
for (uint m = 0; m < max; ++m)
{
@@ -7619,7 +7619,7 @@
if (oldUIFontSize != newUIFontSize)
{
QFont apf = qApp->font();
- apf.setPointSize(prefsManager->appPrefs.ui_ApplicationFontSize);
+ apf.setPointSize(prefsManager->appPrefs.uiPrefs.applicationFontSize);
qApp->setFont(apf);
}
propertiesPalette->Fonts->RebuildList(0);
Index: scribus/plugins/scriptplugin/runscriptdialog.cpp
===================================================================
--- scribus/plugins/scriptplugin/runscriptdialog.cpp (revision 13875)
+++ scribus/plugins/scriptplugin/runscriptdialog.cpp (revision 13876)
@@ -17,7 +17,7 @@
m_extEnable = extEnable;
PrefsManager *prefsManager = PrefsManager::instance();
- QString scriptDir = prefsManager->appPrefs.ScriptDir;
+ QString scriptDir(prefsManager->appPrefs.pathPrefs.scripts);
if (!m_lastScriptDir.isEmpty() && QDir(m_lastScriptDir).exists())
fileWidget->setDirectory(m_lastScriptDir);
else if (!scriptDir.isEmpty() && QDir(scriptDir).exists())
Index: scribus/plugins/scriptplugin/pconsole.cpp
===================================================================
--- scribus/plugins/scriptplugin/pconsole.cpp (revision 13875)
+++ scribus/plugins/scriptplugin/pconsole.cpp (revision 13876)
@@ -87,7 +87,7 @@
{
QFont font = QFont("Fixed");
font.setStyleHint(QFont::TypeWriter);
- font.setPointSize(PrefsManager::instance()->appPrefs.ui_ApplicationFontSize);
+ font.setPointSize(PrefsManager::instance()->appPrefs.uiPrefs.applicationFontSize);
commandEdit->setFont(font);
outputEdit->setFont(font);
}
Index: scribus/plugins/scriptplugin/scriptercore.cpp
===================================================================
--- scribus/plugins/scriptplugin/scriptercore.cpp (revision 13875)
+++ scribus/plugins/scriptplugin/scriptercore.cpp (revision 13876)
@@ -112,7 +112,7 @@
menuMgr->removeMenuItem((*it), "RecentScripts");
scrRecentScriptActions.clear();
- uint max = qMin(PrefsManager::instance()->appPrefs.ui_RecentDocCount, RecentScripts.count());
+ uint max = qMin(PrefsManager::instance()->appPrefs.uiPrefs.recentDocCount, RecentScripts.count());
for (uint m = 0; m < max; ++m)
{
QString strippedName=RecentScripts[m];
@@ -129,7 +129,7 @@
scrRecentScriptActions.clear();
if (SavedRecentScripts.count() != 0)
{
- uint max = qMin(PrefsManager::instance()->appPrefs.ui_RecentDocCount, SavedRecentScripts.count());
+ uint max = qMin(PrefsManager::instance()->appPrefs.uiPrefs.recentDocCount, SavedRecentScripts.count());
for (uint m = 0; m < max; ++m)
{
QFileInfo fd(SavedRecentScripts[m]);
Index: scribus/plugins/cvgimplugin/importcvg.cpp
===================================================================
--- scribus/plugins/cvgimplugin/importcvg.cpp (revision 13875)
+++ scribus/plugins/cvgimplugin/importcvg.cpp (revision 13876)
@@ -107,9 +107,9 @@
}
parseHeader(fName, b, h);
if (b == 0.0)
- b = PrefsManager::instance()->appPrefs.PageWidth;
+ b = PrefsManager::instance()->appPrefs.docSetupPrefs.pageWidth;
if (h == 0.0)
- h = PrefsManager::instance()->appPrefs.PageHeight;
+ h = PrefsManager::instance()->appPrefs.docSetupPrefs.pageHeight;
docWidth = b;
docHeight = h;
baseX = 0;
Index: scribus/plugins/saveastemplateplugin/satemplate.cpp
===================================================================
--- scribus/plugins/saveastemplateplugin/satemplate.cpp (revision 13875)
+++ scribus/plugins/saveastemplateplugin/satemplate.cpp (revision 13876)
@@ -121,7 +121,7 @@
QString currentFile(doc->DocName);
bool hasName = doc->hasName;
bool isModified = doc->isModified();
- QString userTemplatesDir = PrefsManager::instance()->appPrefs.documentTemplatesDir;
+ QString userTemplatesDir = PrefsManager::instance()->appPrefs.pathPrefs.documentTemplates;
PrefsContext* dirs = PrefsManager::instance()->prefsFile->getContext("dirs");
QString oldCollect = dirs->get("collect", ".");
QString templatesDir = ".";
Index: scribus/plugins/aiimplugin/importai.cpp
===================================================================
--- scribus/plugins/aiimplugin/importai.cpp (revision 13875)
+++ scribus/plugins/aiimplugin/importai.cpp (revision 13876)
@@ -141,8 +141,8 @@
/* Set default Page to size defined in Preferences */
x = 0.0;
y = 0.0;
- b = PrefsManager::instance()->appPrefs.PageWidth;
- h = PrefsManager::instance()->appPrefs.PageHeight;
+ b = PrefsManager::instance()->appPrefs.docSetupPrefs.pageWidth;
+ h = PrefsManager::instance()->appPrefs.docSetupPrefs.pageHeight;
if (progressDialog)
{
progressDialog->setOverallProgress(1);
Index: scribus/plugins/xfigimplugin/importxfig.cpp
===================================================================
--- scribus/plugins/xfigimplugin/importxfig.cpp (revision 13875)
+++ scribus/plugins/xfigimplugin/importxfig.cpp (revision 13876)
@@ -172,9 +172,9 @@
docX = x;
docY = y;
if (b == 0.0)
- b = PrefsManager::instance()->appPrefs.PageWidth;
+ b = PrefsManager::instance()->appPrefs.docSetupPrefs.pageWidth;
if (h == 0.0)
- h = PrefsManager::instance()->appPrefs.PageHeight;
+ h = PrefsManager::instance()->appPrefs.docSetupPrefs.pageHeight;
docWidth = b - x;
docHeight = h - y;
baseX = 0;
Index: scribus/plugins/psimport/importps.cpp
===================================================================
--- scribus/plugins/psimport/importps.cpp (revision 13875)
+++ scribus/plugins/psimport/importps.cpp (revision 13876)
@@ -99,8 +99,8 @@
/* Set default Page to size defined in Preferences */
x = 0.0;
y = 0.0;
- b = PrefsManager::instance()->appPrefs.PageWidth;
- h = PrefsManager::instance()->appPrefs.PageHeight;
+ b = PrefsManager::instance()->appPrefs.docSetupPrefs.pageWidth;
+ h = PrefsManager::instance()->appPrefs.docSetupPrefs.pageHeight;
if (extensionIndicatesEPSorPS(ext))
{
QString tmp, BBox, tmp2, FarNam;
More information about the scribus-commit
mailing list