diff --git a/kontact_plugin/uniqueapphandler.cpp b/kontact_plugin/uniqueapphandler.cpp index ab1774e..37cc30a 100644 --- a/kontact_plugin/uniqueapphandler.cpp +++ b/kontact_plugin/uniqueapphandler.cpp @@ -71,9 +71,9 @@ using namespace Kontact; int UniqueAppHandler::newInstance() { // This bit is duplicated from TDEUniqueApplication::newInstance() - if ( kapp->mainWidget() ) { - kapp->mainWidget()->show(); - KWin::forceActiveWindow( kapp->mainWidget()->winId() ); + if ( tdeApp->mainWidget() ) { + tdeApp->mainWidget()->show(); + KWin::forceActiveWindow( tdeApp->mainWidget()->winId() ); TDEStartupInfo::appStarted(); } @@ -97,7 +97,7 @@ bool UniqueAppHandler::process( const TQCString &fun, const TQByteArray &data, if ( !ds.atEnd() ) { // backwards compatibility TQCString asn_id; ds >> asn_id; - kapp->setStartupId( asn_id ); + tdeApp->setStartupId( asn_id ); } TQDataStream _replyStream( replyData, IO_WriteOnly ); @@ -133,15 +133,15 @@ UniqueAppWatcher::UniqueAppWatcher( UniqueAppHandlerFactoryBase* factory, Plugin : TQObject( plugin ), mFactory( factory ), mPlugin( plugin ) { // The app is running standalone if 1) that name is known to DCOP - mRunningStandalone = kapp->dcopClient()->isApplicationRegistered( plugin->name() ); + mRunningStandalone = tdeApp->dcopClient()->isApplicationRegistered( plugin->name() ); // and 2) it's not registered by kontact (e.g. in another plugin) - if ( mRunningStandalone && kapp->dcopClient()->findLocalClient( plugin->name() ) ) + if ( mRunningStandalone && tdeApp->dcopClient()->findLocalClient( plugin->name() ) ) mRunningStandalone = false; if ( mRunningStandalone ) { - kapp->dcopClient()->setNotifications( true ); - connect( kapp->dcopClient(), TQ_SIGNAL( applicationRemoved( const TQCString& ) ), + tdeApp->dcopClient()->setNotifications( true ); + connect( tdeApp->dcopClient(), TQ_SIGNAL( applicationRemoved( const TQCString& ) ), this, TQ_SLOT( unregisteredFromDCOP( const TQCString& ) ) ); } else { mFactory->createHandler( mPlugin ); @@ -151,7 +151,7 @@ UniqueAppWatcher::UniqueAppWatcher( UniqueAppHandlerFactoryBase* factory, Plugin UniqueAppWatcher::~UniqueAppWatcher() { if ( mRunningStandalone ) - kapp->dcopClient()->setNotifications( false ); + tdeApp->dcopClient()->setNotifications( false ); delete mFactory; } @@ -159,11 +159,11 @@ UniqueAppWatcher::~UniqueAppWatcher() void UniqueAppWatcher::unregisteredFromDCOP( const TQCString& appId ) { if ( appId == mPlugin->name() && mRunningStandalone ) { - disconnect( kapp->dcopClient(), TQ_SIGNAL( applicationRemoved( const TQCString& ) ), + disconnect( tdeApp->dcopClient(), TQ_SIGNAL( applicationRemoved( const TQCString& ) ), this, TQ_SLOT( unregisteredFromDCOP( const TQCString& ) ) ); kdDebug(5601) << k_funcinfo << appId << endl; mFactory->createHandler( mPlugin ); - kapp->dcopClient()->setNotifications( false ); + tdeApp->dcopClient()->setNotifications( false ); mRunningStandalone = false; } } diff --git a/src/archive.cpp b/src/archive.cpp index bf40a59..c598d6d 100644 --- a/src/archive.cpp +++ b/src/archive.cpp @@ -103,7 +103,7 @@ void Archive::save(Basket *basket, bool withSubBaskets, const TQString &destinat State::List states = (*it)->states(); for (State::List::iterator it2 = states.begin(); it2 != states.end(); ++it2) { State *state = (*it2); - TQPixmap icon = kapp->iconLoader()->loadIcon(state->emblem(), TDEIcon::Small, 16, TDEIcon::DefaultState, /*path_store=*/0L, /*canReturnNull=*/true); + TQPixmap icon = tdeApp->iconLoader()->loadIcon(state->emblem(), TDEIcon::Small, 16, TDEIcon::DefaultState, /*path_store=*/0L, /*canReturnNull=*/true); if (!icon.isNull()) { icon.save(tempIconFile, "PNG"); TQString iconFileName = state->emblem().replace('/', '_'); @@ -197,7 +197,7 @@ void Archive::saveBasketToArchive(Basket *basket, bool recursive, KTar *tar, TQS // Save basket icon: TQString tempIconFile = tempFolder + "icon.png"; if (!basket->icon().isEmpty() && basket->icon() != "basket") { - TQPixmap icon = kapp->iconLoader()->loadIcon(basket->icon(), TDEIcon::Small, 16, TDEIcon::DefaultState, /*path_store=*/0L, /*canReturnNull=*/true); + TQPixmap icon = tdeApp->iconLoader()->loadIcon(basket->icon(), TDEIcon::Small, 16, TDEIcon::DefaultState, /*path_store=*/0L, /*canReturnNull=*/true); if (!icon.isNull()) { icon.save(tempIconFile, "PNG"); TQString iconFileName = basket->icon().replace('/', '_'); @@ -318,7 +318,7 @@ void Archive::open(const TQString &path) "It can be opened but not every information will be available to you. " "For instance, some notes may be missing because they are of a type only available in new versions. " "When saving the file back, consider to save it to another file, to preserve the original one.") - .arg(kapp->aboutData()->programName()), + .arg(tdeApp->aboutData()->programName()), i18n("Basket Archive Error") ); } @@ -326,7 +326,7 @@ void Archive::open(const TQString &path) KMessageBox::error( 0, i18n("This file was created with a recent version of %1. Please upgrade to a newer version to be able to open that file.") - .arg(kapp->aboutData()->programName()), + .arg(tdeApp->aboutData()->programName()), i18n("Basket Archive Error") ); file.close(); @@ -437,7 +437,7 @@ void Archive::importTagEmblems(const TQString &extractionFolder) if ( (!subElement.isNull()) && subElement.tagName() == "state" ) { TQString emblemName = XMLWork::getElementText(subElement, "emblem"); if (!emblemName.isEmpty()) { - TQPixmap emblem = kapp->iconLoader()->loadIcon(emblemName, TDEIcon::NoGroup, 16, TDEIcon::DefaultState, 0L, /*canReturnNull=*/true); + TQPixmap emblem = tdeApp->iconLoader()->loadIcon(emblemName, TDEIcon::NoGroup, 16, TDEIcon::DefaultState, 0L, /*canReturnNull=*/true); // The icon does not exists on that computer, import it: if (emblem.isNull()) { // Of the emblem path was eg. "/home/seb/emblem.png", it was exported as "tag-emblems/_home_seb_emblem.png". @@ -552,7 +552,7 @@ void Archive::importBasketIcon(TQDomElement properties, const TQString &extracti { TQString iconName = XMLWork::getElementText(properties, "icon"); if (!iconName.isEmpty() && iconName != "basket") { - TQPixmap icon = kapp->iconLoader()->loadIcon(iconName, TDEIcon::NoGroup, 16, TDEIcon::DefaultState, 0L, /*canReturnNull=*/true); + TQPixmap icon = tdeApp->iconLoader()->loadIcon(iconName, TDEIcon::NoGroup, 16, TDEIcon::DefaultState, 0L, /*canReturnNull=*/true); // The icon does not exists on that computer, import it: if (icon.isNull()) { TQDir dir; diff --git a/src/backup.cpp b/src/backup.cpp index d770f1d..be900c2 100644 --- a/src/backup.cpp +++ b/src/backup.cpp @@ -81,9 +81,9 @@ BackupDialog::BackupDialog(TQWidget *parent, const char *name) "In this case, mount the shared-folder to the local file system and ask %2 to use that mount point.
" "Warning: you should not run %3 at the same time on both computers, or you risk to loss data while the two applications are desynced." "

Please remember that you should not change the content of that folder manually (eg. adding a file in a basket folder will not add that file to the basket).

") - .arg(kapp->aboutData()->programName()) - .arg(kapp->aboutData()->programName()) - .arg(kapp->aboutData()->programName()), + .arg(tdeApp->aboutData()->programName()) + .arg(tdeApp->aboutData()->programName()) + .arg(tdeApp->aboutData()->programName()), folderWidget); folderLayout->addWidget(moveFolder); folderLayout->addWidget(useFolder); @@ -216,7 +216,7 @@ void BackupDialog::backup() thread.start(); while (thread.running()) { progress->advance(1); // Or else, the animation is not played! - kapp->processEvents(); + tdeApp->processEvents(); usleep(300); // Not too long because if the backup process is finished, we wait for nothing } @@ -274,14 +274,14 @@ void BackupDialog::restore() thread.start(); while (thread.running()) { progress->advance(1); // Or else, the animation is not played! - kapp->processEvents(); + tdeApp->processEvents(); usleep(300); // Not too long because if the restore process is finished, we wait for nothing } dialog->hide(); // The restore is finished, do not continue to show it while telling the user the application is going to be restarted delete dialog; // If we only hidden it, it reappeared just after having restored a small backup... Very strange. dialog = 0; // This was annoying since it is modal and the "BasKet Note Pads is going to be restarted" message was not reachable. - //kapp->processEvents(); + //tdeApp->processEvents(); // Check for errors: if (!thread.success()) { @@ -338,12 +338,12 @@ void Backup::setFolderAndRestart(const TQString &folder, const TQString &message 0, "" + message.arg( (folder.endsWith("/") ? folder.left(folder.length() - 1) : folder), - kapp->aboutData()->programName()), + tdeApp->aboutData()->programName()), i18n("Restart") ); // Restart the application: - KRun::runCommand(binaryPath, kapp->aboutData()->programName(), kapp->iconName()); + KRun::runCommand(binaryPath, tdeApp->aboutData()->programName(), tdeApp->iconName()); exit(0); } 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
this version of %1.").arg(kapp->aboutData()->programName()) ); + label->setText( text + i18n("Encryption is not supported by
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 %1. 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()); diff --git a/src/basketlistview.cpp b/src/basketlistview.cpp index f3bf950..fa85de1 100644 --- a/src/basketlistview.cpp +++ b/src/basketlistview.cpp @@ -140,7 +140,7 @@ void BasketListViewItem::setup() int height = MARGIN + TQMAX(BASKET_ICON_SIZE, textRect.height()) + MARGIN; setHeight(height); - TQPixmap icon = kapp->iconLoader()->loadIcon(m_basket->icon(), TDEIcon::NoGroup, 16, TDEIcon::DefaultState, 0L, /*canReturnNull=*/false); + TQPixmap icon = tdeApp->iconLoader()->loadIcon(m_basket->icon(), TDEIcon::NoGroup, 16, TDEIcon::DefaultState, 0L, /*canReturnNull=*/false); setPixmap(/*column=*/0, icon); @@ -584,12 +584,12 @@ void BasketListViewItem::paintCell(TQPainter *painter, const TQColorGroup &/*col effectiveWidth += countPixmap.width() + MARGIN; } if (showLoadingIcon) { - TQPixmap icon = kapp->iconLoader()->loadIcon("edit-find", TDEIcon::NoGroup, 16, TDEIcon::DefaultState, 0L, /*canReturnNull=*/false); + TQPixmap icon = tdeApp->iconLoader()->loadIcon("edit-find", TDEIcon::NoGroup, 16, TDEIcon::DefaultState, 0L, /*canReturnNull=*/false); thePainter.drawPixmap(effectiveWidth, 0, icon); effectiveWidth += BASKET_ICON_SIZE + MARGIN; } if (showEncryptedIcon && !showLoadingIcon) { - TQPixmap icon = kapp->iconLoader()->loadIcon("encrypted", TDEIcon::NoGroup, 16, TDEIcon::DefaultState, 0L, /*canReturnNull=*/false); + TQPixmap icon = tdeApp->iconLoader()->loadIcon("encrypted", TDEIcon::NoGroup, 16, TDEIcon::DefaultState, 0L, /*canReturnNull=*/false); thePainter.drawPixmap(effectiveWidth, 0, icon); } diff --git a/src/basketproperties.cpp b/src/basketproperties.cpp index d2104ae..53255bf 100644 --- a/src/basketproperties.cpp +++ b/src/basketproperties.cpp @@ -103,7 +103,7 @@ BasketPropertiesDialog::BasketPropertiesDialog(Basket *basket, TQWidget *parent) } } // m_backgroundImage->insertItem(i18n("Other..."), -1); - int BUTTON_MARGIN = kapp->style().pixelMetric(TQStyle::PM_ButtonMargin); + int BUTTON_MARGIN = tdeApp->style().pixelMetric(TQStyle::PM_ButtonMargin); m_backgroundImage->setSizeLimit(50/*75 * 6 / m_backgroundImage->sizeHint().height()*/); m_backgroundImage->setMinimumHeight(75 + 2 * BUTTON_MARGIN); 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) "

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

") - .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() ? "" : ""), - 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 %1 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( - "" + kapp->makeStdCaption( currentBasket()->isLocked() + "" + tdeApp->makeStdCaption( currentBasket()->isLocked() ? TQString("%1 %2") .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(); } diff --git a/src/crashhandler.cpp b/src/crashhandler.cpp index e13ca27..a95da4e 100644 --- a/src/crashhandler.cpp +++ b/src/crashhandler.cpp @@ -82,7 +82,7 @@ "But, all is not lost! You could potentially help us fix the crash. " "Information describing the crash is below, so just click send, " "or if you have time, write a brief description of how the crash happened first.\n\n" - "Many thanks." ).arg(kapp->aboutData()->programName()) + "\n\n"; + "Many thanks." ).arg(tdeApp->aboutData()->programName()) + "\n\n"; body += "\n\n\n\n\n\n" + i18n( "The information below is to help the developers identify the problem, " "please do not modify it." ) + "\n\n\n\n"; @@ -192,7 +192,7 @@ // body += kdBacktrace(); //TODO startup notification - kapp->invokeMailer( + tdeApp->invokeMailer( /*to*/ "kelvie@ieee.org", /*cc*/ TQString(), /*bcc*/ TQString(), @@ -206,7 +206,7 @@ std::cout << ("\n" + i18n( "%1 has crashed! We're sorry about this.\n\n" "But, all is not lost! Perhaps an upgrade is already available " "which fixes the problem. Please check your distribution's software repository." ) - .arg(kapp->aboutData()->programName())).local8Bit().data() << std::endl; + .arg(tdeApp->aboutData()->programName())).local8Bit().data() << std::endl; } //_exit() exits immediately, otherwise this diff --git a/src/filter.cpp b/src/filter.cpp index 226520a..52fc7ad 100644 --- a/src/filter.cpp +++ b/src/filter.cpp @@ -55,8 +55,8 @@ FilterBar::FilterBar(TQWidget *parent, const char *name) TQHBoxLayout *hBox = new TQHBoxLayout(this, /*margin*/0, /*spacing*/0); // Create every widgets: - TQIconSet resetIconSet = kapp->iconLoader()->loadIconSet("locationbar_erase", TDEIcon::Toolbar); - TQIconSet inAllIconSet = kapp->iconLoader()->loadIconSet("edit-find", TDEIcon::Toolbar); + TQIconSet resetIconSet = tdeApp->iconLoader()->loadIconSet("locationbar_erase", TDEIcon::Toolbar); + TQIconSet inAllIconSet = tdeApp->iconLoader()->loadIconSet("edit-find", TDEIcon::Toolbar); m_resetButton = new TQToolButton(this); @@ -172,7 +172,7 @@ void FilterBar::repopulateTagsComnbo() text = state->name(); icon = state->emblem(); } - emblem = kapp->iconLoader()->loadIcon(icon, TDEIcon::Desktop, ICON_SIZE, TDEIcon::DefaultState, 0L, /*canReturnNull=*/true); + emblem = tdeApp->iconLoader()->loadIcon(icon, TDEIcon::Desktop, ICON_SIZE, TDEIcon::DefaultState, 0L, /*canReturnNull=*/true); m_tagsBox->insertItem(emblem, text, index); // Update the mapping: m_tagsMap.insert(index, tag); @@ -184,7 +184,7 @@ void FilterBar::repopulateTagsComnbo() // Insert the state: text = state->name(); icon = state->emblem(); - emblem = kapp->iconLoader()->loadIcon(icon, TDEIcon::Desktop, ICON_SIZE, TDEIcon::DefaultState, 0L, /*canReturnNull=*/true); + emblem = tdeApp->iconLoader()->loadIcon(icon, TDEIcon::Desktop, ICON_SIZE, TDEIcon::DefaultState, 0L, /*canReturnNull=*/true); // Indent the emblem to show the hierarchy relation: if (!emblem.isNull()) emblem = Tools::indentPixmap(emblem, /*depth=*/1, /*deltaX=*/2 * ICON_SIZE / 3); diff --git a/src/formatimporter.cpp b/src/formatimporter.cpp index 90e8ba3..62257a9 100644 --- a/src/formatimporter.cpp +++ b/src/formatimporter.cpp @@ -65,7 +65,7 @@ void FormatImporter::copyFolder(const TQString &folder, const TQString &newFolde TDEIO::CopyJob *copyJob = TDEIO::copyAs(KURL(folder), KURL(newFolder), /*showProgressInfo=*/false); connect( copyJob, TQ_SIGNAL(result(TDEIO::Job*)), this, TQ_SLOT(slotCopyingDone(TDEIO::Job*)) ); while (!copyFinished) - kapp->processEvents(); + tdeApp->processEvents(); } void FormatImporter::moveFolder(const TQString &folder, const TQString &newFolder) @@ -74,7 +74,7 @@ void FormatImporter::moveFolder(const TQString &folder, const TQString &newFolde TDEIO::CopyJob *copyJob = TDEIO::moveAs(KURL(folder), KURL(newFolder), /*showProgressInfo=*/false); connect( copyJob, TQ_SIGNAL(result(TDEIO::Job*)), this, TQ_SLOT(slotCopyingDone(TDEIO::Job*)) ); while (!copyFinished) - kapp->processEvents(); + tdeApp->processEvents(); } void FormatImporter::slotCopyingDone(TDEIO::Job *) diff --git a/src/global.cpp b/src/global.cpp index 3ef0bf9..33d60cb 100644 --- a/src/global.cpp +++ b/src/global.cpp @@ -87,7 +87,7 @@ TQString Global::openNoteIcon() // FIXME: Now an edit icon TDEMainWindow* Global::mainWindow() { - TQWidget* res = kapp->mainWidget(); + TQWidget* res = tdeApp->mainWidget(); if(res && res->inherits("TDEMainWindow")) { diff --git a/src/htmlexporter.cpp b/src/htmlexporter.cpp index 413220b..aa1d4ca 100644 --- a/src/htmlexporter.cpp +++ b/src/htmlexporter.cpp @@ -103,7 +103,7 @@ void HTMLExporter::prepareExport(Basket *basket, const TQString &fullPath) { progress->setTotalSteps(/*Preparation:*/1 + /*Finishing:*/1 + /*Basket:*/1 + /*SubBaskets:*/Global::bnpView->basketCount(Global::bnpView->listViewItemForBasket(basket))); progress->setValue(0); - kapp->processEvents(); + tdeApp->processEvents(); // Remember the file path choosen by the user: filePath = fullPath; @@ -217,7 +217,7 @@ void HTMLExporter::exportBasket(Basket *basket, bool isSubBasket) "\n" " \n" " \n" - " aboutData()->programName() << " " << VERSION << "\">\n" + " aboutData()->programName() << " " << VERSION << "\">\n" "