summaryrefslogtreecommitdiffstats
path: root/client/deKoratorclient.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'client/deKoratorclient.cpp')
-rw-r--r--client/deKoratorclient.cpp110
1 files changed, 76 insertions, 34 deletions
diff --git a/client/deKoratorclient.cpp b/client/deKoratorclient.cpp
index 4dd1834..e5d89d9 100644
--- a/client/deKoratorclient.cpp
+++ b/client/deKoratorclient.cpp
@@ -600,40 +600,82 @@ void DeKoratorFactory::loadPixmaps()
// deco
- // top frame from left to right
- // enable if one of those images exist
- bool optLeft = DECOARR[ topLeftFrame ][ orig ] ->load( decoPixDir + "/leftTopFrameBg.png" );
- bool optMid = DECOARR[ topMidFrame ][ orig ] ->load( decoPixDir + "/midTopFrameBg.png" );
- bool optRight = DECOARR[ topRightFrame ][ orig ] ->load( decoPixDir + "/rightTopFrameBg.png" );
- HASTOPFRAME = optLeft && optMid && optRight;
-
- // title bar from left to right
- DECOARR[ leftUpperCornerFrame ][ orig ] ->load( decoPixDir + "/topLeftCornerBg.png" );
- DECOARR[ buttonsLeft ][ orig ] ->load( decoPixDir + "/leftButtonsBg.png" );
- DECOARR[ titleLeft ][ orig ] ->load( decoPixDir + "/leftTitleBg.png" );
- DECOARR[ titleMid ][ orig ] ->load( decoPixDir + "/midTitleBg.png" );
- DECOARR[ titleRight ][ orig ] ->load( decoPixDir + "/rightTitleBg.png" );
- DECOARR[ buttonsRight ][ orig ] ->load( decoPixDir + "/rightButtonsBg.png" );
- DECOARR[ rightUpperCornerFrame ][ orig ] ->load( decoPixDir + "/topRightCornerBg.png" );
- // left frame from top to bottom
- DECOARR[ leftUpperFrame ][ orig ] ->load( decoPixDir + "/topLeftFrameBg.png" );
- DECOARR[ leftMidFrame ][ orig ] ->load( decoPixDir + "/midLeftFrameBg.png" );
- DECOARR[ leftLowerCornerFrame ][ orig ] ->load( decoPixDir + "/bottomLeftFrameBg.png" );
- // bottom frame from left to right
- DECOARR[ bottomLeftFrame ][ orig ] ->load( decoPixDir + "/leftBottomFrameBg.png" );
- DECOARR[ bottomMidFrame ][ orig ] ->load( decoPixDir + "/midBottomFrameBg.png" );
- DECOARR[ bottomRightFrame ][ orig ] ->load( decoPixDir + "/rightBottomFrameBg.png" );
- // bottom shaded frame from left to right
- // enable if one of those images exist
- optLeft = DECOARR[ bottomShadedLeftFrame ][ orig ] ->load( decoPixDir + "/leftBottomShadedFrameBg.png" );
- optMid = DECOARR[ bottomShadedMidFrame ][ orig ] ->load( decoPixDir + "/midBottomShadedFrameBg.png" );
- optRight = DECOARR[ bottomShadedRightFrame ][ orig ] ->load( decoPixDir + "/rightBottomShadedFrameBg.png" );
- HASBOTTOMSHADEDFRAME = optLeft && optMid && optRight;
-
- // right frame from top to bottom
- DECOARR[ rightUpperFrame ][ orig ] ->load( decoPixDir + "/topRightFrameBg.png" );
- DECOARR[ rightMidFrame ][ orig ] ->load( decoPixDir + "/midRightFrameBg.png" );
- DECOARR[ rightLowerCornerFrame ][ orig ] ->load( decoPixDir + "/bottomRightFrameBg.png" );
+ // image 'leftUpperCornerFrameBg.png' doesn't exist in the old naming scheme, so we can simply check for that.
+ bool useNewFileNames = DECOARR[ leftUpperCornerFrame ][ orig ] ->load( decoPixDir + "/leftUpperCornerFrameBg.png" );
+ if ( useNewFileNames )
+ {
+ // top frame from left to right
+ // enable if one of those images exist
+ bool optLeft = DECOARR[ topLeftFrame ][ orig ] ->load( decoPixDir + "/topLeftFrameBg.png" );
+ bool optMid = DECOARR[ topMidFrame ][ orig ] ->load( decoPixDir + "/topMidFrameBg.png" );
+ bool optRight = DECOARR[ topRightFrame ][ orig ] ->load( decoPixDir + "/topRightFrameBg.png" );
+ HASTOPFRAME = optLeft && optMid && optRight;
+
+ // title bar from left to right
+ DECOARR[ leftUpperCornerFrame ][ orig ] ->load( decoPixDir + "/leftUpperCornerFrameBg.png" );
+ DECOARR[ buttonsLeft ][ orig ] ->load( decoPixDir + "/buttonsLeftBg.png" );
+ DECOARR[ titleLeft ][ orig ] ->load( decoPixDir + "/titleLeftBg.png" );
+ DECOARR[ titleMid ][ orig ] ->load( decoPixDir + "/titleMidBg.png" );
+ DECOARR[ titleRight ][ orig ] ->load( decoPixDir + "/titleRightBg.png" );
+ DECOARR[ buttonsRight ][ orig ] ->load( decoPixDir + "/buttonsRightBg.png" );
+ DECOARR[ rightUpperCornerFrame ][ orig ] ->load( decoPixDir + "/rightUpperCornerFrameBg.png" );
+ // left frame from top to bottom
+ DECOARR[ leftUpperFrame ][ orig ] ->load( decoPixDir + "/leftUpperFrameBg.png" );
+ DECOARR[ leftMidFrame ][ orig ] ->load( decoPixDir + "/leftMidFrameBg.png" );
+ DECOARR[ leftLowerCornerFrame ][ orig ] ->load( decoPixDir + "/leftLowerCornerFrameBg.png" );
+ // bottom frame from left to right
+ DECOARR[ bottomLeftFrame ][ orig ] ->load( decoPixDir + "/bottomLeftFrameBg.png" );
+ DECOARR[ bottomMidFrame ][ orig ] ->load( decoPixDir + "/bottomMidFrameBg.png" );
+ DECOARR[ bottomRightFrame ][ orig ] ->load( decoPixDir + "/bottomRightFrameBg.png" );
+ // bottom shaded frame from left to right
+ // enable if one of those images exist
+ optLeft = DECOARR[ bottomShadedLeftFrame ][ orig ] ->load( decoPixDir + "/bottomShadedLeftFrameBg.png" );
+ optMid = DECOARR[ bottomShadedMidFrame ][ orig ] ->load( decoPixDir + "/bottomShadedMidFrameBg.png" );
+ optRight = DECOARR[ bottomShadedRightFrame ][ orig ] ->load( decoPixDir + "/bottomShadedRightFrameBg.png" );
+ HASBOTTOMSHADEDFRAME = optLeft && optMid && optRight;
+
+ // right frame from top to bottom
+ DECOARR[ rightUpperFrame ][ orig ] ->load( decoPixDir + "/rightUpperFrameBg.png" );
+ DECOARR[ rightMidFrame ][ orig ] ->load( decoPixDir + "/rightMidFrameBg.png" );
+ DECOARR[ rightLowerCornerFrame ][ orig ] ->load( decoPixDir + "/rightLowerCornerFrameBg.png" );
+ }
+ else
+ {
+ // top frame from left to right
+ // enable if one of those images exist
+ bool optLeft = DECOARR[ topLeftFrame ][ orig ] ->load( decoPixDir + "/leftTopFrameBg.png" );
+ bool optMid = DECOARR[ topMidFrame ][ orig ] ->load( decoPixDir + "/midTopFrameBg.png" );
+ bool optRight = DECOARR[ topRightFrame ][ orig ] ->load( decoPixDir + "/rightTopFrameBg.png" );
+ HASTOPFRAME = optLeft && optMid && optRight;
+
+ // title bar from left to right
+ DECOARR[ leftUpperCornerFrame ][ orig ] ->load( decoPixDir + "/topLeftCornerBg.png" );
+ DECOARR[ buttonsLeft ][ orig ] ->load( decoPixDir + "/leftButtonsBg.png" );
+ DECOARR[ titleLeft ][ orig ] ->load( decoPixDir + "/leftTitleBg.png" );
+ DECOARR[ titleMid ][ orig ] ->load( decoPixDir + "/midTitleBg.png" );
+ DECOARR[ titleRight ][ orig ] ->load( decoPixDir + "/rightTitleBg.png" );
+ DECOARR[ buttonsRight ][ orig ] ->load( decoPixDir + "/rightButtonsBg.png" );
+ DECOARR[ rightUpperCornerFrame ][ orig ] ->load( decoPixDir + "/topRightCornerBg.png" );
+ // left frame from top to bottom
+ DECOARR[ leftUpperFrame ][ orig ] ->load( decoPixDir + "/topLeftFrameBg.png" );
+ DECOARR[ leftMidFrame ][ orig ] ->load( decoPixDir + "/midLeftFrameBg.png" );
+ DECOARR[ leftLowerCornerFrame ][ orig ] ->load( decoPixDir + "/bottomLeftFrameBg.png" );
+ // bottom frame from left to right
+ DECOARR[ bottomLeftFrame ][ orig ] ->load( decoPixDir + "/leftBottomFrameBg.png" );
+ DECOARR[ bottomMidFrame ][ orig ] ->load( decoPixDir + "/midBottomFrameBg.png" );
+ DECOARR[ bottomRightFrame ][ orig ] ->load( decoPixDir + "/rightBottomFrameBg.png" );
+ // bottom shaded frame from left to right
+ // enable if one of those images exist
+ optLeft = DECOARR[ bottomShadedLeftFrame ][ orig ] ->load( decoPixDir + "/leftBottomShadedFrameBg.png" );
+ optMid = DECOARR[ bottomShadedMidFrame ][ orig ] ->load( decoPixDir + "/midBottomShadedFrameBg.png" );
+ optRight = DECOARR[ bottomShadedRightFrame ][ orig ] ->load( decoPixDir + "/rightBottomShadedFrameBg.png" );
+ HASBOTTOMSHADEDFRAME = optLeft && optMid && optRight;
+
+ // right frame from top to bottom
+ DECOARR[ rightUpperFrame ][ orig ] ->load( decoPixDir + "/topRightFrameBg.png" );
+ DECOARR[ rightMidFrame ][ orig ] ->load( decoPixDir + "/midRightFrameBg.png" );
+ DECOARR[ rightLowerCornerFrame ][ orig ] ->load( decoPixDir + "/bottomRightFrameBg.png" );
+ }
// buttons