aboutsummaryrefslogtreecommitdiffstats
path: root/src/net/java/sip/communicator/plugin/desktoputil/SIPCommMenu.java
diff options
context:
space:
mode:
authorDamian Minkov <damencho@jitsi.org>2013-10-21 12:57:41 +0300
committerDamian Minkov <damencho@jitsi.org>2013-10-21 12:57:41 +0300
commita5bdde21048d1192ceb28222add66a56c1c78858 (patch)
tree189937c876b9736ab768df5a5bb983458552659e /src/net/java/sip/communicator/plugin/desktoputil/SIPCommMenu.java
parent472af3210bdeb5f3b23df25209fa7c62520c5f14 (diff)
downloadjitsi-a5bdde21048d1192ceb28222add66a56c1c78858.zip
jitsi-a5bdde21048d1192ceb28222add66a56c1c78858.tar.gz
jitsi-a5bdde21048d1192ceb28222add66a56c1c78858.tar.bz2
Cleanups menu window listeners.
Diffstat (limited to 'src/net/java/sip/communicator/plugin/desktoputil/SIPCommMenu.java')
-rw-r--r--src/net/java/sip/communicator/plugin/desktoputil/SIPCommMenu.java12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/net/java/sip/communicator/plugin/desktoputil/SIPCommMenu.java b/src/net/java/sip/communicator/plugin/desktoputil/SIPCommMenu.java
index 9da0f55..c8891ec 100644
--- a/src/net/java/sip/communicator/plugin/desktoputil/SIPCommMenu.java
+++ b/src/net/java/sip/communicator/plugin/desktoputil/SIPCommMenu.java
@@ -77,7 +77,7 @@ public class SIPCommMenu
@Override
public void componentResized(ComponentEvent evt)
{
- Window parentWindow;
+ final Window parentWindow;
Component parent = SIPCommMenu.this.getParent();
@@ -104,6 +104,16 @@ public class SIPCommMenu
if (popupMenu != null && popupMenu.isVisible())
popupMenu.setVisible(false);
}
+
+ /**
+ * Invoked when a window has been closed.
+ * Remove the listener as we do not need it any more.
+ */
+ @Override
+ public void windowClosed(WindowEvent e)
+ {
+ parentWindow.removeWindowListener(this);
+ }
});
}
});