From ea06d9bbbd8d8ef75034bfc3f62838f193537984 Mon Sep 17 00:00:00 2001 From: Robert Förster Date: Tue, 1 Sep 2009 22:12:36 +0000 Subject: - trailing whitespace cleanups all over the place - removed charset dependent manpages since it really makes no sense to distribute them, they are getting installed in non standard places and one manpage per language is enough - added SpotChat to the serverdb, happens to be my network anyway :P (someone should remind me to check all the networks and servers there so we can do a cleanup if needed git-svn-id: https://svn.kvirc.de/svn/trunk/kvirc@3463 17fca916-40b9-46aa-a4ea-0a15b648b75c --- src/modules/theme/themefunctions.cpp | 30 +++++++++++++++--------------- src/modules/theme/themefunctions.h | 2 +- 2 files changed, 16 insertions(+), 16 deletions(-) (limited to 'src/modules/theme') diff --git a/src/modules/theme/themefunctions.cpp b/src/modules/theme/themefunctions.cpp index 446d6797c..9c4c04ad6 100644 --- a/src/modules/theme/themefunctions.cpp +++ b/src/modules/theme/themefunctions.cpp @@ -58,7 +58,7 @@ namespace KviThemeFunctions KviHtmlDialogData hd; const char * check_fields[] = { "Name", "Version", "Author", "Description", "Date", "Application" }; - + // check if it is a valid theme file KviPackageReader r; if(!r.readHeader(szThemePackageFileName)) @@ -67,37 +67,37 @@ namespace KviThemeFunctions KviQString::sprintf(szError,__tr2qs_ctx("The selected file does not seem to be a valid KVIrc package: %Q","theme"),&szErr); return false; } - + pInfoFields = r.stringInfoFields(); - + pValue = pInfoFields->find("PackageType"); if(!pValue)return notAValidThemePackage(szError); if(!KviQString::equalCI(*pValue,"ThemePack"))return notAValidThemePackage(szError); pValue = pInfoFields->find("ThemePackVersion"); if(!pValue)return notAValidThemePackage(szError); if(!KviQString::equalCI(*pValue,"1"))return notAValidThemePackage(szError); - + // make sure the default fields exist for(int i=0;i<6;i++) { pValue = pInfoFields->find(check_fields[i]); if(!pValue)return notAValidThemePackage(szError); } - + pValue = pInfoFields->find("ThemeCount"); if(!pValue)return notAValidThemePackage(szError); bool bOk; int iThemeCount = pValue->toInt(&bOk); if(!bOk)return notAValidThemePackage(szError); if(iThemeCount < 1)return notAValidThemePackage(szError); - + // ok.. it should be really valid at this point - + // load its picture pByteArray = r.binaryInfoFields()->find("Image"); if(pByteArray) pix.loadFromData(*pByteArray,0,0); - + if(pix.isNull()) { // load the default icon @@ -129,11 +129,11 @@ namespace KviThemeFunctions int iIdx = 0; int iValidThemeCount = iThemeCount; - + while(iIdx < iThemeCount) { bool bValid = true; - + QString szThemeName; QString szThemeVersion; QString szThemeDescription; @@ -256,7 +256,7 @@ namespace KviThemeFunctions &szWarnings, &szShowDetails ); - + hd.addImageResource("theme_dialog_pack_image",pix); hd.addHtmlResource("theme_dialog_details",szDetails); hd.addHtmlResource("theme_dialog_main",hd.szHtmlText); @@ -277,7 +277,7 @@ namespace KviThemeFunctions hd.iFlags = KviHtmlDialogData::ForceMinimumSize; bInstall = KviHtmlDialog::display(pDialogParent,&hd) == 2; - + if(bInstall) { QString szUnpackPath; @@ -373,13 +373,13 @@ namespace KviThemeFunctions if(g_pFrame->isMaximized()) bMaximizeFrame = false; } - + if(bMaximizeFrame) g_pFrame->showMaximized(); - + QPixmap pix = QPixmap::grabWidget(g_pFrame); bool bResult = true; - + if(pix.isNull()) bResult = false; else { diff --git a/src/modules/theme/themefunctions.h b/src/modules/theme/themefunctions.h index f7b357e5b..dd29fe4bd 100644 --- a/src/modules/theme/themefunctions.h +++ b/src/modules/theme/themefunctions.h @@ -47,7 +47,7 @@ namespace KviThemeFunctions const QPixmap &pixScreenshot, int iUniqueIndexInDocument = 0, KviHtmlDialogData *hd=0 - + ); bool makeKVIrcScreenshot(const QString &szSavePngFilePath,bool bMaximizeFrame = false); } -- cgit v1.3.1-10-gc9f91