mirror of
https://github.com/angryip/ipscan.git
synced 2025-10-26 11:18:17 +00:00
Menu instances need to be disposed() in SWT
git-svn-id: https://ipscan.svn.sourceforge.net/svnroot/ipscan/ipscan@15 375186e5-ef17-0410-b0b6-91563547dcda
This commit is contained in:
parent
5602ae0567
commit
0788f78bf6
@ -104,8 +104,10 @@ public class FeederActions {
|
||||
Menu popupMenu = new Menu(Display.getCurrent().getActiveShell(), SWT.POP_UP);
|
||||
Listener menuItemListener = new Listener() {
|
||||
public void handleEvent(Event event) {
|
||||
String address = (String) event.widget.getData();
|
||||
MenuItem menuItem = (MenuItem) event.widget;
|
||||
String address = (String) menuItem.getData();
|
||||
ipText.setText(address);
|
||||
menuItem.getParent().dispose();
|
||||
}
|
||||
};
|
||||
|
||||
@ -135,6 +137,7 @@ public class FeederActions {
|
||||
Event event = new Event();
|
||||
event.widget = popupMenu.getItem(0);
|
||||
menuItemListener.handleEvent(event);
|
||||
popupMenu.dispose();
|
||||
}
|
||||
// otherwise, unable to retrieve any sane local addresses,
|
||||
// leave the field as-is, which probably shows the loopback address already
|
||||
|
||||
Loading…
Reference in New Issue
Block a user