[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdenonbeta/kopete/libkopete
From: Jason Keirstead <jason () keirstead ! org>
Date: 2003-02-18 6:25:15
[Download RAW message or body]
CVS commit by brunes:
Close the view associated with the event if the event is ignored
M +16 -2 kopeteviewmanager.cpp 1.18
M +12 -0 kopeteviewmanager.h 1.13
--- kdenonbeta/kopete/libkopete/kopeteviewmanager.cpp #1.17:1.18
@@ -120,5 +120,6 @@ void KopeteViewManager::messageAppended(
KopeteEvent *event=new KopeteEvent(msg,manager);
m_eventMap.insert( manager, event );
- connect(event, SIGNAL(applied(KopeteEvent *)), this, \
SLOT(slotEventDeleted(KopeteEvent *))); + \
connect(event, SIGNAL(applied(KopeteEvent *)), this, \
SLOT(slotEventApplied(KopeteEvent *))); + \
connect(event, SIGNAL(done(KopeteEvent *)), this, SLOT(slotEventDeleted(KopeteEvent \
*))); emit newMessageEvent(event);
}
@@ -169,5 +170,5 @@ void KopeteViewManager::launchWindow( Ko
}
-void KopeteViewManager::slotEventDeleted( KopeteEvent *event )
+void KopeteViewManager::slotEventApplied( KopeteEvent *event )
{
for ( EventMap::Iterator it = m_eventMap.begin(); it != m_eventMap.end(); \
++it ) @@ -179,4 +180,17 @@ void KopeteViewManager::slotEventDeleted
readMessages( kmm, false );
break;
+ }
+ }
+}
+
+void KopeteViewManager::slotEventDeleted( KopeteEvent *event )
+{
+ for ( EventMap::Iterator it = m_eventMap.begin(); it != m_eventMap.end(); \
++it ) + {
+ if( it.data() == event )
+ {
+ //If this event is still in the map, then it has not been \
applied. + //Close the view associated with it.
+ view( it.key(), false )->close();
}
}
--- kdenonbeta/kopete/libkopete/kopeteviewmanager.h #1.12:1.13
@@ -221,5 +221,17 @@ class KopeteViewManager : public QObject
void slotChatWindowDestroyed( KopeteChatWindow * );
void slotMessageManagerDestroyed( KopeteMessageManager * );
+
+ /**
+ * An event has been applied. This slot shows the view
+ * associated with the event
+ */
+ void slotEventApplied( KopeteEvent * );
+
+ /**
+ * An event has been deleted. If this view was never shown,
+ * we close the view (the message has been ignored)
+ */
void slotEventDeleted( KopeteEvent * );
+
void slotPrefsChanged();
void slotViewActivated( KopeteView * );
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic