summaryrefslogtreecommitdiffstats
path: root/src/bnpview.cpp
diff options
context:
space:
mode:
authorMichele Calgaro <[email protected]>2025-01-22 17:46:54 +0900
committerMichele Calgaro <[email protected]>2025-02-03 22:38:49 +0900
commit4a47c1bfffffad7094f0b5c7cef532069e088ec3 (patch)
tree31b86dd0d87816e4b31e8bc2aa7687b2e85c2e82 /src/bnpview.cpp
parent7975b08418486c2793bd61c32ee347ce6b81c687 (diff)
downloadbasket-4a47c1bfffffad7094f0b5c7cef532069e088ec3.tar.gz
basket-4a47c1bfffffad7094f0b5c7cef532069e088ec3.zip
Use tdeApp
Signed-off-by: Michele Calgaro <[email protected]>
Diffstat (limited to 'src/bnpview.cpp')
-rw-r--r--src/bnpview.cpp46
1 files changed, 23 insertions, 23 deletions
diff --git a/src/bnpview.cpp b/src/bnpview.cpp
index 43ba58e..d0d919f 100644
--- a/src/bnpview.cpp
+++ b/src/bnpview.cpp
@@ -141,7 +141,7 @@ void BNPView::lateInit()
{
if (Settings::useSystray() && TDECmdLineArgs::parsedArgs() && TDECmdLineArgs::parsedArgs()->isSet("start-hidden"))
if(Global::mainWindow()) Global::mainWindow()->hide();
- else if (Settings::useSystray() && kapp->isRestored())
+ else if (Settings::useSystray() && tdeApp->isRestored())
if(Global::mainWindow()) Global::mainWindow()->setShown(!Settings::startDocked());
else
showMainWindow();
@@ -197,7 +197,7 @@ void BNPView::lateInit()
while (it.current()) {
BasketListViewItem *item = ((BasketListViewItem*)it.current());
item->basket()->load();
- kapp->processEvents();
+ tdeApp->processEvents();
++it;
}
StopWatch::check(100);*/
@@ -250,7 +250,7 @@ void BNPView::onFirstShow()
// LikeBack::setWindowNamesListing(LikeBack:: / *NoListing* / / *WarnUnnamedWindows* / AllWindows);
*/
- // In late init, because we need kapp->mainWidget() to be set!
+ // In late init, because we need tdeApp->mainWidget() to be set!
if (!isPart())
connectTagsMenu();
@@ -554,7 +554,7 @@ void BNPView::setupActions()
/** Basket : **************************************************************/
- // At this stage, main.cpp has not set kapp->mainWidget(), so Global::runInsideKontact()
+ // At this stage, main.cpp has not set tdeApp->mainWidget(), so Global::runInsideKontact()
// returns true. We do it ourself:
bool runInsideKontact = true;
TQWidget *parentWidget = (TQWidget*) parent();
@@ -1006,7 +1006,7 @@ void BNPView::toggleFilterAllBaskets(bool doFilter)
newFilter();
}
-/** This function can be called recursively because we call kapp->processEvents().
+/** This function can be called recursively because we call tdeApp->processEvents().
* If this function is called whereas another "instance" is running,
* this new "instance" leave and set up a flag that is read by the first "instance"
* to know it should re-begin the work.
@@ -1042,7 +1042,7 @@ void BNPView::newFilter()
// Show/hide the "little filter icons" (during basket load)
// or the "little numbers" (to show number of found notes in the baskets) is the tree:
m_tree->triggerUpdate();
- kapp->processEvents();
+ tdeApp->processEvents();
// Load every baskets for filtering, if they are not already loaded, and if necessary:
if (filterData.isFiltering) {
@@ -1056,7 +1056,7 @@ void BNPView::newFilter()
basket->load();
basket->filterAgain();
m_tree->triggerUpdate();
- kapp->processEvents();
+ tdeApp->processEvents();
if (shouldRestart) {
alreadyEntered = false;
shouldRestart = false;
@@ -1069,7 +1069,7 @@ void BNPView::newFilter()
}
m_tree->triggerUpdate();
-// kapp->processEvents();
+// tdeApp->processEvents();
alreadyEntered = false;
shouldRestart = false;
@@ -1191,7 +1191,7 @@ void BNPView::setTreePlacement(bool onLeft)
else
moveToLast(m_tree);
//updateGeometry();
- kapp->postEvent( this, new TQResizeEvent(size(), size()) );
+ tdeApp->postEvent( this, new TQResizeEvent(size(), size()) );
}
void BNPView::relayoutAllBaskets()
@@ -1452,7 +1452,7 @@ void BNPView::slotColorFromScreen(bool global)
m_colorPicker->pickColor();
/* m_gettingColorFromScreen = true;
- kapp->processEvents();
+ tdeApp->processEvents();
TQTimer::singleShot( 100, this, TQ_SLOT(grabColorFromScreen()) );*/
}
@@ -1546,7 +1546,7 @@ TQPopupMenu* BNPView::popupMenu(const TQString &menuName)
"<p>As last ressort, if you are sure the application is correctly installed "
"but you had a preview version of it, try to remove the "
"file %5basketui.rc</p>")
- .arg(kapp->aboutData()->programName(), kapp->aboutData()->programName(),
+ .arg(tdeApp->aboutData()->programName(), tdeApp->aboutData()->programName(),
stdDirs.saveLocation("data", "basket/")).arg(stdDirs.saveLocation("data", "basket/"), stdDirs.saveLocation("data", "basket/")),
i18n("Ressource not Found"), KMessageBox::AllowLink );
}
@@ -1601,7 +1601,7 @@ void BNPView::grabScreenshot(bool global)
// In this case, global is true, and we don't wait.
// In the future, if global is also defined for other cases, check for
// enum TDEAction::ActivationReason { UnknownActivation, EmulatedActivation, AccelActivation, PopupMenuActivation, ToolBarActivation };
- int delay = (isMainWindowActive() ? 500 : (global/*kapp->activePopupWidget()*/ ? 0 : 200));
+ int delay = (isMainWindowActive() ? 500 : (global/*tdeApp->activePopupWidget()*/ ? 0 : 200));
m_colorPickWasGlobal = global;
if (isMainWindowActive()) {
@@ -1767,7 +1767,7 @@ void BNPView::doBasketDeletion(Basket *basket)
void BNPView::password()
{
#ifdef HAVE_LIBGPGME
- PasswordDlg dlg(kapp->activeWindow(), "Password");
+ PasswordDlg dlg(tdeApp->activeWindow(), "Password");
Basket *cur = currentBasket();
dlg.setType(cur->encryptionType());
@@ -1959,7 +1959,7 @@ void BNPView::showPassiveDroppedDelayed()
m_passivePopup->setView(
title.arg(Tools::textToHTMLWithoutP(currentBasket()->basketName())),
(contentsPixmap.isNull() ? "" : "<img src=\"_passivepopup_image_\">"),
- kapp->iconLoader()->loadIcon(currentBasket()->icon(), TDEIcon::NoGroup, 16, TDEIcon::DefaultState, 0L, true));
+ tdeApp->iconLoader()->loadIcon(currentBasket()->icon(), TDEIcon::NoGroup, 16, TDEIcon::DefaultState, 0L, true));
m_passivePopup->show();
}
@@ -1972,7 +1972,7 @@ void BNPView::showPassiveImpossible(const TQString &message)
.arg(i18n("Basket <i>%1</i> is locked"))
.arg(Tools::textToHTMLWithoutP(currentBasket()->basketName())),
message,
- kapp->iconLoader()->loadIcon(currentBasket()->icon(), TDEIcon::NoGroup, 16, TDEIcon::DefaultState, 0L, true));
+ tdeApp->iconLoader()->loadIcon(currentBasket()->icon(), TDEIcon::NoGroup, 16, TDEIcon::DefaultState, 0L, true));
m_passivePopup->show();
}
@@ -1992,12 +1992,12 @@ void BNPView::showPassiveContent(bool forceShow/* = false*/)
delete m_passivePopup; // Delete previous one (if exists): it will then hide it (only one at a time)
m_passivePopup = new KPassivePopup(Settings::useSystray() ? (TQWidget*)Global::systemTray : (TQWidget*)this);
m_passivePopup->setView(
- "<qt>" + kapp->makeStdCaption( currentBasket()->isLocked()
+ "<qt>" + tdeApp->makeStdCaption( currentBasket()->isLocked()
? TQString("%1 <font color=gray30>%2</font>")
.arg(Tools::textToHTMLWithoutP(currentBasket()->basketName()), i18n("(Locked)"))
: Tools::textToHTMLWithoutP(currentBasket()->basketName()) ),
message,
- kapp->iconLoader()->loadIcon(currentBasket()->icon(), TDEIcon::NoGroup, 16, TDEIcon::DefaultState, 0L, true));
+ tdeApp->iconLoader()->loadIcon(currentBasket()->icon(), TDEIcon::NoGroup, 16, TDEIcon::DefaultState, 0L, true));
m_passivePopup->show();
}
@@ -2011,7 +2011,7 @@ void BNPView::showPassiveLoading(Basket *basket)
m_passivePopup->setView(
Tools::textToHTMLWithoutP(basket->basketName()),
i18n("Loading..."),
- kapp->iconLoader()->loadIcon(basket->icon(), TDEIcon::NoGroup, 16, TDEIcon::DefaultState, 0L, true));
+ tdeApp->iconLoader()->loadIcon(basket->icon(), TDEIcon::NoGroup, 16, TDEIcon::DefaultState, 0L, true));
m_passivePopup->show();
}
@@ -2080,7 +2080,7 @@ void BNPView::setActive(bool active)
#if KDE_IS_VERSION( 3, 2, 90 ) // KDE 3.3.x
if (active) {
- kapp->updateUserTimestamp(); // If "activate on mouse hovering systray", or "on drag throught systray"
+ 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();
@@ -2097,7 +2097,7 @@ void BNPView::setActive(bool active)
KWin::setOnDesktop(winId(), KWin::currentDesktop());
win->raise();
// Code from me: expected and correct behavviour:
- kapp->updateUserTimestamp(); // If "activate on mouse hovering systray", or "on drag throught systray"
+ tdeApp->updateUserTimestamp(); // If "activate on mouse hovering systray", or "on drag throught systray"
KWin::activateWindow(win->winId());
} else
win->hide();
@@ -2200,16 +2200,16 @@ void BNPView::leaveEvent(TQEvent*)
void BNPView::timeoutTryHide()
{
// If a menu is displayed, do nothing for the moment
- if (kapp->activePopupWidget() != 0L)
+ if (tdeApp->activePopupWidget() != 0L)
return;
- if (kapp->widgetAt(TQCursor::pos()) != 0L)
+ if (tdeApp->widgetAt(TQCursor::pos()) != 0L)
m_hideTimer->stop();
else if ( ! m_hideTimer->isActive() ) // Start only one time
m_hideTimer->start(Settings::timeToHideOnMouseOut() * 100, true);
// If a sub-dialog is oppened, we musn't hide the main window:
- if (kapp->activeWindow() != 0L && kapp->activeWindow() != Global::mainWindow())
+ if (tdeApp->activeWindow() != 0L && tdeApp->activeWindow() != Global::mainWindow())
m_hideTimer->stop();
}