Show
Ignore:
Timestamp:
07/05/08 12:44:11 (5 months ago)
Author:
eugene
Message:

Revised emoticon (un)parsing. It's not a hyperlink now. It removes annoying tab-switching and possibility to click on it.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/qt4-gui/src/config/emoticons.cpp

    r5837 r6427  
    490490          } 
    491491 
    492           QString img = QString::fromLatin1("<a href=\"#%1\"><img src=\"%2\"></a>").arg(emo.escapedSmiley).arg(emo.file); 
    493           TRACE(" Replacing '%s' with '%s'", message.mid(pos, emo.escapedSmiley.length()).toLatin1().data(), img.toLatin1().data()); 
     492          QString img = QString::fromLocal8Bit("<img src=\"file://%1#LICQ%2\">") 
     493            .arg(emo.file) 
     494            .arg(emo.escapedSmiley); 
     495          TRACE("Replacing '%s' with '%s'", 
     496              message.mid(pos, emo.escapedSmiley.length()).toLatin1().data(), 
     497              img.toLatin1().data()); 
    494498          message.replace(pos, emo.escapedSmiley.length(), img); 
    495499          pos += img.length() - 1; // Point pos at '>' 
     
    510514void Emoticons::unparseMessage(QString& message) 
    511515{ 
    512   QRegExp deicon("<a href=\"#([^\"]*).*</a>"); 
     516  QRegExp deicon("<img src=\"file://.*#LICQ(.*)\".*>"); 
    513517  deicon.setMinimal(true); 
    514518  message.replace(deicon, "\\1");