diff options
| author | Michele Calgaro <michele.calgaro@yahoo.it> | 2026-03-06 14:57:59 +0900 |
|---|---|---|
| committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2026-03-06 15:04:08 +0900 |
| commit | 850f01569f0dc9cad2cf960fd82e56ec99fb5015 (patch) | |
| tree | d8ba05c08addbf2e7d2eea0f7146e7e3b95bbe91 /src | |
| parent | 18ae943ddec7911d7644864c7e250bce9e8d0fcb (diff) | |
| download | basket-850f01569f0dc9cad2cf960fd82e56ec99fb5015.tar.gz basket-850f01569f0dc9cad2cf960fd82e56ec99fb5015.zip | |
Remove use of KDE_IS_VERSION
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'src')
| -rw-r--r-- | src/basket.cpp | 8 | ||||
| -rw-r--r-- | src/bnpview.cpp | 49 | ||||
| -rw-r--r-- | src/mainwindow.cpp | 4 | ||||
| -rw-r--r-- | src/notedrag.cpp | 9 | ||||
| -rw-r--r-- | src/popupmenu.cpp | 6 | ||||
| -rw-r--r-- | src/systemtray.cpp | 2 |
6 files changed, 7 insertions, 71 deletions
diff --git a/src/basket.cpp b/src/basket.cpp index 7c7e5d4..2792398 100644 --- a/src/basket.cpp +++ b/src/basket.cpp @@ -4119,12 +4119,8 @@ void Basket::noteDelete() i18n("<qt>Do you really want to delete this note?</qt>", "<qt>Do you really want to delete those <b>%n</b> notes?</qt>", countSelecteds()), - i18n("Delete Note", "Delete Notes", countSelecteds()) -#if KDE_IS_VERSION( 3, 2, 90 ) // KDE 3.3.x - , KStdGuiItem::del(), KStdGuiItem::cancel()); -#else - ); -#endif + i18n("Delete Note", "Delete Notes", countSelecteds()), + KStdGuiItem::del(), KStdGuiItem::cancel()); if (really == KMessageBox::No) return; diff --git a/src/bnpview.cpp b/src/bnpview.cpp index c98f063..c44a2de 100644 --- a/src/bnpview.cpp +++ b/src/bnpview.cpp @@ -485,11 +485,7 @@ void BNPView::setupActions() this, TQ_SLOT(moveNoteDown()), actionCollection(), "note_move_down" ); m_actMoveOnBottom = new TDEAction( i18n("Move on &Bottom"), "2downarrow", "Ctrl+Shift+End", this, TQ_SLOT(moveOnBottom()), actionCollection(), "note_move_bottom" ); -#if KDE_IS_VERSION( 3, 1, 90 ) // KDE 3.2.x m_actPaste = KStdAction::pasteText( this, TQ_SLOT(pasteInCurrentBasket()), actionCollection() ); -#else - m_actPaste = KStdAction::paste( this, TQ_SLOT(pasteInCurrentBasket()), actionCollection() ); -#endif /** Insert : **************************************************************/ @@ -1710,12 +1706,8 @@ void BNPView::delBasket() int really = KMessageBox::questionYesNo( this, i18n("<qt>Do you really want to remove the basket <b>%1</b> and its contents?</qt>") .arg(Tools::textToHTMLWithoutP(basket->basketName())), - i18n("Remove Basket") -#if KDE_IS_VERSION( 3, 2, 90 ) // KDE 3.3.x - , KGuiItem(i18n("&Remove Basket"), "edit-delete"), KStdGuiItem::cancel()); -#else - ); -#endif + i18n("Remove Basket"), + KGuiItem(i18n("&Remove Basket"), "edit-delete"), KStdGuiItem::cancel()); if (really == KMessageBox::No) return; @@ -1726,12 +1718,8 @@ void BNPView::delBasket() i18n("<qt><b>%1</b> have the following children baskets.<br>Do you want to remove them too?</qt>") .arg(Tools::textToHTMLWithoutP(basket->basketName())), basketsList, - i18n("Remove Children Baskets") -#if KDE_IS_VERSION( 3, 2, 90 ) // KDE 3.3.x - , KGuiItem(i18n("&Remove Children Baskets"), "edit-delete")); -#else - ); -#endif + i18n("Remove Children Baskets"), + KGuiItem(i18n("&Remove Children Baskets"), "edit-delete")); if (deleteChilds == KMessageBox::No) listViewItemForBasket(basket)->moveChildsBaskets(); @@ -2078,40 +2066,11 @@ void BNPView::setActive(bool active) if(!win) return; -#if KDE_IS_VERSION( 3, 2, 90 ) // KDE 3.3.x if (active) { tdeApp->updateUserTimestamp(); // If "activate on mouse hovering systray", or "on drag throught systray" Global::systemTray->setActive(); // FIXME: add this in the places it need } else Global::systemTray->setInactive(); -#elif KDE_IS_VERSION( 3, 1, 90 ) // KDE 3.2.x - // Code from Kopete (that seem to work, in waiting KSystemTray make puplic the toggleSHown) : - if (active) { - win->show(); - //raise() and show() should normaly deIconify the window. but it doesn't do here due - // to a bug in TQt or in KDE (qt3.1.x or KDE 3.1.x) then, i have to call KWin's method - if (win->isMinimized()) - KWin::deIconifyWindow(winId()); - - if ( ! KWin::windowInfo(winId(), NET::WMDesktop).onAllDesktops() ) - KWin::setOnDesktop(winId(), KWin::currentDesktop()); - win->raise(); - // Code from me: expected and correct behavviour: - tdeApp->updateUserTimestamp(); // If "activate on mouse hovering systray", or "on drag throught systray" - KWin::activateWindow(win->winId()); - } else - win->hide(); -#else // KDE 3.1.x and lower - if (win->active) { - if (win->isMinimized()) - win->hide(); // If minimized, show() doesn't work ! - win->show(); // Show it - // showNormal(); // If it was minimized - win->raise(); // Raise it on top - win->setActiveWindow(); // And set it the active window - } else - win->hide(); -#endif } void BNPView::hideOnEscape() diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 3d1c6a6..2a813bf 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -341,12 +341,8 @@ void MainWindow::minimizeRestore() void MainWindow::changeActive() { -#if KDE_IS_VERSION( 3, 2, 90 ) // KDE 3.3.x tdeApp->updateUserTimestamp(); // If "activate on mouse hovering systray", or "on drag throught systray" Global::systemTray->toggleActive(); -#else - setActive( ! isActiveWindow() ); -#endif } #include "mainwindow.moc" diff --git a/src/notedrag.cpp b/src/notedrag.cpp index 37e2337..227c108 100644 --- a/src/notedrag.cpp +++ b/src/notedrag.cpp @@ -224,19 +224,10 @@ void NoteDrag::serializeLinks(NoteSelection *noteList, KMultipleDrag *multipleDr } if (!urls.isEmpty()) { // First, the standard text/uri-list MIME format: -#if KDE_IS_VERSION( 3, 3, 90 ) KURLDrag *urlsDrag = new KURLDrag(urls); // ONLY export as text/uri-list, and not as text/plain* as we wil do that better ourself urlsDrag->setExportAsText(false); multipleDrag->addDragObject(urlsDrag); -#else - KURLDrag2 *urlsDrag = new KURLDrag2(urls); - TQByteArray byteArray = urlsDrag->encodedData2("text/uri-list"); - TQStoredDrag *uriListDrag = new TQStoredDrag("text/uri-list"); - uriListDrag->setEncodedData(byteArray); - multipleDrag->addDragObject(uriListDrag); - delete urlsDrag; -#endif // Then, also provide it in the Mozilla proprietary format (that also allow to add titles to URLs): // A version for Mozilla applications (convert to "theUrl\ntheTitle", into UTF-16): // FIXME: Does Mozilla support the drag of several URLs at once? diff --git a/src/popupmenu.cpp b/src/popupmenu.cpp index 6d0b52d..f156f48 100644 --- a/src/popupmenu.cpp +++ b/src/popupmenu.cpp @@ -25,11 +25,7 @@ #include "popupmenu.h" -#if KDE_IS_VERSION( 3, 2, 90 ) // KDE 3.3.x - #define MENU_Y_OFFSET 1 -#else - #define MENU_Y_OFFSET 2 -#endif +#define MENU_Y_OFFSET 1 /** NOTE 1 : This implementation forget BIDI support (eg RightToLeft languages * expect to try to popup the menu first at bottom-right diff --git a/src/systemtray.cpp b/src/systemtray.cpp index f2ad3e7..1a4eb13 100644 --- a/src/systemtray.cpp +++ b/src/systemtray.cpp @@ -77,11 +77,9 @@ void KSystemTray2::displayCloseMessage(TQString fileMenu) * - Perhapse add the icon in the text (eg. "... in the * system tray ([icon])."). Add some clutter to the dialog. */ -#if KDE_IS_VERSION( 3, 1, 90 ) // Don't do all the computations if they are unneeded: if ( ! KMessageBox::shouldBeShownContinue("hideOnCloseInfo") ) return; -#endif // "Default parameter". Here, to avoid a i18n() call and dependancy in the .h if (fileMenu.isEmpty()) fileMenu = i18n("File"); |
