[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdenetwork/kopete/kopete
From: Olivier Goffart <ogoffart () tiscalinet ! be>
Date: 2004-11-29 21:19:52
Message-ID: 20041129211952.A38361B9B2 () office ! kde ! org
[Download RAW message or body]
CVS commit by ogoffart:
Port emoticons to a decent API:
use d pointer
Emoticons is in the namespace Kopete
Remove useless accessors.
some other Kopete standard like self()
M +2 -2 chatwindow/chatmessagepart.cpp 1.7
M +1 -1 chatwindow/emoticonselector.cpp 1.7
M +6 -1 chatwindow/kopeteemoticonaction.cpp 1.5
M +2 -2 config/appearance/appearanceconfig.cpp 1.48
--- kdenetwork/kopete/kopete/chatwindow/chatmessagepart.cpp #1.6:1.7
@@ -375,5 +375,5 @@ const QString ChatMessagePart::addNickLi
QString nick = (*it)->property( \
Kopete::Global::Properties::self()->nickName().key() \
).value().toString();
//FIXME: this is really slow in channels with lots of contacts
- QString parsed_nick = KopeteEmoticons::parseEmoticons( nick );
+ QString parsed_nick = Kopete::Emoticons::parseEmoticons( nick );
if ( nick != parsed_nick )
@@ -394,5 +394,5 @@ const QString ChatMessagePart::addNickLi
QString nick = m_manager->myself()->property( \
Kopete::Global::Properties::self()->nickName().key() \
).value().toString();
retVal.replace( QRegExp( QString::fromLatin1("([\\s&;>])%1([\\s&;<:])")
- .arg( QRegExp::escape( KopeteEmoticons::parseEmoticons( nick ) ) ) \
), QString::fromLatin1("\\1%1\\2").arg( nick ) ); + .arg( \
QRegExp::escape( Kopete::Emoticons::parseEmoticons( nick ) ) ) ), \
QString::fromLatin1("\\1%1\\2").arg( nick ) );
return retVal;
--- kdenetwork/kopete/kopete/chatwindow/emoticonselector.cpp #1.6:1.7
@@ -58,5 +58,5 @@ void EmoticonSelector::prepareList(void)
int row = 0;
int col = 0;
- QMap<QString, QString> list = \
KopeteEmoticons::emoticons()->emoticonAndPicList(); + QMap<QString, QString> \
list = Kopete::Emoticons::self()->emoticonAndPicList(); int emoticonsPerRow = \
static_cast<int>(sqrt(list.count())); // kdDebug(14000) << "emoticonsPerRow=" \
<< emoticonsPerRow << endl;
--- kdenetwork/kopete/kopete/chatwindow/kopeteemoticonaction.cpp #1.4:1.5
@@ -69,5 +69,10 @@ KopeteEmoticonAction::KopeteEmoticonActi
// Try to load the icon for our current emoticon theme, when it fails
// fall back to our own default
- QString icon = KopeteEmoticons::emoticons()->emoticonToPicPath( ":)" );
+ QMap<QString, QString> emoticonsMap = \
Kopete::Emoticons::self()->emoticonAndPicList(); + QString icon;
+ if(emoticonsMap.contains(":)") )
+ icon=emoticonsMap[":)"];
+ else
+ icon=emoticonsMap[":-)"];
if ( icon.isNull() )
setIcon( "emoticon" );
--- kdenetwork/kopete/kopete/config/appearance/appearanceconfig.cpp #1.47:1.48
@@ -397,6 +397,6 @@ void AppearanceConfig::slotSelectedEmoti
mPrfsEmoticons->btnRemoveTheme->setEnabled( fileInf.isWritable() );
- KopeteEmoticons emoticons( themeName );
- QStringList smileys = emoticons.picList();
+ Kopete::Emoticons emoticons( themeName );
+ QStringList smileys = emoticons.emoticonAndPicList().values();
QString newContentText = "<qt>";
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic