Remove definition KDE_IS_VERSION.

Signed-off-by: gregory guy <gregory-tde@laposte.net>
(cherry picked from commit 610b0fea26)
r14.0.x
gregory guy 3 years ago committed by Michele Calgaro
parent 6a98f451b6
commit eac5fa9db4
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -40,9 +40,9 @@
#include <klibloader.h>
#include <tdelocale.h>
#include <kprocess.h>
#if KDE_IS_VERSION(3,4,0)
#include <twin.h>
#endif
#include <stdio.h>
#include <X11/Xlib.h>
#include <X11/extensions/shape.h>
@ -76,10 +76,10 @@ int main(int argc, char **argv)
app.setMainWidget(mainBAB);
Corner leftCorner(Corner::left);
Corner rightCorner(Corner::right);
#if KDE_IS_VERSION(3,4,0)
KWin::setShadowSize(leftCorner.winId(), 0);
KWin::setShadowSize(rightCorner.winId(), 0);
#endif
if (!mainBAB->cornerCheck->isChecked())
{
leftCorner.hide();

@ -301,9 +301,7 @@ tdestyle_baghira_config::tdestyle_baghira_config(TQWidget *parent, const char *n
TQHBoxLayout *rwlh = new TQHBoxLayout(rulesWidget);
applist = new TDEListView(rulesWidget);
applist->setFullWidth(true);
#if KDE_IS_VERSION(3,3,91)
applist->setShadeSortColumn(false);
#endif
applist->setAllColumnsShowFocus( true );
applist->setSelectionMode(TQListView::Single);
applist->addColumn ( i18n("Name") );

@ -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;
}

@ -105,13 +105,11 @@ enum TitlebarType{
class BaghiraClient;
// #if KDE_IS_VERSION(3,3,91)
class ResizeHandle : public TQWidget
{
//#if KDE_IS_VERSION(3,3,91)
friend class BaghiraClient;
Q_OBJECT
#if KDE_IS_VERSION(3,3,91)
public:
ResizeHandle(BaghiraClient *parent);
protected:
@ -124,7 +122,6 @@ private:
void shape();
BaghiraClient *client;
TQPixmap pix;
#endif
};
// #endif

@ -249,10 +249,7 @@ void UserManager::doNewSession( bool lock_ )
i18n("Warning - New Session"),
KGuiItem(i18n("&Start New Session"), "fork"),
":confirmNewSession",
#if KDE_IS_VERSION(3,4,0) //3.4
KMessageBox::PlainCaption |
#endif
KMessageBox::Notify);
KMessageBox::PlainCaption | KMessageBox::Notify);
if (result==KMessageBox::Cancel)
return;

@ -143,13 +143,8 @@ MediaListBox::MediaListBox( TQWidget * parent, const char * name, WFlags f ) : R
popupMenu->insertItem(i18n("Device List"), devicePopup, 1, 0);
popupMenu->insertSeparator( 0 );
#if KDE_IS_VERSION(3,4,90)
insertItem(new ListBoxDevice("system", size_, i18n("My Computer"), "system:/", "", "", TRUE, FALSE, FALSE));
insertItem(new ListBoxDevice("network", size_, i18n("Network"), "remote:/", "", "", TRUE, FALSE, FALSE));
#else
insertItem(new ListBoxDevice("system", size_, i18n("My Computer"), "media:/", "", "", TRUE, FALSE, FALSE));
insertItem(new ListBoxDevice("network", size_, i18n("Network"), "lan:/localhost", "", "", TRUE, FALSE, FALSE));
#endif
insertItem(new ListBoxDevice("hdd_mount", size_, i18n("Startvolume"), TQDir::rootDirPath(), "", "", TRUE, FALSE, FALSE));
client = TDEApplication::dcopClient();
client->connectDCOPSignal("kded", "mediamanager", "mediumAdded(TQString)", "BaghiraSidebarIface", "mediumAdded(TQString)", FALSE);
@ -279,11 +274,7 @@ ListBoxDevice *MediaListBox::createListBoxDevice(TQStringList & deviceProperties
label = deviceProperties[MEDIALIST_PROPS*n+LABEL];
label = i18n(label.section( " (", 0, 0 ).utf8());
}
#if KDE_IS_VERSION(3,4,90)
return new ListBoxDevice( icon, size_, label, "system:/media/"+deviceProperties[MEDIALIST_PROPS*n+NAME], deviceProperties[MEDIALIST_PROPS*n+NAME], deviceProperties[MEDIALIST_PROPS*n+DEVICE_NODE], deviceProperties[MEDIALIST_PROPS*n+MOUNTED] == "true", icon.contains("dvd") || icon.contains("cdrom") || icon.contains("cdwriter"),icon.contains("floppy"), devicePopup->insertItem(deviceProperties[MEDIALIST_PROPS*n+NAME], this, SLOT(toggleDevice(int))));
#else
return new ListBoxDevice( icon, size_, label, "media:/"+deviceProperties[MEDIALIST_PROPS*n+NAME], deviceProperties[MEDIALIST_PROPS*n+NAME], deviceProperties[MEDIALIST_PROPS*n+DEVICE_NODE], deviceProperties[MEDIALIST_PROPS*n+MOUNTED] == "true", icon.contains("dvd") || icon.contains("cdrom") || icon.contains("cdwriter"),icon.contains("floppy"),devicePopup->insertItem(deviceProperties[MEDIALIST_PROPS*n+NAME], this, SLOT(toggleDevice(int))));
#endif
}
int MediaListBox::index (const TQString & name )

@ -812,9 +812,8 @@ void Panel::poof()
_poofAnimPix = new TQPixmap(_poofPix->width(), _poofPix->width());
if (!_poof)
_poof = new TQWidget(0,0, TQt::WType_TopLevel | TQt::WStyle_NoBorder | TQt::WStyle_StaysOnTop | TQt::WX11BypassWM);
#if KDE_IS_VERSION(3,3,91) //3.4 beta
KWin::setShadowSize(_poof->winId(), 0);
#endif
_poof->setFixedSize(_poofPix->width(), _poofPix->width());
int x = TQCursor::pos().x() - _poof->width()/2;
int y = TQCursor::pos().y() - _poof->height()/2;

@ -403,10 +403,8 @@ void LiquidStyle::polish( const TQStyleControlElementData &ceData, ControlElemen
w->setPalette( pal );
}
else
#if !KDE_IS_VERSION(3,4,3)
if (!(w->parent() && w->parent()->inherits("MiniBar")))
#endif
w->setBackgroundMode( TQWidget::NoBackground);
w->setBackgroundMode( TQWidget::NoBackground);
installObjectEventHandler(ceData, elementFlags, ptr, this);
goto kstpolish;
}

Loading…
Cancel
Save