diff options
author | Michele Calgaro <[email protected]> | 2025-01-22 17:46:54 +0900 |
---|---|---|
committer | Michele Calgaro <[email protected]> | 2025-02-03 22:38:49 +0900 |
commit | 4a47c1bfffffad7094f0b5c7cef532069e088ec3 (patch) | |
tree | 31b86dd0d87816e4b31e8bc2aa7687b2e85c2e82 /src/basket.cpp | |
parent | 7975b08418486c2793bd61c32ee347ce6b81c687 (diff) | |
download | basket-4a47c1bfffffad7094f0b5c7cef532069e088ec3.tar.gz basket-4a47c1bfffffad7094f0b5c7cef532069e088ec3.zip |
Use tdeApp
Signed-off-by: Michele Calgaro <[email protected]>
Diffstat (limited to 'src/basket.cpp')
-rw-r--r-- | src/basket.cpp | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/src/basket.cpp b/src/basket.cpp index ab1c693..922016d 100644 --- a/src/basket.cpp +++ b/src/basket.cpp @@ -758,7 +758,7 @@ void Basket::loadNotes(const TQDomElement ¬es, Note *parent) } } } -// kapp->processEvents(); +// tdeApp->processEvents(); } } @@ -914,7 +914,7 @@ void Basket::setAppearance(const TQString &icon, const TQString &name, const TQS m_action->setText("BASKET SHORTCUT: " + name); // Basket should ALWAYS have an icon (the "basket" icon by default): - TQPixmap iconTest = kapp->iconLoader()->loadIcon(m_icon, TDEIcon::NoGroup, 16, TDEIcon::DefaultState, 0L, /*canReturnNull=*/true); + TQPixmap iconTest = tdeApp->iconLoader()->loadIcon(m_icon, TDEIcon::NoGroup, 16, TDEIcon::DefaultState, 0L, /*canReturnNull=*/true); if (iconTest.isNull()) m_icon = "basket"; @@ -1172,7 +1172,7 @@ void Basket::load() // Now that the background image is loaded and subscribed, we display it during the load process: delete doc; updateContents(); -// kapp->processEvents(); +// tdeApp->processEvents(); //BEGIN Compatibility with 0.6.0 Pre-Alpha versions: TQDomElement notes = XMLWork::getElement(docElem, "notes"); @@ -1426,7 +1426,7 @@ void Basket::leaveEvent(TQEvent *) void Basket::setFocusIfNotInPopupMenu() { - if (!kapp->activePopupWidget()) { + if (!tdeApp->activePopupWidget()) { if (isDuringEdit()) { m_editor->widget()->setFocus(); } @@ -1451,7 +1451,7 @@ void Basket::contentsMousePressEvent(TQMouseEvent *event) // Do nothing if we disabled the click some milliseconds sooner. // For instance when a popup menu has been closed with click, we should not do action: - if (event->button() == TQt::LeftButton && (kapp->activePopupWidget() || m_lastDisableClick.msecsTo(TQTime::currentTime()) <= 80)) { + if (event->button() == TQt::LeftButton && (tdeApp->activePopupWidget() || m_lastDisableClick.msecsTo(TQTime::currentTime()) <= 80)) { doHoverEffects(); m_noActionOnMouseRelease = true; // But we allow to select: @@ -2536,7 +2536,7 @@ void Basket::doAutoScrollSelection() dx = pos.x() - visibleWidth() + AUTO_SCROLL_MARGIN; if (dx || dy) { - kapp->sendPostedEvents(); // Do the repaints, because the scrolling will make the area to repaint to be wrong + tdeApp->sendPostedEvents(); // Do the repaints, because the scrolling will make the area to repaint to be wrong scrollBy(dx, dy); if (!m_autoScrollSelectionTimer.isActive()) m_autoScrollSelectionTimer.start(AUTO_SCROLL_DELAY); @@ -2691,7 +2691,7 @@ void Basket::doHoverEffects(const TQPoint &pos) // Don't do hover effects when a popup menu is opened. // Primarily because the basket area will only receive mouseEnterEvent and mouveLeaveEvent. // It willn't be noticed of mouseMoveEvent, which would result in a apparently broken application state: - if (kapp->activePopupWidget()) + if (tdeApp->activePopupWidget()) underMouse = false; // Compute which note is hovered: @@ -2704,7 +2704,7 @@ void Basket::doHoverEffects(const TQPoint &pos) void Basket::mouseEnteredEditorWidget() { - if (!m_lockedHovering && !kapp->activePopupWidget()) + if (!m_lockedHovering && !tdeApp->activePopupWidget()) doHoverEffects(editedNote(), Note::Content, TQPoint()); } @@ -3086,7 +3086,7 @@ void Basket::drawContents(TQPainter *painter, int clipX, int clipY, int clipWidt #ifdef HAVE_LIBGPGME label->setText( text + i18n("Press Unlock to access it.") ); #else - label->setText( text + i18n("Encryption is not supported by<br/>this version of %1.").arg(kapp->aboutData()->programName()) ); + label->setText( text + i18n("Encryption is not supported by<br/>this version of %1.").arg(tdeApp->aboutData()->programName()) ); #endif label->setAlignment( int( TQLabel::AlignTop ) ); layout->addMultiCellWidget( label, 0, 0, 1, 2 ); @@ -3902,7 +3902,7 @@ bool Basket::closeEditor() emit resetStatusBarText(); // Remove the "Editing. ... to validate." text. - //if (kapp->activeWindow() == Global::mainContainer) + //if (tdeApp->activeWindow() == Global::mainContainer) // Set focus to the basket, unless the user pressed a letter key in the filter bar and the currently edited note came hidden, then editing closed: if (!decoration()->filterBar()->lineEdit()->hasFocus()) @@ -4074,16 +4074,16 @@ void Basket::noteEdit(Note *note, bool justAdded, const TQPoint &clickedPoint) / if (clickedPoint != TQPoint()) { TQPoint pos(clickedPoint.x() - note->x() - note->contentX() + m_editor->textEdit()->frameWidth() + 4 - m_editor->textEdit()->frameWidth(), clickedPoint.y() - note->y() - m_editor->textEdit()->frameWidth()); - // Do it right before the kapp->processEvents() to not have the cursor to quickly flicker at end (and sometimes stay at end AND where clicked): + // Do it right before the tdeApp->processEvents() to not have the cursor to quickly flicker at end (and sometimes stay at end AND where clicked): m_editor->textEdit()->moveCursor(KTextEdit::MoveHome, false); m_editor->textEdit()->ensureCursorVisible(); m_editor->textEdit()->placeCursor(pos); updateEditorAppearance(); } } -// kapp->processEvents(); // Show the editor toolbar before ensuring the note is visible +// tdeApp->processEvents(); // Show the editor toolbar before ensuring the note is visible ensureNoteVisible(note); // because toolbar can create a new line and then partially hide the note - m_editor->widget()->setFocus(); // When clicking in the basket, a TQTimer::singleShot(0, ...) focus the basket! So we focus the the widget after kapp->processEvents() + m_editor->widget()->setFocus(); // When clicking in the basket, a TQTimer::singleShot(0, ...) focus the basket! So we focus the the widget after tdeApp->processEvents() emit resetStatusBarText(); // Display "Editing. ... to validate." } else { // Delete the note user have canceled the addition: @@ -4288,7 +4288,7 @@ void Basket::noteOpen(Note *note) */ bool KRun__displayOpenWithDialog(const KURL::List& lst, bool tempFiles, const TQString &text) { - if (kapp && !kapp->authorizeTDEAction("openwith")) { + if (tdeApp && !tdeApp->authorizeTDEAction("openwith")) { KMessageBox::sorry(0L, i18n("You are not authorized to open this file.")); // TODO: Better message, i18n freeze :-( return false; } @@ -5413,7 +5413,7 @@ bool Basket::saveToFile(const TQString& fullPath, const TQByteArray& array, TQ_U : i18n("File permissions are bad for <b>%1</b>. Please check that you have write access to it and the parent folders.") .arg(fullPath) ), - kapp->activeWindow() + tdeApp->activeWindow() ); } if (!dialog->isShown()) @@ -5421,7 +5421,7 @@ bool Basket::saveToFile(const TQString& fullPath, const TQByteArray& array, TQ_U const int retryDelay = 1000/*ms*/; const int sleepDelay = 50/*ms*/; for (int i = 0; i < retryDelay / sleepDelay; ++i) { - kapp->processEvents(); + tdeApp->processEvents(); usleep(sleepDelay); } } @@ -5455,7 +5455,7 @@ DiskErrorDialog::DiskErrorDialog(const TQString &titleMessage, const TQString &m //enableButtonOK(false); setModal(true); TQHBoxLayout *layout = new TQHBoxLayout(plainPage(), /*margin=*/0, spacingHint()); - TQPixmap icon = kapp->iconLoader()->loadIcon("drive-harddisk-unmounted", TDEIcon::NoGroup, 64, TDEIcon::DefaultState, /*path_store=*/0L, /*canReturnNull=*/true); + TQPixmap icon = tdeApp->iconLoader()->loadIcon("drive-harddisk-unmounted", TDEIcon::NoGroup, 64, TDEIcon::DefaultState, /*path_store=*/0L, /*canReturnNull=*/true); TQLabel *iconLabel = new TQLabel(plainPage()); iconLabel->setPixmap(icon); iconLabel->setFixedSize(iconLabel->sizeHint()); |