From eac5fa9db4545dd832b13bc5f79d7bb5d274c62b Mon Sep 17 00:00:00 2001 From: gregory guy Date: Tue, 5 Oct 2021 14:54:22 +0200 Subject: Remove definition KDE_IS_VERSION. Signed-off-by: gregory guy (cherry picked from commit 610b0fea26e0855ea2ded8d935288378335346b6) --- deco/baghiraclient.cpp | 37 ++++++++----------------------------- 1 file changed, 8 insertions(+), 29 deletions(-) (limited to 'deco/baghiraclient.cpp') diff --git a/deco/baghiraclient.cpp b/deco/baghiraclient.cpp index 558ede3..ba55883 100644 --- a/deco/baghiraclient.cpp +++ b/deco/baghiraclient.cpp @@ -201,7 +201,7 @@ void DeMaximizer::setClient(BaghiraClient *client) // repaint(); } -#if KDE_IS_VERSION(3,3,91) + ////////////////////////////////////////////////////////////////////////////// // ResizeHandle() // --------------- @@ -289,7 +289,6 @@ void ResizeHandle::paintEvent ( TQPaintEvent * ) p.drawPixmap(0,0,pix); } -#endif ////////////////////////////////////////////////////////////////////////////// // BaghiraFactory() @@ -1458,7 +1457,7 @@ void BaghiraClient::init() return; } noDeco_ = false; -#if KDE_IS_VERSION(3,3,91) + //first try if there's an X setting unsigned char *data = 0; Atom actual; @@ -1510,23 +1509,7 @@ void BaghiraClient::init() } if (currentStyle > 4) currentStyle = BaghiraFactory::defaultMode(); -#else - TQSettings config; - config.beginGroup("/baghira/Style"); - if (config.readBoolEntry( "Design_Default", 1 ) == 2) - { - currentStyle = 2; - config.endGroup(); - } - else - { - config.endGroup(); - config.beginGroup("/baghira/Deco"); - int tmp = config.readNumEntry( "defaultMode", 1 ); - currentStyle = (tmp > -1 && tmp < 5) ? tmp : 1; - config.endGroup(); - } -#endif + createMainWidget( WResizeNoErase | WRepaintNoErase ); widget() ->installEventFilter( this ); widget() ->setBackgroundMode( NoBackground ); @@ -1567,9 +1550,7 @@ void BaghiraClient::init() plusminus = -1; isFaded = false; addButtons( titlelayout, options() ->titleButtonsRight() ); -#if KDE_IS_VERSION(3,3,91) grip = 0; -#endif if (BaghiraFactory::effect(currentStyle, true) >= Baghira::Brushed || BaghiraFactory::effect(currentStyle, false) >= Baghira::Brushed) HandlePix = TQPixmap(BaghiraFactory::pix(currentStyle, TitleBar, isActive(), false )); @@ -1835,10 +1816,9 @@ bool BaghiraClient::eventFilter( TQObject *obj, TQEvent *e ) case TQEvent::MouseButtonPress: { if (titlebar_->geometry().contains( static_cast(e)->pos() ) && static_cast(e)->state() == TQt::ControlButton){ currentStyle < 4 ? currentStyle++ : currentStyle = 0; -#if KDE_IS_VERSION(3,3,91) + unsigned long wmDesign = currentStyle; XChangeProperty(tqt_xdisplay(), windowId(), baghira_deco_design, XA_CARDINAL, 32, PropModeReplace, (unsigned char *) &wmDesign, 1L); -#endif widget()->repaint(); TQBitmap *m = NULL; TQBitmap *mn = NULL; @@ -1886,10 +1866,9 @@ bool BaghiraClient::eventFilter( TQObject *obj, TQEvent *e ) button[i]->repaint(); } } -#if KDE_IS_VERSION(3,3,91) if (grip) grip->updateLook(TRUE); -#endif + doShape(); return true; } @@ -1918,9 +1897,9 @@ bool BaghiraClient::eventFilter( TQObject *obj, TQEvent *e ) return true; } case TQEvent::Show: { -#if KDE_IS_VERSION(3,3,91) - if (!grip && BaghiraFactory::resizeGrip() && isResizable()) grip = new ResizeHandle(this); -#endif + if (!grip && BaghiraFactory::resizeGrip() && isResizable()) + grip = new ResizeHandle(this); + showEvent( static_cast( e ) ); return true; } -- cgit v1.2.1