Use callbacks for toggle btn state and refresh ui
* src/application-events.cpp (ApplicationEvents::Invoke): Invalidate UI when a new Item is loaded. * src/gpgoladdin.cpp (GpgolRibbonExtender::Invoke): Store RibbonUI instances. Forward calls for new ID's. (GpgolRibbonExtender::GetCustomUI): Add callbacks. (GpgolRibbonExtender::GetIDsOfNames): Add CB ID's- (gpgoladdin_invalidate_ui): Invalidate UI. Invalidate causes all callback to be triggered again in their correct contexts. * src/gpgoladdin.h: Add prototype for gpgoladdin_invalidate_ui. * src/ribbon-callbacks.cpp (mark_mime_action): Work on base message. (get_crypt_pressed): Callback for toggle buttons. * src/ribbon-callbacks.h: Add ids and prototypes
This effectively is the first step to have a customised Ribbon UI
for a mail context. Also fixes toggle button behavior in mime send
mode and:
- GnuPG-Bug-Id: T2141