summaryrefslogtreecommitdiffstats
path: root/kmail/kmreaderwin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kmail/kmreaderwin.cpp')
-rw-r--r--kmail/kmreaderwin.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/kmail/kmreaderwin.cpp b/kmail/kmreaderwin.cpp
index b3c435703..1b6ca4874 100644
--- a/kmail/kmreaderwin.cpp
+++ b/kmail/kmreaderwin.cpp
@@ -618,6 +618,11 @@ void KMReaderWin::createActions( TDEActionCollection * ac ) {
Key_X, TQT_TQOBJECT(this), TQT_SLOT(slotToggleFixedFont()),
ac, "toggle_fixedfont" );
+ mToggleMimePartTreeAction = new TDEToggleAction( i18n("Show Message Structure"),
+ 0, ac, "toggle_mimeparttree" );
+ connect(mToggleMimePartTreeAction, TQT_SIGNAL(toggled(bool)),
+ TQT_TQOBJECT(this), TQT_SLOT(slotToggleMimePartTree()));
+
mStartIMChatAction = new TDEAction( i18n("Chat &With..."), 0, TQT_TQOBJECT(this),
TQT_SLOT(slotIMChat()), ac, "start_im_chat" );
}
@@ -1444,6 +1449,7 @@ int KMReaderWin::pointsToPixel(int pointSize) const
//-----------------------------------------------------------------------------
void KMReaderWin::showHideMimeTree( bool isPlainTextTopLevel ) {
+ mIsPlainText = isPlainTextTopLevel;
if ( mMimeTreeMode == 2 ||
( mMimeTreeMode == 1 && !isPlainTextTopLevel ) )
mMimePartTree->show();
@@ -1453,6 +1459,9 @@ void KMReaderWin::showHideMimeTree( bool isPlainTextTopLevel ) {
saveSplitterSizes( reader );
mMimePartTree->hide();
}
+ if ( mToggleMimePartTreeAction->isChecked() != mMimePartTree->isVisible() ) {
+ mToggleMimePartTreeAction->setChecked( mMimePartTree->isVisible() );
+ }
}
void KMReaderWin::displayMessage() {
@@ -2135,6 +2144,17 @@ void KMReaderWin::slotToggleFixedFont()
//-----------------------------------------------------------------------------
+void KMReaderWin::slotToggleMimePartTree()
+{
+ if ( mToggleMimePartTreeAction->isChecked() ) {
+ mMimeTreeMode = 2; // always
+ } else {
+ mMimeTreeMode = 0; // never
+ }
+ showHideMimeTree();
+}
+
+//-----------------------------------------------------------------------------
void KMReaderWin::slotCopySelectedText()
{
kapp->clipboard()->setText( mViewer->selectedText() );