mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-14 17:06:16 +00:00
Merge pull request #7048 from gdicristofaro/hostPersonWeakListeners
Host person weak listeners
This commit is contained in:
commit
ada05ad628
@ -193,6 +193,8 @@ public class HostNode extends DisplayableItemNode {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
private final PropertyChangeListener weakPcl = WeakListeners.propertyChange(hostChangePcl, null);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Get the host name or 'unknown host' if null.
|
* Get the host name or 'unknown host' if null.
|
||||||
@ -251,8 +253,7 @@ public class HostNode extends DisplayableItemNode {
|
|||||||
host == null ? Lookups.fixed(displayName) : Lookups.fixed(host, displayName));
|
host == null ? Lookups.fixed(displayName) : Lookups.fixed(host, displayName));
|
||||||
|
|
||||||
hostId = host == null ? null : host.getHostId();
|
hostId = host == null ? null : host.getHostId();
|
||||||
Case.addEventTypeSubscriber(EnumSet.of(Case.Events.HOSTS_UPDATED),
|
Case.addEventTypeSubscriber(EnumSet.of(Case.Events.HOSTS_UPDATED), weakPcl);
|
||||||
WeakListeners.propertyChange(hostChangePcl, this));
|
|
||||||
super.setName(displayName);
|
super.setName(displayName);
|
||||||
super.setDisplayName(displayName);
|
super.setDisplayName(displayName);
|
||||||
this.setIconBaseWithExtension(ICON_PATH);
|
this.setIconBaseWithExtension(ICON_PATH);
|
||||||
|
@ -177,6 +177,8 @@ public class PersonNode extends DisplayableItemNode {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
private final PropertyChangeListener weakPcl = WeakListeners.propertyChange(personChangePcl, null);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the display name for this person or "Unknown Persons".
|
* Gets the display name for this person or "Unknown Persons".
|
||||||
@ -214,8 +216,7 @@ public class PersonNode extends DisplayableItemNode {
|
|||||||
this.setIconBaseWithExtension(ICON_PATH);
|
this.setIconBaseWithExtension(ICON_PATH);
|
||||||
this.person = person;
|
this.person = person;
|
||||||
this.personId = person == null ? null : person.getPersonId();
|
this.personId = person == null ? null : person.getPersonId();
|
||||||
Case.addEventTypeSubscriber(EnumSet.of(Case.Events.PERSONS_UPDATED),
|
Case.addEventTypeSubscriber(EnumSet.of(Case.Events.PERSONS_UPDATED), weakPcl);
|
||||||
WeakListeners.propertyChange(personChangePcl, this));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
x
Reference in New Issue
Block a user