diff options
| -rw-r--r-- | client/config/deKoratorconfig.cpp | 34 | ||||
| -rw-r--r-- | client/config/themes.cpp | 2 | ||||
| -rw-r--r-- | client/deKoratorclient.cpp | 134 | ||||
| -rw-r--r-- | client/deKoratorclient.h | 2 |
4 files changed, 86 insertions, 86 deletions
diff --git a/client/config/deKoratorconfig.cpp b/client/config/deKoratorconfig.cpp index 1bd5257..97475a8 100644 --- a/client/config/deKoratorconfig.cpp +++ b/client/config/deKoratorconfig.cpp @@ -372,12 +372,12 @@ void DeKoratorConfig::defaults() // misc TQRadioButton * button = ( TQRadioButton* ) dialog_->titlealign->child( "AlignHCenter" ); - if ( button ) button->setChecked( TRUE ); - dialog_->useMenuImageChkBox->setChecked( FALSE ); - dialog_->ignoreAppIcnCol->setChecked( FALSE ); - dialog_->dblClkCloseChkBox->setChecked( FALSE ); - dialog_->showBtmBorderChkBox->setChecked( FALSE ); - dialog_->useShdtextChkBox->setChecked( FALSE ); + if ( button ) button->setChecked( true ); + dialog_->useMenuImageChkBox->setChecked( false ); + dialog_->ignoreAppIcnCol->setChecked( false ); + dialog_->dblClkCloseChkBox->setChecked( false ); + dialog_->showBtmBorderChkBox->setChecked( false ); + dialog_->useShdtextChkBox->setChecked( false ); dialog_->activeShdtextXSpinBox->setValue( 0 ); dialog_->activeShdtextYSpinBox->setValue( 0 ); dialog_->activeShdColBtn->setColor( TQColor( 150, 150, 150 ) ); @@ -388,17 +388,17 @@ void DeKoratorConfig::defaults() dialog_->btnShiftYSpinBox->setValue( 0 ); // colors - dialog_->transparencyChkBox->setChecked( FALSE ); - dialog_->colorizeActFramesChkBox->setChecked( FALSE ); - dialog_->colorizeActButtonsChkBox->setChecked( FALSE ); - dialog_->colorizeInActFramesChkBox->setChecked( FALSE ); - dialog_->colorizeInActButtonsChkBox->setChecked( FALSE ); - dialog_->useAnimChkBox->setChecked( FALSE ); + dialog_->transparencyChkBox->setChecked( false ); + dialog_->colorizeActFramesChkBox->setChecked( false ); + dialog_->colorizeActButtonsChkBox->setChecked( false ); + dialog_->colorizeInActFramesChkBox->setChecked( false ); + dialog_->colorizeInActButtonsChkBox->setChecked( false ); + dialog_->useAnimChkBox->setChecked( false ); dialog_->animateEfeectsCombo->setCurrentText( "Intensity" ); dialog_->stepsSpinBox->setValue( 5 ); dialog_->intervalSpinBox->setValue( 30 ); - dialog_->KeepAnimateChkBox->setChecked( FALSE ); + dialog_->KeepAnimateChkBox->setChecked( false ); dialog_->hoverTypeCombo->setCurrentText( "To Gray" ); dialog_->effectsAmount_SpinBox->setValue( 5 ); @@ -409,9 +409,9 @@ void DeKoratorConfig::defaults() // dialog_->buttonsHoverColorizeComboBox->setCurrentText( "Liquid Method" ); // buttons - dialog_->useCusBtnClrChkBox->setChecked( FALSE ); - dialog_->cusColActBtnChkBox->setChecked( FALSE ); - dialog_->cusColInActBtnChkBox->setChecked( FALSE ); + dialog_->useCusBtnClrChkBox->setChecked( false ); + dialog_->cusColActBtnChkBox->setChecked( false ); + dialog_->cusColInActBtnChkBox->setChecked( false ); dialog_->closeClrBtn->setColor( TQColor( 150, 150, 150 ) ); dialog_->minClrBtn->setColor( TQColor( 150, 150, 150 ) ); dialog_->maxClrBtn->setColor( TQColor( 150, 150, 150 ) ); @@ -432,7 +432,7 @@ void DeKoratorConfig::defaults() dialog_->framesPathKurl->setURL( (deftheme.isNull() ? "" : deftheme + "deco") ); dialog_->buttonsPathKurl->setURL( (deftheme.isNull() ? "" : deftheme + "buttons") ); - dialog_->useMasks_Chkbox->setChecked( config_->readBoolEntry( "UseMasks", FALSE ) ); + dialog_->useMasks_Chkbox->setChecked( config_->readBoolEntry( "UseMasks", false ) ); dialog_->masksPathKurl->setURL( (deftheme.isNull() ? "" : deftheme + "masks") ); if(! deftheme.isNull()) { diff --git a/client/config/themes.cpp b/client/config/themes.cpp index 625929a..62d7fd8 100644 --- a/client/config/themes.cpp +++ b/client/config/themes.cpp @@ -294,7 +294,7 @@ TQStringList IconThemesConfig::findThemeDirs( const TQString &archiveName ) for ( TQStringList::Iterator it = entries.begin(); it != entries.end(); ++it ) { TQString name = ( TQString ) * it; - TQRegExp rxp = TQRegExp( "*-theme", TRUE, TRUE ); + TQRegExp rxp = TQRegExp( "*-theme", true, true ); int i = name.contains( rxp ); if ( !i ) { diff --git a/client/deKoratorclient.cpp b/client/deKoratorclient.cpp index 9ac8b34..2de0e1f 100644 --- a/client/deKoratorclient.cpp +++ b/client/deKoratorclient.cpp @@ -122,16 +122,16 @@ static int BOTTOMSHADEDRIGHTMASKHEIGHT = 0; // config // misc static TQt::AlignmentFlags TITLEALIGN = TQt::AlignHCenter; -static bool USEMENUEIMAGE = FALSE; -static bool IGNOREAPPICNCOL = FALSE; -static bool DBLCLKCLOSE = FALSE; -static bool SHOWBTMBORDER = FALSE; -static bool USESHDTEXT = FALSE; -static int ACTIVESHDTEXTX = FALSE; -static int ACTIVESHDTEXTY = FALSE; +static bool USEMENUEIMAGE = false; +static bool IGNOREAPPICNCOL = false; +static bool DBLCLKCLOSE = false; +static bool SHOWBTMBORDER = false; +static bool USESHDTEXT = false; +static int ACTIVESHDTEXTX = 0; +static int ACTIVESHDTEXTY = 0; static TQColor ACTIVESHADECOLOR = TQColor( 150, 150, 150 ); -static int INACTIVESHDTEXTX = FALSE; -static int INACTIVESHDTEXTY = FALSE; +static int INACTIVESHDTEXTX = 0; +static int INACTIVESHDTEXTY = 0; static TQColor INACTIVESHADECOLOR = TQColor( 150, 150, 150 ); static int BTNSHIFTX = 0; static int BTNSHIFTY = 0; @@ -139,12 +139,12 @@ static int BTNSHIFTY = 0; // colors -static bool USEANIMATION = TRUE; +static bool USEANIMATION = true; static TQString ANIMATIONTYPE = "Intensity"; static int STEPS = 5; static int INTERVAL = 5; -static int KEEPANIMATING = FALSE; +static bool KEEPANIMATING = false; static TQString BUTTONHOVERTYPE = "To Gray"; static float EFFECTAMOUNT = 5; @@ -159,7 +159,7 @@ static const uint ANIMATIONSTEPS = 100; // // paths -static bool USEMASKS = FALSE; +static bool USEMASKS = false; // pix arrays static TQPixmap *DECOARR[ decoCount ][ pixTypeCount ]; @@ -174,24 +174,24 @@ static TQPixmap *BUTTONPIXINACTARR[ buttonTypeAllCount ][ buttonStateCount ]; // DeKoratorFactory Class // ////////////////////////////////////////////////////////////////////////////// -bool DeKoratorFactory::initialized_ = FALSE; -bool DeKoratorFactory::colorizeActFrames_ = FALSE; -bool DeKoratorFactory::colorizeActButtons_ = FALSE; -bool DeKoratorFactory::colorizeInActFrames_ = FALSE; -bool DeKoratorFactory::colorizeInActButtons_ = FALSE; +bool DeKoratorFactory::initialized_ = false; +bool DeKoratorFactory::colorizeActFrames_ = false; +bool DeKoratorFactory::colorizeActButtons_ = false; +bool DeKoratorFactory::colorizeInActFrames_ = false; +bool DeKoratorFactory::colorizeInActButtons_ = false; -bool DeKoratorFactory::useCustomButtonsColors_ = FALSE; -bool DeKoratorFactory::customColorsActiveButtons_ = FALSE; -bool DeKoratorFactory::customColorsInActiveButtons_ = FALSE; +bool DeKoratorFactory::useCustomButtonsColors_ = false; +bool DeKoratorFactory::customColorsActiveButtons_ = false; +bool DeKoratorFactory::customColorsInActiveButtons_ = false; TQColor DeKoratorFactory::cusBtnCol_[ buttonTypeAllCount ]; -bool DeKoratorFactory::needInit_ = FALSE; -bool DeKoratorFactory::needReload_ = FALSE; +bool DeKoratorFactory::needInit_ = false; +bool DeKoratorFactory::needReload_ = false; TQString DeKoratorFactory::framesPath_ = ""; TQString DeKoratorFactory::buttonsPath_ = ""; TQString DeKoratorFactory::masksPath_ = ""; -bool DeKoratorFactory::transparency_ = FALSE; +bool DeKoratorFactory::transparency_ = false; extern "C" { @@ -211,7 +211,7 @@ DeKoratorFactory::DeKoratorFactory() TDEGlobal::locale()->insertCatalogue("twin-style-dekorator"); readConfig(); - initialized_ = TRUE; + initialized_ = true; imageHolder = new QImageHolder(TQImage(), TQImage()); @@ -242,7 +242,7 @@ DeKoratorFactory::DeKoratorFactory() // Destructor DeKoratorFactory::~DeKoratorFactory() { - initialized_ = FALSE; + initialized_ = false; int i, j, k; if (imageHolder) @@ -282,15 +282,15 @@ KDecoration* DeKoratorFactory::createDecoration( KDecorationBridge* b ) ////////////////////////////////////////////////////////////////////////////// // reset() // ------- -// Reset the handler. Returns TRUE if decorations need to be remade, FALSE if +// Reset the handler. Returns true if decorations need to be remade, false if // only a repaint is necessary bool DeKoratorFactory::reset( unsigned long changed ) { // captionBufferDirty_ = true; // read in the configuration - initialized_ = FALSE; + initialized_ = false; bool confchange = readConfig(); - initialized_ = TRUE; + initialized_ = true; if ( confchange || ( changed & ( SettingDecoration | SettingButtons | SettingBorder | SettingColors ) ) ) @@ -316,7 +316,7 @@ bool DeKoratorFactory::reset( unsigned long changed ) // // chooseRightPixmaps(); // - // return TRUE; + // return true; } //if ( DeKoratorFactory::needInit_ ) @@ -337,14 +337,14 @@ bool DeKoratorFactory::reset( unsigned long changed ) chooseRightPixmaps(); - //return TRUE; + //return true; } - return TRUE; + return true; } else { resetDecorations( changed ); - return FALSE; + return false; } } @@ -559,7 +559,7 @@ bool DeKoratorFactory::readConfig() oldUseMasks == USEMASKS && oldStyleBgCol == STYLEBGCOL ) - return FALSE; + return false; else { // if ( oldColorizeActFrames != DeKoratorFactory::colorizeActFrames_ || @@ -571,20 +571,20 @@ bool DeKoratorFactory::readConfig() // cusColChanged == true || // oldStyleBgCol != STYLEBGCOL // ) - // DeKoratorFactory::needInit_ = TRUE; + // DeKoratorFactory::needInit_ = true; // else - // DeKoratorFactory::needInit_ = FALSE; + // DeKoratorFactory::needInit_ = false; if ( oldFramesPath != DeKoratorFactory::framesPath_ || oldButtonsPath != DeKoratorFactory::buttonsPath_ || oldMasksPath != DeKoratorFactory::masksPath_ || oldTransparency != DeKoratorFactory::transparency_ ) - DeKoratorFactory::needReload_ = TRUE; + DeKoratorFactory::needReload_ = true; else - DeKoratorFactory::needReload_ = FALSE; + DeKoratorFactory::needReload_ = false; - return TRUE; + return true; } } @@ -911,7 +911,7 @@ void DeKoratorFactory::colorizePixmap( TQPixmap *pix, TQColor c, TQString colori if ( img.depth() != 32 ) img = img.convertDepth( 32 ); TQImage *dest = new TQImage( img.width(), img.height(), 32 ); - dest->setAlphaBuffer( TRUE ); + dest->setAlphaBuffer( true ); unsigned int *data = ( unsigned int * ) img.bits(); unsigned int *destData = ( unsigned int* ) dest->bits(); int total = img.width() * img.height(); @@ -970,7 +970,7 @@ void DeKoratorFactory::colorizePixmap( TQPixmap *pix, TQColor c, TQString colori // TQImage *dest; // *dest = img; TQImage *dest = new TQImage( img.width(), img.height(), 32 ); - dest->setAlphaBuffer( TRUE ); + dest->setAlphaBuffer( true ); unsigned int *data = ( unsigned int * ) img.bits(); unsigned int *destData = ( unsigned int* ) dest->bits(); int total = img.width() * img.height(); @@ -1290,7 +1290,7 @@ DeKoratorButton::DeKoratorButton( bool isLeft, int buttonWidth, int buttonHeight { //decoPixInAct_ = buttonPixInAct; animProgress = 0; - hover_ = FALSE; + hover_ = false; setBackgroundMode( NoBackground ); setFixedSize( buttonWidth_, BUTTONSHEIGHT ); setCursor( arrowCursor ); @@ -1338,10 +1338,10 @@ void DeKoratorButton::setPixmap( buttonTypeAll btnType ) // } // else // { - // deco_ = new TQBitmap(DECOSIZE, DECOSIZE, bitmap, TRUE); + // deco_ = new TQBitmap(DECOSIZE, DECOSIZE, bitmap, true); // deco_->setMask(*deco_); // } - repaint( FALSE ); + repaint( false ); } ////////////////////////////////////////////////////////////////////////////// @@ -1362,13 +1362,13 @@ void DeKoratorButton::enterEvent( TQEvent * e ) // if we wanted to do mouseovers, we would keep track of it here TQButton::enterEvent( e ); s = STEPS; - hover_ = TRUE; + hover_ = true; setCursor( TQt::PointingHandCursor ); if ( USEANIMATION ) animate(); else - repaint( FALSE ); + repaint( false ); } ////////////////////////////////////////////////////////////////////////////// @@ -1381,13 +1381,13 @@ void DeKoratorButton::leaveEvent( TQEvent * e ) TQButton::leaveEvent( e ); //STEPS = s; - hover_ = FALSE; + hover_ = false; unsetCursor (); if ( USEANIMATION ) animate(); else - repaint( FALSE ); + repaint( false ); } ////////////////////////////////////////////////////////////////////////////// @@ -1801,9 +1801,9 @@ void DeKoratorClient::init() // setup titlebar buttons for ( int n = 0; n < ButtonTypeCount; n++ ) button[ n ] = 0; - addButtons( titleLayout_, options() ->titleButtonsLeft(), TRUE ); + addButtons( titleLayout_, options() ->titleButtonsLeft(), true ); titleLayout_->addItem( titleBarSpacer_ ); - addButtons( titleLayout_, options() ->titleButtonsRight(), FALSE ); + addButtons( titleLayout_, options() ->titleButtonsRight(), false ); //right spacer titleLayout_->addItem( rightTitleBarSpacer_ ); @@ -2054,7 +2054,7 @@ void DeKoratorClient::activeChange() for ( int n = 0; n < ButtonTypeCount; n++ ) if ( button[ n ] ) button[ n ] ->reset(); - widget() ->repaint( FALSE ); + widget() ->repaint( false ); } ////////////////////////////////////////////////////////////////////////////// @@ -2103,7 +2103,7 @@ void DeKoratorClient::iconChange() if ( !USEMENUEIMAGE && button[ ButtonMenu ] ) { //button[ ButtonMenu ] ->setPixmap( 0 ); - button[ ButtonMenu ] ->repaint( FALSE ); + button[ ButtonMenu ] ->repaint( false ); } } @@ -2164,7 +2164,7 @@ void DeKoratorClient::shadeChange() for ( int n = 0; n < ButtonTypeCount; n++ ) if ( button[ n ] ) button[ n ] ->reset(); - widget() ->repaint( FALSE ); + widget() ->repaint( false ); //mainlayout_->setRowSpacing( 3, isSetShade() ? 0 : MARGIN ); // if ( DeKoratorFactory::useMasks_ ) @@ -2278,7 +2278,7 @@ TQSize DeKoratorClient::minimumSize() const // Return logical mouse position KDecoration::Position DeKoratorClient::mousePosition( const TQPoint & point ) const { - // bool res = TRUE; + // bool res = true; Position pos; if ( isShade() ) { @@ -2385,7 +2385,7 @@ KDecoration::Position DeKoratorClient::mousePosition( const TQPoint & point ) co bool DeKoratorClient::eventFilter( TQObject * obj, TQEvent * e ) { if ( obj != widget() ) - return FALSE; + return false; switch ( e->type() ) { @@ -2393,42 +2393,42 @@ bool DeKoratorClient::eventFilter( TQObject * obj, TQEvent * e ) case TQEvent::MouseButtonDblClick: { mouseDoubleClickEvent( static_cast<TQMouseEvent *>( e ) ); - return TRUE; + return true; } case TQEvent::Wheel: { wheelEvent( static_cast<TQWheelEvent *>( e ) ); - return TRUE; + return true; } case TQEvent::MouseButtonPress: { processMousePressEvent( static_cast<TQMouseEvent *>( e ) ); if ( USEMASKS ) doShape(); - return TRUE; + return true; } case TQEvent::Paint: { paintEvent( static_cast<TQPaintEvent *>( e ) ); - return TRUE; + return true; } case TQEvent::Resize: { resizeEvent( static_cast<TQResizeEvent *>( e ) ); - return TRUE; + return true; } case TQEvent::Show: { showEvent( static_cast<TQShowEvent *>( e ) ); - return TRUE; + return true; } default: { - return FALSE; + return false; } } - return FALSE; + return false; } ////////////////////////////////////////////////////////////////////////////// @@ -2611,7 +2611,7 @@ void DeKoratorClient::paintEvent( TQPaintEvent* ) //draw titleR text - painter2.setFont( options() ->font( isActive(), FALSE ) ); + painter2.setFont( options() ->font( isActive(), false ) ); painter2.setPen( options() ->color( KDecoration::ColorFont, isActive() ) ); TQt::AlignmentFlags titleAlignBak = TITLEALIGN; @@ -2770,9 +2770,9 @@ void DeKoratorClient::updateCaptionBuffer() // prepare the shadow textPixmap = TQPixmap( captionWidth + ( MARGIN * 2 ) , captionHeight ); // 2*2 px shadow space textPixmap.fill( TQColor( 0, 0, 0 ) ); - textPixmap.setMask( textPixmap.createHeuristicMask( TRUE ) ); + textPixmap.setMask( textPixmap.createHeuristicMask( true ) ); painter.begin( &textPixmap ); - painter.setFont( options() ->font( isActive(), FALSE ) ); + painter.setFont( options() ->font( isActive(), false ) ); painter.setPen( white ); painter.drawText( textPixmap.rect(), AlignCenter, caption() ); painter.end(); @@ -2915,7 +2915,7 @@ void DeKoratorClient::menuButtonPressed() // KDecorationFactory* f = factory(); // showWindowMenu( button[ ButtonMenu ] ->mapToGlobal( p ) ); // if ( !f->exists( this ) ) return ; // decoration was destroyed - // button[ ButtonMenu ] ->setDown( FALSE ); + // button[ ButtonMenu ] ->setDown( false ); // } static TQTime * t = NULL; @@ -2933,7 +2933,7 @@ void DeKoratorClient::menuButtonPressed() showWindowMenu( button[ ButtonMenu ] ->mapToGlobal( p ) ); if ( !f->exists( this ) ) return ; // decoration was destroyed - button[ ButtonMenu ] ->setDown( FALSE ); + button[ ButtonMenu ] ->setDown( false ); } else closing_ = true; diff --git a/client/deKoratorclient.h b/client/deKoratorclient.h index 6fc3bab..aef01b9 100644 --- a/client/deKoratorclient.h +++ b/client/deKoratorclient.h @@ -250,7 +250,7 @@ inline TQt::ButtonState DeKoratorButton::lastMousePress() const inline void DeKoratorButton::reset() { - repaint( FALSE ); + repaint( false ); } |
