aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYana Stamcheva <yana@jitsi.org>2012-08-22 14:10:33 +0000
committerYana Stamcheva <yana@jitsi.org>2012-08-22 14:10:33 +0000
commita7ee45ad2ebe6d0809b0b1a26f9b446aae636d0d (patch)
tree93770e3cb5771bb2e32407c4e52bbae0fb33897c
parentb9ec3d74bb83c882d916ab7d0c90d4e1a2900821 (diff)
downloadjitsi-a7ee45ad2ebe6d0809b0b1a26f9b446aae636d0d.zip
jitsi-a7ee45ad2ebe6d0809b0b1a26f9b446aae636d0d.tar.gz
jitsi-a7ee45ad2ebe6d0809b0b1a26f9b446aae636d0d.tar.bz2
Removes correctly deleted notifications.
-rw-r--r--src/net/java/sip/communicator/impl/gui/main/contactlist/notifsource/NotificationContactSource.java40
-rw-r--r--src/net/java/sip/communicator/impl/gui/main/contactlist/notifsource/NotificationGroup.java1
2 files changed, 28 insertions, 13 deletions
diff --git a/src/net/java/sip/communicator/impl/gui/main/contactlist/notifsource/NotificationContactSource.java b/src/net/java/sip/communicator/impl/gui/main/contactlist/notifsource/NotificationContactSource.java
index 30c3677..5697fdb 100644
--- a/src/net/java/sip/communicator/impl/gui/main/contactlist/notifsource/NotificationContactSource.java
+++ b/src/net/java/sip/communicator/impl/gui/main/contactlist/notifsource/NotificationContactSource.java
@@ -17,7 +17,6 @@ import org.osgi.framework.*;
import net.java.sip.communicator.impl.gui.*;
import net.java.sip.communicator.impl.gui.main.contactlist.*;
-import net.java.sip.communicator.service.contactlist.*;
import net.java.sip.communicator.service.customcontactactions.*;
import net.java.sip.communicator.service.protocol.*;
import net.java.sip.communicator.service.protocol.OperationSetMessageWaiting.MessageType;
@@ -307,20 +306,35 @@ public class NotificationContactSource
/**
* Performs the action on button click.
*/
- public void actionPerformed(UIContactDetail contactDetail, int x, int y)
+ public void actionPerformed(final UIContactDetail contactDetail,
+ final int x,
+ final int y)
{
- try
+ new Thread()
{
- contactAction.actionPerformed(
- (NotificationMessage) contactDetail.getDescriptor(), x, y);
- }
- catch (OperationFailedException e)
- {
- new ErrorDialog(null,
- GuiActivator.getResources()
- .getI18NString("service.gui.ERROR"),
- e.getMessage());
- }
+ public void run()
+ {
+ try
+ {
+ contactAction.actionPerformed(
+ (NotificationMessage) contactDetail.getDescriptor(),
+ x, y);
+ }
+ catch (final OperationFailedException e)
+ {
+ SwingUtilities.invokeLater(new Runnable()
+ {
+ public void run()
+ {
+ new ErrorDialog(null,
+ GuiActivator.getResources()
+ .getI18NString("service.gui.ERROR"),
+ e.getMessage()).setVisible(true);
+ }
+ });
+ }
+ }
+ }.start();
}
}
diff --git a/src/net/java/sip/communicator/impl/gui/main/contactlist/notifsource/NotificationGroup.java b/src/net/java/sip/communicator/impl/gui/main/contactlist/notifsource/NotificationGroup.java
index 8a3967a..0df6e66 100644
--- a/src/net/java/sip/communicator/impl/gui/main/contactlist/notifsource/NotificationGroup.java
+++ b/src/net/java/sip/communicator/impl/gui/main/contactlist/notifsource/NotificationGroup.java
@@ -225,6 +225,7 @@ public class NotificationGroup
if (toRemove)
{
removeNotificationContact(contacts.get(identifier));
+ contacts.remove(identifier);
}
}