Changeset 35bc2a90e3dc2e20d94a570dba54231324b4ab72

Show
Ignore:
Timestamp:
01/06/07 23:35:51 (6 years ago)
Author:
Philipp Kern <phil@…>
Parents:
6591100bbd14d818dabb9164b0ffe394e5fbaae9
Children:
930225ef1e1c135c0f5076cf955ef263ab5be48e
git-committer:
Philipp Kern <phil@0x539.de> / 2007-01-06T22:35:51Z+0000
Message:

[project @ Send lines separately in chat]

Original author: Armin Burgmeier <armin@…>
Date: 2005-05-28 14:02:55+00:00

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/chat.cpp

    r623510b r35bc2a9  
    107107        m_ent_chat.set_text(""); 
    108108 
    109         m_signal_chat.emit(message); 
     109        // Send each line separately 
     110        Glib::ustring::size_type prev = 0, pos = 0; 
     111        while( (pos = message.find('\n', pos)) != Glib::ustring::npos) 
     112        { 
     113                m_signal_chat.emit(message.substr(prev, pos - prev) ); 
     114                prev = ++pos; 
     115        } 
     116        m_signal_chat.emit(message.substr(prev) ); 
    110117}