aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/theme
diff options
context:
space:
mode:
authorGravatar Noldor2011-04-13 17:41:08 +0000
committerGravatar Noldor2011-04-13 17:41:08 +0000
commite38a0df10f6dd4b4e37d3ea67cf0d0cf65bcc312 (patch)
tree4813ae67898e0c8db08a3b2a1ff32ceb6fdab89a /src/modules/theme
parentFix in theme module (diff)
downloadKVIrc-e38a0df10f6dd4b4e37d3ea67cf0d0cf65bcc312.tar.gz
KVIrc-e38a0df10f6dd4b4e37d3ea67cf0d0cf65bcc312.tar.bz2
KVIrc-e38a0df10f6dd4b4e37d3ea67cf0d0cf65bcc312.zip
Another fix in theme module
git-svn-id: https://svn.kvirc.de/svn/trunk/kvirc@5784 17fca916-40b9-46aa-a4ea-0a15b648b75c
Diffstat (limited to 'src/modules/theme')
-rw-r--r--src/modules/theme/libkvitheme.cpp14
1 files changed, 3 insertions, 11 deletions
diff --git a/src/modules/theme/libkvitheme.cpp b/src/modules/theme/libkvitheme.cpp
index fb5d81ffe..2509f3c48 100644
--- a/src/modules/theme/libkvitheme.cpp
+++ b/src/modules/theme/libkvitheme.cpp
@@ -96,31 +96,23 @@ static bool theme_kvs_cmd_apply(KviKvsModuleCommandCall * c)
KVSM_PARAMETERS_BEGIN(c)
KVSM_PARAMETER("package_name",KVS_PT_STRING,0,szThemePackFile)
KVSM_PARAMETERS_END(c)
- QString szDir;
- g_pApp->getLocalKvircDirectory(szDir,KviApplication::Themes);
- szDir += KVI_PATH_SEPARATOR_CHAR;
- szDir += szThemePackFile;
KviThemeInfo * themeInfo = new KviThemeInfo();
- if(themeInfo->load(szDir))
+ if(themeInfo->load(szThemePackFile))
{
themeInfo->setSubdirectory(szThemePackFile);
if(KviMessageBox::yesNo(__tr2qs_ctx("Apply theme - KVIrc","theme"),
__tr2qs_ctx("Do you wish to apply theme \"%Q\" (version %Q)?","theme"),
&(themeInfo->name()),&(themeInfo->version())))
{
- QString szPath;
- themeInfo->getCompleteDirPath(szPath);
- if(szPath.isEmpty())return true;
-
KviThemeInfo out;
-
- if(!KviTheme::load(szPath,out))
+ if(!KviTheme::load(szThemePackFile,out))
{
QString szErr = out.lastError();
QString szMsg = QString(__tr2qs_ctx("Failed to apply the specified theme: %1","theme")).arg(szErr);
QMessageBox::critical(0,__tr2qs_ctx("Apply theme - KVIrc","theme"),szMsg,
QMessageBox::Ok,QMessageBox::NoButton,QMessageBox::NoButton);
}
+ return true;
}
}
c->warning(__tr2qs_ctx("The theme package '%Q' does not exist","theme"),&szThemePackFile);