From: <it_...@us...> - 2008-04-29 23:59:29
|
Revision: 3019 http://kmess.svn.sourceforge.net/kmess/?rev=3019&view=rev Author: it_amroth Date: 2008-04-29 16:59:37 -0700 (Tue, 29 Apr 2008) Log Message: ----------- Fixed nicknames with HTML in the notification balloons (continued from previous commit). Also fixed them in the chat window's status bar. Also set the Contact Sidebar's Personal Messages of the contacts to rich text, even if the squeezed text label makes a mess of html. Modified Paths: -------------- trunk/kmess/src/chat/chatwindow.cpp trunk/kmess/src/chat/contactframe.ui trunk/kmess/src/notification/notificationchat.cpp trunk/kmess/src/notification/notificationnewemail.cpp Modified: trunk/kmess/src/chat/chatwindow.cpp =================================================================== --- trunk/kmess/src/chat/chatwindow.cpp 2008-04-29 22:51:08 UTC (rev 3018) +++ trunk/kmess/src/chat/chatwindow.cpp 2008-04-29 23:59:37 UTC (rev 3019) @@ -1482,7 +1482,7 @@ // Avoid newlines which cause problems to the UI layout. message = message.replace( "\n", " " ); - statusLabel_->setText( Qt::escape( message ) ); + statusLabel_->setText( "<html>" + Qt::escape( message ) + "</html>" ); if( message.isEmpty() ) { Modified: trunk/kmess/src/chat/contactframe.ui =================================================================== --- trunk/kmess/src/chat/contactframe.ui 2008-04-29 22:51:08 UTC (rev 3018) +++ trunk/kmess/src/chat/contactframe.ui 2008-04-29 23:59:37 UTC (rev 3019) @@ -141,6 +141,9 @@ <property name="text" > <string>KSqueezedTextLabel</string> </property> + <property name="textFormat" > + <enum>Qt::RichText</enum> + </property> <property name="scaledContents" > <bool>true</bool> </property> Modified: trunk/kmess/src/notification/notificationchat.cpp =================================================================== --- trunk/kmess/src/notification/notificationchat.cpp 2008-04-29 22:51:08 UTC (rev 3018) +++ trunk/kmess/src/notification/notificationchat.cpp 2008-04-29 23:59:37 UTC (rev 3019) @@ -163,86 +163,86 @@ switch( messageType ) { case ChatMessage::TYPE_NOTIFICATION: - text = i18n( "In <b>%1</b>'s chat: %2", friendlyName, body ); + text = i18n( "<html>In <b>%1</b>'s chat: %2</html>", friendlyName, body ); break; case ChatMessage::TYPE_INCOMING: - text = i18n( "<b>%1</b> says:<br>'%2'", friendlyName, body ); + text = i18n( "<html><b>%1</b> says:<br>'%2'</html>", friendlyName, body ); break; case ChatMessage::TYPE_OFFLINE_INCOMING: - text = i18n( "<b>%1</b> has sent you an offline message:<br>'%2'", friendlyName, body ); + text = i18n( "<html><b>%1</b> has sent you an offline message:<br>'%2'</html>", friendlyName, body ); break; case ChatMessage::TYPE_APPLICATION: case ChatMessage::TYPE_APPLICATION_WEBCAM: case ChatMessage::TYPE_APPLICATION_FILE: case ChatMessage::TYPE_APPLICATION_AUDIO: - text = i18n( "%1's chat requests attention!", friendlyName ); + text = i18n( "<html>%1's chat requests attention!</html>", friendlyName ); break; case ChatMessage::TYPE_SYSTEM: default: - text = i18n( "<b>%1</b>:<br>%2", friendlyName, body ); + text = i18n( "<html><b>%1</b>:<br>%2</html>", friendlyName, body ); break; } switch( message.getContentsClass() ) { case ChatMessage::CONTENT_MESSAGE_INK: - text = i18n( "<b>%1</b> has sent you a handwritten message!", friendlyName ); + text = i18n( "<html><b>%1</b> has sent you a handwritten message!</html>", friendlyName ); break; case ChatMessage::CONTENT_NOTIFICATION_NUDGE: - text = i18n( "<b>%1</b> has sent you a nudge!", friendlyName ); + text = i18n( "<html><b>%1</b> has sent you a nudge!</html>", friendlyName ); break; case ChatMessage::CONTENT_NOTIFICATION_WINK: - text = i18n( "<b>%1</b> has sent you a wink!", friendlyName ); + text = i18n( "<html><b>%1</b> has sent you a wink!</html>", friendlyName ); break; case ChatMessage::CONTENT_APP_INVITE: switch( messageType ) { - case ChatMessage::TYPE_APPLICATION_WEBCAM: text = i18n( "<b>%1</b> wants to use the webcam!", friendlyName ); break; - case ChatMessage::TYPE_APPLICATION_FILE: text = i18n( "<b>%1</b> is sending you a file!", friendlyName ); break; - default: text = i18n( "<b>%1</b> has sent you an invitation!", friendlyName ); break; + case ChatMessage::TYPE_APPLICATION_WEBCAM: text = i18n( "<html><b>%1</b> wants to use the webcam!</html>", friendlyName ); break; + case ChatMessage::TYPE_APPLICATION_FILE: text = i18n( "<html><b>%1</b> is sending you a file!</html>", friendlyName ); break; + default: text = i18n( "<html><b>%1</b> has sent you an invitation!</html>", friendlyName ); break; } break; case ChatMessage::CONTENT_APP_CANCELED: switch( messageType ) { - case ChatMessage::TYPE_APPLICATION_WEBCAM: text = i18n( "<b>%1</b> has canceled the webcam session!", friendlyName ); break; - case ChatMessage::TYPE_APPLICATION_FILE: text = i18n( "<b>%1</b> has canceled the file transfer!", friendlyName ); break; - default: text = i18n( "<b>%1</b>'s activity has been canceled!", friendlyName ); break; + case ChatMessage::TYPE_APPLICATION_WEBCAM: text = i18n( "<html><b>%1</b> has canceled the webcam session!</html>", friendlyName ); break; + case ChatMessage::TYPE_APPLICATION_FILE: text = i18n( "<html><b>%1</b> has canceled the file transfer!</html>", friendlyName ); break; + default: text = i18n( "<html><b>%1</b>'s activity has been canceled!</html>", friendlyName ); break; } break; case ChatMessage::CONTENT_APP_STARTED: switch( messageType ) { - case ChatMessage::TYPE_APPLICATION_WEBCAM: text = i18n( "<b>%1</b> has accepted to use the webcam!", friendlyName ); break; - case ChatMessage::TYPE_APPLICATION_FILE: text = i18n( "<b>%1</b> has accepted the file transfer!", friendlyName ); break; - default: text = i18n( "<b>%1</b> has accepted your invitation!", friendlyName ); break; + case ChatMessage::TYPE_APPLICATION_WEBCAM: text = i18n( "<html><b>%1</b> has accepted to use the webcam!</html>", friendlyName ); break; + case ChatMessage::TYPE_APPLICATION_FILE: text = i18n( "<html><b>%1</b> has accepted the file transfer!</html>", friendlyName ); break; + default: text = i18n( "<html><b>%1</b> has accepted your invitation!</html>", friendlyName ); break; } break; case ChatMessage::CONTENT_APP_ENDED: switch( messageType ) { - case ChatMessage::TYPE_APPLICATION_WEBCAM: text = i18n( "<b>%1</b> has ended the webcam session!", friendlyName ); break; - case ChatMessage::TYPE_APPLICATION_FILE: text = i18n( "The file transfer with <b>%1</b> is done!", friendlyName ); break; - default: text = i18n( "<b>%1</b>'s activity has ended!", friendlyName ); break; + case ChatMessage::TYPE_APPLICATION_WEBCAM: text = i18n( "<html><b>%1</b> has ended the webcam session!</html>", friendlyName ); break; + case ChatMessage::TYPE_APPLICATION_FILE: text = i18n( "<html>The file transfer with <b>%1</b> is done!</html>", friendlyName ); break; + default: text = i18n( "<html><b>%1</b>'s activity has ended!</html>", friendlyName ); break; } break; case ChatMessage::CONTENT_APP_FAILED: switch( messageType ) { - case ChatMessage::TYPE_APPLICATION_WEBCAM: text = i18n( "<b>%1</b>'s webcam session has failed!", friendlyName ); break; - case ChatMessage::TYPE_APPLICATION_FILE: text = i18n( "The file transfer with <b>%1</b> has failed!", friendlyName ); break; - default: text = i18n( "<b>%1</b>'s activity has ended with an error!", friendlyName ); break; + case ChatMessage::TYPE_APPLICATION_WEBCAM: text = i18n( "<html><b>%1</b>'s webcam session has failed!</html>", friendlyName ); break; + case ChatMessage::TYPE_APPLICATION_FILE: text = i18n( "<html>The file transfer with <b>%1</b> has failed!</html>", friendlyName ); break; + default: text = i18n( "<html><b>%1</b>'s activity has ended with an error!</html>", friendlyName ); break; } break; Modified: trunk/kmess/src/notification/notificationnewemail.cpp =================================================================== --- trunk/kmess/src/notification/notificationnewemail.cpp 2008-04-29 22:51:08 UTC (rev 3018) +++ trunk/kmess/src/notification/notificationnewemail.cpp 2008-04-29 23:59:37 UTC (rev 3019) @@ -71,7 +71,7 @@ stringList.append( folder ); stringList.append( url ); - text = i18n( "<b>New email:</b><br>'%1'<br>by '%2'", + text = i18n( "<html><b>New email:</b><br>'%1'<br>by '%2'</html>", Qt::escape( subject ), Qt::escape( sender ) ); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |