summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-09-07 21:56:26 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-09-07 21:56:26 +0000
commitf815711d039485259835e246103d3e7f8f3d7203 (patch)
tree580513845904e84dd64dd9f5504bb01f8f941421
parent08d46ebbbb283714e3d0a327442a93e283592c7d (diff)
downloadtdenetwork-f815711d039485259835e246103d3e7f8f3d7203.tar.gz
tdenetwork-f815711d039485259835e246103d3e7f8f3d7203.zip
* Batch 1/2 of kdemultimedia bugfix patches from the Chakra project
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1172709 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
-rw-r--r--filesharing/advanced/kcm_sambaconf/kcmsambaconf.desktop2
-rw-r--r--kopete/kopete/kopetewindow.cpp4
-rw-r--r--kopete/protocols/jabber/jabberchatsession.cpp20
-rw-r--r--kopete/protocols/oscar/aim/aimcontact.cpp3
-rw-r--r--kopete/protocols/oscar/oscarversionupdater.cpp4
5 files changed, 21 insertions, 12 deletions
diff --git a/filesharing/advanced/kcm_sambaconf/kcmsambaconf.desktop b/filesharing/advanced/kcm_sambaconf/kcmsambaconf.desktop
index 385a8636..65ffd568 100644
--- a/filesharing/advanced/kcm_sambaconf/kcmsambaconf.desktop
+++ b/filesharing/advanced/kcm_sambaconf/kcmsambaconf.desktop
@@ -1,6 +1,6 @@
[Desktop Entry]
Exec=kcmshell kcmsambaconf
-Icon=kcmsambaconf
+Icon=samba
Type=Application
Terminal=false
diff --git a/kopete/kopete/kopetewindow.cpp b/kopete/kopete/kopetewindow.cpp
index e013a95c..08d3ab5b 100644
--- a/kopete/kopete/kopetewindow.cpp
+++ b/kopete/kopete/kopetewindow.cpp
@@ -981,7 +981,9 @@ void KopeteWindow::slotBuildStatusMessageMenu()
newMessagePix->setPixmap( SmallIcon( "edit" ) );
/* TQLabel * newMessageLabel = new TQLabel( i18n( "Add " ), newMessageBox );*/
m_newMessageEdit = new TQLineEdit( newMessageBox, "newmessage" );
-
+
+ m_newMessageEdit->setText(Kopete::Away::message());
+
newMessageBox->setFocusProxy( m_newMessageEdit );
newMessageBox->setFocusPolicy( TQWidget::ClickFocus );
/* newMessageLabel->setFocusProxy( newMessageEdit );
diff --git a/kopete/protocols/jabber/jabberchatsession.cpp b/kopete/protocols/jabber/jabberchatsession.cpp
index e07582f7..dbe35ab6 100644
--- a/kopete/protocols/jabber/jabberchatsession.cpp
+++ b/kopete/protocols/jabber/jabberchatsession.cpp
@@ -23,6 +23,7 @@
#include <tqtooltip.h>
#include <tqfile.h>
#include <tqiconset.h>
+#include <tqregexp.h>
#include <kconfig.h>
#include <kdebug.h>
@@ -278,25 +279,28 @@ void JabberChatSession::slotMessageSent ( Kopete::Message &message, Kopete::Chat
{
// this message is not encrypted
jabberMessage.setBody ( message.plainBody ());
- if (message.format() == Kopete::Message::RichText)
+ if (message.format() == Kopete::Message::RichText)
{
JabberResource *bestResource = account()->resourcePool()->bestJabberResource(toJid);
if( bestResource && bestResource->features().canXHTML() )
{
TQString xhtmlBody = message.escapedBody();
-
+
// According to JEP-0071 8.9 it is only RECOMMANDED to replace \n with <br/>
- // which mean that some implementation (gaim 2 beta) may still think that \n are linebreak.
+ // which mean that some implementation (gaim 2 beta) may still think that \n are linebreak.
// and considered the fact that KTextEditor generate a well indented XHTML, we need to remove all \n from it
// see Bug 121627
// Anyway, theses client that do like that are *WRONG* considreded the example of jep-71 where there are lot of
// linebreak that are not interpreted. - Olivier 2006-31-03
xhtmlBody.replace("\n","");
-
+
//&nbsp; is not a valid XML entity
xhtmlBody.replace("&nbsp;" , "&#160;");
-
- xhtmlBody="<p "+ message.getHtmlStyleAttribute() +">"+ xhtmlBody +"</p>";
+
+ // Remove trailing line break
+ xhtmlBody.remove( TQRegExp( "<br/>$" ) );
+
+ xhtmlBody = "<span " + message.getHtmlStyleAttribute() + ">" + xhtmlBody + "</span>";
jabberMessage.setXHTMLBody ( xhtmlBody );
}
}
@@ -310,11 +314,11 @@ void JabberChatSession::slotMessageSent ( Kopete::Message &message, Kopete::Chat
// FIXME: the view() is a speedy way to solve BUG:108389. A better solution is to be found
// but I don't want to introduce a new bug during the bug hunt ;-).
if (view() && view()->plugin()->pluginId() == "kopete_emailwindow" )
- {
+ {
jabberMessage.setType ( "normal" );
}
else
- {
+ {
jabberMessage.setType ( "chat" );
}
diff --git a/kopete/protocols/oscar/aim/aimcontact.cpp b/kopete/protocols/oscar/aim/aimcontact.cpp
index fc55537d..b32a5305 100644
--- a/kopete/protocols/oscar/aim/aimcontact.cpp
+++ b/kopete/protocols/oscar/aim/aimcontact.cpp
@@ -438,6 +438,9 @@ void AIMContact::slotSendMsg(Kopete::Message& message, Kopete::ChatSession *)
//30- (and any I missed) are size 7
s.replace ( TQRegExp ( TQString::fromLatin1("<font ptsize=\"[^\"]*\">")),TQString::fromLatin1("<font size=\"7\">"));
+ // strip left over line break
+ s.remove(TQRegExp(TQString::fromLatin1("<br\b[^>]*>$")));
+
s.replace ( TQRegExp ( TQString::fromLatin1("<br[ /]*>")), TQString::fromLatin1("<br>") );
// strip left over line break
diff --git a/kopete/protocols/oscar/oscarversionupdater.cpp b/kopete/protocols/oscar/oscarversionupdater.cpp
index 75f38b74..92c7a5e2 100644
--- a/kopete/protocols/oscar/oscarversionupdater.cpp
+++ b/kopete/protocols/oscar/oscarversionupdater.cpp
@@ -88,8 +88,8 @@ void OscarVersionUpdater::initICQVersionInfo()
{
kdDebug(OSCAR_RAW_DEBUG) << k_funcinfo << endl;
KConfigGroup config( KGlobal::config(), "ICQVersion" );
-
- mICQVersion.clientString = config.readEntry( "ClientString", "ICQBasic" );
+
+ mICQVersion.clientString = config.readEntry( "ClientString", "ICQ Client" );
mICQVersion.clientId = config.readEntry( "ClientId", "0x010A" ).toUShort( 0, 0 );
mICQVersion.major = config.readEntry( "Major", "0x0006" ).toUShort( 0, 0 );
mICQVersion.minor = config.readEntry( "Minor", "0x0000" ).toUShort( 0, 0 );