Bug 74985 - single-shot chat window has junk in incoming message section
Summary: single-shot chat window has junk in incoming message section
Status: RESOLVED FIXED
Alias: None
Product: kopete
Classification: Applications
Component: Chat Window (show other bugs)
Version: 0.8.0
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Kopete Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-02-11 19:11 UTC by william maddler
Modified: 2004-02-12 03:24 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description william maddler 2004-02-11 19:11:13 UTC
Version:           0.8.0 (using KDE KDE 3.2.0)
Installed from:    Slackware Packages
Compiler:          GCC 3.3.2 
OS:          Linux

I've just compiled and installed Kopete 0.8.0.

Everything works fine beside if I set "Single shot window" on.

Whenever I get a new message the incoming message window contains something
like:
---------------------------------
Message from steeeve at 18:02:54
    no mi ha incasinato
 " 100>#0000001
---------------------------------

everything works fine in otherwise.
Comment 1 Matt Rogers 2004-02-11 23:15:13 UTC
do you get the same strange characters if you use a regular chat window, rather than a single shot window?
Comment 2 william maddler 2004-02-11 23:33:35 UTC
No, I get them in single shot only.
I tried both the version in official kdenetwork slackware packages and a compiled from source version.

Removed all kopete related files in ~/.kde

But the chars are still there.

I can give my ICQ number if you want to do some real time tests.
Or tell me if I can give you more infos or do some tests here.
Comment 3 Matt Rogers 2004-02-12 00:10:41 UTC
Does it happen on every message you receive, regardless of protocol? Or does it happen with only one protocol? One more question. :) Does it only happen with one particular contact?

Also, for future reference, you don't need to add my email address to the CC, I see all the bug reports anyways. :)

Comment 4 william maddler 2004-02-12 00:22:32 UTC
ok... sorry! :)

back to the bug...
yes I have that string on every incoming message, every protocol and every contact.
Before submitting the bug i tested with ICQ and IRC and the 100>#0000001 string is always there.

Could it be a missing " in the one shot window handling procedure? 
I noticed the " char at the beginning of the string.
Comment 5 Richard Smith 2004-02-12 02:51:54 UTC
Confirmed. I get:

" 120>#0000001

Investigating...
Comment 6 Richard Smith 2004-02-12 03:07:07 UTC
Mine! Found...
Comment 7 Richard Smith 2004-02-12 03:24:26 UTC
CVS commit by lilachaze: 

.arg() won't work for %10 and %11... Fix bug 74985
CCMAIL: 74985@bugs.kde.org


  M +4 -2      kopeteemailwindow.cpp   1.34


--- kdenetwork/kopete/kopete/chatwindow/kopeteemailwindow.cpp  #1.33:1.34
@@ -501,5 +501,6 @@ void KopeteEmailWindow::writeMessage( Ko
         QString dir = ( QApplication::reverseLayout() ? QString::fromLatin1("rtl") : QString::fromLatin1("ltr") );
         d->htmlPart->begin();
-        d->htmlPart->write( QString::fromLatin1( "<html><head><style>body{font-family:%1;font-size:%2pt;color:%3}td{font-family:%4;font-size:%5pt;color:%6}</style></head><body style=\"background-repeat:no-repeat;background-attachment:fixed\" bgcolor=\"%7\" vlink=\"%8\" link=\"%9\" %10>%11</body></html>" )
+        //FIXME: this should use multi-argument version of .arg!
+        d->htmlPart->write( QString::fromLatin1( "<html><head><style>body {font-family:%1; font-size:%2pt; color:%3} td {font-family:%4; font-size:%5pt; color:%6}</style></head>" )
                 .arg( KopetePrefs::prefs()->fontFace().family() )
                 .arg( KopetePrefs::prefs()->fontFace().pointSize() )
@@ -507,5 +508,6 @@ void KopeteEmailWindow::writeMessage( Ko
                 .arg( KopetePrefs::prefs()->fontFace().family() )
                 .arg( KopetePrefs::prefs()->fontFace().pointSize() )
-                .arg( KopetePrefs::prefs()->textColor().name() )
+                .arg( KopetePrefs::prefs()->textColor().name() ) );
+        d->htmlPart->write( QString::fromLatin1( "<body style=\"background-repeat:no-repeat; background-attachment:fixed\" bgcolor=\"%1\" vlink=\"%2\" link=\"%3\" %4>%5</body></html>" )
                 .arg( KopetePrefs::prefs()->bgColor().name() )
                 .arg( KopetePrefs::prefs()->linkColor().name() )


Comment 8 Richard Smith 2004-02-12 03:24:53 UTC
CVS commit by lilachaze: 

.arg() won't work for %10 and %11... Fix bug 74985 [BACKPORT]
CCMAIL: 74985-done@bugs.kde.org


  M +4 -2      kopeteemailwindow.cpp   1.30.2.1


--- kdenetwork/kopete/kopete/chatwindow/kopeteemailwindow.cpp  #1.30:1.30.2.1
@@ -501,5 +501,6 @@ void KopeteEmailWindow::writeMessage( Ko
         QString dir = ( QApplication::reverseLayout() ? QString::fromLatin1("rtl") : QString::fromLatin1("ltr") );
         d->htmlPart->begin();
-        d->htmlPart->write( QString::fromLatin1( "<html><head><style>body{font-family:%1;font-size:%2pt;color:%3}td{font-family:%4;font-size:%5pt;color:%6}</style></head><body style=\"background-repeat:no-repeat;background-attachment:fixed\" bgcolor=\"%7\" vlink=\"%8\" link=\"%9\" %10>%11</body></html>" )
+        //FIXME: this should use multi-argument version of .arg!
+        d->htmlPart->write( QString::fromLatin1( "<html><head><style>body {font-family:%1; font-size:%2pt; color:%3} td {font-family:%4; font-size:%5pt; color:%6}</style></head>" )
                 .arg( KopetePrefs::prefs()->fontFace().family() )
                 .arg( KopetePrefs::prefs()->fontFace().pointSize() )
@@ -507,5 +508,6 @@ void KopeteEmailWindow::writeMessage( Ko
                 .arg( KopetePrefs::prefs()->fontFace().family() )
                 .arg( KopetePrefs::prefs()->fontFace().pointSize() )
-                .arg( KopetePrefs::prefs()->textColor().name() )
+                .arg( KopetePrefs::prefs()->textColor().name() ) );
+        d->htmlPart->write( QString::fromLatin1( "<body style=\"background-repeat:no-repeat; background-attachment:fixed\" bgcolor=\"%1\" vlink=\"%2\" link=\"%3\" %4>%5</body></html>" )
                 .arg( KopetePrefs::prefs()->bgColor().name() )
                 .arg( KopetePrefs::prefs()->linkColor().name() )