r20048 by craig - More cleanup, mostly in shortwords
scribus-commit
scribus-commit at lists.scribus.net
Sun May 3 19:52:28 UTC 2015
Author: craig
Date: Sun May 3 19:52:28 2015
New Revision: 20048
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=20048
Log:
More cleanup, mostly in shortwords
Modified:
trunk/Scribus/scribus/plugins/short-words/configuration.cpp
trunk/Scribus/scribus/plugins/short-words/parse.cpp
trunk/Scribus/scribus/plugins/short-words/shortwords.cpp
trunk/Scribus/scribus/ui/propertiespalette_shape.cpp
Modified: trunk/Scribus/scribus/plugins/short-words/configuration.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20048&path=/trunk/Scribus/scribus/plugins/short-words/configuration.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/short-words/configuration.cpp (original)
+++ trunk/Scribus/scribus/plugins/short-words/configuration.cpp Sun May 3 19:52:28 2015
@@ -89,27 +89,20 @@
QStringList SWConfig::getShortWords(QString lang)
{
- //QStringList allShorts;
if (QFile::exists(RC_PATH_USR))
return getShortWordsFromFile(lang, RC_PATH_USR);
return getShortWordsFromFile(lang, RC_PATH);
- /*if (userConfig && QFile::exists(RC_PATH_USR))
- return getShortWordsFromFile(lang, RC_PATH_USR);
- if (!userConfig && QFile::exists(RC_PATH_USR))
- allShorts = getShortWordsFromFile(lang, RC_PATH_USR);
- return allShorts + getShortWordsFromFile(lang, RC_PATH);*/
}
QStringList SWConfig::getAvailableLanguageCodes(QString filename)
{
- QStringList nations;
- QString aRow, code, lang;
-
QFile f(filename);
if (!f.open(QIODevice::ReadOnly))
return QStringList();
QTextStream t(&f);
+ QStringList nations;
+ QString aRow, code, lang;
while (!t.atEnd())
{
aRow = t.readLine();
Modified: trunk/Scribus/scribus/plugins/short-words/parse.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20048&path=/trunk/Scribus/scribus/plugins/short-words/parse.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/short-words/parse.cpp (original)
+++ trunk/Scribus/scribus/plugins/short-words/parse.cpp Sun May 3 19:52:28 2015
@@ -144,30 +144,30 @@
void SWParse::parsePage(ScribusDoc* doc, int page)
{
- uint cnt = 0;
+ uint count = 0;
uint docItemsCount=doc->Items->count();
if (docItemsCount == 0)
return;
- for (uint a = 0; a < docItemsCount; ++a)
+ for (uint i = 0; i < docItemsCount; ++i)
{
- PageItem* b = doc->Items->at(a);
- if (b->OwnPage == page)
- ++cnt;
+ PageItem* pi = doc->Items->at(i);
+ if (pi->OwnPage == page)
+ ++count;
}
- doc->scMW()->mainWindowProgressBar->setMaximum(cnt);
+ doc->scMW()->mainWindowProgressBar->setMaximum(count);
doc->view()->GotoPage(page);
- uint i = 0;
- for (uint a = 0; a < docItemsCount; ++a)
+ uint j = 0;
+ for (uint i = 0; i < docItemsCount; ++i)
{
- PageItem* b = doc->Items->at(a);
- if (b->OwnPage == page)
+ PageItem* pi = doc->Items->at(i);
+ if (pi->OwnPage == page)
{
- doc->scMW()->mainWindowProgressBar->setValue(++i);
- parseItem(b);
+ doc->scMW()->mainWindowProgressBar->setValue(++j);
+ parseItem(pi);
}
}
- doc->scMW()->mainWindowProgressBar->setValue(cnt);
+ doc->scMW()->mainWindowProgressBar->setValue(count);
}
void SWParse::parseAll(ScribusDoc* doc)
Modified: trunk/Scribus/scribus/plugins/short-words/shortwords.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20048&path=/trunk/Scribus/scribus/plugins/short-words/shortwords.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/short-words/shortwords.cpp (original)
+++ trunk/Scribus/scribus/plugins/short-words/shortwords.cpp Sun May 3 19:52:28 2015
@@ -131,7 +131,8 @@
parse->lang = ""; // get it from style
doc->scMW()->setStatusBarInfoText(QObject::tr("Short Words processing. Wait please...", "short words plugin"));
- switch (dlg->actionSelected()) {
+ switch (dlg->actionSelected())
+ {
case 0:
parse->parseSelection(doc);
break;
Modified: trunk/Scribus/scribus/ui/propertiespalette_shape.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20048&path=/trunk/Scribus/scribus/ui/propertiespalette_shape.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/propertiespalette_shape.cpp (original)
+++ trunk/Scribus/scribus/ui/propertiespalette_shape.cpp Sun May 3 19:52:28 2015
@@ -543,7 +543,7 @@
void PropertiesPalette_Shape::languageChange()
{
- QString ptSuffix = tr(" pt");
+ QString ptSuffix = unitGetSuffixFromIndex(SC_PT);
QString suffix = m_doc ? unitGetSuffixFromIndex(m_doc->unitIndex()) : ptSuffix;
roundRect->setSuffix(suffix);
More information about the scribus-commit
mailing list