Use tdeApp

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/35/head
Michele Calgaro 1 month ago
parent 7975b08418
commit 4a47c1bfff
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -71,9 +71,9 @@ using namespace Kontact;
int UniqueAppHandler::newInstance() int UniqueAppHandler::newInstance()
{ {
// This bit is duplicated from TDEUniqueApplication::newInstance() // This bit is duplicated from TDEUniqueApplication::newInstance()
if ( kapp->mainWidget() ) { if ( tdeApp->mainWidget() ) {
kapp->mainWidget()->show(); tdeApp->mainWidget()->show();
KWin::forceActiveWindow( kapp->mainWidget()->winId() ); KWin::forceActiveWindow( tdeApp->mainWidget()->winId() );
TDEStartupInfo::appStarted(); TDEStartupInfo::appStarted();
} }
@ -97,7 +97,7 @@ bool UniqueAppHandler::process( const TQCString &fun, const TQByteArray &data,
if ( !ds.atEnd() ) { // backwards compatibility if ( !ds.atEnd() ) { // backwards compatibility
TQCString asn_id; TQCString asn_id;
ds >> asn_id; ds >> asn_id;
kapp->setStartupId( asn_id ); tdeApp->setStartupId( asn_id );
} }
TQDataStream _replyStream( replyData, IO_WriteOnly ); TQDataStream _replyStream( replyData, IO_WriteOnly );
@ -133,15 +133,15 @@ UniqueAppWatcher::UniqueAppWatcher( UniqueAppHandlerFactoryBase* factory, Plugin
: TQObject( plugin ), mFactory( factory ), mPlugin( plugin ) : TQObject( plugin ), mFactory( factory ), mPlugin( plugin )
{ {
// The app is running standalone if 1) that name is known to DCOP // 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) // 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; mRunningStandalone = false;
if ( mRunningStandalone ) { if ( mRunningStandalone ) {
kapp->dcopClient()->setNotifications( true ); tdeApp->dcopClient()->setNotifications( true );
connect( kapp->dcopClient(), TQ_SIGNAL( applicationRemoved( const TQCString& ) ), connect( tdeApp->dcopClient(), TQ_SIGNAL( applicationRemoved( const TQCString& ) ),
this, TQ_SLOT( unregisteredFromDCOP( const TQCString& ) ) ); this, TQ_SLOT( unregisteredFromDCOP( const TQCString& ) ) );
} else { } else {
mFactory->createHandler( mPlugin ); mFactory->createHandler( mPlugin );
@ -151,7 +151,7 @@ UniqueAppWatcher::UniqueAppWatcher( UniqueAppHandlerFactoryBase* factory, Plugin
UniqueAppWatcher::~UniqueAppWatcher() UniqueAppWatcher::~UniqueAppWatcher()
{ {
if ( mRunningStandalone ) if ( mRunningStandalone )
kapp->dcopClient()->setNotifications( false ); tdeApp->dcopClient()->setNotifications( false );
delete mFactory; delete mFactory;
} }
@ -159,11 +159,11 @@ UniqueAppWatcher::~UniqueAppWatcher()
void UniqueAppWatcher::unregisteredFromDCOP( const TQCString& appId ) void UniqueAppWatcher::unregisteredFromDCOP( const TQCString& appId )
{ {
if ( appId == mPlugin->name() && mRunningStandalone ) { 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& ) ) ); this, TQ_SLOT( unregisteredFromDCOP( const TQCString& ) ) );
kdDebug(5601) << k_funcinfo << appId << endl; kdDebug(5601) << k_funcinfo << appId << endl;
mFactory->createHandler( mPlugin ); mFactory->createHandler( mPlugin );
kapp->dcopClient()->setNotifications( false ); tdeApp->dcopClient()->setNotifications( false );
mRunningStandalone = false; mRunningStandalone = false;
} }
} }

@ -103,7 +103,7 @@ void Archive::save(Basket *basket, bool withSubBaskets, const TQString &destinat
State::List states = (*it)->states(); State::List states = (*it)->states();
for (State::List::iterator it2 = states.begin(); it2 != states.end(); ++it2) { for (State::List::iterator it2 = states.begin(); it2 != states.end(); ++it2) {
State *state = (*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()) { if (!icon.isNull()) {
icon.save(tempIconFile, "PNG"); icon.save(tempIconFile, "PNG");
TQString iconFileName = state->emblem().replace('/', '_'); TQString iconFileName = state->emblem().replace('/', '_');
@ -197,7 +197,7 @@ void Archive::saveBasketToArchive(Basket *basket, bool recursive, KTar *tar, TQS
// Save basket icon: // Save basket icon:
TQString tempIconFile = tempFolder + "icon.png"; TQString tempIconFile = tempFolder + "icon.png";
if (!basket->icon().isEmpty() && basket->icon() != "basket") { 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()) { if (!icon.isNull()) {
icon.save(tempIconFile, "PNG"); icon.save(tempIconFile, "PNG");
TQString iconFileName = basket->icon().replace('/', '_'); 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. " "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. " "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.") "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") i18n("Basket Archive Error")
); );
} }
@ -326,7 +326,7 @@ void Archive::open(const TQString &path)
KMessageBox::error( KMessageBox::error(
0, 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.") 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") i18n("Basket Archive Error")
); );
file.close(); file.close();
@ -437,7 +437,7 @@ void Archive::importTagEmblems(const TQString &extractionFolder)
if ( (!subElement.isNull()) && subElement.tagName() == "state" ) { if ( (!subElement.isNull()) && subElement.tagName() == "state" ) {
TQString emblemName = XMLWork::getElementText(subElement, "emblem"); TQString emblemName = XMLWork::getElementText(subElement, "emblem");
if (!emblemName.isEmpty()) { 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: // The icon does not exists on that computer, import it:
if (emblem.isNull()) { if (emblem.isNull()) {
// Of the emblem path was eg. "/home/seb/emblem.png", it was exported as "tag-emblems/_home_seb_emblem.png". // 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"); TQString iconName = XMLWork::getElementText(properties, "icon");
if (!iconName.isEmpty() && iconName != "basket") { 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: // The icon does not exists on that computer, import it:
if (icon.isNull()) { if (icon.isNull()) {
TQDir dir; TQDir dir;

@ -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.<br>" "In this case, mount the shared-folder to the local file system and ask %2 to use that mount point.<br>"
"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.</li>" "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.</li>"
"</ul><p>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).</p>") "</ul><p>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).</p>")
.arg(kapp->aboutData()->programName()) .arg(tdeApp->aboutData()->programName())
.arg(kapp->aboutData()->programName()) .arg(tdeApp->aboutData()->programName())
.arg(kapp->aboutData()->programName()), .arg(tdeApp->aboutData()->programName()),
folderWidget); folderWidget);
folderLayout->addWidget(moveFolder); folderLayout->addWidget(moveFolder);
folderLayout->addWidget(useFolder); folderLayout->addWidget(useFolder);
@ -216,7 +216,7 @@ void BackupDialog::backup()
thread.start(); thread.start();
while (thread.running()) { while (thread.running()) {
progress->advance(1); // Or else, the animation is not played! 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 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(); thread.start();
while (thread.running()) { while (thread.running()) {
progress->advance(1); // Or else, the animation is not played! 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 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 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. 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. 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: // Check for errors:
if (!thread.success()) { if (!thread.success()) {
@ -338,12 +338,12 @@ void Backup::setFolderAndRestart(const TQString &folder, const TQString &message
0, 0,
"<qt>" + message.arg( "<qt>" + message.arg(
(folder.endsWith("/") ? folder.left(folder.length() - 1) : folder), (folder.endsWith("/") ? folder.left(folder.length() - 1) : folder),
kapp->aboutData()->programName()), tdeApp->aboutData()->programName()),
i18n("Restart") i18n("Restart")
); );
// Restart the application: // Restart the application:
KRun::runCommand(binaryPath, kapp->aboutData()->programName(), kapp->iconName()); KRun::runCommand(binaryPath, tdeApp->aboutData()->programName(), tdeApp->iconName());
exit(0); exit(0);
} }

@ -758,7 +758,7 @@ void Basket::loadNotes(const TQDomElement &notes, 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); m_action->setText("BASKET SHORTCUT: " + name);
// Basket should ALWAYS have an icon (the "basket" icon by default): // 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()) if (iconTest.isNull())
m_icon = "basket"; 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: // Now that the background image is loaded and subscribed, we display it during the load process:
delete doc; delete doc;
updateContents(); updateContents();
// kapp->processEvents(); // tdeApp->processEvents();
//BEGIN Compatibility with 0.6.0 Pre-Alpha versions: //BEGIN Compatibility with 0.6.0 Pre-Alpha versions:
TQDomElement notes = XMLWork::getElement(docElem, "notes"); TQDomElement notes = XMLWork::getElement(docElem, "notes");
@ -1426,7 +1426,7 @@ void Basket::leaveEvent(TQEvent *)
void Basket::setFocusIfNotInPopupMenu() void Basket::setFocusIfNotInPopupMenu()
{ {
if (!kapp->activePopupWidget()) { if (!tdeApp->activePopupWidget()) {
if (isDuringEdit()) { if (isDuringEdit()) {
m_editor->widget()->setFocus(); m_editor->widget()->setFocus();
} }
@ -1451,7 +1451,7 @@ void Basket::contentsMousePressEvent(TQMouseEvent *event)
// Do nothing if we disabled the click some milliseconds sooner. // 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: // 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(); doHoverEffects();
m_noActionOnMouseRelease = true; m_noActionOnMouseRelease = true;
// But we allow to select: // But we allow to select:
@ -2536,7 +2536,7 @@ void Basket::doAutoScrollSelection()
dx = pos.x() - visibleWidth() + AUTO_SCROLL_MARGIN; dx = pos.x() - visibleWidth() + AUTO_SCROLL_MARGIN;
if (dx || dy) { 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); scrollBy(dx, dy);
if (!m_autoScrollSelectionTimer.isActive()) if (!m_autoScrollSelectionTimer.isActive())
m_autoScrollSelectionTimer.start(AUTO_SCROLL_DELAY); 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. // Don't do hover effects when a popup menu is opened.
// Primarily because the basket area will only receive mouseEnterEvent and mouveLeaveEvent. // 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: // It willn't be noticed of mouseMoveEvent, which would result in a apparently broken application state:
if (kapp->activePopupWidget()) if (tdeApp->activePopupWidget())
underMouse = false; underMouse = false;
// Compute which note is hovered: // Compute which note is hovered:
@ -2704,7 +2704,7 @@ void Basket::doHoverEffects(const TQPoint &pos)
void Basket::mouseEnteredEditorWidget() void Basket::mouseEnteredEditorWidget()
{ {
if (!m_lockedHovering && !kapp->activePopupWidget()) if (!m_lockedHovering && !tdeApp->activePopupWidget())
doHoverEffects(editedNote(), Note::Content, TQPoint()); doHoverEffects(editedNote(), Note::Content, TQPoint());
} }
@ -3086,7 +3086,7 @@ void Basket::drawContents(TQPainter *painter, int clipX, int clipY, int clipWidt
#ifdef HAVE_LIBGPGME #ifdef HAVE_LIBGPGME
label->setText( text + i18n("Press Unlock to access it.") ); label->setText( text + i18n("Press Unlock to access it.") );
#else #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 #endif
label->setAlignment( int( TQLabel::AlignTop ) ); label->setAlignment( int( TQLabel::AlignTop ) );
layout->addMultiCellWidget( label, 0, 0, 1, 2 ); layout->addMultiCellWidget( label, 0, 0, 1, 2 );
@ -3902,7 +3902,7 @@ bool Basket::closeEditor()
emit resetStatusBarText(); // Remove the "Editing. ... to validate." text. 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: // 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()) if (!decoration()->filterBar()->lineEdit()->hasFocus())
@ -4074,16 +4074,16 @@ void Basket::noteEdit(Note *note, bool justAdded, const TQPoint &clickedPoint) /
if (clickedPoint != TQPoint()) { if (clickedPoint != TQPoint()) {
TQPoint pos(clickedPoint.x() - note->x() - note->contentX() + m_editor->textEdit()->frameWidth() + 4 - m_editor->textEdit()->frameWidth(), 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()); 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()->moveCursor(KTextEdit::MoveHome, false);
m_editor->textEdit()->ensureCursorVisible(); m_editor->textEdit()->ensureCursorVisible();
m_editor->textEdit()->placeCursor(pos); m_editor->textEdit()->placeCursor(pos);
updateEditorAppearance(); 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 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." emit resetStatusBarText(); // Display "Editing. ... to validate."
} else { } else {
// Delete the note user have canceled the addition: // 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) 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 :-( KMessageBox::sorry(0L, i18n("You are not authorized to open this file.")); // TODO: Better message, i18n freeze :-(
return false; 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.") : i18n("File permissions are bad for <b>%1</b>. Please check that you have write access to it and the parent folders.")
.arg(fullPath) .arg(fullPath)
), ),
kapp->activeWindow() tdeApp->activeWindow()
); );
} }
if (!dialog->isShown()) 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 retryDelay = 1000/*ms*/;
const int sleepDelay = 50/*ms*/; const int sleepDelay = 50/*ms*/;
for (int i = 0; i < retryDelay / sleepDelay; ++i) { for (int i = 0; i < retryDelay / sleepDelay; ++i) {
kapp->processEvents(); tdeApp->processEvents();
usleep(sleepDelay); usleep(sleepDelay);
} }
} }
@ -5455,7 +5455,7 @@ DiskErrorDialog::DiskErrorDialog(const TQString &titleMessage, const TQString &m
//enableButtonOK(false); //enableButtonOK(false);
setModal(true); setModal(true);
TQHBoxLayout *layout = new TQHBoxLayout(plainPage(), /*margin=*/0, spacingHint()); 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()); TQLabel *iconLabel = new TQLabel(plainPage());
iconLabel->setPixmap(icon); iconLabel->setPixmap(icon);
iconLabel->setFixedSize(iconLabel->sizeHint()); iconLabel->setFixedSize(iconLabel->sizeHint());

@ -140,7 +140,7 @@ void BasketListViewItem::setup()
int height = MARGIN + TQMAX(BASKET_ICON_SIZE, textRect.height()) + MARGIN; int height = MARGIN + TQMAX(BASKET_ICON_SIZE, textRect.height()) + MARGIN;
setHeight(height); 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); setPixmap(/*column=*/0, icon);
@ -584,12 +584,12 @@ void BasketListViewItem::paintCell(TQPainter *painter, const TQColorGroup &/*col
effectiveWidth += countPixmap.width() + MARGIN; effectiveWidth += countPixmap.width() + MARGIN;
} }
if (showLoadingIcon) { 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); thePainter.drawPixmap(effectiveWidth, 0, icon);
effectiveWidth += BASKET_ICON_SIZE + MARGIN; effectiveWidth += BASKET_ICON_SIZE + MARGIN;
} }
if (showEncryptedIcon && !showLoadingIcon) { 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); thePainter.drawPixmap(effectiveWidth, 0, icon);
} }

@ -103,7 +103,7 @@ BasketPropertiesDialog::BasketPropertiesDialog(Basket *basket, TQWidget *parent)
} }
} }
// m_backgroundImage->insertItem(i18n("Other..."), -1); // 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->setSizeLimit(50/*75 * 6 / m_backgroundImage->sizeHint().height()*/);
m_backgroundImage->setMinimumHeight(75 + 2 * BUTTON_MARGIN); m_backgroundImage->setMinimumHeight(75 + 2 * BUTTON_MARGIN);

@ -141,7 +141,7 @@ void BNPView::lateInit()
{ {
if (Settings::useSystray() && TDECmdLineArgs::parsedArgs() && TDECmdLineArgs::parsedArgs()->isSet("start-hidden")) if (Settings::useSystray() && TDECmdLineArgs::parsedArgs() && TDECmdLineArgs::parsedArgs()->isSet("start-hidden"))
if(Global::mainWindow()) Global::mainWindow()->hide(); 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()); if(Global::mainWindow()) Global::mainWindow()->setShown(!Settings::startDocked());
else else
showMainWindow(); showMainWindow();
@ -197,7 +197,7 @@ void BNPView::lateInit()
while (it.current()) { while (it.current()) {
BasketListViewItem *item = ((BasketListViewItem*)it.current()); BasketListViewItem *item = ((BasketListViewItem*)it.current());
item->basket()->load(); item->basket()->load();
kapp->processEvents(); tdeApp->processEvents();
++it; ++it;
} }
StopWatch::check(100);*/ StopWatch::check(100);*/
@ -250,7 +250,7 @@ void BNPView::onFirstShow()
// LikeBack::setWindowNamesListing(LikeBack:: / *NoListing* / / *WarnUnnamedWindows* / AllWindows); // 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()) if (!isPart())
connectTagsMenu(); connectTagsMenu();
@ -554,7 +554,7 @@ void BNPView::setupActions()
/** Basket : **************************************************************/ /** 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: // returns true. We do it ourself:
bool runInsideKontact = true; bool runInsideKontact = true;
TQWidget *parentWidget = (TQWidget*) parent(); TQWidget *parentWidget = (TQWidget*) parent();
@ -1006,7 +1006,7 @@ void BNPView::toggleFilterAllBaskets(bool doFilter)
newFilter(); 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, * 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" * this new "instance" leave and set up a flag that is read by the first "instance"
* to know it should re-begin the work. * to know it should re-begin the work.
@ -1042,7 +1042,7 @@ void BNPView::newFilter()
// Show/hide the "little filter icons" (during basket load) // 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: // or the "little numbers" (to show number of found notes in the baskets) is the tree:
m_tree->triggerUpdate(); m_tree->triggerUpdate();
kapp->processEvents(); tdeApp->processEvents();
// Load every baskets for filtering, if they are not already loaded, and if necessary: // Load every baskets for filtering, if they are not already loaded, and if necessary:
if (filterData.isFiltering) { if (filterData.isFiltering) {
@ -1056,7 +1056,7 @@ void BNPView::newFilter()
basket->load(); basket->load();
basket->filterAgain(); basket->filterAgain();
m_tree->triggerUpdate(); m_tree->triggerUpdate();
kapp->processEvents(); tdeApp->processEvents();
if (shouldRestart) { if (shouldRestart) {
alreadyEntered = false; alreadyEntered = false;
shouldRestart = false; shouldRestart = false;
@ -1069,7 +1069,7 @@ void BNPView::newFilter()
} }
m_tree->triggerUpdate(); m_tree->triggerUpdate();
// kapp->processEvents(); // tdeApp->processEvents();
alreadyEntered = false; alreadyEntered = false;
shouldRestart = false; shouldRestart = false;
@ -1191,7 +1191,7 @@ void BNPView::setTreePlacement(bool onLeft)
else else
moveToLast(m_tree); moveToLast(m_tree);
//updateGeometry(); //updateGeometry();
kapp->postEvent( this, new TQResizeEvent(size(), size()) ); tdeApp->postEvent( this, new TQResizeEvent(size(), size()) );
} }
void BNPView::relayoutAllBaskets() void BNPView::relayoutAllBaskets()
@ -1452,7 +1452,7 @@ void BNPView::slotColorFromScreen(bool global)
m_colorPicker->pickColor(); m_colorPicker->pickColor();
/* m_gettingColorFromScreen = true; /* m_gettingColorFromScreen = true;
kapp->processEvents(); tdeApp->processEvents();
TQTimer::singleShot( 100, this, TQ_SLOT(grabColorFromScreen()) );*/ 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 " "<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 " "but you had a preview version of it, try to remove the "
"file %5basketui.rc</p>") "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/")), stdDirs.saveLocation("data", "basket/")).arg(stdDirs.saveLocation("data", "basket/"), stdDirs.saveLocation("data", "basket/")),
i18n("Ressource not Found"), KMessageBox::AllowLink ); 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 this case, global is true, and we don't wait.
// In the future, if global is also defined for other cases, check for // In the future, if global is also defined for other cases, check for
// enum TDEAction::ActivationReason { UnknownActivation, EmulatedActivation, AccelActivation, PopupMenuActivation, ToolBarActivation }; // 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; m_colorPickWasGlobal = global;
if (isMainWindowActive()) { if (isMainWindowActive()) {
@ -1767,7 +1767,7 @@ void BNPView::doBasketDeletion(Basket *basket)
void BNPView::password() void BNPView::password()
{ {
#ifdef HAVE_LIBGPGME #ifdef HAVE_LIBGPGME
PasswordDlg dlg(kapp->activeWindow(), "Password"); PasswordDlg dlg(tdeApp->activeWindow(), "Password");
Basket *cur = currentBasket(); Basket *cur = currentBasket();
dlg.setType(cur->encryptionType()); dlg.setType(cur->encryptionType());
@ -1959,7 +1959,7 @@ void BNPView::showPassiveDroppedDelayed()
m_passivePopup->setView( m_passivePopup->setView(
title.arg(Tools::textToHTMLWithoutP(currentBasket()->basketName())), title.arg(Tools::textToHTMLWithoutP(currentBasket()->basketName())),
(contentsPixmap.isNull() ? "" : "<img src=\"_passivepopup_image_\">"), (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(); m_passivePopup->show();
} }
@ -1972,7 +1972,7 @@ void BNPView::showPassiveImpossible(const TQString &message)
.arg(i18n("Basket <i>%1</i> is locked")) .arg(i18n("Basket <i>%1</i> is locked"))
.arg(Tools::textToHTMLWithoutP(currentBasket()->basketName())), .arg(Tools::textToHTMLWithoutP(currentBasket()->basketName())),
message, 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(); 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) 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 = new KPassivePopup(Settings::useSystray() ? (TQWidget*)Global::systemTray : (TQWidget*)this);
m_passivePopup->setView( m_passivePopup->setView(
"<qt>" + kapp->makeStdCaption( currentBasket()->isLocked() "<qt>" + tdeApp->makeStdCaption( currentBasket()->isLocked()
? TQString("%1 <font color=gray30>%2</font>") ? TQString("%1 <font color=gray30>%2</font>")
.arg(Tools::textToHTMLWithoutP(currentBasket()->basketName()), i18n("(Locked)")) .arg(Tools::textToHTMLWithoutP(currentBasket()->basketName()), i18n("(Locked)"))
: Tools::textToHTMLWithoutP(currentBasket()->basketName()) ), : Tools::textToHTMLWithoutP(currentBasket()->basketName()) ),
message, 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(); m_passivePopup->show();
} }
@ -2011,7 +2011,7 @@ void BNPView::showPassiveLoading(Basket *basket)
m_passivePopup->setView( m_passivePopup->setView(
Tools::textToHTMLWithoutP(basket->basketName()), Tools::textToHTMLWithoutP(basket->basketName()),
i18n("Loading..."), 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(); m_passivePopup->show();
} }
@ -2080,7 +2080,7 @@ void BNPView::setActive(bool active)
#if KDE_IS_VERSION( 3, 2, 90 ) // KDE 3.3.x #if KDE_IS_VERSION( 3, 2, 90 ) // KDE 3.3.x
if (active) { 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 Global::systemTray->setActive(); // FIXME: add this in the places it need
} else } else
Global::systemTray->setInactive(); Global::systemTray->setInactive();
@ -2097,7 +2097,7 @@ void BNPView::setActive(bool active)
KWin::setOnDesktop(winId(), KWin::currentDesktop()); KWin::setOnDesktop(winId(), KWin::currentDesktop());
win->raise(); win->raise();
// Code from me: expected and correct behavviour: // 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()); KWin::activateWindow(win->winId());
} else } else
win->hide(); win->hide();
@ -2200,16 +2200,16 @@ void BNPView::leaveEvent(TQEvent*)
void BNPView::timeoutTryHide() void BNPView::timeoutTryHide()
{ {
// If a menu is displayed, do nothing for the moment // If a menu is displayed, do nothing for the moment
if (kapp->activePopupWidget() != 0L) if (tdeApp->activePopupWidget() != 0L)
return; return;
if (kapp->widgetAt(TQCursor::pos()) != 0L) if (tdeApp->widgetAt(TQCursor::pos()) != 0L)
m_hideTimer->stop(); m_hideTimer->stop();
else if ( ! m_hideTimer->isActive() ) // Start only one time else if ( ! m_hideTimer->isActive() ) // Start only one time
m_hideTimer->start(Settings::timeToHideOnMouseOut() * 100, true); m_hideTimer->start(Settings::timeToHideOnMouseOut() * 100, true);
// If a sub-dialog is oppened, we musn't hide the main window: // 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(); m_hideTimer->stop();
} }

@ -82,7 +82,7 @@
"But, all is not lost! You could potentially help us fix the crash. " "But, all is not lost! You could potentially help us fix the crash. "
"Information describing the crash is below, so just click send, " "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" "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( body += "\n\n\n\n\n\n" + i18n(
"The information below is to help the developers identify the problem, " "The information below is to help the developers identify the problem, "
"please do not modify it." ) + "\n\n\n\n"; "please do not modify it." ) + "\n\n\n\n";
@ -192,7 +192,7 @@
// body += kdBacktrace(); // body += kdBacktrace();
//TODO startup notification //TODO startup notification
kapp->invokeMailer( tdeApp->invokeMailer(
/*to*/ "kelvie@ieee.org", /*to*/ "kelvie@ieee.org",
/*cc*/ TQString(), /*cc*/ TQString(),
/*bcc*/ TQString(), /*bcc*/ TQString(),
@ -206,7 +206,7 @@
std::cout << ("\n" + i18n( "%1 has crashed! We're sorry about this.\n\n" 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 " "But, all is not lost! Perhaps an upgrade is already available "
"which fixes the problem. Please check your distribution's software repository." ) "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 //_exit() exits immediately, otherwise this

@ -55,8 +55,8 @@ FilterBar::FilterBar(TQWidget *parent, const char *name)
TQHBoxLayout *hBox = new TQHBoxLayout(this, /*margin*/0, /*spacing*/0); TQHBoxLayout *hBox = new TQHBoxLayout(this, /*margin*/0, /*spacing*/0);
// Create every widgets: // Create every widgets:
TQIconSet resetIconSet = kapp->iconLoader()->loadIconSet("locationbar_erase", TDEIcon::Toolbar); TQIconSet resetIconSet = tdeApp->iconLoader()->loadIconSet("locationbar_erase", TDEIcon::Toolbar);
TQIconSet inAllIconSet = kapp->iconLoader()->loadIconSet("edit-find", TDEIcon::Toolbar); TQIconSet inAllIconSet = tdeApp->iconLoader()->loadIconSet("edit-find", TDEIcon::Toolbar);
m_resetButton = new TQToolButton(this); m_resetButton = new TQToolButton(this);
@ -172,7 +172,7 @@ void FilterBar::repopulateTagsComnbo()
text = state->name(); text = state->name();
icon = state->emblem(); 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); m_tagsBox->insertItem(emblem, text, index);
// Update the mapping: // Update the mapping:
m_tagsMap.insert(index, tag); m_tagsMap.insert(index, tag);
@ -184,7 +184,7 @@ void FilterBar::repopulateTagsComnbo()
// Insert the state: // Insert the state:
text = state->name(); text = state->name();
icon = state->emblem(); 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: // Indent the emblem to show the hierarchy relation:
if (!emblem.isNull()) if (!emblem.isNull())
emblem = Tools::indentPixmap(emblem, /*depth=*/1, /*deltaX=*/2 * ICON_SIZE / 3); emblem = Tools::indentPixmap(emblem, /*depth=*/1, /*deltaX=*/2 * ICON_SIZE / 3);

@ -65,7 +65,7 @@ void FormatImporter::copyFolder(const TQString &folder, const TQString &newFolde
TDEIO::CopyJob *copyJob = TDEIO::copyAs(KURL(folder), KURL(newFolder), /*showProgressInfo=*/false); TDEIO::CopyJob *copyJob = TDEIO::copyAs(KURL(folder), KURL(newFolder), /*showProgressInfo=*/false);
connect( copyJob, TQ_SIGNAL(result(TDEIO::Job*)), this, TQ_SLOT(slotCopyingDone(TDEIO::Job*)) ); connect( copyJob, TQ_SIGNAL(result(TDEIO::Job*)), this, TQ_SLOT(slotCopyingDone(TDEIO::Job*)) );
while (!copyFinished) while (!copyFinished)
kapp->processEvents(); tdeApp->processEvents();
} }
void FormatImporter::moveFolder(const TQString &folder, const TQString &newFolder) 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); TDEIO::CopyJob *copyJob = TDEIO::moveAs(KURL(folder), KURL(newFolder), /*showProgressInfo=*/false);
connect( copyJob, TQ_SIGNAL(result(TDEIO::Job*)), this, TQ_SLOT(slotCopyingDone(TDEIO::Job*)) ); connect( copyJob, TQ_SIGNAL(result(TDEIO::Job*)), this, TQ_SLOT(slotCopyingDone(TDEIO::Job*)) );
while (!copyFinished) while (!copyFinished)
kapp->processEvents(); tdeApp->processEvents();
} }
void FormatImporter::slotCopyingDone(TDEIO::Job *) void FormatImporter::slotCopyingDone(TDEIO::Job *)

@ -87,7 +87,7 @@ TQString Global::openNoteIcon() // FIXME: Now an edit icon
TDEMainWindow* Global::mainWindow() TDEMainWindow* Global::mainWindow()
{ {
TQWidget* res = kapp->mainWidget(); TQWidget* res = tdeApp->mainWidget();
if(res && res->inherits("TDEMainWindow")) if(res && res->inherits("TDEMainWindow"))
{ {

@ -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->setTotalSteps(/*Preparation:*/1 + /*Finishing:*/1 + /*Basket:*/1 + /*SubBaskets:*/Global::bnpView->basketCount(Global::bnpView->listViewItemForBasket(basket)));
progress->setValue(0); progress->setValue(0);
kapp->processEvents(); tdeApp->processEvents();
// Remember the file path choosen by the user: // Remember the file path choosen by the user:
filePath = fullPath; filePath = fullPath;
@ -217,7 +217,7 @@ void HTMLExporter::exportBasket(Basket *basket, bool isSubBasket)
"<html>\n" "<html>\n"
" <head>\n" " <head>\n"
" <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">\n" " <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">\n"
" <meta name=\"Generator\" content=\"" << kapp->aboutData()->programName() << " " << VERSION << "\">\n" " <meta name=\"Generator\" content=\"" << tdeApp->aboutData()->programName() << " " << VERSION << "\">\n"
" <style type=\"text/css\">\n" " <style type=\"text/css\">\n"
// " @media print {\n" // " @media print {\n"
// " span.printable { display: inline; }\n" // " span.printable { display: inline; }\n"
@ -320,7 +320,7 @@ void HTMLExporter::exportBasket(Basket *basket, bool isSubBasket)
" </div>\n" " </div>\n"
" <p class=\"credits\">%1</p>\n").arg( " <p class=\"credits\">%1</p>\n").arg(
i18n("Made with %1, a TDE tool to take notes and keep information at hand.") i18n("Made with %1, a TDE tool to take notes and keep information at hand.")
.arg(kapp->aboutData()->programName(), VERSION)); .arg(tdeApp->aboutData()->programName(), VERSION));
// Copy a transparent GIF image in the folder, needed for the JavaScript hack: // Copy a transparent GIF image in the folder, needed for the JavaScript hack:
TQString gifFileName = "spacer.gif"; TQString gifFileName = "spacer.gif";

@ -142,7 +142,7 @@ void KGpgMe::init(gpgme_protocol_t proto)
err = gpgme_engine_check_version(proto); err = gpgme_engine_check_version(proto);
if(err) { if(err) {
KMessageBox::error(kapp->activeWindow(), TQString("%1: %2") KMessageBox::error(tdeApp->activeWindow(), TQString("%1: %2")
.arg(gpgme_strsource(err)).arg(gpgme_strerror(err))); .arg(gpgme_strsource(err)).arg(gpgme_strerror(err)));
} }
} }
@ -182,7 +182,7 @@ TQString KGpgMe::checkForUtf8(TQString txt)
TQString KGpgMe::selectKey(TQString previous) TQString KGpgMe::selectKey(TQString previous)
{ {
KGpgSelKey dlg(kapp->activeWindow(), "", previous, *this); KGpgSelKey dlg(tdeApp->activeWindow(), "", previous, *this);
if(dlg.exec()) if(dlg.exec())
return dlg.key(); return dlg.key();
@ -224,13 +224,13 @@ KGpgKeyList KGpgMe::keys(bool privateKeys /* = false */) const
} }
if(err) { if(err) {
KMessageBox::error(kapp->activeWindow(), TQString("%1: %2") KMessageBox::error(tdeApp->activeWindow(), TQString("%1: %2")
.arg(gpgme_strsource(err)).arg(gpgme_strerror(err))); .arg(gpgme_strsource(err)).arg(gpgme_strerror(err)));
} }
else { else {
result = gpgme_op_keylist_result(m_ctx); result = gpgme_op_keylist_result(m_ctx);
if (result->truncated) { if (result->truncated) {
KMessageBox::error(kapp->activeWindow(), KMessageBox::error(tdeApp->activeWindow(),
i18n("Key listing unexpectedly truncated.")); i18n("Key listing unexpectedly truncated."));
} }
} }
@ -266,7 +266,7 @@ bool KGpgMe::encrypt(const TQByteArray& inBuffer, TQ_ULONG length,
if(!err) { if(!err) {
result = gpgme_op_encrypt_result(m_ctx); result = gpgme_op_encrypt_result(m_ctx);
if (result->invalid_recipients) { if (result->invalid_recipients) {
KMessageBox::error(kapp->activeWindow(), TQString("%1: %2") KMessageBox::error(tdeApp->activeWindow(), TQString("%1: %2")
.arg(i18n("That public key is not meant for encryption")) .arg(i18n("That public key is not meant for encryption"))
.arg(result->invalid_recipients->fpr)); .arg(result->invalid_recipients->fpr));
} }
@ -279,7 +279,7 @@ bool KGpgMe::encrypt(const TQByteArray& inBuffer, TQ_ULONG length,
} }
} }
if(err != GPG_ERR_NO_ERROR && err != GPG_ERR_CANCELED) { if(err != GPG_ERR_NO_ERROR && err != GPG_ERR_CANCELED) {
KMessageBox::error(kapp->activeWindow(), TQString("%1: %2") KMessageBox::error(tdeApp->activeWindow(), TQString("%1: %2")
.arg(gpgme_strsource(err)).arg(gpgme_strerror(err))); .arg(gpgme_strsource(err)).arg(gpgme_strerror(err)));
} }
if(err != GPG_ERR_NO_ERROR) if(err != GPG_ERR_NO_ERROR)
@ -309,7 +309,7 @@ bool KGpgMe::decrypt(const TQByteArray& inBuffer, TQByteArray* outBuffer)
if(!err) { if(!err) {
result = gpgme_op_decrypt_result(m_ctx); result = gpgme_op_decrypt_result(m_ctx);
if(result->unsupported_algorithm) { if(result->unsupported_algorithm) {
KMessageBox::error(kapp->activeWindow(), TQString("%1: %2") KMessageBox::error(tdeApp->activeWindow(), TQString("%1: %2")
.arg(i18n("Unsupported algorithm")) .arg(i18n("Unsupported algorithm"))
.arg(result->unsupported_algorithm)); .arg(result->unsupported_algorithm));
} }
@ -321,7 +321,7 @@ bool KGpgMe::decrypt(const TQByteArray& inBuffer, TQByteArray* outBuffer)
} }
} }
if(err != GPG_ERR_NO_ERROR && err != GPG_ERR_CANCELED) { if(err != GPG_ERR_NO_ERROR && err != GPG_ERR_CANCELED) {
KMessageBox::error(kapp->activeWindow(), TQString("%1: %2") KMessageBox::error(tdeApp->activeWindow(), TQString("%1: %2")
.arg(gpgme_strsource(err)).arg(gpgme_strerror(err))); .arg(gpgme_strsource(err)).arg(gpgme_strerror(err)));
} }
if(err != GPG_ERR_NO_ERROR) if(err != GPG_ERR_NO_ERROR)

@ -177,7 +177,7 @@ void TDEIconCanvas::slotLoadFiles()
{ {
loadIcon(*it); loadIcon(*it);
// Calling kapp->processEvents() makes the iconview flicker like hell // Calling tdeApp->processEvents() makes the iconview flicker like hell
// (it's being repainted once for every new item), so we don't do this. // (it's being repainted once for every new item), so we don't do this.
// Instead, we directly repaint the progress bar without going through // Instead, we directly repaint the progress bar without going through
// the event-loop. We do that just once for every 10th item so that // the event-loop. We do that just once for every 10th item so that

@ -65,10 +65,10 @@ LikeBackBar::LikeBackBar(LikeBack *likeBack)
{ {
TQHBoxLayout *layout = new TQHBoxLayout(this); TQHBoxLayout *layout = new TQHBoxLayout(this);
TQIconSet likeIconSet = kapp->iconLoader()->loadIconSet("likeback_like", TDEIcon::Small); TQIconSet likeIconSet = tdeApp->iconLoader()->loadIconSet("likeback_like", TDEIcon::Small);
TQIconSet dislikeIconSet = kapp->iconLoader()->loadIconSet("likeback_dislike", TDEIcon::Small); TQIconSet dislikeIconSet = tdeApp->iconLoader()->loadIconSet("likeback_dislike", TDEIcon::Small);
TQIconSet bugIconSet = kapp->iconLoader()->loadIconSet("likeback_bug", TDEIcon::Small); TQIconSet bugIconSet = tdeApp->iconLoader()->loadIconSet("likeback_bug", TDEIcon::Small);
TQIconSet featureIconSet = kapp->iconLoader()->loadIconSet("likeback_feature", TDEIcon::Small); TQIconSet featureIconSet = tdeApp->iconLoader()->loadIconSet("likeback_feature", TDEIcon::Small);
m_likeButton = new TQToolButton(this, "likeback_like"); m_likeButton = new TQToolButton(this, "likeback_like");
m_likeButton->setIconSet(likeIconSet); m_likeButton->setIconSet(likeIconSet);
@ -125,7 +125,7 @@ void LikeBackBar::autoMove()
{ {
static TQWidget *lastWindow = 0; static TQWidget *lastWindow = 0;
TQWidget *window = kapp->activeWindow(); TQWidget *window = tdeApp->activeWindow();
// When a Kicker applet has the focus, like the Commandline TQLineEdit, // When a Kicker applet has the focus, like the Commandline TQLineEdit,
// the systemtray icon indicates to be the current window and the LikeBack is shown next to the system tray icon. // the systemtray icon indicates to be the current window and the LikeBack is shown next to the system tray icon.
// It's obviously bad ;-) : // It's obviously bad ;-) :
@ -220,9 +220,9 @@ LikeBack::LikeBack(Button buttons, bool showBarByDefault, TDEConfig *config, con
// Use default TDEApplication config and aboutData if not provided: // Use default TDEApplication config and aboutData if not provided:
if (d->config == 0) if (d->config == 0)
d->config = kapp->config(); d->config = tdeApp->config();
if (d->aboutData == 0) if (d->aboutData == 0)
d->aboutData = kapp->aboutData(); d->aboutData = tdeApp->aboutData();
// Initialize properties (2/2) [Needs aboutData to be set]: // Initialize properties (2/2) [Needs aboutData to be set]:
d->showBar = userWantsToShowBar(); d->showBar = userWantsToShowBar();
@ -412,10 +412,10 @@ void LikeBack::setUserWantsToShowBar(bool showBar)
void LikeBack::showInformationMessage() void LikeBack::showInformationMessage()
{ {
// Load and register the images needed by the message: // Load and register the images needed by the message:
TQPixmap likeIcon = kapp->iconLoader()->loadIcon("likeback_like", TDEIcon::Small); TQPixmap likeIcon = tdeApp->iconLoader()->loadIcon("likeback_like", TDEIcon::Small);
TQPixmap dislikeIcon = kapp->iconLoader()->loadIcon("likeback_dislike", TDEIcon::Small); TQPixmap dislikeIcon = tdeApp->iconLoader()->loadIcon("likeback_dislike", TDEIcon::Small);
TQPixmap bugIcon = kapp->iconLoader()->loadIcon("likeback_bug", TDEIcon::Small); TQPixmap bugIcon = tdeApp->iconLoader()->loadIcon("likeback_bug", TDEIcon::Small);
TQPixmap featureIcon = kapp->iconLoader()->loadIcon("likeback_feature", TDEIcon::Small); TQPixmap featureIcon = tdeApp->iconLoader()->loadIcon("likeback_feature", TDEIcon::Small);
TQMimeSourceFactory::defaultFactory()->setPixmap("likeback_icon_like", likeIcon); TQMimeSourceFactory::defaultFactory()->setPixmap("likeback_icon_like", likeIcon);
TQMimeSourceFactory::defaultFactory()->setPixmap("likeback_icon_dislike", dislikeIcon); TQMimeSourceFactory::defaultFactory()->setPixmap("likeback_icon_dislike", dislikeIcon);
TQMimeSourceFactory::defaultFactory()->setPixmap("likeback_icon_bug", bugIcon); TQMimeSourceFactory::defaultFactory()->setPixmap("likeback_icon_bug", bugIcon);
@ -491,7 +491,7 @@ TQString LikeBack::activeWindowPath()
{ {
// Compute the window hierarchy (from the latest to the oldest): // Compute the window hierarchy (from the latest to the oldest):
TQStringList windowNames; TQStringList windowNames;
TQWidget *window = kapp->activeWindow(); TQWidget *window = tdeApp->activeWindow();
while (window) { while (window) {
TQString name = window->name(); TQString name = window->name();
// Append the class name to the window name if it is unnamed: // Append the class name to the window name if it is unnamed:
@ -559,7 +559,7 @@ void LikeBack::askEmailAddress()
"<p><b>" + i18n("Please provide your email address.") + "</b></p>" + "<p><b>" + i18n("Please provide your email address.") + "</b></p>" +
"<p>" + i18n("It will only be used to contact you back if more information is needed about your comments, ask you how to reproduce the bugs you report, send bug corrections for you to test, etc.") + "</p>" + "<p>" + i18n("It will only be used to contact you back if more information is needed about your comments, ask you how to reproduce the bugs you report, send bug corrections for you to test, etc.") + "</p>" +
"<p>" + i18n("The email address is optional. If you do not provide any, your comments will be sent anonymously.") + "</p>", "<p>" + i18n("The email address is optional. If you do not provide any, your comments will be sent anonymously.") + "</p>",
currentEmailAddress, &ok, kapp->activeWindow(), /*name=*/(const char*)0, &emailValidator); currentEmailAddress, &ok, tdeApp->activeWindow(), /*name=*/(const char*)0, &emailValidator);
enableBar(); enableBar();
if (ok) if (ok)
@ -632,7 +632,7 @@ void LikeBack::fetchUserEmail()
LikeBackDialog::LikeBackDialog(LikeBack::Button reason, const TQString &initialComment, const TQString &windowPath, const TQString &context, LikeBack *likeBack) LikeBackDialog::LikeBackDialog(LikeBack::Button reason, const TQString &initialComment, const TQString &windowPath, const TQString &context, LikeBack *likeBack)
: KDialogBase(KDialogBase::Swallow, i18n("Send a Comment to Developers"), KDialogBase::Ok | KDialogBase::Cancel | KDialogBase::Default, : KDialogBase(KDialogBase::Swallow, i18n("Send a Comment to Developers"), KDialogBase::Ok | KDialogBase::Cancel | KDialogBase::Default,
KDialogBase::Ok, kapp->activeWindow(), /*name=*/"_likeback_feedback_window_", /*modal=*/true, /*separator=*/true) KDialogBase::Ok, tdeApp->activeWindow(), /*name=*/"_likeback_feedback_window_", /*modal=*/true, /*separator=*/true)
, m_likeBack(likeBack) , m_likeBack(likeBack)
, m_windowPath(windowPath) , m_windowPath(windowPath)
, m_context(context) , m_context(context)
@ -668,7 +668,7 @@ LikeBackDialog::LikeBackDialog(LikeBack::Button reason, const TQString &initialC
TQWidget *buttons = new TQWidget(box); TQWidget *buttons = new TQWidget(box);
TQGridLayout *buttonsGrid = new TQGridLayout(buttons, /*nbRows=*/4, /*nbColumns=*/2, /*margin=*/0, spacingHint()); TQGridLayout *buttonsGrid = new TQGridLayout(buttons, /*nbRows=*/4, /*nbColumns=*/2, /*margin=*/0, spacingHint());
if (m_likeBack->buttons() & LikeBack::Like) { if (m_likeBack->buttons() & LikeBack::Like) {
TQPixmap likePixmap = kapp->iconLoader()->loadIcon("likeback_like", TDEIcon::NoGroup, 16, TDEIcon::DefaultState, 0L, true); TQPixmap likePixmap = tdeApp->iconLoader()->loadIcon("likeback_like", TDEIcon::NoGroup, 16, TDEIcon::DefaultState, 0L, true);
TQLabel *likeIcon = new TQLabel(buttons); TQLabel *likeIcon = new TQLabel(buttons);
likeIcon->setPixmap(likePixmap); likeIcon->setPixmap(likePixmap);
likeIcon->setSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed); likeIcon->setSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed);
@ -678,7 +678,7 @@ LikeBackDialog::LikeBackDialog(LikeBack::Button reason, const TQString &initialC
m_group->insert(likeButton, LikeBack::Like); m_group->insert(likeButton, LikeBack::Like);
} }
if (m_likeBack->buttons() & LikeBack::Dislike) { if (m_likeBack->buttons() & LikeBack::Dislike) {
TQPixmap dislikePixmap = kapp->iconLoader()->loadIcon("likeback_dislike", TDEIcon::NoGroup, 16, TDEIcon::DefaultState, 0L, true); TQPixmap dislikePixmap = tdeApp->iconLoader()->loadIcon("likeback_dislike", TDEIcon::NoGroup, 16, TDEIcon::DefaultState, 0L, true);
TQLabel *dislikeIcon = new TQLabel(buttons); TQLabel *dislikeIcon = new TQLabel(buttons);
dislikeIcon->setPixmap(dislikePixmap); dislikeIcon->setPixmap(dislikePixmap);
dislikeIcon->setSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed); dislikeIcon->setSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed);
@ -688,7 +688,7 @@ LikeBackDialog::LikeBackDialog(LikeBack::Button reason, const TQString &initialC
m_group->insert(dislikeButton, LikeBack::Dislike); m_group->insert(dislikeButton, LikeBack::Dislike);
} }
if (m_likeBack->buttons() & LikeBack::Bug) { if (m_likeBack->buttons() & LikeBack::Bug) {
TQPixmap bugPixmap = kapp->iconLoader()->loadIcon("likeback_bug", TDEIcon::NoGroup, 16, TDEIcon::DefaultState, 0L, true); TQPixmap bugPixmap = tdeApp->iconLoader()->loadIcon("likeback_bug", TDEIcon::NoGroup, 16, TDEIcon::DefaultState, 0L, true);
TQLabel *bugIcon = new TQLabel(buttons); TQLabel *bugIcon = new TQLabel(buttons);
bugIcon->setPixmap(bugPixmap); bugIcon->setPixmap(bugPixmap);
bugIcon->setSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed); bugIcon->setSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed);
@ -698,7 +698,7 @@ LikeBackDialog::LikeBackDialog(LikeBack::Button reason, const TQString &initialC
m_group->insert(bugButton, LikeBack::Bug); m_group->insert(bugButton, LikeBack::Bug);
} }
if (m_likeBack->buttons() & LikeBack::Feature) { if (m_likeBack->buttons() & LikeBack::Feature) {
TQPixmap featurePixmap = kapp->iconLoader()->loadIcon("likeback_feature", TDEIcon::NoGroup, 16, TDEIcon::DefaultState, 0L, true); TQPixmap featurePixmap = tdeApp->iconLoader()->loadIcon("likeback_feature", TDEIcon::NoGroup, 16, TDEIcon::DefaultState, 0L, true);
TQLabel *featureIcon = new TQLabel(buttons); TQLabel *featureIcon = new TQLabel(buttons);
featureIcon->setPixmap(featurePixmap); featureIcon->setPixmap(featurePixmap);
featureIcon->setSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed); featureIcon->setSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Fixed);
@ -726,7 +726,7 @@ LikeBackDialog::LikeBackDialog(LikeBack::Button reason, const TQString &initialC
setButtonGuiItem(Default, KGuiItem(i18n("&Email Address..."), "mail_generic")); setButtonGuiItem(Default, KGuiItem(i18n("&Email Address..."), "mail_generic"));
resize(TQSize(kapp->desktop()->width() * 1 / 2, kapp->desktop()->height() * 3 / 5).expandedTo(sizeHint())); resize(TQSize(tdeApp->desktop()->width() * 1 / 2, tdeApp->desktop()->height() * 3 / 5).expandedTo(sizeHint()));
TQAction *sendShortcut = new TQAction(this); TQAction *sendShortcut = new TQAction(this);
sendShortcut->setAccel(TQString("Ctrl+Return")); sendShortcut->setAccel(TQString("Ctrl+Return"));

@ -57,7 +57,7 @@ class LikeBackDialog;
* Here is an example of code to call to quickly setup LikeBack on the client: * Here is an example of code to call to quickly setup LikeBack on the client:
* @code * @code
* // Instanciate the LikeBack system, and show the first-use information dialog if the button-bar is shown: * // Instanciate the LikeBack system, and show the first-use information dialog if the button-bar is shown:
* LikeBack *likeBack = new LikeBack(LikeBack::AllButtons, LikeBack::isDevelopmentVersion(kapp->aboutData->version())); // Show button-bar only in beta-versions * LikeBack *likeBack = new LikeBack(LikeBack::AllButtons, LikeBack::isDevelopmentVersion(tdeApp->aboutData->version())); // Show button-bar only in beta-versions
* likeBack->setServer("myapp.kde.org", "/likeback/send.php"); * likeBack->setServer("myapp.kde.org", "/likeback/send.php");
* likeBack->setAcceptedLanguages(TQStringList::split(";", "en;fr"), i18n("Please write in English or French.")); * likeBack->setAcceptedLanguages(TQStringList::split(";", "en;fr"), i18n("Please write in English or French."));
* *

@ -216,7 +216,7 @@ void LinkLabel::setLink(const TQString &title, const TQString &icon, LinkLook *l
if (icon.isEmpty()) if (icon.isEmpty())
m_icon->clear(); m_icon->clear();
else { else {
TQPixmap pixmap = DesktopIcon(icon, m_look->iconSize(), m_look->iconSize(), kapp); TQPixmap pixmap = DesktopIcon(icon, m_look->iconSize(), m_look->iconSize(), tdeApp);
if (!pixmap.isNull()) if (!pixmap.isNull())
m_icon->setPixmap(pixmap); m_icon->setPixmap(pixmap);
} }
@ -396,7 +396,7 @@ void LinkDisplay::setLink(const TQString &title, const TQString &icon, const TQP
m_font = font; m_font = font;
// "Constants": // "Constants":
int BUTTON_MARGIN = kapp->style().pixelMetric(TQStyle::PM_ButtonMargin); int BUTTON_MARGIN = tdeApp->style().pixelMetric(TQStyle::PM_ButtonMargin);
int LINK_MARGIN = BUTTON_MARGIN + 2; int LINK_MARGIN = BUTTON_MARGIN + 2;
// Recompute m_minWidth: // Recompute m_minWidth:
@ -434,7 +434,7 @@ void LinkDisplay::setWidth(int width)
void LinkDisplay::paint(TQPainter *painter, int x, int y, int width, int height, const TQColorGroup &colorGroup, void LinkDisplay::paint(TQPainter *painter, int x, int y, int width, int height, const TQColorGroup &colorGroup,
bool isDefaultColor, bool isSelected, bool isHovered, bool isIconButtonHovered) const bool isDefaultColor, bool isSelected, bool isHovered, bool isIconButtonHovered) const
{ {
int BUTTON_MARGIN = kapp->style().pixelMetric(TQStyle::PM_ButtonMargin); int BUTTON_MARGIN = tdeApp->style().pixelMetric(TQStyle::PM_ButtonMargin);
int LINK_MARGIN = BUTTON_MARGIN + 2; int LINK_MARGIN = BUTTON_MARGIN + 2;
TQPixmap pixmap; TQPixmap pixmap;
@ -446,14 +446,14 @@ void LinkDisplay::paint(TQPainter *painter, int x, int y, int width, int height,
int iconSize = m_look->iconSize(); int iconSize = m_look->iconSize();
TQString iconName = (isHovered ? Global::openNoteIcon() : m_icon); TQString iconName = (isHovered ? Global::openNoteIcon() : m_icon);
TDEIcon::States iconState = (isIconButtonHovered ? TDEIcon::ActiveState : TDEIcon::DefaultState); TDEIcon::States iconState = (isIconButtonHovered ? TDEIcon::ActiveState : TDEIcon::DefaultState);
pixmap = kapp->iconLoader()->loadIcon(iconName, TDEIcon::Desktop, iconSize, iconState, 0L, /*canReturnNull=*/false); pixmap = tdeApp->iconLoader()->loadIcon(iconName, TDEIcon::Desktop, iconSize, iconState, 0L, /*canReturnNull=*/false);
} }
int iconPreviewWidth = TQMAX(m_look->iconSize(), (m_look->previewEnabled() ? m_preview.width() : 0)); int iconPreviewWidth = TQMAX(m_look->iconSize(), (m_look->previewEnabled() ? m_preview.width() : 0));
int pixmapX = (iconPreviewWidth - pixmap.width()) / 2; int pixmapX = (iconPreviewWidth - pixmap.width()) / 2;
int pixmapY = (height - pixmap.height()) / 2; int pixmapY = (height - pixmap.height()) / 2;
// Draw the button (if any) and the icon: // Draw the button (if any) and the icon:
if (isHovered) if (isHovered)
kapp->style().drawPrimitive(TQStyle::PE_ButtonCommand, painter, TQRect(-1, -1, iconPreviewWidth + 2*BUTTON_MARGIN, height + 2), tdeApp->style().drawPrimitive(TQStyle::PE_ButtonCommand, painter, TQRect(-1, -1, iconPreviewWidth + 2*BUTTON_MARGIN, height + 2),
colorGroup, TQStyle::Style_Enabled | (isIconButtonHovered ? TQStyle::Style_MouseOver : 0)); colorGroup, TQStyle::Style_Enabled | (isIconButtonHovered ? TQStyle::Style_MouseOver : 0));
painter->drawPixmap(x + BUTTON_MARGIN - 1 + pixmapX, y + pixmapY, pixmap); painter->drawPixmap(x + BUTTON_MARGIN - 1 + pixmapX, y + pixmapY, pixmap);
@ -487,7 +487,7 @@ TQPixmap LinkDisplay::feedbackPixmap(int width, int height, const TQColorGroup &
bool LinkDisplay::iconButtonAt(const TQPoint &pos) const bool LinkDisplay::iconButtonAt(const TQPoint &pos) const
{ {
int BUTTON_MARGIN = kapp->style().pixelMetric(TQStyle::PM_ButtonMargin); int BUTTON_MARGIN = tdeApp->style().pixelMetric(TQStyle::PM_ButtonMargin);
// int LINK_MARGIN = BUTTON_MARGIN + 2; // int LINK_MARGIN = BUTTON_MARGIN + 2;
int iconPreviewWidth = TQMAX(m_look->iconSize(), (m_look->previewEnabled() ? m_preview.width() : 0)); int iconPreviewWidth = TQMAX(m_look->iconSize(), (m_look->previewEnabled() ? m_preview.width() : 0));
@ -496,7 +496,7 @@ bool LinkDisplay::iconButtonAt(const TQPoint &pos) const
TQRect LinkDisplay::iconButtonRect() const TQRect LinkDisplay::iconButtonRect() const
{ {
int BUTTON_MARGIN = kapp->style().pixelMetric(TQStyle::PM_ButtonMargin); int BUTTON_MARGIN = tdeApp->style().pixelMetric(TQStyle::PM_ButtonMargin);
// int LINK_MARGIN = BUTTON_MARGIN + 2; // int LINK_MARGIN = BUTTON_MARGIN + 2;
int iconPreviewWidth = TQMAX(m_look->iconSize(), (m_look->previewEnabled() ? m_preview.width() : 0)); int iconPreviewWidth = TQMAX(m_look->iconSize(), (m_look->previewEnabled() ? m_preview.width() : 0));
@ -521,7 +521,7 @@ TQFont LinkDisplay::labelFont(TQFont font, bool isIconButtonHovered) const
int LinkDisplay::heightForWidth(int width) const int LinkDisplay::heightForWidth(int width) const
{ {
int BUTTON_MARGIN = kapp->style().pixelMetric(TQStyle::PM_ButtonMargin); int BUTTON_MARGIN = tdeApp->style().pixelMetric(TQStyle::PM_ButtonMargin);
int LINK_MARGIN = BUTTON_MARGIN + 2; int LINK_MARGIN = BUTTON_MARGIN + 2;
int iconPreviewWidth = TQMAX(m_look->iconSize(), (m_look->previewEnabled() ? m_preview.width() : 0)); int iconPreviewWidth = TQMAX(m_look->iconSize(), (m_look->previewEnabled() ? m_preview.width() : 0));
int iconPreviewHeight = TQMAX(m_look->iconSize(), (m_look->previewEnabled() ? m_preview.height() : 0)); int iconPreviewHeight = TQMAX(m_look->iconSize(), (m_look->previewEnabled() ? m_preview.height() : 0));
@ -618,7 +618,7 @@ LinkLookEditWidget::LinkLookEditWidget(TDECModule *module, const TQString exTitl
"<p>If you do not want the application to create notes depending on the content of the files you drop, " "<p>If you do not want the application to create notes depending on the content of the files you drop, "
"go to the \"General\" page and uncheck \"Image or animation\" in the \"View Content of Added Files for the Following Types\" group.</p>") "go to the \"General\" page and uncheck \"Image or animation\" in the \"View Content of Added Files for the Following Types\" group.</p>")
// TODO: Note: you can resize down maximum size of images... // TODO: Note: you can resize down maximum size of images...
.arg(kapp->aboutData()->programName(), kapp->aboutData()->programName()), .arg(tdeApp->aboutData()->programName(), tdeApp->aboutData()->programName()),
this); this);
gl->addWidget(m_label, 4, 0); gl->addWidget(m_label, 4, 0);
gl->addWidget(m_preview, 4, 1); gl->addWidget(m_preview, 4, 1);

@ -207,7 +207,7 @@ void MainWindow::slotNewToolbarConfig() // This is called when OK or Apply is cl
void MainWindow::showSettingsDialog() void MainWindow::showSettingsDialog()
{ {
if(m_settings == 0) if(m_settings == 0)
m_settings = new KSettings::Dialog(kapp->activeWindow()); m_settings = new KSettings::Dialog(tdeApp->activeWindow());
if (Global::mainWindow()) { if (Global::mainWindow()) {
m_settings->dialog()->showButton(KDialogBase::Help, false); // Not implemented! m_settings->dialog()->showButton(KDialogBase::Help, false); // Not implemented!
m_settings->dialog()->showButton(KDialogBase::Default, false); // Not implemented! m_settings->dialog()->showButton(KDialogBase::Default, false); // Not implemented!
@ -232,8 +232,8 @@ void MainWindow::polish()
// - Keep the window manager placing the window where it want and save this // - Keep the window manager placing the window where it want and save this
if (Settings::mainWindowSize().isEmpty()) { if (Settings::mainWindowSize().isEmpty()) {
// std::cout << "Main Window Position: Initial Set in show()" << std::endl; // std::cout << "Main Window Position: Initial Set in show()" << std::endl;
int defaultWidth = kapp->desktop()->width() * 5 / 6; int defaultWidth = tdeApp->desktop()->width() * 5 / 6;
int defaultHeight = kapp->desktop()->height() * 5 / 6; int defaultHeight = tdeApp->desktop()->height() * 5 / 6;
resize(defaultWidth, defaultHeight); // sizeHint() is bad (too small) and we want the user to have a good default area size resize(defaultWidth, defaultHeight); // sizeHint() is bad (too small) and we want the user to have a good default area size
shouldSave = true; shouldSave = true;
} else { } else {
@ -298,7 +298,7 @@ bool MainWindow::queryClose()
/* if (m_shuttingDown) // Set in askForQuit(): we don't have to ask again /* if (m_shuttingDown) // Set in askForQuit(): we don't have to ask again
return true;*/ return true;*/
if (kapp->sessionSaving()) { if (tdeApp->sessionSaving()) {
Settings::setStartDocked(false); // If queryClose() is called it's because the window is shown Settings::setStartDocked(false); // If queryClose() is called it's because the window is shown
Settings::saveConfig(); Settings::saveConfig();
return true; return true;
@ -314,7 +314,7 @@ bool MainWindow::queryClose()
bool MainWindow::askForQuit() bool MainWindow::askForQuit()
{ {
TQString message = i18n("<p>Do you really want to quit %1?</p>").arg(kapp->aboutData()->programName()); TQString message = i18n("<p>Do you really want to quit %1?</p>").arg(tdeApp->aboutData()->programName());
if (Settings::useSystray()) if (Settings::useSystray())
message += i18n("<p>Notice that you do not have to quit the application before ending your TDE session. " message += i18n("<p>Notice that you do not have to quit the application before ending your TDE session. "
"If you end your session while the application is still running, the application will be reloaded the next time you log in.</p>"); "If you end your session while the application is still running, the application will be reloaded the next time you log in.</p>");
@ -342,7 +342,7 @@ void MainWindow::minimizeRestore()
void MainWindow::changeActive() void MainWindow::changeActive()
{ {
#if KDE_IS_VERSION( 3, 2, 90 ) // KDE 3.3.x #if KDE_IS_VERSION( 3, 2, 90 ) // KDE 3.3.x
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->toggleActive(); Global::systemTray->toggleActive();
#else #else
setActive( ! isActiveWindow() ); setActive( ! isActiveWindow() );

@ -266,7 +266,7 @@ int NewBasketDialog::populateBasketsList(TQListViewItem *item, int indent, int i
while (item) { while (item) {
// Get the basket data: // Get the basket data:
Basket *basket = ((BasketListViewItem*)item)->basket(); Basket *basket = ((BasketListViewItem*)item)->basket();
TQPixmap icon = kapp->iconLoader()->loadIcon(basket->icon(), TDEIcon::NoGroup, ICON_SIZE, TDEIcon::DefaultState, 0L, /*canReturnNull=*/false); TQPixmap icon = tdeApp->iconLoader()->loadIcon(basket->icon(), TDEIcon::NoGroup, ICON_SIZE, TDEIcon::DefaultState, 0L, /*canReturnNull=*/false);
icon = Tools::indentPixmap(icon, indent, 2 * ICON_SIZE / 3); icon = Tools::indentPixmap(icon, indent, 2 * ICON_SIZE / 3);
// Append item to the list: // Append item to the list:

@ -1286,7 +1286,7 @@ void drawGradient( TQPainter *p, const TQColor &colorTop, const TQColor & colorB
void Note::drawExpander(TQPainter *painter, int x, int y, const TQColor &background, bool expand, Basket *basket) void Note::drawExpander(TQPainter *painter, int x, int y, const TQColor &background, bool expand, Basket *basket)
{ {
// If the current style is a TDEStyle, use it to draw the expander (plus or minus): // If the current style is a TDEStyle, use it to draw the expander (plus or minus):
if (dynamic_cast<TDEStyle*>(&(kapp->style())) != NULL) { if (dynamic_cast<TDEStyle*>(&(tdeApp->style())) != NULL) {
// Set the 4 rounded corners background to background color: // Set the 4 rounded corners background to background color:
TQColorGroup cg(basket->colorGroup()); TQColorGroup cg(basket->colorGroup());
cg.setColor(TQColorGroup::Base, background); cg.setColor(TQColorGroup::Base, background);
@ -1296,7 +1296,7 @@ void Note::drawExpander(TQPainter *painter, int x, int y, const TQColor &backgro
painter->fillRect(x, y, 9, 9, brush); painter->fillRect(x, y, 9, 9, brush);
// Draw it: // Draw it:
((TDEStyle&)(kapp->style())).drawTDEStylePrimitive( TDEStyle::KPE_ListViewExpander, ((TDEStyle&)(tdeApp->style())).drawTDEStylePrimitive( TDEStyle::KPE_ListViewExpander,
painter, painter,
basket->viewport(), basket->viewport(),
TQRect(x, y, 9, 9), TQRect(x, y, 9, 9),
@ -1976,7 +1976,7 @@ void Note::draw(TQPainter *painter, const TQRect &clipRect)
int xIcon = HANDLE_WIDTH + NOTE_MARGIN; int xIcon = HANDLE_WIDTH + NOTE_MARGIN;
for (State::List::Iterator it = m_states.begin(); it != m_states.end(); ++it) { for (State::List::Iterator it = m_states.begin(); it != m_states.end(); ++it) {
if (!(*it)->emblem().isEmpty()) { if (!(*it)->emblem().isEmpty()) {
TQPixmap stateEmblem = kapp->iconLoader()->loadIcon((*it)->emblem(), TDEIcon::NoGroup, 16, TDEIcon::DefaultState, 0L, false); TQPixmap stateEmblem = tdeApp->iconLoader()->loadIcon((*it)->emblem(), TDEIcon::NoGroup, 16, TDEIcon::DefaultState, 0L, false);
painter2.drawPixmap(xIcon, yIcon, stateEmblem); painter2.drawPixmap(xIcon, yIcon, stateEmblem);
xIcon += NOTE_MARGIN + EMBLEM_SIZE; xIcon += NOTE_MARGIN + EMBLEM_SIZE;
} }

@ -306,7 +306,7 @@ TQPixmap NoteDrag::feedbackPixmap(NoteSelection *noteList)
bgColor = node->note->basket()->backgroundColor(); bgColor = node->note->basket()->backgroundColor();
needSpace = false; needSpace = false;
} else { } else {
pixmap = node->note->content()->feedbackPixmap(/*maxWidth=*/kapp->desktop()->width() / 2, /*maxHeight=*/96); pixmap = node->note->content()->feedbackPixmap(/*maxWidth=*/tdeApp->desktop()->width() / 2, /*maxHeight=*/96);
bgColor = node->note->backgroundColor(); bgColor = node->note->backgroundColor();
needSpace = node->note->content()->needSpaceForFeedbackPixmap(); needSpace = node->note->content()->needSpaceForFeedbackPixmap();
} }
@ -319,7 +319,7 @@ TQPixmap NoteDrag::feedbackPixmap(NoteSelection *noteList)
height += (i > 0 && needSpace ? 1 : 0) + pixmap.height() + SPACING + (needSpace ? 1 : 0); height += (i > 0 && needSpace ? 1 : 0) + pixmap.height() + SPACING + (needSpace ? 1 : 0);
if (elipsisImage) if (elipsisImage)
break; break;
if (height > kapp->desktop()->height() / 2) if (height > tdeApp->desktop()->height() / 2)
elipsisImage = true; elipsisImage = true;
} }
} }

@ -146,7 +146,7 @@ TextEditor::TextEditor(TextContent *textContent, TQWidget *parent)
if (Settings::spellCheckTextNotes()) if (Settings::spellCheckTextNotes())
textEdit->setCheckSpellingEnabled(true); textEdit->setCheckSpellingEnabled(true);
textEdit->setText(m_textContent->text()); textEdit->setText(m_textContent->text());
textEdit->moveCursor(KTextEdit::MoveEnd, false); // FIXME: Sometimes, the cursor flicker at ends before being positionned where clicked (because kapp->processEvents() I think) textEdit->moveCursor(KTextEdit::MoveEnd, false); // FIXME: Sometimes, the cursor flicker at ends before being positionned where clicked (because tdeApp->processEvents() I think)
textEdit->verticalScrollBar()->setCursor(TQt::ArrowCursor); textEdit->verticalScrollBar()->setCursor(TQt::ArrowCursor);
setInlineEditor(textEdit); setInlineEditor(textEdit);
connect( textEdit, TQ_SIGNAL(escapePressed()), this, TQ_SIGNAL(askValidation()) ); connect( textEdit, TQ_SIGNAL(escapePressed()), this, TQ_SIGNAL(askValidation()) );
@ -604,7 +604,7 @@ LinkEditDialog::LinkEditDialog(LinkContent *contentNote, TQWidget *parent/*, TQK
urlChanged(""); urlChanged("");
// if (ke) // if (ke)
// kapp->postEvent(m_url->lineEdit(), ke); // tdeApp->postEvent(m_url->lineEdit(), ke);
} }
LinkEditDialog::~LinkEditDialog() LinkEditDialog::~LinkEditDialog()

@ -447,7 +447,7 @@ Note* NoteFactory::dropNote(TQMimeSource *source, Basket *parent, bool fromDrop,
/* Unsucceful drop */ /* Unsucceful drop */
note = createNoteUnknown(source, parent); note = createNoteUnknown(source, parent);
TQString message = i18n("<p>%1 doesn't support the data you've dropped.<br>" TQString message = i18n("<p>%1 doesn't support the data you've dropped.<br>"
"It however created a generic note, allowing you to drag or copy it to an application that understand it.</p>").arg(kapp->aboutData()->programName()); "It however created a generic note, allowing you to drag or copy it to an application that understand it.</p>").arg(tdeApp->aboutData()->programName());
KMessageBox::information(parent, message, i18n("Unsupported MIME Type(s)"), KMessageBox::information(parent, message, i18n("Unsupported MIME Type(s)"),
"unsupportedDropInfo", KMessageBox::AllowLink); "unsupportedDropInfo", KMessageBox::AllowLink);
return note; return note;
@ -939,7 +939,7 @@ TQString NoteFactory::iconForCommand(const TQString &command)
bool NoteFactory::isIconExist(const TQString &icon) bool NoteFactory::isIconExist(const TQString &icon)
{ {
return ! kapp->iconLoader()->loadIcon(icon, TDEIcon::NoGroup, 16, TDEIcon::DefaultState, 0L, true).isNull(); return ! tdeApp->iconLoader()->loadIcon(icon, TDEIcon::NoGroup, 16, TDEIcon::DefaultState, 0L, true).isNull();
} }
Note* NoteFactory::createEmptyNote(NoteType::Id type, Basket *parent) Note* NoteFactory::createEmptyNote(NoteType::Id type, Basket *parent)

@ -49,8 +49,8 @@ void PopupMenu::execAtRectCenter(TQPopupMenu &menu, const TQRect &rect)
// Very strange : menu.exec(point) do that clipping (but not when exec() by mouse !!! ) : // Very strange : menu.exec(point) do that clipping (but not when exec() by mouse !!! ) :
// If menu is partially out of the screen, move it : // If menu is partially out of the screen, move it :
/* int desktopWidth = kapp->desktop()->width(); /* int desktopWidth = tdeApp->desktop()->width();
int desktopHeight = kapp->desktop()->height(); int desktopHeight = tdeApp->desktop()->height();
if (point.x() + menuSize.width() > desktopWidth) point.setX(desktopWidth - menuSize.width()); if (point.x() + menuSize.width() > desktopWidth) point.setX(desktopWidth - menuSize.width());
if (point.y() + menuSize.height() - 2 > desktopHeight) point.setY(desktopHeight - menuSize.height() + 2); if (point.y() + menuSize.height() - 2 > desktopHeight) point.setY(desktopHeight - menuSize.height() + 2);
if (point.x() < 0) point.setX(0); if (point.x() < 0) point.setX(0);
@ -67,14 +67,14 @@ void PopupMenu::execAtRectCenter(TQPopupMenu &menu, const TQRect &rect)
void PopupMenu::execAtRectBottom(TQPopupMenu &menu, const TQRect &rect, bool centered) void PopupMenu::execAtRectBottom(TQPopupMenu &menu, const TQRect &rect, bool centered)
{ {
TQSize menuSize = menu.sizeHint() - TQSize(1, 1); // A size is [1..n] => We want two lengths that are [0..(n-1)] TQSize menuSize = menu.sizeHint() - TQSize(1, 1); // A size is [1..n] => We want two lengths that are [0..(n-1)]
int desktopWidth = kapp->desktop()->width(); // to be compared/added/substracted with TQRects/TQPoints... int desktopWidth = tdeApp->desktop()->width(); // to be compared/added/substracted with TQRects/TQPoints...
int desktopHeight = kapp->desktop()->height(); int desktopHeight = tdeApp->desktop()->height();
/** Paint the rect on the screen (desktop). /** Paint the rect on the screen (desktop).
* For test purpose only (to be sure the passed rectangle is right). * For test purpose only (to be sure the passed rectangle is right).
* Comment this (and the qpainter and qpen includes) for a non-debug version. * Comment this (and the qpainter and qpen includes) for a non-debug version.
*/ */
/*TQPainter paint(kapp->desktop(), kapp->desktop(), true); /*TQPainter paint(tdeApp->desktop(), tdeApp->desktop(), true);
paint.setPen( TQPen(TQt::black, 1) ); paint.setPen( TQPen(TQt::black, 1) );
paint.drawRect(rect); paint.drawRect(rect);
paint.end();*/ paint.end();*/
@ -109,14 +109,14 @@ void PopupMenu::execAtRectBottom(TQPopupMenu &menu, const TQRect &rect, bool cen
void PopupMenu::execAtRectRight(TQPopupMenu &menu, const TQRect &rect, bool centered) void PopupMenu::execAtRectRight(TQPopupMenu &menu, const TQRect &rect, bool centered)
{ {
TQSize menuSize = menu.sizeHint() - TQSize(1, 1); // A size is [1..n] => We want two lengths that are [0..(n-1)] TQSize menuSize = menu.sizeHint() - TQSize(1, 1); // A size is [1..n] => We want two lengths that are [0..(n-1)]
int desktopWidth = kapp->desktop()->width(); // to be compared/added/substracted with TQRects/TQPoints... int desktopWidth = tdeApp->desktop()->width(); // to be compared/added/substracted with TQRects/TQPoints...
int desktopHeight = kapp->desktop()->height(); int desktopHeight = tdeApp->desktop()->height();
/** Paint the rect on the screen (desktop). /** Paint the rect on the screen (desktop).
* For test purpose only (to be sure the passed rectangle is right). * For test purpose only (to be sure the passed rectangle is right).
* Comment this (and the qpainter and qpen includes) for a non-debug version. * Comment this (and the qpainter and qpen includes) for a non-debug version.
*/ */
/*TQPainter paint(kapp->desktop(), kapp->desktop(), true); /*TQPainter paint(tdeApp->desktop(), tdeApp->desktop(), true);
paint.setPen( TQPen(TQt::black, 1) ); paint.setPen( TQPen(TQt::black, 1) );
paint.drawRect(rect); paint.drawRect(rect);
paint.end();*/ paint.end();*/

@ -397,7 +397,7 @@ GeneralPage::GeneralPage(TQWidget * parent, const char * name)
"on that icon to paste the current selection.") + "</p>" + "on that icon to paste the current selection.") + "</p>" +
"<p>" + i18n("When doing so, %1 pops up a little balloon message to inform you the action has been successfully done. You can disable that balloon.") + "</p>" + "<p>" + i18n("When doing so, %1 pops up a little balloon message to inform you the action has been successfully done. You can disable that balloon.") + "</p>" +
"<p>" + i18n("Note that those messages are smart enough to not appear if the main window is visible. This is because you already see the result of your actions in the main window.") + "</p>") "<p>" + i18n("Note that those messages are smart enough to not appear if the main window is visible. This is because you already see the result of your actions in the main window.") + "</p>")
.arg(kapp->aboutData()->programName()), .arg(tdeApp->aboutData()->programName()),
this); this);
hLay->addWidget(m_usePassivePopup); hLay->addWidget(m_usePassivePopup);
hLay->addWidget(hLabel); hLay->addWidget(hLabel);
@ -801,7 +801,7 @@ NotesAppearancePage::NotesAppearancePage(TQWidget * parent, const char * name)
m_fileLook = new LinkLookEditWidget(this, i18n("Annual report"), "text-x-generic", tabs); m_fileLook = new LinkLookEditWidget(this, i18n("Annual report"), "text-x-generic", tabs);
m_localLinkLook = new LinkLookEditWidget(this, i18n("Home folder"), "folder_home", tabs); m_localLinkLook = new LinkLookEditWidget(this, i18n("Home folder"), "folder_home", tabs);
m_networkLinkLook = new LinkLookEditWidget(this, "www.kde.org", KMimeType::iconForURL("http://www.kde.org"), tabs); m_networkLinkLook = new LinkLookEditWidget(this, "www.kde.org", KMimeType::iconForURL("http://www.kde.org"), tabs);
m_launcherLook = new LinkLookEditWidget(this, i18n("Launch %1").arg(kapp->aboutData()->programName()), "basket", tabs); m_launcherLook = new LinkLookEditWidget(this, i18n("Launch %1").arg(tdeApp->aboutData()->programName()), "basket", tabs);
tabs->addTab(m_soundLook, i18n("&Sounds") ); tabs->addTab(m_soundLook, i18n("&Sounds") );
tabs->addTab(m_fileLook, i18n("&Files") ); tabs->addTab(m_fileLook, i18n("&Files") );
tabs->addTab(m_localLinkLook, i18n("&Local Links") ); tabs->addTab(m_localLinkLook, i18n("&Local Links") );

@ -88,8 +88,8 @@ void KSystemTray2::displayCloseMessage(TQString fileMenu)
// Some values we need: // Some values we need:
TQPoint g = mapToGlobal(pos()); TQPoint g = mapToGlobal(pos());
int desktopWidth = kapp->desktop()->width(); int desktopWidth = tdeApp->desktop()->width();
int desktopHeight = kapp->desktop()->height(); int desktopHeight = tdeApp->desktop()->height();
int tw = width(); int tw = width();
int th = height(); int th = height();
@ -121,24 +121,24 @@ void KSystemTray2::displayCloseMessage(TQString fileMenu)
/* if (useSystray) { /* if (useSystray) {
// We are testing if one of the corners is hidden, and if yes, we would enter // We are testing if one of the corners is hidden, and if yes, we would enter
// a time consuming process (raise kicker and wait some time): // a time consuming process (raise kicker and wait some time):
// if (kapp->widgetAt(g) != this || // if (tdeApp->widgetAt(g) != this ||
// kapp->widgetAt(g + TQPoint(tw-1, 0)) != this || // tdeApp->widgetAt(g + TQPoint(tw-1, 0)) != this ||
// kapp->widgetAt(g + TQPoint(0, th-1)) != this || // tdeApp->widgetAt(g + TQPoint(0, th-1)) != this ||
// kapp->widgetAt(g + TQPoint(tw-1, th-1)) != this) { // tdeApp->widgetAt(g + TQPoint(tw-1, th-1)) != this) {
int systrayManagerWinId = topLevelWidget()->winId(); int systrayManagerWinId = topLevelWidget()->winId();
KWin::forceActiveWindow(systrayManagerWinId); KWin::forceActiveWindow(systrayManagerWinId);
kapp->processEvents(); // Because without it the systrayManager is raised only after the messageBox is displayed tdeApp->processEvents(); // Because without it the systrayManager is raised only after the messageBox is displayed
// KWin::activateWindow(systrayManagerWinId); // KWin::activateWindow(systrayManagerWinId);
// kapp->processEvents(); // Because without it the systrayManager is raised only after the messageBox is displayed // tdeApp->processEvents(); // Because without it the systrayManager is raised only after the messageBox is displayed
// KWin::raiseWindow(systrayManagerWinId); // KWin::raiseWindow(systrayManagerWinId);
// kapp->processEvents(); // Because without it the systrayManager is raised only after the messageBox is displayed // tdeApp->processEvents(); // Because without it the systrayManager is raised only after the messageBox is displayed
sleep(1); sleep(1);
// TODO: Re-verify that at least one corner is now visible // TODO: Re-verify that at least one corner is now visible
// } // }
}*/ }*/
// KMessageBox::information(this, TQString::number(g.x()) + ":" + TQString::number(g.y()) + ":" + // KMessageBox::information(this, TQString::number(g.x()) + ":" + TQString::number(g.y()) + ":" +
// TQString::number((int)(kapp->widgetAt(g+TQPoint(1,1))))); // TQString::number((int)(tdeApp->widgetAt(g+TQPoint(1,1)))));
TQString message = i18n( TQString message = i18n(
"<p>Closing the main window will keep %1 running in the system tray. " "<p>Closing the main window will keep %1 running in the system tray. "
@ -185,12 +185,12 @@ void KSystemTray2::displayCloseMessage(TQString fileMenu)
// Associate source to image and show the dialog: // Associate source to image and show the dialog:
TQMimeSourceFactory::defaultFactory()->setPixmap("systray_shot", finalShot); TQMimeSourceFactory::defaultFactory()->setPixmap("systray_shot", finalShot);
KMessageBox::information(kapp->activeWindow(), KMessageBox::information(tdeApp->activeWindow(),
message + "<p><center><img source=\"systray_shot\"></center></p>", message + "<p><center><img source=\"systray_shot\"></center></p>",
i18n("Docking in System Tray"), "hideOnCloseInfo"); i18n("Docking in System Tray"), "hideOnCloseInfo");
TQMimeSourceFactory::defaultFactory()->setData("systray_shot", 0L); TQMimeSourceFactory::defaultFactory()->setData("systray_shot", 0L);
} else { } else {
KMessageBox::information(kapp->activeWindow(), KMessageBox::information(tdeApp->activeWindow(),
message, message,
i18n("Docking in System Tray"), "hideOnCloseInfo"); i18n("Docking in System Tray"), "hideOnCloseInfo");
} }
@ -242,7 +242,7 @@ void SystemTray::mousePressEvent(TQMouseEvent *event)
event->accept(); event->accept();
} else if (event->button() & TQt::RightButton) { // Popup menu } else if (event->button() & TQt::RightButton) { // Popup menu
TDEPopupMenu menu(this); TDEPopupMenu menu(this);
menu.insertTitle( SmallIcon("basket"), kapp->aboutData()->programName() ); menu.insertTitle( SmallIcon("basket"), tdeApp->aboutData()->programName() );
Global::bnpView->actNewBasket->plug(&menu); Global::bnpView->actNewBasket->plug(&menu);
Global::bnpView->actNewSubBasket->plug(&menu); Global::bnpView->actNewSubBasket->plug(&menu);
@ -435,8 +435,8 @@ void SystemTray::updateToolTipDelayed()
{ {
Basket *basket = Global::bnpView->currentBasket(); Basket *basket = Global::bnpView->currentBasket();
TQString tip = "<p><nobr>" + ( basket->isLocked() ? kapp->makeStdCaption(i18n("%1 (Locked)")) TQString tip = "<p><nobr>" + ( basket->isLocked() ? tdeApp->makeStdCaption(i18n("%1 (Locked)"))
: kapp->makeStdCaption( "%1") ) : tdeApp->makeStdCaption( "%1") )
.arg(Tools::textToHTMLWithoutP(basket->basketName())); .arg(Tools::textToHTMLWithoutP(basket->basketName()));
TQToolTip::add(this, tip); TQToolTip::add(this, tip);

@ -740,14 +740,14 @@ void IndentedMenuItem::paint(TQPainter *painter, const TQColorGroup &cg, bool ac
*/ */
bool drawingEtchedText = !enabled && !active && painter->pen().color() != cg.mid()/*== cg.foreground()*/; bool drawingEtchedText = !enabled && !active && painter->pen().color() != cg.mid()/*== cg.foreground()*/;
if (drawingEtchedText) { if (drawingEtchedText) {
TQString styleName = kapp->style().name(); TQString styleName = tdeApp->style().name();
if (styleName == "plastik" || styleName == "lipstik") if (styleName == "plastik" || styleName == "lipstik")
painter->setPen(cg.light()); painter->setPen(cg.light());
drawingEtchedText = !enabled && !active && painter->pen().color() != cg.foreground(); drawingEtchedText = !enabled && !active && painter->pen().color() != cg.foreground();
} else } else
drawingEtchedText = !enabled && !active && painter->pen().color() == cg.light(); drawingEtchedText = !enabled && !active && painter->pen().color() == cg.light();
if (!m_icon.isEmpty() && !drawingEtchedText) { if (!m_icon.isEmpty() && !drawingEtchedText) {
TQPixmap icon = kapp->iconLoader()->loadIcon(m_icon, TDEIcon::Small, iconSize, TQPixmap icon = tdeApp->iconLoader()->loadIcon(m_icon, TDEIcon::Small, iconSize,
(enabled ? (active ? TDEIcon::ActiveState : TDEIcon::DefaultState) : TDEIcon::DisabledState), (enabled ? (active ? TDEIcon::ActiveState : TDEIcon::DefaultState) : TDEIcon::DisabledState),
/*path_store=*/0L, /*canReturnNull=*/true); /*path_store=*/0L, /*canReturnNull=*/true);
painter->drawPixmap(x, y + (h-iconSize)/2, icon); painter->drawPixmap(x, y + (h-iconSize)/2, icon);
@ -810,14 +810,14 @@ void StateMenuItem::paint(TQPainter *painter, const TQColorGroup &cg, bool activ
*/ */
bool drawingEtchedText = !enabled && !active && painter->pen().color() != cg.mid()/*== cg.foreground()*/; bool drawingEtchedText = !enabled && !active && painter->pen().color() != cg.mid()/*== cg.foreground()*/;
if (drawingEtchedText) { if (drawingEtchedText) {
TQString styleName = kapp->style().name(); TQString styleName = tdeApp->style().name();
if (styleName == "plastik" || styleName == "lipstik") if (styleName == "plastik" || styleName == "lipstik")
painter->setPen(cg.light()); painter->setPen(cg.light());
drawingEtchedText = !enabled && !active && painter->pen().color() != cg.foreground(); drawingEtchedText = !enabled && !active && painter->pen().color() != cg.foreground();
} else } else
drawingEtchedText = !enabled && !active && painter->pen().color() == cg.light(); drawingEtchedText = !enabled && !active && painter->pen().color() == cg.light();
if (!m_state->emblem().isEmpty() && !drawingEtchedText) { if (!m_state->emblem().isEmpty() && !drawingEtchedText) {
TQPixmap icon = kapp->iconLoader()->loadIcon(m_state->emblem(), TDEIcon::Small, iconSize, TQPixmap icon = tdeApp->iconLoader()->loadIcon(m_state->emblem(), TDEIcon::Small, iconSize,
(enabled ? (active ? TDEIcon::ActiveState : TDEIcon::DefaultState) : TDEIcon::DisabledState), (enabled ? (active ? TDEIcon::ActiveState : TDEIcon::DefaultState) : TDEIcon::DisabledState),
/*path_store=*/0L, /*canReturnNull=*/true); /*path_store=*/0L, /*canReturnNull=*/true);
painter->drawPixmap(x, y + (h-iconSize)/2, icon); painter->drawPixmap(x, y + (h-iconSize)/2, icon);
@ -855,11 +855,11 @@ TQSize StateMenuItem::sizeHint()
TQIconSet StateMenuItem::checkBoxIconSet(bool checked, TQColorGroup cg) TQIconSet StateMenuItem::checkBoxIconSet(bool checked, TQColorGroup cg)
{ {
int width = kapp->style().pixelMetric(TQStyle::PM_IndicatorWidth, 0); int width = tdeApp->style().pixelMetric(TQStyle::PM_IndicatorWidth, 0);
int height = kapp->style().pixelMetric(TQStyle::PM_IndicatorHeight, 0); int height = tdeApp->style().pixelMetric(TQStyle::PM_IndicatorHeight, 0);
TQRect rect(0, 0, width, height); TQRect rect(0, 0, width, height);
TQColor menuBackgroundColor = (dynamic_cast<TDEStyle*>(&(kapp->style())) == NULL ? TQColor(cg.background()) : cg.background().light(103)); TQColor menuBackgroundColor = (dynamic_cast<TDEStyle*>(&(tdeApp->style())) == NULL ? TQColor(cg.background()) : cg.background().light(103));
// Enabled, Not hovering // Enabled, Not hovering
TQPixmap pixmap(width, height); TQPixmap pixmap(width, height);
@ -867,7 +867,7 @@ TQIconSet StateMenuItem::checkBoxIconSet(bool checked, TQColorGroup cg)
TQPainter painter(&pixmap); TQPainter painter(&pixmap);
int style = TQStyle::Style_Enabled | TQStyle::Style_Active | (checked ? TQStyle::Style_On : TQStyle::Style_Off); int style = TQStyle::Style_Enabled | TQStyle::Style_Active | (checked ? TQStyle::Style_On : TQStyle::Style_Off);
TQColor background = cg.color(TQColorGroup::Background); TQColor background = cg.color(TQColorGroup::Background);
kapp->style().drawPrimitive(TQStyle::PE_Indicator, &painter, rect, cg, style); tdeApp->style().drawPrimitive(TQStyle::PE_Indicator, &painter, rect, cg, style);
painter.end(); painter.end();
// Enabled, Hovering // Enabled, Hovering
@ -876,7 +876,7 @@ TQIconSet StateMenuItem::checkBoxIconSet(bool checked, TQColorGroup cg)
painter.begin(&pixmapHover); painter.begin(&pixmapHover);
style |= TQStyle::Style_MouseOver; style |= TQStyle::Style_MouseOver;
cg.setColor(TQColorGroup::Background, TDEGlobalSettings::highlightColor()); cg.setColor(TQColorGroup::Background, TDEGlobalSettings::highlightColor());
kapp->style().drawPrimitive(TQStyle::PE_Indicator, &painter, rect, cg, style); tdeApp->style().drawPrimitive(TQStyle::PE_Indicator, &painter, rect, cg, style);
painter.end(); painter.end();
// Disabled // Disabled
@ -885,7 +885,7 @@ TQIconSet StateMenuItem::checkBoxIconSet(bool checked, TQColorGroup cg)
painter.begin(&pixmapDisabled); painter.begin(&pixmapDisabled);
style = /*TQStyle::Style_Enabled | */TQStyle::Style_Active | (checked ? TQStyle::Style_On : TQStyle::Style_Off); style = /*TQStyle::Style_Enabled | */TQStyle::Style_Active | (checked ? TQStyle::Style_On : TQStyle::Style_Off);
cg.setColor(TQColorGroup::Background, background); cg.setColor(TQColorGroup::Background, background);
kapp->style().drawPrimitive(TQStyle::PE_Indicator, &painter, rect, cg, style); tdeApp->style().drawPrimitive(TQStyle::PE_Indicator, &painter, rect, cg, style);
painter.end(); painter.end();
TQIconSet iconSet(pixmap); TQIconSet iconSet(pixmap);
@ -896,8 +896,8 @@ TQIconSet StateMenuItem::checkBoxIconSet(bool checked, TQColorGroup cg)
TQIconSet StateMenuItem::radioButtonIconSet(bool checked, TQColorGroup cg) TQIconSet StateMenuItem::radioButtonIconSet(bool checked, TQColorGroup cg)
{ {
int width = kapp->style().pixelMetric(TQStyle::PM_ExclusiveIndicatorWidth, 0); int width = tdeApp->style().pixelMetric(TQStyle::PM_ExclusiveIndicatorWidth, 0);
int height = kapp->style().pixelMetric(TQStyle::PM_ExclusiveIndicatorHeight, 0); int height = tdeApp->style().pixelMetric(TQStyle::PM_ExclusiveIndicatorHeight, 0);
TQRect rect(0, 0, width, height); TQRect rect(0, 0, width, height);
int style = TQStyle::Style_Default | TQStyle::Style_Enabled | (checked ? TQStyle::Style_On : TQStyle::Style_Off); int style = TQStyle::Style_Default | TQStyle::Style_Enabled | (checked ? TQStyle::Style_On : TQStyle::Style_Off);
@ -906,13 +906,13 @@ TQIconSet StateMenuItem::radioButtonIconSet(bool checked, TQColorGroup cg)
pixmap.fill(TQt::red); pixmap.fill(TQt::red);
TQPainter painter(&pixmap); TQPainter painter(&pixmap);
/* We can't use that line of code (like for checkboxes): /* We can't use that line of code (like for checkboxes):
* //kapp->style().drawPrimitive(TQStyle::PE_ExclusiveIndicator, &painter, rect, cg, style); * //tdeApp->style().drawPrimitive(TQStyle::PE_ExclusiveIndicator, &painter, rect, cg, style);
* because Plastik (and derived styles) don't care of the TQStyle::Style_On flag and will ALWAYS draw an unchecked radiobutton. * because Plastik (and derived styles) don't care of the TQStyle::Style_On flag and will ALWAYS draw an unchecked radiobutton.
* So, we use another method: * So, we use another method:
*/ */
TQRadioButton rb(0); TQRadioButton rb(0);
rb.setChecked(checked); rb.setChecked(checked);
kapp->style().drawControl(TQStyle::CE_RadioButton, &painter, &rb, rect, cg, style); tdeApp->style().drawControl(TQStyle::CE_RadioButton, &painter, &rb, rect, cg, style);
painter.end(); painter.end();
/* Some styles like Plastik (and derived ones) have TQStyle::PE_ExclusiveIndicator drawing a radiobutton disc, as wanted, /* Some styles like Plastik (and derived ones) have TQStyle::PE_ExclusiveIndicator drawing a radiobutton disc, as wanted,
* and leave pixels ouside it untouched, BUT TQStyle::PE_ExclusiveIndicatorMask is a fully black square. * and leave pixels ouside it untouched, BUT TQStyle::PE_ExclusiveIndicatorMask is a fully black square.
@ -925,10 +925,10 @@ TQIconSet StateMenuItem::radioButtonIconSet(bool checked, TQColorGroup cg)
TQPixmap pixmapHover(width, height); TQPixmap pixmapHover(width, height);
pixmapHover.fill(TQt::red); pixmapHover.fill(TQt::red);
painter.begin(&pixmapHover); painter.begin(&pixmapHover);
//kapp->style().drawPrimitive(TQStyle::PE_ExclusiveIndicator, &painter, rect, cg, style); //tdeApp->style().drawPrimitive(TQStyle::PE_ExclusiveIndicator, &painter, rect, cg, style);
style |= TQStyle::Style_MouseOver; style |= TQStyle::Style_MouseOver;
cg.setColor(TQColorGroup::Background, TDEGlobalSettings::highlightColor()); cg.setColor(TQColorGroup::Background, TDEGlobalSettings::highlightColor());
kapp->style().drawControl(TQStyle::CE_RadioButton, &painter, &rb, rect, cg, style); tdeApp->style().drawControl(TQStyle::CE_RadioButton, &painter, &rb, rect, cg, style);
painter.end(); painter.end();
pixmapHover.setMask(pixmapHover.createHeuristicMask()); pixmapHover.setMask(pixmapHover.createHeuristicMask());

@ -235,7 +235,7 @@ void TagListViewItem::paintCell(TQPainter *painter, const TQColorGroup &/*colorG
TQFontMetrics fontMetrics(font); TQFontMetrics fontMetrics(font);
TQRect textRect = fontMetrics.boundingRect(0, 0, /*width=*/1, 500000, TQt::AlignAuto | TQt::AlignTop, text); TQRect textRect = fontMetrics.boundingRect(0, 0, /*width=*/1, 500000, TQt::AlignAuto | TQt::AlignTop, text);
TQPixmap emblem = (withIcon ? kapp->iconLoader()->loadIcon(state->emblem(), TDEIcon::NoGroup, 16, TDEIcon::DefaultState, 0L, /*canReturnNull=*/true) : TQPixmap()); TQPixmap emblem = (withIcon ? tdeApp->iconLoader()->loadIcon(state->emblem(), TDEIcon::NoGroup, 16, TDEIcon::DefaultState, 0L, /*canReturnNull=*/true) : TQPixmap());
TQColor backgroundColor = (isSelected() ? TDEGlobalSettings::highlightColor() TQColor backgroundColor = (isSelected() ? TDEGlobalSettings::highlightColor()
: (withIcon && state->backgroundColor().isValid() ? state->backgroundColor() : (withIcon && state->backgroundColor().isValid() ? state->backgroundColor()
@ -433,26 +433,26 @@ TagsEditDialog::TagsEditDialog(TQWidget *parent, State *stateToEdit, bool addNew
backgroundColorLayout->addWidget(m_backgroundColor); backgroundColorLayout->addWidget(m_backgroundColor);
backgroundColorLayout->addStretch(); backgroundColorLayout->addStretch();
TQIconSet boldIconSet = kapp->iconLoader()->loadIconSet("format-text-bold", TDEIcon::Small); TQIconSet boldIconSet = tdeApp->iconLoader()->loadIconSet("format-text-bold", TDEIcon::Small);
m_bold = new TQPushButton(boldIconSet, "", stateWidget); m_bold = new TQPushButton(boldIconSet, "", stateWidget);
m_bold->setToggleButton(true); m_bold->setToggleButton(true);
int size = TQMAX(m_bold->sizeHint().width(), m_bold->sizeHint().height()); int size = TQMAX(m_bold->sizeHint().width(), m_bold->sizeHint().height());
m_bold->setFixedSize(size, size); // Make it square! m_bold->setFixedSize(size, size); // Make it square!
TQToolTip::add(m_bold, i18n("Bold")); TQToolTip::add(m_bold, i18n("Bold"));
TQIconSet underlineIconSet = kapp->iconLoader()->loadIconSet("format-text-underline", TDEIcon::Small); TQIconSet underlineIconSet = tdeApp->iconLoader()->loadIconSet("format-text-underline", TDEIcon::Small);
m_underline = new TQPushButton(underlineIconSet, "", stateWidget); m_underline = new TQPushButton(underlineIconSet, "", stateWidget);
m_underline->setToggleButton(true); m_underline->setToggleButton(true);
m_underline->setFixedSize(size, size); // Make it square! m_underline->setFixedSize(size, size); // Make it square!
TQToolTip::add(m_underline, i18n("Underline")); TQToolTip::add(m_underline, i18n("Underline"));
TQIconSet italicIconSet = kapp->iconLoader()->loadIconSet("format-text-italic", TDEIcon::Small); TQIconSet italicIconSet = tdeApp->iconLoader()->loadIconSet("format-text-italic", TDEIcon::Small);
m_italic = new TQPushButton(italicIconSet, "", stateWidget); m_italic = new TQPushButton(italicIconSet, "", stateWidget);
m_italic->setToggleButton(true); m_italic->setToggleButton(true);
m_italic->setFixedSize(size, size); // Make it square! m_italic->setFixedSize(size, size); // Make it square!
TQToolTip::add(m_italic, i18n("Italic")); TQToolTip::add(m_italic, i18n("Italic"));
TQIconSet strikeIconSet = kapp->iconLoader()->loadIconSet("format-text-strikethrough", TDEIcon::Small); TQIconSet strikeIconSet = tdeApp->iconLoader()->loadIconSet("format-text-strikethrough", TDEIcon::Small);
m_strike = new TQPushButton(strikeIconSet, "", stateWidget); m_strike = new TQPushButton(strikeIconSet, "", stateWidget);
m_strike->setToggleButton(true); m_strike->setToggleButton(true);
m_strike->setFixedSize(size, size); // Make it square! m_strike->setFixedSize(size, size); // Make it square!

Loading…
Cancel
Save