diff options
author | gregory guy <gregory-tde@laposte.net> | 2021-10-05 14:54:22 +0200 |
---|---|---|
committer | gregory guy <gregory-tde@laposte.net> | 2021-10-06 11:13:05 +0200 |
commit | 610b0fea26e0855ea2ded8d935288378335346b6 (patch) | |
tree | 79ae8f19d6e41b985729f79c3aadb4c0db5deefc | |
parent | 6216a7aa09fecd0262e90e9ee596eb711f8f65ad (diff) | |
download | tde-style-baghira-610b0fea26e0855ea2ded8d935288378335346b6.tar.gz tde-style-baghira-610b0fea26e0855ea2ded8d935288378335346b6.zip |
Remove definition KDE_IS_VERSION.
Signed-off-by: gregory guy <gregory-tde@laposte.net>
-rw-r--r-- | bab/main.cpp | 8 | ||||
-rw-r--r-- | config/tdestyle_baghira_config.cpp | 2 | ||||
-rw-r--r-- | deco/baghiraclient.cpp | 37 | ||||
-rw-r--r-- | deco/baghiraclient.h | 5 | ||||
-rw-r--r-- | sessionapplet/usermanager.cpp | 5 | ||||
-rw-r--r-- | sidebar/dndlistbox.cpp | 9 | ||||
-rw-r--r-- | starter/menu.cpp | 3 | ||||
-rw-r--r-- | style/polish.cpp | 6 |
8 files changed, 17 insertions, 58 deletions
diff --git a/bab/main.cpp b/bab/main.cpp index a4a5682..3650888 100644 --- a/bab/main.cpp +++ b/bab/main.cpp @@ -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(); diff --git a/config/tdestyle_baghira_config.cpp b/config/tdestyle_baghira_config.cpp index 7c627c5..8ee7e29 100644 --- a/config/tdestyle_baghira_config.cpp +++ b/config/tdestyle_baghira_config.cpp @@ -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") ); 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; } diff --git a/deco/baghiraclient.h b/deco/baghiraclient.h index ddd3aa7..d661fa0 100644 --- a/deco/baghiraclient.h +++ b/deco/baghiraclient.h @@ -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 diff --git a/sessionapplet/usermanager.cpp b/sessionapplet/usermanager.cpp index 6d712e7..3fe5958 100644 --- a/sessionapplet/usermanager.cpp +++ b/sessionapplet/usermanager.cpp @@ -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; diff --git a/sidebar/dndlistbox.cpp b/sidebar/dndlistbox.cpp index 9adbb7e..c476316 100644 --- a/sidebar/dndlistbox.cpp +++ b/sidebar/dndlistbox.cpp @@ -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-mounted", 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 ) diff --git a/starter/menu.cpp b/starter/menu.cpp index a730b51..e4e1f51 100644 --- a/starter/menu.cpp +++ b/starter/menu.cpp @@ -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; diff --git a/style/polish.cpp b/style/polish.cpp index 49ceeb8..a810d37 100644 --- a/style/polish.cpp +++ b/style/polish.cpp @@ -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; } |