[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [kopete] /: replace the "override user formatting" options with a single one. Make it actually work.
From: Charles Samuels <charles () kde ! org>
Date: 2013-07-10 4:17:19
Message-ID: E1UwlqB-00062k-6g () scm ! kde ! org
[Download RAW message or body]
Git commit f6a8bb22dc19be2341daa8b0f053ae215be71ded by Charles Samuels.
Committed on 10/07/2013 at 03:55.
Pushed by charles into branch 'master'.
replace the "override user formatting" options with a single one. Make it \
actually work.
The only times it does not work is when The LaTeX plugin is enabled AND \
actually doing something, or on history messages.
This situation is better than the previous, in which it never worked
bug #277508
my first commit in years! :O
M +6 -22 kopete/chatwindow/chatmessagepart.cpp
M +4 -6 kopete/chatwindow/chatmessagepart.h
M +2 -12 kopete/chatwindow/kopetechatwindowsettings.kcfg
M +1 -2 kopete/config/chatwindow/chatwindowconfig.cpp
M +48 -23 kopete/config/chatwindow/chatwindowconfig_colors.ui
M +2 -12 libkopete/kopeteappearancesettings.kcfg
M +4 -5 libkopete/kopetechatsession.h
M +59 -51 libkopete/kopetemessage.cpp
M +18 -9 libkopete/kopetemessage.h
M +1 -3 plugins/latex/latexplugin.cpp
M +0 -3 plugins/latex/latexplugin.h
http://commits.kde.org/kopete/f6a8bb22dc19be2341daa8b0f053ae215be71ded
diff --git a/kopete/chatwindow/chatmessagepart.cpp \
b/kopete/chatwindow/chatmessagepart.cpp index fab158a..7481fd7 100644
--- a/kopete/chatwindow/chatmessagepart.cpp
+++ b/kopete/chatwindow/chatmessagepart.cpp
@@ -122,10 +122,7 @@ public:
// Don't delete currentChatStyle, it is handled by \
ChatWindowStyleManager. }
- bool bgOverride;
- bool fgOverride;
- bool rtfOverride;
- bool graphicOverride;
+ bool fmtOverride;
// ToolTip *tt;
bool scrollPressed;
@@ -215,7 +212,6 @@ ChatMessagePart::ChatMessagePart( Kopete::ChatSession \
*mgr, QWidget *parent ) : KHTMLPart( parent ), d( new Private )
{
d->manager = mgr;
- d->graphicOverride = true;
d->currentChatStyle = \
ChatWindowStyleManager::self()->getValidStyleFromPool( \
KopeteChatWindowSettings::self()->styleName() ); if (d->currentChatStyle)
connect( d->currentChatStyle, SIGNAL(destroyed(QObject*)), this, \
SLOT(clearStyle()) ); @@ -255,7 +251,6 @@ ChatMessagePart::ChatMessagePart( \
Kopete::ChatSession *mgr, QWidget *parent )
connect( d->manager, \
SIGNAL(messageStateChanged(uint,Kopete::Message::MessageState)),
this, SLOT(messageStateChanged(uint,Kopete::Message::MessageState)) \
);
- connect (d->manager, SIGNAL(toggleGraphicOverride(bool)), this, \
SLOT(slotToggleGraphicOverride(bool)) );
connect ( browserExtension(), \
SIGNAL(openUrlRequestDelayed(KUrl,KParts::OpenUrlArguments,KParts::BrowserArguments)),
this, SLOT(slotOpenURLRequest(KUrl,KParts::OpenUrlArguments,KParts::BrowserArguments)) \
); @@ -414,18 +409,11 @@ void \
ChatMessagePart::slotFileTransferIncomingDone( unsigned int id )
void ChatMessagePart::readOverrides()
{
- d->bgOverride = Kopete::AppearanceSettings::self()->chatBgOverride();
- d->fgOverride = Kopete::AppearanceSettings::self()->chatFgOverride();
- d->rtfOverride = ( d->graphicOverride ? false : \
Kopete::AppearanceSettings::self()->chatRtfOverride()); + d->fmtOverride = \
Kopete::AppearanceSettings::self()->chatFmtOverride(); }
-void ChatMessagePart::slotToggleGraphicOverride(bool enable)
+void ChatMessagePart::slotToggleGraphicOverride(bool)
{
- if (d->graphicOverride != enable)
- {
- d->graphicOverride = enable;
- emit slotAppearanceChanged();
- }
}
void ChatMessagePart::setStyle( const QString &styleName )
@@ -488,13 +476,8 @@ void ChatMessagePart::appendMessage( Kopete::Message \
&message, bool restoring ) if ( !d->currentChatStyle )
return;
- // Don't remove foreground color for history messages.
if ( !message.classes().contains("history") )
- {
- message.setBackgroundOverride( d->bgOverride );
- message.setForegroundOverride( d->fgOverride );
- message.setRichTextOverride( d->rtfOverride );
- }
+ message.setFormattingOverride( d->fmtOverride );
#ifdef STYLE_TIMETEST
QTime beforeMessage = QTime::currentTime();
@@ -1294,7 +1277,8 @@ QString ChatMessagePart::formatMessageBody(const \
Kopete::Message &message) classes+=message.classes();
// Affect the parsed body.
- formattedBody += QString("class=\"%1\">%2</span>").arg(classes.join(" "), \
message.parsedBody()); + formattedBody += QString("class=\"%1\">%2</span>")
+ .arg(classes.join(" "), message.parsedBody());
return formattedBody;
}
diff --git a/kopete/chatwindow/chatmessagepart.h \
b/kopete/chatwindow/chatmessagepart.h index 13e08e9..f82ab79 100644
--- a/kopete/chatwindow/chatmessagepart.h
+++ b/kopete/chatwindow/chatmessagepart.h
@@ -148,12 +148,10 @@ public slots:
void messageStateChanged( uint messageId, Kopete::Message::MessageState \
state );
- /**
- * Change the current style
- * This method override is used when a plugin need graphic management.
- * @param enable toggle the override.
- */
- void slotToggleGraphicOverride(bool enable);
+ /**
+ * does nothing
+ */
+ void slotToggleGraphicOverride(bool enable);
signals:
/**
diff --git a/kopete/chatwindow/kopetechatwindowsettings.kcfg \
b/kopete/chatwindow/kopetechatwindowsettings.kcfg index 28bb558..806c614 \
100644
--- a/kopete/chatwindow/kopetechatwindowsettings.kcfg
+++ b/kopete/chatwindow/kopetechatwindowsettings.kcfg
@@ -57,18 +57,8 @@
</entry>
<!-- Overrides preferences -->
- <entry key="chatBgOverride" type="Bool">
- <label>Disable custom text color set by users.</label>
- <default>false</default>
- <emit signal="messageOverridesChanged" />
- </entry>
- <entry key="chatFgOverride" type="Bool">
- <label>Disable custom background color set by users.</label>
- <default>false</default>
- <emit signal="messageOverridesChanged" />
- </entry>
- <entry key="chatRtfOverride" type="Bool">
- <label>Disable rich text set by users.</label>
+ <entry key="chatFmtOverride" type="Bool">
+ <label>Disable custom formatting set by users.</label>
<default>false</default>
<emit signal="messageOverridesChanged" />
</entry>
diff --git a/kopete/config/chatwindow/chatwindowconfig.cpp \
b/kopete/config/chatwindow/chatwindowconfig.cpp index 7dde0c7..e6bc2a3 \
100644
--- a/kopete/config/chatwindow/chatwindowconfig.cpp
+++ b/kopete/config/chatwindow/chatwindowconfig.cpp
@@ -275,8 +275,7 @@ void ChatWindowConfig::save()
// Ugly hacks, this will emit the kcfg signals
appearanceSettings->setChatTextColor(m_colorsUi.kcfg_chatTextColor->color());
appearanceSettings->setUseEmoticons(m_emoticonsUi.kcfg_useEmoticons->isChecked());
- settings->setHighlightForegroundColor(m_colorsUi.kcfg_highlightForegroundColor->color());
- settings->setChatBgOverride(m_colorsUi.kcfg_chatBgOverride->isChecked());
+ settings->setChatFmtOverride(m_colorsUi.kcfg_chatFmtOverride->isChecked());
appearanceSettings->writeConfig();
settings->writeConfig();
diff --git a/kopete/config/chatwindow/chatwindowconfig_colors.ui \
b/kopete/config/chatwindow/chatwindowconfig_colors.ui index \
75d68da..fde6ae9 100644
--- a/kopete/config/chatwindow/chatwindowconfig_colors.ui
+++ b/kopete/config/chatwindow/chatwindowconfig_colors.ui
@@ -39,6 +39,9 @@ p, li { white-space: pre-wrap; }
</item>
<item row="0" column="1" colspan="2">
<widget class="QRadioButton" name="radioButton">
+ <property name="whatsThis">
+ <string>Use normal screen font</string>
+ </property>
<property name="text">
<string>Use system font</string>
</property>
@@ -92,11 +95,10 @@ p, li { white-space: pre-wrap; }
<item row="0" column="0">
<widget class="QLabel" name="textLabel3">
<property name="toolTip">
- <string><html><head><meta \
name="qrichtext" content="1" /><style \
type="text/css">
-p, li { white-space: pre-wrap; }
-</style></head><body style=" font-family:'Sans Serif'; \
font-size:10pt; font-weight:400; \
font-style:normal;">
-<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; \
margin-right:0px; -qt-block-indent:0; text-indent:0px;">Base font \
in the chat window</p>
-<p style="-qt-paragraph-type:empty; margin-top:0px; \
margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; \
text-indent:0px;"></p></body></html></string> + \
<string>The color of normal text</string> + </property>
+ <property name="whatsThis">
+ <string>The color of normal text</string>
</property>
<property name="text">
<string>Base &font:</string>
@@ -109,7 +111,10 @@ p, li { white-space: pre-wrap; }
<item row="0" column="1">
<widget class="KColorButton" name="kcfg_chatTextColor">
<property name="toolTip">
- <string>Base font color for the chat window</string>
+ <string>The color of normal text</string>
+ </property>
+ <property name="whatsThis">
+ <string>The color of normal text</string>
</property>
<property name="text">
<string/>
@@ -131,6 +136,9 @@ p, li { white-space: pre-wrap; }
<property name="toolTip">
<string>Foreground color for highlighted messages</string>
</property>
+ <property name="whatsThis">
+ <string>Foreground color for highlighted messages</string>
+ </property>
<property name="text">
<string/>
</property>
@@ -138,6 +146,12 @@ p, li { white-space: pre-wrap; }
</item>
<item row="1" column="0">
<widget class="QLabel" name="textLabel2_2">
+ <property name="toolTip">
+ <string>Color for the background of the chat window</string>
+ </property>
+ <property name="whatsThis">
+ <string>Color for the background of the chat window</string>
+ </property>
<property name="text">
<string>&Background color:</string>
</property>
@@ -151,6 +165,9 @@ p, li { white-space: pre-wrap; }
<property name="toolTip">
<string>Color for the background of the chat window</string>
</property>
+ <property name="whatsThis">
+ <string>Color for the background of the chat window</string>
+ </property>
<property name="text">
<string/>
</property>
@@ -165,6 +182,12 @@ p, li { white-space: pre-wrap; }
</item>
<item row="1" column="2">
<widget class="QLabel" name="textLabel1">
+ <property name="toolTip">
+ <string>Background color for highlighted messages</string>
+ </property>
+ <property name="whatsThis">
+ <string>Background color for highlighted messages</string>
+ </property>
<property name="text">
<string>Highlight bac&kground:</string>
</property>
@@ -178,6 +201,9 @@ p, li { white-space: pre-wrap; }
<property name="toolTip">
<string>Background color for highlighted messages</string>
</property>
+ <property name="whatsThis">
+ <string>Background color for highlighted messages</string>
+ </property>
<property name="text">
<string/>
</property>
@@ -185,6 +211,12 @@ p, li { white-space: pre-wrap; }
</item>
<item row="2" column="0">
<widget class="QLabel" name="textLabel1_3">
+ <property name="toolTip">
+ <string>Color used for links in chats</string>
+ </property>
+ <property name="whatsThis">
+ <string>Color used for links in chats</string>
+ </property>
<property name="text">
<string>&Link color:</string>
</property>
@@ -198,6 +230,9 @@ p, li { white-space: pre-wrap; }
<property name="toolTip">
<string>Color used for links in chats</string>
</property>
+ <property name="whatsThis">
+ <string>Color used for links in chats</string>
+ </property>
<property name="text">
<string/>
</property>
@@ -220,23 +255,15 @@ p, li { white-space: pre-wrap; }
</property>
<layout class="QVBoxLayout">
<item>
- <widget class="QCheckBox" name="kcfg_chatBgOverride">
- <property name="text">
- <string>Do not show user specified back&ground color</string>
+ <widget class="QCheckBox" name="kcfg_chatFmtOverride">
+ <property name="toolTip">
+ <string>Disregard the colors (background and foreground), and \
font (size and typeface) of incoming messages</string> </property>
- </widget>
- </item>
- <item>
- <widget class="QCheckBox" name="kcfg_chatFgOverride">
- <property name="text">
- <string>&Do not show user specified foreground color</string>
+ <property name="whatsThis">
+ <string>Disregard the colors (background and foreground), and \
font (size and typeface) of incoming messages</string> </property>
- </widget>
- </item>
- <item>
- <widget class="QCheckBox" name="kcfg_chatRtfOverride">
<property name="text">
- <string>Do not show user specified &rich text</string>
+ <string>Ignore peer's formatting</string>
</property>
</widget>
</item>
@@ -283,9 +310,7 @@ p, li { white-space: pre-wrap; }
<tabstop>kcfg_chatLinkColor</tabstop>
<tabstop>kcfg_highlightForegroundColor</tabstop>
<tabstop>kcfg_highlightBackgroundColor</tabstop>
- <tabstop>kcfg_chatBgOverride</tabstop>
- <tabstop>kcfg_chatFgOverride</tabstop>
- <tabstop>kcfg_chatRtfOverride</tabstop>
+ <tabstop>kcfg_chatFmtOverride</tabstop>
</tabstops>
<resources/>
<connections>
diff --git a/libkopete/kopeteappearancesettings.kcfg \
b/libkopete/kopeteappearancesettings.kcfg index 95e9022..d5114ad 100644
--- a/libkopete/kopeteappearancesettings.kcfg
+++ b/libkopete/kopeteappearancesettings.kcfg
@@ -43,18 +43,8 @@
</entry>
<!-- Overrides preferences -->
- <entry key="chatBgOverride" type="Bool">
- <label>Disable custom text color set by users.</label>
- <default>false</default>
- <emit signal="messageOverridesChanged" />
- </entry>
- <entry key="chatFgOverride" type="Bool">
- <label>Disable custom background color set by users.</label>
- <default>false</default>
- <emit signal="messageOverridesChanged" />
- </entry>
- <entry key="chatRtfOverride" type="Bool">
- <label>Disable rich text set by users.</label>
+ <entry key="chatFmtOverride" type="Bool">
+ <label>Disable custom formatting set by users.</label>
<default>false</default>
<emit signal="messageOverridesChanged" />
</entry>
diff --git a/libkopete/kopetechatsession.h b/libkopete/kopetechatsession.h
index b08abb5..5bac8aa 100644
--- a/libkopete/kopetechatsession.h
+++ b/libkopete/kopetechatsession.h
@@ -333,11 +333,10 @@ signals:
*/
void photoChanged();
- /**
- * Toggle Graphic Override mode for plugin
- * @param enable Toggle the overide
- */
- void toggleGraphicOverride(bool enable);
+ /**
+ * does nothing
+ */
+ void toggleGraphicOverride(bool enable);
public slots:
/**
diff --git a/libkopete/kopetemessage.cpp b/libkopete/kopetemessage.cpp
index 7ee05da..ba187d4 100644
--- a/libkopete/kopetemessage.cpp
+++ b/libkopete/kopetemessage.cpp
@@ -49,7 +49,7 @@ class Message::Private
public:
Private() //assign next message id, it can't be changed later
: id(nextId++), direction(Internal), format(Qt::PlainText), \
type(TypeNormal), importance(Normal), state(StateUnknown),
- delayed(false), backgroundOverride(false), foregroundOverride(false), \
richTextOverride(false), isRightToLeft(false), + delayed(false), \
formattingOverride(false), forceHtml(false), \
isRightToLeft(false),
timeStamp( QDateTime::currentDateTime() ), body(new QTextDocument), \
parsedBodyDirty(true), escapedBodyDirty(true), fileTransfer(0)
{}
@@ -68,9 +68,7 @@ public:
MessageImportance importance;
MessageState state;
bool delayed;
- bool backgroundOverride;
- bool foregroundOverride;
- bool richTextOverride;
+ bool formattingOverride, forceHtml;
bool isRightToLeft;
QDateTime timeStamp;
QFont font;
@@ -119,9 +117,7 @@ Message::Private::Private (const Message::Private \
&other) importance = other.importance;
state = other.state;
delayed = other.delayed;
- backgroundOverride = other.backgroundOverride;
- foregroundOverride = other.foregroundOverride;
- richTextOverride = other.richTextOverride;
+ formattingOverride = other.formattingOverride;
isRightToLeft = other.isRightToLeft;
timeStamp = other.timeStamp;
font = other.font;
@@ -199,22 +195,24 @@ uint Message::nextId()
void Message::setBackgroundOverride( bool enabled )
{
- d->backgroundOverride = enabled;
+ setFormattingOverride(enabled);
}
void Message::setForegroundOverride( bool enabled )
{
- d->foregroundOverride = enabled;
+ setFormattingOverride(enabled);
}
void Message::setRichTextOverride( bool enabled )
{
- if ( d->richTextOverride != enabled )
- {
- d->richTextOverride = enabled;
- d->escapedBodyDirty = true;
- d->parsedBodyDirty = true;
- }
+ setFormattingOverride(enabled);
+}
+
+void Message::setFormattingOverride( bool enabled )
+{
+ d->formattingOverride = enabled;
+ d->parsedBodyDirty=true;
+ d->escapedBodyDirty=true;
}
void Message::setForegroundColor( const QColor &color )
@@ -242,6 +240,12 @@ void Message::setHtmlBody (const QString &body)
doSetBody (body, Qt::RichText);
}
+void Message::setForcedHtmlBody( const QString &body)
+{
+ setHtmlBody(body);
+ d->forceHtml = true;
+}
+
void Message::doSetBody (QString body, Qt::TextFormat f)
{
// Remove ObjectReplacementCharacter because otherwise html text will be \
empty @@ -370,12 +374,12 @@ QString Message::escapedBody() const
{
// kDebug(14010) << escapedBody() << " " << d->richTextOverride;
-// the escaped body is cached because QRegExp is very expensive, so it \
shouldn't be used any more than nescessary +// the escaped body is cached \
because QRegExp is very expensive, so it shouldn't be used any more than \
necessary if (!d->escapedBodyDirty)
return d->escapedBody;
else {
QString html;
- if ( d->format == Qt::PlainText || d->richTextOverride )
+ if ( d->format == Qt::PlainText || (d->formattingOverride && \
!d->forceHtml)) html = Qt::convertFromPlainText( d->body->toPlainText(), \
Qt::WhiteSpaceNormal ); else
html = d->body->toHtml();
@@ -414,16 +418,16 @@ static QString makeRegExp( const char *pattern )
const QStringList Message::regexpPatterns()
{
- const QString name = QLatin1String( "[\\w\\+\\-=_\\.]+" );
- const QString userAndPassword = QString( "(?:%1(?::%1)?\\@)" \
).arg( name );
- const QString urlChar = QLatin1String( \
"\\+\\-\\w\\./#@&;:=\\?~%_,\\!\\$\\*\\(\\)" );
- const QString urlSection = QString( "[%1]+" ).arg( urlChar );
- const QString domain = QLatin1String( \
"[\\-\\w_]+(?:\\.[\\-\\w_]+)+" );
- QStringList patternList;
- patternList << makeRegExp("\\w+://%1?\\w%2").arg( userAndPassword, \
urlSection )
- << makeRegExp("%1?www\\.%2%3").arg( userAndPassword, \
domain, urlSection )
- << makeRegExp("%1@%2").arg( name, domain );
- return patternList;
+ const QString name = QLatin1String( "[\\w\\+\\-=_\\.]+" );
+ const QString userAndPassword = QString( "(?:%1(?::%1)?\\@)" ).arg( name \
); + const QString urlChar = QLatin1String( \
"\\+\\-\\w\\./#@&;:=\\?~%_,\\!\\$\\*\\(\\)" ); + const QString urlSection = \
QString( "[%1]+" ).arg( urlChar ); + const QString domain = QLatin1String( \
"[\\-\\w_]+(?:\\.[\\-\\w_]+)+" ); + QStringList patternList;
+ patternList << makeRegExp("\\w+://%1?\\w%2").arg( userAndPassword, \
urlSection ) + << makeRegExp("%1?www\\.%2%3").arg( \
userAndPassword, domain, urlSection ) + << \
makeRegExp("%1@%2").arg( name, domain ); + return patternList;
}
QString Message::parseLinks( const QString &message, Qt::TextFormat format \
) @@ -613,32 +617,36 @@ QString Message::getHtmlStyleAttribute() const
styleAttribute = QString::fromUtf8("style=\"");
- // Affect foreground(color) and background color to message.
- if( !d->foregroundOverride && d->foregroundColor.isValid() )
- {
- styleAttribute += QString::fromUtf8("color: %1; \
").arg(d->foregroundColor.name());
- }
- if( !d->backgroundOverride && d->backgroundColor.isValid() )
+ if( !d->formattingOverride)
{
- styleAttribute += QString::fromUtf8("background-color: %1; \
").arg(d->backgroundColor.name());
- }
+ // Affect foreground(color) and background color to message.
+ // we only do this if the formatting won't get stripped anyway
+ if( d->foregroundColor.isValid() )
+ {
+ styleAttribute += QString::fromUtf8("color: %1; \
").arg(d->foregroundColor.name()); + }
+ if( d->backgroundColor.isValid() )
+ {
+ styleAttribute += QString::fromUtf8("background-color: %1; \
").arg(d->backgroundColor.name()); + }
- // Affect font parameters.
- if( !d->richTextOverride && d->font!=QFont() )
- {
- QString fontstr;
- if(!d->font.family().isNull())
- fontstr+=QLatin1String("font-family: \
")+d->font.family()+QLatin1String("; ");
- if(d->font.italic())
- fontstr+=QLatin1String("font-style: italic; ");
- if(d->font.strikeOut())
- fontstr+=QLatin1String("text-decoration: line-through; ");
- if(d->font.underline())
- fontstr+=QLatin1String("text-decoration: underline; ");
- if(d->font.bold())
- fontstr+=QLatin1String("font-weight: bold;");
-
- styleAttribute += fontstr;
+ // Affect font parameters.
+ if( d->font!=QFont() )
+ {
+ QString fontstr;
+ if(!d->font.family().isNull())
+ fontstr+=QLatin1String("font-family: \
")+d->font.family()+QLatin1String("; "); + if(d->font.italic())
+ fontstr+=QLatin1String("font-style: italic; ");
+ if(d->font.strikeOut())
+ fontstr+=QLatin1String("text-decoration: line-through; ");
+ if(d->font.underline())
+ fontstr+=QLatin1String("text-decoration: underline; ");
+ if(d->font.bold())
+ fontstr+=QLatin1String("font-weight: bold;");
+
+ styleAttribute += fontstr;
+ }
}
styleAttribute += QString::fromUtf8("\"");
diff --git a/libkopete/kopetemessage.h b/libkopete/kopetemessage.h
index db5ee70..edf329c 100644
--- a/libkopete/kopetemessage.h
+++ b/libkopete/kopetemessage.h
@@ -369,6 +369,13 @@ public:
* @param body The body, interpreted as HTML
*/
void setHtmlBody( const QString &body);
+
+ /**
+ * @brief Sets the body of the message, which is used even if formatting \
is overridden + *
+ * @param body The body, interpreted as HTML
+ */
+ void setForcedHtmlBody( const QString &body);
/**
* @brief Sets the body of the message
@@ -417,22 +424,24 @@ public:
void setManager(ChatSession * manager);
/**
- * @brief Enables the use of a background for a message
- * @param enable A flag to indicate if the background should be enabled \
or disabled. + * @brief Does nothing
*/
- void setBackgroundOverride( bool enable );
+ void KDE_DEPRECATED setBackgroundOverride( bool enable );
/**
- * @brief Enables the use of a foreground for a message
- * @param enable A flag to indicate if the foreground should be enabled \
or disabled. + * @brief Does nothing
*/
- void setForegroundOverride( bool enable );
+ void KDE_DEPRECATED setForegroundOverride( bool enable );
/**
- * @brief Enables the use of a RTF formatting for a message
- * @param enable A flag to indicate if the RTF formatting should be \
enabled or disabled. + * @brief Does nothing
+ */
+ void KDE_DEPRECATED setRichTextOverride( bool enable );
+
+ /**
+ * @brief Ignores peer's formatting
*/
- void setRichTextOverride( bool enable );
+ void setFormattingOverride( bool enable );
/**
* @brief Return HTML style attribute for this message.
diff --git a/plugins/latex/latexplugin.cpp b/plugins/latex/latexplugin.cpp
index 24af424..51b327c 100644
--- a/plugins/latex/latexplugin.cpp
+++ b/plugins/latex/latexplugin.cpp
@@ -80,7 +80,6 @@ LatexPlugin* LatexPlugin::s_pluginStatic = 0L;
void LatexPlugin::slotNewChatSession( Kopete::ChatSession *KMM )
{
new LatexGUIClient( KMM );
- connect( this , SIGNAL(toggleLatex(bool)), KMM, \
SIGNAL(toggleGraphicOverride(bool)) ); }
void LatexPlugin::slotMessageAboutToShow( Kopete::Message& msg )
@@ -176,8 +175,7 @@ void LatexPlugin::slotMessageAboutToShow( \
Kopete::Message& msg ) \
messageText.replace(Kopete::Message::escape(it.key()), " <img width=\"" + \
QString::number(imagePxWidth) + "\" height=\"" + \
QString::number(imagePxHeight) + "\" align=\"middle\" src=\"" + (*it) + "\" \
alt=\"" + escapedLATEX +"\" title=\"" + escapedLATEX +"\" /> "); }
- msg.setHtmlBody( messageText );
- emit toggleLatex(true);
+ msg.setForcedHtmlBody( messageText );
}
diff --git a/plugins/latex/latexplugin.h b/plugins/latex/latexplugin.h
index ee3ea88..8bd6297 100644
--- a/plugins/latex/latexplugin.h
+++ b/plugins/latex/latexplugin.h
@@ -65,9 +65,6 @@ public:
*/
bool securityCheck(const QString & formula);
-signals:
- void toggleLatex(bool);
-
private:
static LatexPlugin* s_pluginStatic;
QString m_convScript;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic