Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 22188 → Rev 22197

/branches/Version14x/Scribus/scribus/prefsmanager.cpp
422,7 → 422,7
appPrefs.paragraphsLI = 10;
appPrefs.showStartupDialog = true;
appPrefs.useSmallWidgets = false;
initDefaultCheckerPrefs(&appPrefs.checkerProfiles);
initDefaultCheckerPrefs(appPrefs.checkerProfiles);
appPrefs.curCheckProfile = CommonStrings::PostScript;
appPrefs.PDF_Options.Thumbnails = false;
appPrefs.PDF_Options.Articles = false;
930,7 → 930,7
ReadPrefsXML();
if (appPrefs.checkerProfiles.count() == 0)
{
initDefaultCheckerPrefs(&appPrefs.checkerProfiles);
initDefaultCheckerPrefs(appPrefs.checkerProfiles);
appPrefs.curCheckProfile = CommonStrings::PostScript;
}
if (!appPrefs.mainWinState.isEmpty())
2405,37 → 2405,49
return true;
}
 
void PrefsManager::initDefaultCheckerPrefs(CheckerPrefsList* cp)
void PrefsManager::initDefaultCheckerPrefs(CheckerPrefsList& cp)
{
if (cp!=NULL)
struct checkerPrefs checkerSettings;
checkerSettings.ignoreErrors = false;
checkerSettings.autoCheck = true;
checkerSettings.checkGlyphs = true;
checkerSettings.checkOrphans = true;
checkerSettings.checkOverflow = true;
checkerSettings.checkPictures = true;
checkerSettings.checkResolution = true;
checkerSettings.checkTransparency = true;
checkerSettings.checkAnnotations = false;
checkerSettings.checkRasterPDF = true;
checkerSettings.checkForGIF = true;
checkerSettings.ignoreOffLayers = false;
checkerSettings.checkOffConflictLayers = false;
checkerSettings.minResolution = 144.0;
checkerSettings.maxResolution = 2400.0;
//TODO Stop translating these into settings!!!!!!!!!
cp.insert(CommonStrings::PostScript, checkerSettings);
cp.insert(CommonStrings::PDF_1_3 , checkerSettings);
checkerSettings.checkTransparency = false;
cp.insert(CommonStrings::PDF_1_4 , checkerSettings);
cp.insert(CommonStrings::PDF_1_5 , checkerSettings);
checkerSettings.checkTransparency = true;
checkerSettings.checkAnnotations = true;
checkerSettings.minResolution = 144.0;
cp.insert(CommonStrings::PDF_X1a , checkerSettings);
cp.insert(CommonStrings::PDF_X3 , checkerSettings);
}
 
void PrefsManager::insertMissingCheckerProfiles(CheckerPrefsList& cp)
{
CheckerPrefsList defaultList;
initDefaultCheckerPrefs(defaultList);
 
CheckerPrefsList::const_iterator it = defaultList.constBegin();
for (; it != defaultList.constEnd(); ++it)
{
struct checkerPrefs checkerSettings;
checkerSettings.ignoreErrors = false;
checkerSettings.autoCheck = true;
checkerSettings.checkGlyphs = true;
checkerSettings.checkOrphans = true;
checkerSettings.checkOverflow = true;
checkerSettings.checkPictures = true;
checkerSettings.checkResolution = true;
checkerSettings.checkTransparency = true;
checkerSettings.checkAnnotations = false;
checkerSettings.checkRasterPDF = true;
checkerSettings.checkForGIF = true;
checkerSettings.ignoreOffLayers = false;
checkerSettings.checkOffConflictLayers = false;
checkerSettings.minResolution = 144.0;
checkerSettings.maxResolution = 2400.0;
//TODO Stop translating these into settings!!!!!!!!!
cp->insert( CommonStrings::PostScript, checkerSettings);
cp->insert( CommonStrings::PDF_1_3 , checkerSettings);
checkerSettings.checkTransparency = false;
cp->insert( CommonStrings::PDF_1_4 , checkerSettings);
cp->insert( CommonStrings::PDF_1_5 , checkerSettings);
checkerSettings.checkTransparency = true;
checkerSettings.checkAnnotations = true;
checkerSettings.minResolution = 144.0;
cp->insert( CommonStrings::PDF_X1a , checkerSettings);
cp->insert( CommonStrings::PDF_X3 , checkerSettings);
QString name = it.key();
if (cp.contains(name))
continue;
cp.insert(name, it.value());
}
}
 
/branches/Version14x/Scribus/scribus/prefsmanager.h
66,11 → 66,15
*/
void initDefaults();
void initDefaultGUIFont(const QFont&);
void initDefaultCheckerPrefs(CheckerPrefsList* cp);
void initDefaultCheckerPrefs(CheckerPrefsList& cp);
void initDefaultActionKeys();
void applyLoadedShortCuts();
void initArrowStyles();
/*!
\brief Insert checker profiles not available in specified list
*/
void insertMissingCheckerProfiles(CheckerPrefsList& cp);
/*!
\author Craig Bradney
\date Thu 18 Nov 2004
\brief Set the user's preference file location. Rename any existing old preferences files
/branches/Version14x/Scribus/scribus/scribus.cpp
4033,9 → 4033,10
HaveDoc++;
if (doc->checkerProfiles.count() == 0)
{
prefsManager->initDefaultCheckerPrefs(&doc->checkerProfiles);
prefsManager->initDefaultCheckerPrefs(doc->checkerProfiles);
doc->curCheckProfile = CommonStrings::PostScript;
}
prefsManager->insertMissingCheckerProfiles(doc->checkerProfiles);
if (doc->PDF_Options.LPISettings.count() == 0)
{
struct LPIData lpo;