diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-02-16 20:17:18 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-02-16 20:17:18 +0000 |
commit | f4fae92b6768541e2952173c3d4b09040f95bf7e (patch) | |
tree | d8c5d93232235cd635f3310b4d95490df181ba2d /kmail/kmmainwidget.cpp | |
parent | 125c0a08265b75a133644d3b55f47e37c919f45d (diff) | |
download | tdepim-f4fae92b6768541e2952173c3d4b09040f95bf7e.tar.gz tdepim-f4fae92b6768541e2952173c3d4b09040f95bf7e.zip |
Moved kpilot from kdepim to applications, as the core Trinity libraries should not contain hardware-dependent software
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1221127 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kmail/kmmainwidget.cpp')
-rw-r--r-- | kmail/kmmainwidget.cpp | 100 |
1 files changed, 50 insertions, 50 deletions
diff --git a/kmail/kmmainwidget.cpp b/kmail/kmmainwidget.cpp index 27b04df0d..a3363e4fc 100644 --- a/kmail/kmmainwidget.cpp +++ b/kmail/kmmainwidget.cpp @@ -46,7 +46,7 @@ #include "globalsettings.h" #include "kcursorsaver.h" #include "broadcaststatus.h" -using KPIM::BroadcastStatus; +using KPIM::BroadcasStatus; #include "kmfoldermgr.h" #include "kmfolderdia.h" #include "accountmanager.h" @@ -246,7 +246,7 @@ KMMainWidget::KMMainWidget(TQWidget *parent, const char *name, mStartupDone = true; - KMainWindow *mainWin = dynamic_cast<KMainWindow*>(topLevelWidget()); + KMainWindow *mainWin = dynamic_cast<KMainWindow*>(tqtopLevelWidget()); KStatusBar *sb = mainWin ? mainWin->statusBar() : 0; mVacationScriptIndicator = new KStatusBarLabel( TQString(), 0, sb ); mVacationScriptIndicator->hide(); @@ -287,13 +287,13 @@ void KMMainWidget::destruct() //----------------------------------------------------------------------------- void KMMainWidget::readPreConfig(void) { - const KConfigGroup geometry( KMKernel::config(), "Geometry" ); + const KConfigGroup tqgeometry( KMKernel::config(), "Geometry" ); const KConfigGroup reader( KMKernel::config(), "Reader" ); - mLongFolderList = geometry.readEntry( "FolderList", "long" ) != "short"; - mReaderWindowActive = geometry.readEntry( "readerWindowMode", "below" ) != "hide"; - mReaderWindowBelow = geometry.readEntry( "readerWindowMode", "below" ) == "below"; - mThreadPref = geometry.readBoolEntry( "nestedMessages", false ); + mLongFolderList = tqgeometry.readEntry( "FolderList", "long" ) != "short"; + mReaderWindowActive = tqgeometry.readEntry( "readerWindowMode", "below" ) != "hide"; + mReaderWindowBelow = tqgeometry.readEntry( "readerWindowMode", "below" ) == "below"; + mThreadPref = tqgeometry.readBoolEntry( "nestedMessages", false ); mHtmlPref = reader.readBoolEntry( "htmlMail", false ); mHtmlLoadExtPref = reader.readBoolEntry( "htmlLoadExternal", false ); @@ -351,13 +351,13 @@ void KMMainWidget::readConfig(void) readPreConfig(); mHeaders->refreshNestedState(); - bool layoutChanged = ( oldLongFolderList != mLongFolderList ) + bool tqlayoutChanged = ( oldLongFolderList != mLongFolderList ) || ( oldReaderWindowActive != mReaderWindowActive ) || ( oldReaderWindowBelow != mReaderWindowBelow ) || ( oldFavoriteFolderView != mEnableFavoriteFolderView ); - if( layoutChanged ) { + if( tqlayoutChanged ) { hide(); // delete all panners delete mPanner1; // will always delete the others @@ -389,11 +389,11 @@ void KMMainWidget::readConfig(void) widths << folderW << headerW; heights << headerH << readerH; - bool layoutChanged = ( oldLongFolderList != mLongFolderList ) + bool tqlayoutChanged = ( oldLongFolderList != mLongFolderList ) || ( oldReaderWindowActive != mReaderWindowActive ) || ( oldReaderWindowBelow != mReaderWindowBelow ); - if (!mStartupDone || layoutChanged ) + if (!mStartupDone || tqlayoutChanged ) { /** unread / total columns * as we have some dependencies in this widget @@ -482,11 +482,11 @@ void KMMainWidget::readConfig(void) // Update systray toggleSystemTray(); - bool layoutChanged = ( oldLongFolderList != mLongFolderList ) + bool tqlayoutChanged = ( oldLongFolderList != mLongFolderList ) || ( oldReaderWindowActive != mReaderWindowActive ) || ( oldReaderWindowBelow != mReaderWindowBelow ) || ( oldFavoriteFolderView != mEnableFavoriteFolderView ); - if ( layoutChanged ) { + if ( tqlayoutChanged ) { activatePanners(); } @@ -516,7 +516,7 @@ void KMMainWidget::writeConfig(void) { TQString s; KConfig *config = KMKernel::config(); - KConfigGroup geometry( config, "Geometry" ); + KConfigGroup tqgeometry( config, "Geometry" ); if (mMsgView) mMsgView->writeConfig(); @@ -527,31 +527,31 @@ void KMMainWidget::writeConfig(void) if ( mFavoriteFolderView ) mFavoriteFolderView->writeConfig(); - geometry.writeEntry( "MainWin", this->geometry().size() ); + tqgeometry.writeEntry( "MainWin", this->tqgeometry().size() ); const TQValueList<int> widths = ( mLongFolderList ? mPanner1 : mPanner2 )->sizes(); const TQValueList<int> heights = ( mLongFolderList ? mPanner2 : mPanner1 )->sizes(); - geometry.writeEntry( "FolderPaneWidth", widths[0] ); - geometry.writeEntry( "HeaderPaneWidth", widths[1] ); + tqgeometry.writeEntry( "FolderPaneWidth", widths[0] ); + tqgeometry.writeEntry( "HeaderPaneWidth", widths[1] ); // Only save when the widget is shown (to avoid saving a wrong value) if ( mSearchAndHeaders && mSearchAndHeaders->isShown() ) { - geometry.writeEntry( "HeaderPaneHeight", heights[0] ); - geometry.writeEntry( "ReaderPaneHeight", heights[1] ); + tqgeometry.writeEntry( "HeaderPaneHeight", heights[0] ); + tqgeometry.writeEntry( "ReaderPaneHeight", heights[1] ); } // save the state of the unread/total-columns - geometry.writeEntry( "UnreadColumn", mFolderTree->unreadIndex() ); - geometry.writeEntry( "TotalColumn", mFolderTree->totalIndex() ); - geometry.writeEntry( "SizeColumn", mFolderTree->sizeIndex() ); + tqgeometry.writeEntry( "UnreadColumn", mFolderTree->unreadIndex() ); + tqgeometry.writeEntry( "TotalColumn", mFolderTree->totalIndex() ); + tqgeometry.writeEntry( "SizeColumn", mFolderTree->sizeIndex() ); } //----------------------------------------------------------------------------- void KMMainWidget::createWidgets(void) { - // Create the splitters according to the layout settings + // Create the splitters according to the tqlayout settings TQWidget *headerParent = 0, *mimeParent = 0, *messageParent = 0; @@ -587,7 +587,7 @@ void KMMainWidget::createWidgets(void) mTopLayout->add( mPanner1 ); // BUG -sanders these accelerators stop working after switching - // between long/short folder layout + // between long/short folder tqlayout // Probably need to disconnect them first. // create list of messages @@ -637,7 +637,7 @@ void KMMainWidget::createWidgets(void) mMsgActions->setMessageView( mMsgView ); } - connect(mMsgView, TQT_SIGNAL(replaceMsgByUnencryptedVersion()), + connect(mMsgView, TQT_SIGNAL(tqreplaceMsgByUnencryptedVersion()), this, TQT_SLOT(slotReplaceMsgByUnencryptedVersion())); connect(mMsgView, TQT_SIGNAL(popupMenu(KMMessage&,const KURL&,const TQPoint&)), this, TQT_SLOT(slotMsgPopup(KMMessage&,const KURL&,const TQPoint&))); @@ -973,11 +973,11 @@ void KMMainWidget::slotMailChecked( bool newMail, bool sendOnCheck, if(kmkernel->xmlGuiInstance()) { KNotifyClient::Instance instance(kmkernel->xmlGuiInstance()); - KNotifyClient::event( topLevelWidget()->winId(), "new-mail-arrived", + KNotifyClient::event( tqtopLevelWidget()->winId(), "new-mail-arrived", summary ); } else - KNotifyClient::event( topLevelWidget()->winId(), "new-mail-arrived", + KNotifyClient::event( tqtopLevelWidget()->winId(), "new-mail-arrived", summary ); if (mBeepOnNew) { @@ -1028,7 +1028,7 @@ void KMMainWidget::slotShowNewFromTemplate() TQString subj = mb->subject(); if ( subj.isEmpty() ) subj = i18n("No Subject"); mTemplateMenu->popupMenu()->insertItem( - KStringHandler::rsqueeze( subj.replace( "&", "&&" ) ), idx ); + KStringHandler::rsqueeze( subj.tqreplace( "&", "&&" ) ), idx ); } } @@ -1170,7 +1170,7 @@ void KMMainWidget::slotEmptyFolder() if (mMsgView) mMsgView->clearCache(); if ( !isTrash ) - BroadcastStatus::instance()->setStatusMsg(i18n("Moved all messages to the trash")); + BroadcasStatus::instance()->seStatusMsg(i18n("Moved all messages to the trash")); updateMessageActions(); @@ -1268,9 +1268,9 @@ void KMMainWidget::slotCompactFolder() KCursorSaver busy(KBusyPtr::busy()); mFolder->compact( KMFolder::CompactNow ); // setCurrentItemByIndex will override the statusbar message, so save/restore it - TQString statusMsg = BroadcastStatus::instance()->statusMsg(); + TQString statusMsg = BroadcasStatus::instance()->statusMsg(); mHeaders->setCurrentItemByIndex(idx); - BroadcastStatus::instance()->setStatusMsg( statusMsg ); + BroadcasStatus::instance()->seStatusMsg( statusMsg ); } } @@ -1314,7 +1314,7 @@ void KMMainWidget::slotInvalidateIMAPFolders() { "This will remove all changes that you have done " "locally to your IMAP folders."), i18n("Refresh IMAP Cache"), i18n("&Refresh") ) == KMessageBox::Continue ) - kmkernel->acctMgr()->invalidateIMAPFolders(); + kmkernel->acctMgr()->tqinvalidateIMAPFolders(); } //----------------------------------------------------------------------------- @@ -1713,12 +1713,12 @@ void KMMainWidget::slotApplyFilters() //----------------------------------------------------------------------------- void KMMainWidget::slotCheckVacation() { - updateVactionScriptStatus( false ); + updateVactionScripStatus( false ); if ( !kmkernel->askToGoOnline() ) return; Vacation *vac = new Vacation( this, true /* check only */ ); - connect( vac, TQT_SIGNAL(scriptActive(bool)), TQT_SLOT(updateVactionScriptStatus(bool)) ); + connect( vac, TQT_SIGNAL(scriptActive(bool)), TQT_SLOT(updateVactionScripStatus(bool)) ); } void KMMainWidget::slotEditVacation() @@ -1731,7 +1731,7 @@ void KMMainWidget::slotEditVacation() return; mVacation = new Vacation( this ); - connect( mVacation, TQT_SIGNAL(scriptActive(bool)), TQT_SLOT(updateVactionScriptStatus(bool)) ); + connect( mVacation, TQT_SIGNAL(scriptActive(bool)), TQT_SLOT(updateVactionScripStatus(bool)) ); if ( mVacation->isUsable() ) { connect( mVacation, TQT_SIGNAL(result(bool)), mVacation, TQT_SLOT(deleteLater()) ); } else { @@ -2468,7 +2468,7 @@ void KMMainWidget::getAccountMenu() TQStringList::Iterator it; int id = 0; for(it = actList.begin(); it != actList.end() ; ++it, id++) - mActMenu->insertItem((*it).replace("&", "&&"), id); + mActMenu->insertItem((*it).tqreplace("&", "&&"), id); } //----------------------------------------------------------------------------- @@ -2481,7 +2481,7 @@ void KMMainWidget::getTransportMenu() TQStringList::Iterator it; int id = 0; for(it = availTransports.begin(); it != availTransports.end() ; ++it, id++) - mSendMenu->insertItem((*it).replace("&", "&&"), id); + mSendMenu->insertItem((*it).tqreplace("&", "&&"), id); } //----------------------------------------------------------------------------- @@ -2545,7 +2545,7 @@ void KMMainWidget::updateCustomTemplateMenus() KAction *action; switch ( t.type() ) { case CustomTemplates::TReply: - action = new KAction( (*it).replace( "&", "&&" ), + action = new KAction( (*it).tqreplace( "&", "&&" ), KShortcut( t.shortcut() ), mCustomReplyMapper, TQT_SLOT( map() ), @@ -2557,7 +2557,7 @@ void KMMainWidget::updateCustomTemplateMenus() ++replyc; break; case CustomTemplates::TReplyAll: - action = new KAction( (*it).replace( "&", "&&" ), + action = new KAction( (*it).tqreplace( "&", "&&" ), KShortcut( t.shortcut() ), mCustomReplyAllMapper, TQT_SLOT( map() ), @@ -2569,7 +2569,7 @@ void KMMainWidget::updateCustomTemplateMenus() ++replyallc; break; case CustomTemplates::TForward: - action = new KAction( (*it).replace( "&", "&&" ), + action = new KAction( (*it).tqreplace( "&", "&&" ), KShortcut( t.shortcut() ), mCustomForwardMapper, TQT_SLOT( map() ), @@ -2581,7 +2581,7 @@ void KMMainWidget::updateCustomTemplateMenus() ++forwardc; break; case CustomTemplates::TUniversal: - action = new KAction( (*it).replace( "&", "&&" ), + action = new KAction( (*it).tqreplace( "&", "&&" ), KShortcut::null(), mCustomReplyMapper, TQT_SLOT( map() ), @@ -2591,7 +2591,7 @@ void KMMainWidget::updateCustomTemplateMenus() mCustomReplyActionMenu->insert( action, idx ); mCustomTemplateActions.append( action ); ++replyc; - action = new KAction( (*it).replace( "&", "&&" ), + action = new KAction( (*it).tqreplace( "&", "&&" ), KShortcut::null(), mCustomReplyAllMapper, TQT_SLOT( map() ), @@ -2601,7 +2601,7 @@ void KMMainWidget::updateCustomTemplateMenus() mCustomReplyAllActionMenu->insert( action, idx ); mCustomTemplateActions.append( action ); ++replyallc; - action = new KAction( (*it).replace( "&", "&&" ), + action = new KAction( (*it).tqreplace( "&", "&&" ), KShortcut::null(), mCustomForwardMapper, TQT_SLOT( map() ), @@ -2659,7 +2659,7 @@ void KMMainWidget::setupActions() (void) new KAction( i18n("&Refresh Local IMAP Cache"), "refresh", this, TQT_SLOT(slotInvalidateIMAPFolders()), - actionCollection(), "file_invalidate_imap_cache" ); + actionCollection(), "file_tqinvalidate_imap_cache" ); (void) new KAction( i18n("Empty All &Trash Folders"), 0, KMKernel::self(), TQT_SLOT(slotEmptyTrash()), @@ -3608,7 +3608,7 @@ void KMMainWidget::removeDuplicates() if ( !id.isEmpty() ) { TQString subjMD5 = (*mFolder)[i]->strippedSubjectMD5(); int other = -1; - if ( idMD5s.contains(id) ) + if ( idMD5s.tqcontains(id) ) other = idMD5s[id].first(); else idMD5s[id].append( i ); @@ -3649,7 +3649,7 @@ void KMMainWidget::removeDuplicates() "Removed %n duplicate messages.", numDuplicates ); else msg = i18n("No duplicate messages found."); - BroadcastStatus::instance()->setStatusMsg( msg ); + BroadcasStatus::instance()->seStatusMsg( msg ); } @@ -3713,7 +3713,7 @@ void KMMainWidget::initializeFilterActions() for ( ;it != kmkernel->filterMgr()->filters().constEnd(); ++it ) { if (!(*it)->isEmpty() && (*it)->configureShortcut()) { filterName = TQString("Filter %1").arg((*it)->name()); - normalizedName = filterName.replace(" ", "_"); + normalizedName = filterName.tqreplace(" ", "_"); if (action(normalizedName.utf8())) continue; filterCommand = new KMMetaFilterActionCommand(*it, mHeaders, this); @@ -3803,7 +3803,7 @@ void KMMainWidget::slotShortcutChanged( KMFolder *folder ) TQString actionlabel = TQString( "FolderShortcut %1").arg( folder->prettyURL() ); TQString actionname = TQString( "FolderShortcut %1").arg( folder->idString() ); - TQString normalizedName = actionname.replace(" ", "_"); + TQString normalizedName = actionname.tqreplace(" ", "_"); KAction* action = new KAction(actionlabel, folder->shortcut(), c, TQT_SLOT(start()), actionCollection(), normalizedName.local8Bit()); @@ -3993,14 +3993,14 @@ void KMMainWidget::slotRequestFullSearchFromQuickSearch() assert( mSearchWin ); KMSearchPattern pattern; pattern.append( KMSearchRule::createInstance( "<message>", KMSearchRule::FuncContains, mQuickSearchLine->currentSearchTerm() ) ); - int status = mQuickSearchLine->currentStatus(); + int status = mQuickSearchLine->currenStatus(); if ( status != 0 ) { pattern.append( new KMSearchRuleStatus( status ) ); } mSearchWin->setSearchPattern( pattern ); } -void KMMainWidget::updateVactionScriptStatus(bool active) +void KMMainWidget::updateVactionScripStatus(bool active) { mVacationIndicatorActive = active; if ( active ) { |