summaryrefslogtreecommitdiffstats
path: root/deco/baghiraclient.cpp
diff options
context:
space:
mode:
authorgregory guy <gregory-tde@laposte.net>2021-10-05 14:54:22 +0200
committergregory guy <gregory-tde@laposte.net>2021-10-06 11:13:05 +0200
commit610b0fea26e0855ea2ded8d935288378335346b6 (patch)
tree79ae8f19d6e41b985729f79c3aadb4c0db5deefc /deco/baghiraclient.cpp
parent6216a7aa09fecd0262e90e9ee596eb711f8f65ad (diff)
downloadtde-style-baghira-610b0fea26e0855ea2ded8d935288378335346b6.tar.gz
tde-style-baghira-610b0fea26e0855ea2ded8d935288378335346b6.zip
Remove definition KDE_IS_VERSION.
Signed-off-by: gregory guy <gregory-tde@laposte.net>
Diffstat (limited to 'deco/baghiraclient.cpp')
-rw-r--r--deco/baghiraclient.cpp37
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;
}