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

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

@ -201,7 +201,7 @@ void DeMaximizer::setClient(BaghiraClient *client)
// repaint(); // repaint();
} }
#if KDE_IS_VERSION(3,3,91)
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
// ResizeHandle() // ResizeHandle()
// --------------- // ---------------
@ -289,7 +289,6 @@ void ResizeHandle::paintEvent ( TQPaintEvent * )
p.drawPixmap(0,0,pix); p.drawPixmap(0,0,pix);
} }
#endif
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
// BaghiraFactory() // BaghiraFactory()
@ -1458,7 +1457,7 @@ void BaghiraClient::init()
return; return;
} }
noDeco_ = false; noDeco_ = false;
#if KDE_IS_VERSION(3,3,91)
//first try if there's an X setting //first try if there's an X setting
unsigned char *data = 0; unsigned char *data = 0;
Atom actual; Atom actual;
@ -1510,23 +1509,7 @@ void BaghiraClient::init()
} }
if (currentStyle > 4) if (currentStyle > 4)
currentStyle = BaghiraFactory::defaultMode(); 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 ); createMainWidget( WResizeNoErase | WRepaintNoErase );
widget() ->installEventFilter( this ); widget() ->installEventFilter( this );
widget() ->setBackgroundMode( NoBackground ); widget() ->setBackgroundMode( NoBackground );
@ -1567,9 +1550,7 @@ void BaghiraClient::init()
plusminus = -1; plusminus = -1;
isFaded = false; isFaded = false;
addButtons( titlelayout, options() ->titleButtonsRight() ); addButtons( titlelayout, options() ->titleButtonsRight() );
#if KDE_IS_VERSION(3,3,91)
grip = 0; grip = 0;
#endif
if (BaghiraFactory::effect(currentStyle, true) >= Baghira::Brushed || BaghiraFactory::effect(currentStyle, false) >= Baghira::Brushed) if (BaghiraFactory::effect(currentStyle, true) >= Baghira::Brushed || BaghiraFactory::effect(currentStyle, false) >= Baghira::Brushed)
HandlePix = TQPixmap(BaghiraFactory::pix(currentStyle, TitleBar, isActive(), false )); HandlePix = TQPixmap(BaghiraFactory::pix(currentStyle, TitleBar, isActive(), false ));
@ -1835,10 +1816,9 @@ bool BaghiraClient::eventFilter( TQObject *obj, TQEvent *e )
case TQEvent::MouseButtonPress: { case TQEvent::MouseButtonPress: {
if (titlebar_->geometry().contains( static_cast<TQMouseEvent *>(e)->pos() ) && static_cast<TQMouseEvent *>(e)->state() == TQt::ControlButton){ if (titlebar_->geometry().contains( static_cast<TQMouseEvent *>(e)->pos() ) && static_cast<TQMouseEvent *>(e)->state() == TQt::ControlButton){
currentStyle < 4 ? currentStyle++ : currentStyle = 0; currentStyle < 4 ? currentStyle++ : currentStyle = 0;
#if KDE_IS_VERSION(3,3,91)
unsigned long wmDesign = currentStyle; unsigned long wmDesign = currentStyle;
XChangeProperty(tqt_xdisplay(), windowId(), baghira_deco_design, XA_CARDINAL, 32, PropModeReplace, (unsigned char *) &wmDesign, 1L); XChangeProperty(tqt_xdisplay(), windowId(), baghira_deco_design, XA_CARDINAL, 32, PropModeReplace, (unsigned char *) &wmDesign, 1L);
#endif
widget()->repaint(); widget()->repaint();
TQBitmap *m = NULL; TQBitmap *m = NULL;
TQBitmap *mn = NULL; TQBitmap *mn = NULL;
@ -1886,10 +1866,9 @@ bool BaghiraClient::eventFilter( TQObject *obj, TQEvent *e )
button[i]->repaint(); button[i]->repaint();
} }
} }
#if KDE_IS_VERSION(3,3,91)
if (grip) if (grip)
grip->updateLook(TRUE); grip->updateLook(TRUE);
#endif
doShape(); doShape();
return true; return true;
} }
@ -1918,9 +1897,9 @@ bool BaghiraClient::eventFilter( TQObject *obj, TQEvent *e )
return true; return true;
} }
case TQEvent::Show: { case TQEvent::Show: {
#if KDE_IS_VERSION(3,3,91) if (!grip && BaghiraFactory::resizeGrip() && isResizable())
if (!grip && BaghiraFactory::resizeGrip() && isResizable()) grip = new ResizeHandle(this); grip = new ResizeHandle(this);
#endif
showEvent( static_cast<TQShowEvent *>( e ) ); showEvent( static_cast<TQShowEvent *>( e ) );
return true; return true;
} }

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

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

@ -143,13 +143,8 @@ MediaListBox::MediaListBox( TQWidget * parent, const char * name, WFlags f ) : R
popupMenu->insertItem(i18n("Device List"), devicePopup, 1, 0); popupMenu->insertItem(i18n("Device List"), devicePopup, 1, 0);
popupMenu->insertSeparator( 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("system", size_, i18n("My Computer"), "system:/", "", "", TRUE, FALSE, FALSE));
insertItem(new ListBoxDevice("network", size_, i18n("Network"), "remote:/", "", "", 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)); insertItem(new ListBoxDevice("hdd_mount", size_, i18n("Startvolume"), TQDir::rootDirPath(), "", "", TRUE, FALSE, FALSE));
client = TDEApplication::dcopClient(); client = TDEApplication::dcopClient();
client->connectDCOPSignal("kded", "mediamanager", "mediumAdded(TQString)", "BaghiraSidebarIface", "mediumAdded(TQString)", FALSE); 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 = deviceProperties[MEDIALIST_PROPS*n+LABEL];
label = i18n(label.section( " (", 0, 0 ).utf8()); 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)))); 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 ) int MediaListBox::index (const TQString & name )

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

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

Loading…
Cancel
Save