[krbdev.mit.edu #8192] git commit

Tom Yu via RT rt at krbdev.mit.edu
Wed May 13 17:06:12 EDT 2015



Switch to Windows SDK Ribbon from MFC Ribbon

The MFC Ribbon implementation is not very accessible (e.g., to
screen reading software), whereas the windows ribbon provides
essentially the same functionality and good integration with
screen reading software, including the built-in Windows Narrator.

Remove the RT_RIBBON_XML resource from the resource file and
replace it with an inclusion of the generated kfwribbon.rc file.
Also remove the ribbon1.mfcribbon-ms ribbon description from the
res/ directory.  Add the appropriate dependency relation in the
Makefile.

LeashUIApplication implements the IUIUApplication interfaces.  It
appears to be difficult to cleanly tear down the underlying
IUIFramework and ribbon, since the WM_DESTROY event is handled by the
parent MFC window, which will not call IUIFramework::Destroy().
Manually inserting a call to IUIFramework::Destroy() in the shutdown
handling of the MFC classes is difficult, since the WM_DESTROY message
is handled by a different window than where the ribbon is initialized,
and the MFC framework will attempt to access window objects
corresponding to the UI Ribbon resources after they are destroyed,
which raises exceptions.  It seems best to just go without destroying
the IUIFramework, since its lifecycle matches that of the application
and there will be no leaks during the application lifecycle.

LeashUICommandHandler implements the IUICommandHandler interfaces,
passing messages through to the existing MFC handlers, though the
default values for the various checkbox controls must be duplicated.

The (MFC) CMainFrame creates and maintains a handle to the
LeashUIApplication associated with the ribbon it creates, so that
it can query the height of the ribbon and redraw when the
LeashUIApplication signals that the ribbon size has changed.

Record that the added object files depend on kfwribbon.h, so that
the XML markup is compiled sufficiently early in the build.

(cherry picked from commit fa5edf1e72b142f14d36b7eb304f55066c5af2f9)

https://github.com/krb5/krb5/commit/173d79e16765f73bcf0adec8b78d28a6038c305b
Author: Ben Kaduk <kaduk at mit.edu>
Committer: Tom Yu <tlyu at mit.edu>
Commit: 173d79e16765f73bcf0adec8b78d28a6038c305b
Branch: krb5-1.13
 src/windows/leash/Leash.rc                  |   16 +-
 src/windows/leash/LeashUIApplication.cpp    |  291 ++++++++++++++++++++++
 src/windows/leash/LeashUIApplication.h      |   86 +++++++
 src/windows/leash/LeashUICommandHandler.cpp |  262 ++++++++++++++++++++
 src/windows/leash/LeashUICommandHandler.h   |   72 ++++++
 src/windows/leash/MainFrm.cpp               |   39 +++-
 src/windows/leash/MainFrm.h                 |    3 +
 src/windows/leash/Makefile.in               |    6 +-
 src/windows/leash/res/ribbon1.mfcribbon-ms  |  352 ---------------------------
 9 files changed, 758 insertions(+), 369 deletions(-)


More information about the kfwdev mailing list