From e38a0df10f6dd4b4e37d3ea67cf0d0cf65bcc312 Mon Sep 17 00:00:00 2001 From: Noldor Date: Wed, 13 Apr 2011 17:41:08 +0000 Subject: Another fix in theme module git-svn-id: https://svn.kvirc.de/svn/trunk/kvirc@5784 17fca916-40b9-46aa-a4ea-0a15b648b75c --- src/modules/theme/libkvitheme.cpp | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'src/modules/theme/libkvitheme.cpp') 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); -- cgit v1.3.1-10-gc9f91