diff options
author | gregory guy <gregory-tde@laposte.net> | 2021-10-05 14:54:22 +0200 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2021-10-06 19:27:41 +0900 |
commit | eac5fa9db4545dd832b13bc5f79d7bb5d274c62b (patch) | |
tree | a11ebdcd9d44be4b20015092dd61e70cd5b2fefa /deco/baghiraclient.cpp | |
parent | 6a98f451b6617ce0a3602f2e21b26acfb2bd6e8e (diff) | |
download | tde-style-baghira-eac5fa9db4545dd832b13bc5f79d7bb5d274c62b.tar.gz tde-style-baghira-eac5fa9db4545dd832b13bc5f79d7bb5d274c62b.zip |
Remove definition KDE_IS_VERSION.
Signed-off-by: gregory guy <gregory-tde@laposte.net>
(cherry picked from commit 610b0fea26e0855ea2ded8d935288378335346b6)
Diffstat (limited to 'deco/baghiraclient.cpp')
-rw-r--r-- | deco/baghiraclient.cpp | 37 |
1 files changed, 8 insertions, 29 deletions
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<TQMouseEvent *>(e)->pos() ) && static_cast<TQMouseEvent *>(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<TQShowEvent *>( e ) ); return true; } |