| Summary: | [API] SWT#Settings event is missing | ||
|---|---|---|---|
| Product: | [RT] RAP | Reporter: | Rüdiger Herrmann <ruediger.herrmann> |
| Component: | RWT | Assignee: | Project Inbox <rap-inbox> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | P3 | CC: | rsternberg |
| Version: | unspecified | ||
| Target Milestone: | 1.4 M5 | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
|
Description
Rüdiger Herrmann
Changes are in CVS HEAD. In class Display, there is now a settingsListener field that holds all listeners for the Settings event. However, the event is never actually fired. Is that intentionally? As you mention in the description, currently is not possible to change the theme ( system colors, system font ) within a session. That's why the SWT.Settings event is never fired (implemented as no-op), but the infrastructure (add/remove listener) is there. Once, the switch theme in runtime is supported, we need only to fire the event in the proper place. I was thinking that if the event field exists, it should also work to notify attached listeners using Widget#notifyListeners(). But this would only work if we created an internal typed event. I think we should either provide for this unlikely case or otherwise drop the dead code. SWT.Settings event can be attached only to Display, not to the Widget. It's not possible to trigger it manually. The settingsListeners list is removed from Display, as currently it is useless. |