diff options
| author | Michele Calgaro <michele.calgaro@yahoo.it> | 2026-03-23 11:58:42 +0900 |
|---|---|---|
| committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2026-03-23 11:58:42 +0900 |
| commit | 50855e76de13f2ca1361130493cc026b1ea50bba (patch) | |
| tree | 650edd43485d425f107326eb581771768d1c6d47 /superkaramba/src | |
| parent | c6bdfd549484abe62ddaa3fb6dbf952354c4886b (diff) | |
| download | tdeutils-50855e76de13f2ca1361130493cc026b1ea50bba.tar.gz tdeutils-50855e76de13f2ca1361130493cc026b1ea50bba.zip | |
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'superkaramba/src')
| -rw-r--r-- | superkaramba/src/imagelabel.cpp | 8 | ||||
| -rw-r--r-- | superkaramba/src/karamba.cpp | 23 | ||||
| -rw-r--r-- | superkaramba/src/karambaapp.h | 12 | ||||
| -rw-r--r-- | superkaramba/src/main.cpp | 1 | ||||
| -rw-r--r-- | superkaramba/src/rsssensor.cpp | 4 | ||||
| -rw-r--r-- | superkaramba/src/showdesktop.cpp | 12 | ||||
| -rw-r--r-- | superkaramba/src/taskmanager.cpp | 68 | ||||
| -rw-r--r-- | superkaramba/src/taskmanager.h | 13 |
8 files changed, 5 insertions, 136 deletions
diff --git a/superkaramba/src/imagelabel.cpp b/superkaramba/src/imagelabel.cpp index 4b934a9..c3481b4 100644 --- a/superkaramba/src/imagelabel.cpp +++ b/superkaramba/src/imagelabel.cpp @@ -445,11 +445,7 @@ void ImageLabel::parseImages(TQString fn, TQString fn_roll, int _xoff, if ( fileOnNet ) { TQString tmpFile; -#if defined(KDE_3_2) if(TDEIO::NetAccess::download(KURL(path), tmpFile, karambaApp->parentWindow())) -#else - if(TDEIO::NetAccess::download(KURL(path), tmpFile)) -#endif { pixmap_off = KPixmap(tmpFile); TDEIO::NetAccess::removeTempFile(tmpFile); @@ -493,11 +489,7 @@ void ImageLabel::parseImages(TQString fn, TQString fn_roll, int _xoff, if ( fileOnNet ) { TQString tmpFile; -#if defined(KDE_3_2) if(TDEIO::NetAccess::download(KURL(path), tmpFile, karambaApp->parentWindow())) -#else - if(TDEIO::NetAccess::download(KURL(path), tmpFile)) -#endif { pixmap_on = KPixmap(tmpFile); TDEIO::NetAccess::removeTempFile(tmpFile); diff --git a/superkaramba/src/karamba.cpp b/superkaramba/src/karamba.cpp index f4e3767..effafda 100644 --- a/superkaramba/src/karamba.cpp +++ b/superkaramba/src/karamba.cpp @@ -36,7 +36,6 @@ #include <krun.h> #include <tdelocale.h> #include <twin.h> -#include <tdeversion.h> #include <kdirwatch.h> #include <tdeparts/componentfactory.h> @@ -762,12 +761,7 @@ bool karamba::parseConfig() // Matthew Kay: set window type to "dock" // (plays better with taskbar themes this way) KWin::setType(winId(), NET::Dock); - #if defined(TDE_MAKE_VERSION) - #if TDE_VERSION >= TDE_MAKE_VERSION(3,1,9) - //KDE 3.2 addition for the always on top issues - KWin::setState(winId(), NET::KeepBelow); - #endif - #endif + KWin::setState(winId(), NET::KeepBelow); } m_theme.close(); @@ -804,13 +798,7 @@ void karamba::start() void karamba::makeActive() { KWin::setType(winId(), NET::Normal); - - #if defined(TDE_MAKE_VERSION) - #if TDE_VERSION >= TDE_MAKE_VERSION(3,1,9) - //KDE 3.2 addition for the always on top issues - KWin::setState(winId(), NET::Modal); - #endif - #endif + KWin::setState(winId(), NET::Modal); } void karamba::makePassive() @@ -828,12 +816,7 @@ void karamba::makePassive() // Matthew Kay: set window type to "dock" (plays better with taskbar themes // this way) KWin::setType(winId(), NET::Dock); - #if defined(TDE_MAKE_VERSION) - #if TDE_VERSION >= TDE_MAKE_VERSION(3,1,9) - //KDE 3.2 addition for the always on top issues - KWin::setState(winId(), NET::KeepBelow); - #endif - #endif + KWin::setState(winId(), NET::KeepBelow); } void karamba::popupNotify(int) diff --git a/superkaramba/src/karambaapp.h b/superkaramba/src/karambaapp.h index 8e53914..d3d0868 100644 --- a/superkaramba/src/karambaapp.h +++ b/superkaramba/src/karambaapp.h @@ -12,20 +12,8 @@ #define KARAMBAAPP_H #include "tdeapplication.h" -#include <tdeversion.h> #include <ksystemtray.h> -#undef KDE_3_2 -#undef KDE_3_3 -#if defined(TDE_MAKE_VERSION) -#if TDE_VERSION >= TDE_MAKE_VERSION(3,2,0) -#define KDE_3_2 -#endif -#if TDE_VERSION >= TDE_MAKE_VERSION(3,3,0) -#define KDE_3_3 -#endif -#endif - #define karambaApp ((KarambaApplication*)tqApp) class karamba; diff --git a/superkaramba/src/main.cpp b/superkaramba/src/main.cpp index feee817..453856b 100644 --- a/superkaramba/src/main.cpp +++ b/superkaramba/src/main.cpp @@ -32,7 +32,6 @@ #include <tqstringlist.h> #include <tdeconfig.h> #include <tdestandarddirs.h> -#include <tdeversion.h> #include "karamba.h" #include "karambasessionmanaged.h" diff --git a/superkaramba/src/rsssensor.cpp b/superkaramba/src/rsssensor.cpp index e0a4f9e..ebbdeec 100644 --- a/superkaramba/src/rsssensor.cpp +++ b/superkaramba/src/rsssensor.cpp @@ -47,11 +47,7 @@ void RssSensor::update() TQString tmpFile; bool OK = false; -#if defined(KDE_3_3) if(TDEIO::NetAccess::download(KURL(source), tmpFile, karambaApp->parentWindow())) -#else - if(TDEIO::NetAccess::download(KURL(source), tmpFile)) -#endif { file.setName(tmpFile); if ( file.open(IO_ReadOnly | IO_Translate) ) diff --git a/superkaramba/src/showdesktop.cpp b/superkaramba/src/showdesktop.cpp index f37c35e..d53db40 100644 --- a/superkaramba/src/showdesktop.cpp +++ b/superkaramba/src/showdesktop.cpp @@ -51,12 +51,6 @@ void ShowDesktop::slotCurrentDesktopChanged(int) showDesktop( false ); } -#ifdef KDE_3_3 -#define NET_ALL_TYPES_MASK (NET::AllTypesMask) -#else -#define NET_ALL_TYPES_MASK (-1LU) -#endif - void ShowDesktop::slotWindowChanged(WId w, unsigned int dirty) { if (!showingDesktop) @@ -67,11 +61,7 @@ void ShowDesktop::slotWindowChanged(WId w, unsigned int dirty) { NETWinInfo inf(tqt_xdisplay(), w, tqt_xrootwin(), NET::XAWMState | NET::WMWindowType); -#ifdef KDE_3_2 - NET::WindowType windowType = inf.windowType(NET_ALL_TYPES_MASK); -#else - NET::WindowType windowType = inf.windowType(); -#endif + NET::WindowType windowType = inf.windowType(NET::AllTypesMask); if ((windowType == NET::Normal || windowType == NET::Unknown) && inf.mappingState() == NET::Visible ) { diff --git a/superkaramba/src/taskmanager.cpp b/superkaramba/src/taskmanager.cpp index abfd99f..099cd15 100644 --- a/superkaramba/src/taskmanager.cpp +++ b/superkaramba/src/taskmanager.cpp @@ -106,21 +106,11 @@ Task* TaskManager::findTask(WId w) return 0; } -#ifdef KDE_3_3 -#define NET_ALL_TYPES_MASK (NET::AllTypesMask) -#else -#define NET_ALL_TYPES_MASK (-1LU) -#endif - void TaskManager::windowAdded(WId w ) { NETWinInfo info(tqt_xdisplay(), w, tqt_xrootwin(), NET::WMWindowType | NET::WMPid | NET::WMState ); - #ifdef KDE_3_2 - NET::WindowType windowType = info.windowType(NET_ALL_TYPES_MASK); - #else - NET::WindowType windowType = info.windowType(); - #endif + NET::WindowType windowType = info.windowType(NET::AllTypesMask); // ignore NET::Tool and other special window types if (windowType != NET::Normal && windowType != NET::Override && windowType != NET::Unknown && windowType != NET::Dialog) @@ -334,11 +324,7 @@ Task::Task(WId win, TaskManager * parent, const char *name) : _lastWidth(0), _lastHeight(0), _lastResize(false), _lastIcon(), _thumbSize(0.2), _thumb(), _grab() { -#ifdef KDE_3_2 _info = KWin::windowInfo(_win, 0, 0); -#else - _info = KWin::info(_win); -#endif // try to load icon via net_wm _pixmap = KWin::icon(_win, 16, 16, true); @@ -359,11 +345,7 @@ Task::~Task() void Task::refresh(bool icon) { -#ifdef KDE_3_2 _info = KWin::windowInfo(_win, 0, 0); -#else - _info = KWin::info(_win); -#endif if (icon) { // try to load icon via net_wm @@ -398,56 +380,32 @@ void Task::setActive(bool a) bool Task::isMaximized() const { -#ifdef KDE_3_2 return(_info.state() & NET::Max); -#else - return(_info.state & NET::Max); -#endif } bool Task::isIconified() const { -#ifdef KDE_3_2 return (_info.mappingState() == NET::Iconic); -#else - return (_info.mappingState == NET::Iconic); -#endif } bool Task::isAlwaysOnTop() const { -#ifdef KDE_3_2 return (_info.state() & NET::StaysOnTop); -#else - return (_info.state & NET::StaysOnTop); -#endif } bool Task::isShaded() const { -#ifdef KDE_3_2 return (_info.state() & NET::Shaded); -#else - return (_info.state & NET::Shaded); -#endif } bool Task::isOnCurrentDesktop() const { -#ifdef KDE_3_2 return (_info.onAllDesktops() || _info.desktop() == twin_module->currentDesktop()); -#else - return (_info.onAllDesktops || _info.desktop == twin_module->currentDesktop()); -#endif } bool Task::isOnAllDesktops() const { -#ifdef KDE_3_2 return _info.onAllDesktops(); -#else - return _info.onAllDesktops; -#endif } bool Task::isActive() const @@ -463,11 +421,7 @@ bool Task::isOnTop() const bool Task::isModified() const { static TQString modStr = TQString::fromUtf8("[") + i18n("modified") + TQString::fromUtf8("]"); -#ifdef KDE_3_2 int modStrPos = _info.visibleName().find(modStr); -#else - int modStrPos = _info.visibleName.find(modStr); -#endif return ( modStrPos != -1 ); } @@ -623,11 +577,7 @@ void Task::maximize() NETWinInfo ni( tqt_xdisplay(), _win, tqt_xrootwin(), NET::WMState); ni.setState( NET::Max, NET::Max ); -#ifdef KDE_3_2 if (_info.mappingState() == NET::Iconic) -#else - if (_info.mappingState == NET::Iconic) -#endif activate(); } @@ -635,11 +585,7 @@ void Task::restore() { NETWinInfo ni( tqt_xdisplay(), _win, tqt_xrootwin(), NET::WMState); ni.setState( 0, NET::Max ); -#ifdef KDE_3_2 if (_info.mappingState() == NET::Iconic) -#else - if (_info.mappingState == NET::Iconic) -#endif activate(); } @@ -689,30 +635,18 @@ void Task::toDesktop(int desk) NETWinInfo ni(tqt_xdisplay(), _win, tqt_xrootwin(), NET::WMDesktop); if (desk == 0) { -#ifdef KDE_3_2 if (_info.onAllDesktops()) { ni.setDesktop(twin_module->currentDesktop()); KWin::forceActiveWindow(_win); } -#else - if (_info.onAllDesktops) - { - ni.setDesktop(twin_module->currentDesktop()); - KWin::setActiveWindow(_win); - } -#endif else ni.setDesktop(NETWinInfo::OnAllDesktops); return; } ni.setDesktop(desk); if (desk == twin_module->currentDesktop()) -#ifdef KDE_3_2 KWin::forceActiveWindow(_win); -#else - KWin::setActiveWindow(_win); -#endif } void Task::toCurrentDesktop() diff --git a/superkaramba/src/taskmanager.h b/superkaramba/src/taskmanager.h index da6d834..ef6eea4 100644 --- a/superkaramba/src/taskmanager.h +++ b/superkaramba/src/taskmanager.h @@ -76,21 +76,12 @@ public: TaskManager* taskManager() const { return (TaskManager*) parent(); } WId window() const { return _win; } -#ifdef KDE_3_2 TQString name() const { return _info.name(); } TQString visibleName() const { return _info.visibleName(); } /** * Returns the desktop on which this task's window resides. */ int desktop() const { return _info.desktop(); } -#else - TQString name() const { return _info.name; } - TQString visibleName() const { return _info.visibleName; } - /** - * Returns the desktop on which this task's window resides. - */ - int desktop() const { return _info.desktop; } -#endif TQString visibleNameWithState() const { return _info.visibleNameWithState(); } TQString iconName() const; TQString visibleIconName() const; @@ -349,11 +340,7 @@ private: bool _active; WId _win; TQPixmap _pixmap; -#ifdef KDE_3_2 KWin::WindowInfo _info; -#else - KWin::Info _info; -#endif TQValueList<WId> _transients; int _lastWidth; |
