Summary: | Disable sending in chatwindow if connection is lost during the typing of a message | ||
---|---|---|---|
Product: | [Unmaintained] kopete | Reporter: | A T Somers <andre> |
Component: | Main Application | Assignee: | Kopete Developers <kopete-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
A T Somers
2004-02-08 12:55:29 UTC
Ctrl-Z (Undo) should bring it back. Subject: Re: If connection is lost during the typing of a message, the contents of the message gets lost on sending It does not, but even if it would, I think it's not obvious to the user at all... mine! Fixed in CVS. Will backport for KDE 3.2.1 shortly CVS commit by mattr: Backport the fix for bug 74562. Disable the send button if we go offline while typing. CCMAIL: 74562-done@bugs.kde.org M +21 -11 chatview.cpp 1.113.2.2 --- kdenetwork/kopete/kopete/chatwindow/chatview.cpp #1.113.2.1:1.113.2.2 @@ -782,10 +782,18 @@ void ChatView::slotMarkMessageRead() } -void ChatView::slotContactStatusChanged( KopeteContact *contact, const KopeteOnlineStatus & /* newStatus */ , const KopeteOnlineStatus & /* oldstatus */) +void ChatView::slotContactStatusChanged( KopeteContact *contact, const KopeteOnlineStatus &newStatus, const KopeteOnlineStatus & /* oldstatus */) { - if(KopetePrefs::prefs()->showEvents() && contact) + if ( contact && KopetePrefs::prefs()->showEvents() ) { - if( contact->metaContact() ) + if ( contact->account() && contact == contact->account()->myself() ) + { + //Seperate notification for the 'self' contact + if ( newStatus.status() != KopeteOnlineStatus::Connecting ) { + if ( newStatus.status() == KopeteOnlineStatus::Offline ) + mainWindow()->setSendEnabled( false ); + else + mainWindow()->setSendEnabled( true ); + sendInternalMessage( i18n( "%2 has changed their status to %1." ) #if QT_VERSION < 0x030200 @@ -796,4 +804,6 @@ void ChatView::slotContactStatusChanged( ); } + } + } else { @@ -806,5 +816,5 @@ void ChatView::slotContactStatusChanged( ); } - } + if(m_tabBar) CVS commit by lilachaze: Properly fix bug 74562 and other problems with the send button being enabled at the wrong time. Should now only disable the send button if there's nothing to send, or if clicking on the contact in the contact list would refuse to open a window. CCMAIL: 74562@bugs.kde.org M +48 -16 chatview.cpp 1.126 M +15 -1 chatview.h 1.39 M +13 -2 kopetechatwindow.cpp 1.72 M +2 -2 kopetechatwindow.h 1.25 |