Commit c157b7ac authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Fix Bug 127181 - Keyboard key/menu to switch from brut HTML view to formatted...

Fix Bug 127181 - Keyboard key/menu to switch from brut HTML view to formatted HTML view of message body

FIXED-IN: 4.11
BUG: 127181
parent 009bf524
......@@ -1765,10 +1765,19 @@ void ViewerPrivate::createActions()
// Toggle HTML display mode.
mToggleDisplayModeAction = new KToggleAction( i18n( "Toggle HTML Display Mode" ), this );
ac->addAction( "toggle_html_display_mode", mToggleDisplayModeAction );
mToggleDisplayModeAction->setShortcut(QKeySequence(Qt::SHIFT + Qt::Key_H));
connect( mToggleDisplayModeAction, SIGNAL(triggered(bool)),
SLOT(slotToggleHtmlMode()) );
mToggleDisplayModeAction->setHelpText( i18n( "Toggle display mode between HTML and plain text" ) );
// Load external reference
KAction *loadExternalReferenceAction = new KAction( i18n( "Load external references" ), this );
ac->addAction( "load_external_reference", loadExternalReferenceAction );
loadExternalReferenceAction->setShortcut(QKeySequence(Qt::SHIFT + Qt::CTRL + Qt::Key_R));
connect( loadExternalReferenceAction, SIGNAL(triggered(bool)),
SLOT(slotLoadExternalReference()) );
loadExternalReferenceAction->setHelpText( i18n( "Load external references from the Internet for this message." ) );
mSpeakTextAction = new KAction(i18n("Speak Text"),this);
mSpeakTextAction->setIcon(KIcon("preferences-desktop-text-to-speech"));
......@@ -2131,6 +2140,14 @@ void ViewerPrivate::slotUrlPopup(const QUrl &aUrl, const QUrl &imageUrl, const Q
emit popupMenu( mMessageItem, aUrl, imageUrl, aPos );
}
void ViewerPrivate::slotLoadExternalReference()
{
if(mColorBar->isNormal() || htmlLoadExtOverride())
return;
setHtmlLoadExtOverride( true );
update( Viewer::Force );
}
void ViewerPrivate::slotToggleHtmlMode()
{
if(mColorBar->isNormal())
......@@ -3210,7 +3227,7 @@ void ViewerPrivate::slotThemesChanged()
QMapIterator<QString, GrantleeTheme> i(mThemeManager->themes());
while (i.hasNext()) {
i.next();
qDebug()<<" path "<<i.key()<<" name "<<i.value().name();
qDebug()<<" path "<<i.key()<<" name "<<i.value().name()<<" display variable :"<<i.value().displayVariables();
}
//TODO
}
......
......@@ -556,6 +556,7 @@ public slots:
/** Toggle display mode between HTML and plain text. */
void slotToggleHtmlMode();
void slotZoomTextOnly();
void slotLoadExternalReference();
/**
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment