aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/theme
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/theme')
-rw-r--r--src/modules/theme/PackThemeDialog.cpp1
-rw-r--r--src/modules/theme/SaveThemeDialog.cpp3
-rw-r--r--src/modules/theme/ThemeFunctions.cpp29
-rw-r--r--src/modules/theme/ThemeManagementDialog.cpp3
-rw-r--r--src/modules/theme/WebThemeInterfaceDialog.cpp1
-rw-r--r--src/modules/theme/WebThemeInterfaceDialog.h1
-rw-r--r--src/modules/theme/libkvitheme.cpp2
7 files changed, 17 insertions, 23 deletions
diff --git a/src/modules/theme/PackThemeDialog.cpp b/src/modules/theme/PackThemeDialog.cpp
index 32691a4d1..4394c0913 100644
--- a/src/modules/theme/PackThemeDialog.cpp
+++ b/src/modules/theme/PackThemeDialog.cpp
@@ -465,4 +465,3 @@ bool PackThemeDialog::packTheme()
return true;
}
-
diff --git a/src/modules/theme/SaveThemeDialog.cpp b/src/modules/theme/SaveThemeDialog.cpp
index 4b4af497c..19e3ede75 100644
--- a/src/modules/theme/SaveThemeDialog.cpp
+++ b/src/modules/theme/SaveThemeDialog.cpp
@@ -163,7 +163,7 @@ SaveThemeDialog::SaveThemeDialog(QWidget * pParent)
ozText += __tr2qs_ctx("Hit the <b>\"Next\"</b> button to continue.","theme");
ozText += "<p>";
- pLayout->addWidget(m_pSaveIconsCheckBox,0,0);
+ pLayout->addWidget(m_pSaveIconsCheckBox,0,0);
pLabel->setText(ozText);
pLayout->addWidget(pLabel,1,0);
pLayout->setRowStretch(2,1);
@@ -323,4 +323,3 @@ bool SaveThemeDialog::saveTheme()
return true;
}
-
diff --git a/src/modules/theme/ThemeFunctions.cpp b/src/modules/theme/ThemeFunctions.cpp
index e0542534e..c1e464049 100644
--- a/src/modules/theme/ThemeFunctions.cpp
+++ b/src/modules/theme/ThemeFunctions.cpp
@@ -381,7 +381,7 @@ namespace ThemeFunctions
g_pMainWindow->showNormal();
return bResult;
}
-
+
bool packageThemes(
const QString &szPackagePath,
@@ -416,15 +416,15 @@ namespace ThemeFunctions
szError = __tr2qs_ctx("Failed to load the selected image: please fix it","theme");
return false;
}
-
+
if((pix.width() > 300) || (pix.height() > 225))
out = out.fromImage(pix.scaled(300,225,Qt::KeepAspectRatio));
else
out=out.fromImage(pix);
}
-
+
KviPackageWriter f;
-
+
f.addInfoField("PackageType","ThemePack");
f.addInfoField("ThemePackVersion",KVI_CURRENT_THEME_ENGINE_VERSION);
f.addInfoField("Name",szPackageName);
@@ -435,7 +435,7 @@ namespace ThemeFunctions
// to ensure qt4 will use the default() locale and not the system() one
f.addInfoField("Date",QDateTime::currentDateTime().toString(Qt::ISODate));
f.addInfoField("Application","KVIrc " KVI_VERSION "." KVI_SOURCES_DATE);
-
+
if(!out.isNull())
{
QByteArray * pba = new QByteArray();
@@ -445,12 +445,12 @@ namespace ThemeFunctions
buffer.close();
f.addInfoField("Image",pba); // cool :) [no disk access needed]
}
-
+
QString szTmp;
-
+
szTmp.setNum(lThemeInfoList.count());
f.addInfoField("ThemeCount",szTmp);
-
+
int iIdx = 0;
for(KviThemeInfo * pInfo = lThemeInfoList.first();pInfo;pInfo = lThemeInfoList.next())
{
@@ -464,10 +464,10 @@ namespace ThemeFunctions
szError = __tr2qs_ctx("Invalid theme version","theme");
return false;
}
-
+
QString szSubdir = pInfo->name() + QString("-") + pInfo->version();
szSubdir.replace(QRegExp("[^a-zA-Z0-9_\\-.][^a-zA-Z0-9_\\-.]*"),"_");
-
+
szTmp = QString("Theme%1Name").arg(iIdx);
f.addInfoField(szTmp,pInfo->name());
szTmp = QString("Theme%1Version").arg(iIdx);
@@ -489,7 +489,7 @@ namespace ThemeFunctions
{
szTmp = QString("Theme%1Screenshot").arg(iIdx);
QByteArray * pba = new QByteArray();
-
+
QBuffer bufferz(pba,0);
bufferz.open(QIODevice::WriteOnly);
pixScreenshot.save(&bufferz,"PNG");
@@ -504,10 +504,10 @@ namespace ThemeFunctions
szError += f.lastError();
return false;
}
-
+
iIdx++;
}
-
+
if(!f.pack(szPackagePath))
{
szError = __tr2qs_ctx("Packaging failed","theme");
@@ -515,8 +515,7 @@ namespace ThemeFunctions
szError += f.lastError();
return false;
}
-
+
return true;
}
}
-
diff --git a/src/modules/theme/ThemeManagementDialog.cpp b/src/modules/theme/ThemeManagementDialog.cpp
index a20c2f7fd..434c9b69d 100644
--- a/src/modules/theme/ThemeManagementDialog.cpp
+++ b/src/modules/theme/ThemeManagementDialog.cpp
@@ -468,7 +468,7 @@ void ThemeManagementDialog::fillThemeBox(bool bBuiltin)
for(int i=0;i<slThemes.count();i++)
{
//qDebug("Installed theme %s builtin %d",slThemes.at(i).toUtf8().data(),bBuiltin);
-
+
KviThemeInfo * inf = new KviThemeInfo();
if(inf->load(slThemes.at(i),bBuiltin ? KviThemeInfo::Builtin : KviThemeInfo::User))
{
@@ -556,4 +556,3 @@ void ThemeManagementDialog::tipRequest(QListWidgetItem *,const QPoint &)
// pTip->tip(m_pListWidget->visualItemRect(it),szThemeDescription);
*/
}
-
diff --git a/src/modules/theme/WebThemeInterfaceDialog.cpp b/src/modules/theme/WebThemeInterfaceDialog.cpp
index ceb4e9ca0..eb0d1dbed 100644
--- a/src/modules/theme/WebThemeInterfaceDialog.cpp
+++ b/src/modules/theme/WebThemeInterfaceDialog.cpp
@@ -76,4 +76,3 @@ bool WebThemeInterfaceDialog::packageIsInstalled(const QString &szId,const QStri
#endif //COMPILE_WEBKIT_SUPPORT
-
diff --git a/src/modules/theme/WebThemeInterfaceDialog.h b/src/modules/theme/WebThemeInterfaceDialog.h
index dac3efc74..e8e9a1533 100644
--- a/src/modules/theme/WebThemeInterfaceDialog.h
+++ b/src/modules/theme/WebThemeInterfaceDialog.h
@@ -53,4 +53,3 @@ protected:
#endif //_WEBTHEMEINTERFACEDIALOG_H_
-
diff --git a/src/modules/theme/libkvitheme.cpp b/src/modules/theme/libkvitheme.cpp
index 46b8d671c..bf26f9116 100644
--- a/src/modules/theme/libkvitheme.cpp
+++ b/src/modules/theme/libkvitheme.cpp
@@ -307,7 +307,7 @@ static bool theme_kvs_cmd_pack(KviKvsModuleCommandCall * c)
kvs_uint_t s = pArray->size();
QStringList lThemeList;
-
+
for(kvs_uint_t i=0;i<s;i++)
{
KviKvsVariant * v = pArray->at(i);