[28869] in CVS-changelog-for-Kerberos-V5

home help back first fref pref prev next nref lref last post

krb5 commit: Switch to Windows SDK Ribbon from MFC Ribbon

daemon@ATHENA.MIT.EDU (Benjamin Kaduk)
Thu Apr 30 13:08:36 2015

Date: Thu, 30 Apr 2015 13:08:25 -0400
From: Benjamin Kaduk <kaduk@mit.edu>
Message-Id: <201504301708.t3UH8PEF020528@drugstore.mit.edu>
To: cvs-krb5@mit.edu
Reply-To: krbdev@mit.edu
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: cvs-krb5-bounces@mit.edu

https://github.com/krb5/krb5/commit/fa5edf1e72b142f14d36b7eb304f55066c5af2f9
commit fa5edf1e72b142f14d36b7eb304f55066c5af2f9
Author: Ben Kaduk <kaduk@mit.edu>
Date:   Fri Apr 10 17:33:40 2015 -0400

    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.

 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(-)

diff --git a/src/windows/leash/Leash.rc b/src/windows/leash/Leash.rc
index 4c3aaf9..d662317 100644
--- a/src/windows/leash/Leash.rc
+++ b/src/windows/leash/Leash.rc
@@ -886,13 +886,6 @@ IDB_HOMESMALL           BITMAP                  "res\\homesmall.bmp"
 IDB_HOMELARGE           BITMAP                  "res\\homelarge.bmp"
 IDB_BITMAP2             BITMAP                  "res\\main.bmp"
 
-/////////////////////////////////////////////////////////////////////////////
-//
-// Ribbon
-//
-
-IDR_RIBBON1             RT_RIBBON_XML           "res\\ribbon1.mfcribbon-ms"
-
 
 /////////////////////////////////////////////////////////////////////////////
 //
@@ -1011,3 +1004,12 @@ LANGUAGE 9, 1
 #endif
 /////////////////////////////////////////////////////////////////////////////
 #endif    // not APSTUDIO_INVOKED
+
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// UIFILE
+//
+
+#include "kfwribbon.rc"
diff --git a/src/windows/leash/LeashUIApplication.cpp b/src/windows/leash/LeashUIApplication.cpp
new file mode 100644
index 0000000..c470169
--- /dev/null
+++ b/src/windows/leash/LeashUIApplication.cpp
@@ -0,0 +1,291 @@
+// -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*-
+// leash/LeashUIApplication.cpp - Implement IUIApplication for leash
+//
+// Copyright (C) 2014 by the Massachusetts Institute of Technology.
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+//
+// * Redistributions of source code must retain the above copyright
+//   notice, this list of conditions and the following disclaimer.
+//
+// * Redistributions in binary form must reproduce the above copyright
+//   notice, this list of conditions and the following disclaimer in
+//   the documentation and/or other materials provided with the
+//   distribution.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+// COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+// INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+// OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// Implementation of the LeashUIApplication class.  In addition
+// to the minimum requirements for the IUIApplication interface,
+// it also saves and loads the ribbon state across application
+// sessions, and initiates a redraw of the parent window when
+// the ribbon size changes.
+
+#include <UIRibbon.h>
+#include <UIRibbonPropertyHelpers.h>
+#include "kfwribbon.h"
+#include "LeashUIApplication.h"
+#include "LeashUICommandHandler.h"
+
+HWND LeashUIApplication::mainwin;
+
+// The input hwnd is the window to which to bind the ribbon, i.e.,
+// the Leash CMainFrame.
+HRESULT
+LeashUIApplication::CreateInstance(IUIApplication **out, HWND hwnd)
+{
+    LeashUIApplication *app = NULL;
+    LeashUICommandHandler *handler;
+    HRESULT ret;
+
+    if (out == NULL)
+        return E_POINTER;
+    *out = NULL;
+
+    app = new LeashUIApplication();
+    ret = LeashUICommandHandler::CreateInstance(&app->commandHandler, hwnd);
+    if (FAILED(ret))
+        goto out;
+    ret = app->InitializeRibbon(hwnd);
+    if (FAILED(ret))
+        goto out;
+    mainwin = hwnd;
+    // Only the Leash-specific handler type has the back-pointer.
+    handler = static_cast<LeashUICommandHandler *>(app->commandHandler);
+    handler->app = app;
+    *out = static_cast<IUIApplication *>(app);
+    app = NULL;
+    ret = S_OK;
+
+out:
+    if (app != NULL)
+        app->Release();
+    return ret;
+}
+
+// Create a ribbon framework and ribbon for the LeashUIApplication.
+// CoInitializeEx() is required to be called before calling any COM
+// functions.  AfxOleInit(), called from CLeashApp::InitInstance(),
+// makes that call, but it is only scoped to the calling thread,
+// and the LeashUIApplication is created from CMainFrame, which is
+// the frame for the MFC document template.  It is unclear if the
+// Leash main thread will be the same thread which runs the frame
+// from the document template, so call CoInitializeEx() ourselves
+// just in case.  It is safe to call multiple times (it will return
+// S_FALSE on subsequent calls).
+HRESULT
+LeashUIApplication::InitializeRibbon(HWND hwnd)
+{
+    HRESULT ret;
+
+    if (hwnd == NULL)
+        return -1;
+    ret = CoInitializeEx(NULL, COINIT_APARTMENTTHREADED);
+    if (FAILED(ret))
+        return ret;
+    ret = CoCreateInstance(CLSID_UIRibbonFramework, NULL,
+                           CLSCTX_INPROC_SERVER,
+                           IID_PPV_ARGS(&ribbonFramework));
+    if (FAILED(ret))
+        return ret;
+    ret = ribbonFramework->Initialize(hwnd, this);
+    if (FAILED(ret))
+        return ret;
+    ret = ribbonFramework->LoadUI(GetModuleHandle(NULL),
+                                  L"KFW_RIBBON_RIBBON");
+    if (FAILED(ret))
+        return ret;
+    return S_OK;
+}
+
+// Import ribbon state (minimization state and Quick Access Toolbar
+// customizations) from a serialized stream stored in the registry.
+// In particular, the serialized state does not include the state
+// of checkboxes and other ribbon controls.
+//
+// This functionality is not very important, since we do not offer
+// much in the way of QAT customization.  Paired with SaveRibbonState().
+HRESULT
+LeashUIApplication::LoadRibbonState(IUIRibbon *ribbon)
+{
+    HRESULT ret;
+    IStream *s;
+
+    s = SHOpenRegStream2(HKEY_CURRENT_USER, "Software\\MIT\\Kerberos5",
+                         "RibbonState", STGM_READ);
+    if (s == NULL)
+        return E_FAIL;
+    ret = ribbon->LoadSettingsFromStream(s);
+    s->Release();
+    return ret;
+}
+
+// Serialize the ribbon state (minimization state and Quick Access Toolbar
+// customizations) to the registry.  Paired with LoadRibbonState().
+HRESULT
+LeashUIApplication::SaveRibbonState()
+{
+    HRESULT ret;
+    IStream *s = NULL;
+    IUIRibbon *ribbon = NULL;
+
+    // No ribbon means no state to save.
+    if (ribbonFramework == NULL)
+        return S_OK;
+    // ViewID of 0 is the ribbon itself.
+    ret = ribbonFramework->GetView(0, IID_PPV_ARGS(&ribbon));
+    if (FAILED(ret))
+        return ret;
+
+    s = SHOpenRegStream2(HKEY_CURRENT_USER, "Software\\MIT\\Kerberos5",
+                         "RibbonState", STGM_WRITE);
+    if (s == NULL) {
+        ret = E_FAIL;
+        goto out;
+    }
+    ret = ribbon->SaveSettingsToStream(s);
+
+out:
+    if (s != NULL)
+        s->Release();
+    if (ribbon != NULL)
+        ribbon->Release();
+    return ret;
+}
+
+UINT
+LeashUIApplication::GetRibbonHeight()
+{
+    return ribbonHeight;
+}
+
+ULONG
+LeashUIApplication::AddRef()
+{
+    return InterlockedIncrement(&refcnt);
+}
+
+ULONG
+LeashUIApplication::Release()
+{
+    LONG tmp;
+
+    tmp = InterlockedDecrement(&refcnt);
+    if (tmp == 0) {
+        if (commandHandler != NULL)
+            commandHandler->Release();
+        if (ribbonFramework != NULL)
+            ribbonFramework->Release();
+        delete this;
+    }
+    return tmp;
+}
+
+HRESULT
+LeashUIApplication::QueryInterface(REFIID iid, void **ppv)
+{
+    if (ppv == NULL)
+        return E_POINTER;
+
+    if (iid == __uuidof(IUnknown)) {
+        *ppv = static_cast<IUnknown*>(this);
+    } else if (iid == __uuidof(IUIApplication)) {
+        *ppv = static_cast<IUIApplication*>(this);
+    } else {
+        *ppv = NULL;
+        return E_NOINTERFACE;
+    }
+
+    AddRef();
+    return S_OK;
+}
+
+// This is called by the ribbon framework on events which change the (ribbon)
+// view, such as creation and resizing.  (There may be other non-ribbon views
+// in the future, but for now, the ribbon is the only one.)  With the hybrid
+// COM/MFC setup used by Leash, the destroy event is not always received,
+// since the main thread is in the MFC half, and that thread gets the
+// WM_DESTROY message from the system; the MFC code does not know that it
+// needs to cleanly destroy the IUIFramework.
+HRESULT
+LeashUIApplication::OnViewChanged(UINT32 viewId, UI_VIEWTYPE typeID,
+                                  IUnknown *view, UI_VIEWVERB verb,
+                                  INT32 uReasonCode)
+{
+    IUIRibbon *ribbon;
+    HRESULT ret;
+
+    // A viewId means "the ribbon".
+    if (viewId != 0 || typeID != UI_VIEWTYPE_RIBBON)
+        return E_NOTIMPL;
+
+    switch(verb) {
+        case UI_VIEWVERB_DESTROY:
+            return SaveRibbonState();
+        case UI_VIEWVERB_CREATE:
+            ret = view->QueryInterface(IID_PPV_ARGS(&ribbon));
+            if (FAILED(ret))
+                return ret;
+            ret = LoadRibbonState(ribbon);
+            ribbon->Release();
+            if (FAILED(ret))
+                return ret;
+            // FALLTHROUGH
+        case UI_VIEWVERB_SIZE:
+            ret = view->QueryInterface(IID_PPV_ARGS(&ribbon));
+            if (FAILED(ret))
+                return ret;
+            ret = ribbon->GetHeight(&ribbonHeight);
+            ribbon->Release();
+            if (FAILED(ret))
+                return ret;
+            // Tell the main frame to recalculate its layout and redraw.
+            SendMessage(mainwin, WM_RIBBON_RESIZE, 0, NULL);
+            return S_OK;
+        case UI_VIEWVERB_ERROR:
+            // FALLTHROUGH
+        default:
+            return E_NOTIMPL;
+    }
+}
+
+// Provide a command handler to which the command with ID commandId will
+// be bound.  All of our commands get the same handler.
+//
+// The typeID argument is just an enum which classifies what type of
+// command this is, grouping types of buttons together, collections,
+// etc.  Since we only have one command handler, it can safely be ignored.
+HRESULT
+LeashUIApplication::OnCreateUICommand(UINT32 commandId, UI_COMMANDTYPE typeID,
+                                      IUICommandHandler **commandHandler)
+{
+    return this->commandHandler->QueryInterface(IID_PPV_ARGS(commandHandler));
+}
+
+// It looks like this is called by the framework when the window with the
+// ribbon is going away, to give the application a chance to free any
+// application-specific resources (not from the framwork) that were bound
+// to a command in OnCreateUICommand.
+//
+// We do not have any such resources, so we do not need to implement this
+// function other than by returning success.
+HRESULT
+LeashUIApplication::OnDestroyUICommand(UINT32 commandId, UI_COMMANDTYPE typeID,
+                                       IUICommandHandler *commandHandler)
+{
+    return S_OK;
+}
diff --git a/src/windows/leash/LeashUIApplication.h b/src/windows/leash/LeashUIApplication.h
new file mode 100644
index 0000000..64f4352
--- /dev/null
+++ b/src/windows/leash/LeashUIApplication.h
@@ -0,0 +1,86 @@
+// -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*-
+// leash/LeashUIApplication.h - UIApplication implementation for Leash
+//
+// Copyright (C) 2014 by the Massachusetts Institute of Technology.
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+//
+// * Redistributions of source code must retain the above copyright
+//   notice, this list of conditions and the following disclaimer.
+//
+// * Redistributions in binary form must reproduce the above copyright
+//   notice, this list of conditions and the following disclaimer in
+//   the documentation and/or other materials provided with the
+//   distribution.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+// COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+// INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+// OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// The class description for the LeashUIApplication class, which
+// implements the UIApplication interfaces.  All applications using
+// the windows framework are required to implement this interface.
+// Leash is an MFC application, but in order to use the ribbon
+// from the windows framework, we must implement this interface so
+// that we have a UIApplication to hang the ribbon off of, even if we
+// do not make use of any other UIApplication features.
+
+#ifndef LEASH_LEASHUIAPPLICATION_H__
+#define LEASH_LEASHUIAPPLICATION_H__
+
+#include <UIRibbon.h>
+
+#define WM_RIBBON_RESIZE (WM_USER + 10)
+
+class LeashUIApplication : public IUIApplication
+{
+public:
+    // The "ribbon state" here is just whether it's minimized, and the
+    // contents of the Quick Access Toolbar.
+    HRESULT LoadRibbonState(IUIRibbon *ribbon);
+    HRESULT SaveRibbonState();
+    // Export how much space the ribbon is taking up.
+    UINT GetRibbonHeight();
+    // Do the real work here, not in the constructor
+    static HRESULT CreateInstance(IUIApplication **out, HWND hwnd);
+
+    // IUnknown virtual methods
+    ULONG STDMETHODCALLTYPE AddRef();
+    ULONG STDMETHODCALLTYPE Release();
+    HRESULT STDMETHODCALLTYPE QueryInterface(REFIID iid, void **ppv);
+
+    // IUIApplication virtual methods
+    HRESULT STDMETHODCALLTYPE OnViewChanged(UINT32 viewId, UI_VIEWTYPE typeID,
+                                            IUnknown *view, UI_VIEWVERB verb,
+                                            INT32 uReasonCode);
+    HRESULT STDMETHODCALLTYPE
+        OnCreateUICommand(UINT32 commandId, UI_COMMANDTYPE typeID,
+                          IUICommandHandler **commandHandler);
+    HRESULT STDMETHODCALLTYPE
+        OnDestroyUICommand(UINT32 commandId, UI_COMMANDTYPE typeID,
+                           IUICommandHandler *commandHandler);
+
+private:
+    LeashUIApplication() : refcnt(1), commandHandler(NULL),
+                           ribbonFramework(NULL) {}
+    HRESULT InitializeRibbon(HWND hwnd);
+    static HWND mainwin;
+    LONG refcnt;
+    UINT ribbonHeight;
+    IUICommandHandler *commandHandler;
+    IUIFramework *ribbonFramework;
+};
+
+#endif // LEASH_LEASHUIAPPLICATION_H__
diff --git a/src/windows/leash/LeashUICommandHandler.cpp b/src/windows/leash/LeashUICommandHandler.cpp
new file mode 100644
index 0000000..828640f
--- /dev/null
+++ b/src/windows/leash/LeashUICommandHandler.cpp
@@ -0,0 +1,262 @@
+// -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*-
+// leash/LeashUICommandHandler.cpp - implements IUICommandHandler interfaces
+//
+// Copyright (C) 2014 by the Massachusetts Institute of Technology.
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+//
+// * Redistributions of source code must retain the above copyright
+//   notice, this list of conditions and the following disclaimer.
+//
+// * Redistributions in binary form must reproduce the above copyright
+//   notice, this list of conditions and the following disclaimer in
+//   the documentation and/or other materials provided with the
+//   distribution.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+// COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+// INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+// OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// This file contains the class implementation of the leash implementation
+// of the UICommandHandler interface.  Its primary responsibility is
+// to accept UI events (i.e., button presses) and perform the
+// corresponding actions to the leash data structures and display
+// presentation.
+
+#include <UIRibbon.h>
+#include <UIRibbonPropertyHelpers.h>
+#include "kfwribbon.h"
+#include "LeashUICommandHandler.h"
+#include "resource.h"
+
+#include <loadfuncs-leash.h>
+
+// Allowing mixed-case realms has both a machine and user-specific knob,
+// and thus needs a function to manage it.
+extern DWORD Leash_get_default_uppercaserealm();
+extern DECL_FUNC_PTR(Leash_get_default_uppercaserealm);
+
+HRESULT
+LeashUICommandHandler::CreateInstance(IUICommandHandler **out, HWND hwnd)
+{
+    LeashUICommandHandler *handler;
+
+    if (out == NULL)
+        return E_POINTER;
+
+    handler = new LeashUICommandHandler();
+    handler->mainwin = hwnd;
+    *out = static_cast<IUICommandHandler *>(handler);
+    return S_OK;
+}
+
+ULONG
+LeashUICommandHandler::AddRef()
+{
+    return InterlockedIncrement(&refcnt);
+}
+
+ULONG
+LeashUICommandHandler::Release()
+{
+    LONG tmp;
+
+    tmp = InterlockedDecrement(&refcnt);
+    if (tmp == 0)
+        delete this;
+    return tmp;
+}
+
+HRESULT
+LeashUICommandHandler::QueryInterface(REFIID iid, void **ppv)
+{
+    if (ppv == NULL)
+        return E_POINTER;
+
+    if (iid == __uuidof(IUnknown)) {
+        *ppv = static_cast<IUnknown*>(this);
+    } else if (iid == __uuidof(IUICommandHandler)) {
+        *ppv = static_cast<IUICommandHandler*>(this);
+    } else {
+        *ppv = NULL;
+        return E_NOINTERFACE;
+    }
+
+    AddRef();
+    return S_OK;
+}
+
+// Called by the framework when a control is activated that may require
+// an action to be taken, such as a button being pressed or a checkbox
+// state flipped.  (It is not called when the user changes tabs on the
+// ribbon.)  Just proxy these commands through to the existing MFC
+// handlers by sendding the appropriate message to the main window.
+// Action only needs to be taken on the EXECUTE verb, so we can
+// ignore the additional properties surrouding the action, which would
+// be relevant for other verbs.
+//
+// The commandIds are taken from the XML ribbon description.
+HRESULT
+LeashUICommandHandler::Execute(UINT32 commandId, UI_EXECUTIONVERB verb,
+                               const PROPERTYKEY *key,
+                               const PROPVARIANT *currentValue,
+                               IUISimplePropertySet *commandExecutionProperties)
+{
+    if (verb != UI_EXECUTIONVERB_EXECUTE)
+        return E_NOTIMPL;
+
+    switch(commandId) {
+        case cmdGetTicketButton:
+            SendMessage(mainwin, WM_COMMAND, MAKEWPARAM(ID_INIT_TICKET, 1), 0);
+            break;
+        case cmdRenewTicketButton:
+            SendMessage(mainwin, WM_COMMAND, MAKEWPARAM(ID_RENEW_TICKET, 1), 0);
+            break;
+        case cmdDestroyTicketButton:
+            SendMessage(mainwin, WM_COMMAND, MAKEWPARAM(ID_DESTROY_TICKET, 1),
+                        0);
+            break;
+        case cmdMakeDefaultButton:
+            SendMessage(mainwin, WM_COMMAND, MAKEWPARAM(ID_MAKE_DEFAULT, 1),
+                        0);
+            break;
+        case cmdChangePasswordButton:
+            SendMessage(mainwin, WM_COMMAND, MAKEWPARAM(ID_CHANGE_PASSWORD, 1),
+                        0);
+            break;
+        case cmdIssuedCheckBox:
+            SendMessage(mainwin, WM_COMMAND, MAKEWPARAM(ID_TIME_ISSUED, 1), 0);
+            break;
+        case cmdRenewUntilCheckBox:
+            SendMessage(mainwin, WM_COMMAND, MAKEWPARAM(ID_RENEWABLE_UNTIL, 1),
+                        0);
+            break;
+        case cmdValidUntilCheckBox:
+            SendMessage(mainwin, WM_COMMAND, MAKEWPARAM(ID_VALID_UNTIL, 1), 0);
+            break;
+        case cmdEncTypeCheckBox:
+            SendMessage(mainwin, WM_COMMAND, MAKEWPARAM(ID_ENCRYPTION_TYPE, 1),
+                        0);
+            break;
+        case cmdFlagsCheckBox:
+            SendMessage(mainwin, WM_COMMAND, MAKEWPARAM(ID_SHOW_TICKET_FLAGS,
+                                                        1), 0);
+            break;
+        case cmdAutoRenewCheckBox:
+            SendMessage(mainwin, WM_COMMAND, MAKEWPARAM(ID_AUTO_RENEW, 1), 0);
+            break;
+        case cmdExpireAlarmCheckBox:
+            SendMessage(mainwin, WM_COMMAND, MAKEWPARAM(ID_LOW_TICKET_ALARM,
+                                                        1), 0);
+            break;
+        case cmdDestroyOnExitCheckBox:
+            SendMessage(mainwin, WM_COMMAND, MAKEWPARAM(ID_KILL_TIX_ONEXIT, 1),
+                        0);
+            break;
+        case cmdMixedCaseCheckBox:
+            SendMessage(mainwin, WM_COMMAND, MAKEWPARAM(ID_UPPERCASE_REALM, 1),
+                        0);
+            break;
+        case cmdHelp:
+            SendMessage(mainwin, WM_COMMAND, MAKEWPARAM(ID_HELP_LEASH32, 1), 0);
+            break;
+        case cmdAbout:
+            // ID_APP_ABOUT (0xe140) is defined in afxres.h, an MFC header
+            SendMessage(mainwin, WM_COMMAND, MAKEWPARAM(0xe140, 1), 0);
+            break;
+        case cmdExit:
+            // Save Ribbon customizations here, since this is the only
+            // path to a clean exit from the application.
+            if (app != NULL)
+                app->SaveRibbonState();
+            // ID_APP_EXIT (0xe141) is defined in afxres.h, an MFC header
+            SendMessage(mainwin, WM_COMMAND, MAKEWPARAM(0xe141, 1), 0);
+            break;
+        default:
+            // Lots of commands we don't need to pass on
+            return S_OK;
+    }
+    return S_OK;
+}
+
+// Looks up a given registry key in this application's Settings space
+// (analogous to CWinApp::GetProfileInt()), converting it to a
+// (boolean) PROPVARIANT which is returned in *out.  Uses the given
+// default value if the registry key cannot be loaded.
+static HRESULT
+RegKeyToProperty(const char *regkey, bool default, PROPVARIANT *out)
+{
+    DWORD bsize = sizeof(DWORD), enabled;
+    LONG code;
+
+    code = RegGetValue(HKEY_CURRENT_USER,
+                       "Software\\MIT\\MIT Kerberos\\Settings",
+                       regkey, RRF_RT_DWORD, NULL, &enabled,
+                       &bsize);
+    if (code == ERROR_FILE_NOT_FOUND) {
+        code = ERROR_SUCCESS;
+        enabled = default ? 1 : 0;
+    }
+    if (FAILED(code) || bsize != sizeof(enabled))
+        return E_FAIL;
+    return UIInitPropertyFromBoolean(UI_PKEY_BooleanValue, enabled, out);
+}
+
+// Called by the framework when the value of a property needs to be
+// re-evaluated, e.g., if it has been explicitly invalidated, or at
+// program startup.  This is the way to specify the initial/default
+// state for ribbon elements which have state, such as checkboxes.
+// The registry values which are modified by the MFC checkbox
+// action handlers can be read directly from here in order to present
+// a consistent visual interface.  The MFC handlers only write to the
+// registry when a value is changed, though, so we must duplicate
+// the default values which are hardcoded in CLeashView::sm_viewColumns[]
+// and elsewhere in LeashView.cpp.
+HRESULT
+LeashUICommandHandler::UpdateProperty(UINT32 commandId, REFPROPERTYKEY key,
+                                      const PROPVARIANT *currentValue,
+                                      PROPVARIANT *newValue)
+{
+    if (key != UI_PKEY_BooleanValue)
+        return E_NOTIMPL;
+
+    // These default values duplicate those hardcoded in
+    // CLeashView::sm_viewColumns[] and elsewhere in LeashView.cpp.
+    switch(commandId) {
+        case cmdIssuedCheckBox:
+            return RegKeyToProperty("Issued", false, newValue);
+        case cmdRenewUntilCheckBox:
+            return RegKeyToProperty("Renewable Until", false, newValue);
+        case cmdValidUntilCheckBox:
+            return RegKeyToProperty("Valid Until", true, newValue);
+        case cmdEncTypeCheckBox:
+            return RegKeyToProperty("Encryption Type", false, newValue);
+        case cmdFlagsCheckBox:
+            return RegKeyToProperty("Flags", false, newValue);
+        case cmdAutoRenewCheckBox:
+            return RegKeyToProperty("AutoRenewTickets", true, newValue);
+        case cmdExpireAlarmCheckBox:
+            return RegKeyToProperty("LowTicketAlarm", true, newValue);
+        case cmdDestroyOnExitCheckBox:
+            return RegKeyToProperty("DestroyTicketsOnExit", false, newValue);
+        case cmdMixedCaseCheckBox:
+            return UIInitPropertyFromBoolean(UI_PKEY_BooleanValue,
+                pLeash_get_default_uppercaserealm(), newValue);
+        default:
+            return E_NOTIMPL;
+    }
+
+    return E_NOTIMPL;
+}
diff --git a/src/windows/leash/LeashUICommandHandler.h b/src/windows/leash/LeashUICommandHandler.h
new file mode 100644
index 0000000..4991c91
--- /dev/null
+++ b/src/windows/leash/LeashUICommandHandler.h
@@ -0,0 +1,72 @@
+// -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*-
+// leash/LeashUICommandHandler.h - implements IUICommandHandler interfaces
+//
+// Copyright (C) 2014 by the Massachusetts Institute of Technology.
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+//
+// * Redistributions of source code must retain the above copyright
+//   notice, this list of conditions and the following disclaimer.
+//
+// * Redistributions in binary form must reproduce the above copyright
+//   notice, this list of conditions and the following disclaimer in
+//   the documentation and/or other materials provided with the
+//   distribution.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+// FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+// COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
+// INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+// (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+// HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+// OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// This file contains the class definition for the leash implementation
+// of the UICommandHandler interface.  Its primary responsibility is
+// to accept UI events (i.e., button presses) and perform the
+// corresponding actions to the leash data structures and display
+// presentation.  It also supplies values for the state of various
+// interface elements when the framework needs an authoritative value.
+
+#ifndef WINDOWS_LEASHUICOMMANDHANDLER_H__
+#define WINDOWS_LEASHUICOMMANDHANDLER_H__
+
+#include <UIRibbon.h>
+#include "LeashUIApplication.h"
+
+class LeashUICommandHandler : public IUICommandHandler
+{
+public:
+    LeashUIApplication *app;
+    // Actual work for creation is done here, not the constructor.
+    static HRESULT CreateInstance(IUICommandHandler **out, HWND hwnd);
+
+    // IUnknown virtual methods
+    ULONG STDMETHODCALLTYPE AddRef();
+    ULONG STDMETHODCALLTYPE Release();
+    HRESULT STDMETHODCALLTYPE QueryInterface(REFIID iid, void **ppv);
+
+    // IUICommandHandler virtual methods
+    HRESULT STDMETHODCALLTYPE Execute(UINT32 commandId, UI_EXECUTIONVERB verb,
+                    const PROPERTYKEY *key, const PROPVARIANT *currentValue,
+                    IUISimplePropertySet *commandExecutionProperties);
+    HRESULT STDMETHODCALLTYPE UpdateProperty(UINT32 commandId,
+                                             REFPROPERTYKEY key,
+                                             const PROPVARIANT *currentValue,
+                                             PROPVARIANT *newValue);
+
+private:
+    LeashUICommandHandler() : refcnt(1) {}
+    HWND mainwin; // Something to which to send messages.
+    LONG refcnt;
+};
+
+#endif // WINDOWS_LEASHUICOMMANDHANDLER_H__
diff --git a/src/windows/leash/MainFrm.cpp b/src/windows/leash/MainFrm.cpp
index aa17000..886efe6 100644
--- a/src/windows/leash/MainFrm.cpp
+++ b/src/windows/leash/MainFrm.cpp
@@ -14,6 +14,7 @@
 
 
 #include "stdafx.h"
+#include "LeashUIApplication.h"
 #include "Leash.h"
 #include "MainFrm.h"
 #include "lglobals.h"
@@ -57,6 +58,7 @@ BEGIN_MESSAGE_MAP(CMainFrame, CLeashFrame)
 	ON_COMMAND(ID_HELP_LEASH_, CMainFrame::OnHelpFinder)
 	ON_COMMAND(ID_HELP, CMainFrame::OnHelp)
 	ON_COMMAND(ID_CONTEXT_HELP, CMainFrame::OnContextHelp)
+	ON_MESSAGE_VOID(WM_RIBBON_RESIZE, OnRibbonResize)
 END_MESSAGE_MAP()
 
 static UINT indicators[] =
@@ -81,6 +83,7 @@ CMainFrame::CMainFrame()
 	m_isMinimum = FALSE;
     m_isBeingResized = FALSE;
     m_bOwnerCreated = FALSE;
+    pApplication = NULL;
 }
 
 CMainFrame::~CMainFrame()
@@ -90,6 +93,8 @@ CMainFrame::~CMainFrame()
 int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
 {
     if (CLeashApp::m_useRibbon) {
+        HWND hwnd;
+        HRESULT hr;
         // Fixup tooltips (cribbed from http://social.msdn.microsoft.com/Forums/en/vcmfcatl/thread/5c5b4879-d278-4d79-8894-99e7f9b322df)
 
         CMFCToolTipInfo ttParams;
@@ -108,15 +113,17 @@ int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
         CDockingManager::SetDockingMode(DT_SMART);
         m_wndRibbonBar.SetWindows7Look(TRUE);
 
-        // Create the ribbon bar
-        if (!m_wndRibbonBar.Create(this))
-            return -1;   // Failed to create ribbon bar
-
-        m_wndRibbonBar.LoadFromResource(IDR_RIBBON1);
-
-        m_wndApplicationButton.SetVisible(FALSE);
-        // Uncomment the next line to hide the application button
-        //m_wndRibbonBar.SetApplicationButton(&m_wndApplicationButton, CSize());
+        // Initialize the ribbon, keeping a handle to the IUIApplication
+        // so that we can query the ribbon height and save space for it
+        // when calculating our layout.
+        hwnd = this->GetSafeHwnd();
+        if (hwnd == NULL)
+            printf("Failed to get HWND\n");
+        hr = LeashUIApplication::CreateInstance(&pApplication, hwnd);
+        if (FAILED(hr)) {
+            MessageBox("LeashUIApplication::CreateInstance!", "Error", MB_OK);
+            return -1;
+        }
     }
 
 	if (CLeashFrame::OnCreate(lpCreateStruct) == -1)
@@ -333,6 +340,13 @@ void CMainFrame::RecalcLayout(BOOL bNotify)
 { // MINSIZE - Insurance that we have a minimum Leash window size
 	int width = MIN_RIGHT - MIN_LEFT;
 	int height = MIN_BOTTOM - MIN_TOP;
+        LeashUIApplication *leashUI;
+        RECT border;
+        border.left = border.right = border.bottom = 0;
+        // Leave room for the ribbon.
+        leashUI = static_cast<LeashUIApplication*>(pApplication);
+        border.top = (leashUI != NULL) ? leashUI->GetRibbonHeight() : 0;
+        NegotiateBorderSpace(CFrameWnd::borderSet, &border);
 
     BOOL change = FALSE;
 	WINDOWPLACEMENT wndpl;
@@ -429,6 +443,13 @@ LRESULT CMainFrame::WindowProc(UINT message, WPARAM wParam, LPARAM lParam)
     return CLeashFrame::WindowProc(message, wParam, lParam);
 }
 
+// Signalled by LeashUIApplication::OnViewChanged when the ribbon height
+// changes.
+void CMainFrame::OnRibbonResize()
+{
+    RecalcLayout(TRUE);
+}
+
 /*
 void CMainFrame::OnHelp()
 {
diff --git a/src/windows/leash/MainFrm.h b/src/windows/leash/MainFrm.h
index e3d356e..37485ca 100644
--- a/src/windows/leash/MainFrm.h
+++ b/src/windows/leash/MainFrm.h
@@ -21,6 +21,7 @@
 #endif // _MSC_VER >= 1000
 
 #include "LeashFrame.h"
+#include "LeashUIApplication.h"
 
 class CMainFrame : public CLeashFrame
 {
@@ -31,6 +32,7 @@ private:
 	int m_winRectBottom;
     BOOL m_bOwnerCreated;
     CDialog m_MainFrameOwner;
+    IUIApplication *pApplication;
 
 protected: // create from serialization only
     // Ribbon bar for the application
@@ -86,6 +88,7 @@ protected:
 	afx_msg void OnResetWindowSize();
 	afx_msg void OnSizing(UINT fwSide, LPRECT pRect);
 	afx_msg void OnGetMinMaxInfo(MINMAXINFO FAR* lpMMI);
+	afx_msg void OnRibbonResize();
     afx_msg void OnClose(void);
     //afx_msg void OnContextHelp();
     //}}AFX_MSG
diff --git a/src/windows/leash/Makefile.in b/src/windows/leash/Makefile.in
index f3d174f..f3337f4 100644
--- a/src/windows/leash/Makefile.in
+++ b/src/windows/leash/Makefile.in
@@ -57,6 +57,8 @@ OBJS=   \
 	$(OUTPRE)LeashFrame.obj \
 	$(OUTPRE)LeashMessageBox.obj \
 	$(OUTPRE)LeashProperties.obj \
+	$(OUTPRE)LeashUIApplication.obj \
+	$(OUTPRE)LeashUICommandHandler.obj \
 	$(OUTPRE)LeashView.obj \
 	$(OUTPRE)lglobals.obj \
 	$(OUTPRE)MainFrm.obj \
@@ -108,7 +110,9 @@ $(OUTPRE)$(EXE_NAME).exe: $(OBJS) $(XOBJS) $(LIBS)
 kfwribbon.bml kfwribbon.h kfwribbon.rc: kfwribbon.xml
 	uicc.exe kfwribbon.xml kfwribbon.bml /res:kfwribbon.rc /header:kfwribbon.h /name:KFW_RIBBON
 
-$(RESFILE): Leash.rc res/Leash.rc2 ver.rc ../version.rc ../kerberos.ver
+$(RESFILE): Leash.rc res/Leash.rc2 kfwribbon.rc ver.rc ../version.rc ../kerberos.ver
+
+$(OUTPRE)LeashUIApplication.obj $(OUTPRE)LeashUICommandHandler.obj: kfwribbon.h
 
 clean::
 	if exist $(OUTPRE)*.exe del $(OUTPRE)*.exe
diff --git a/src/windows/leash/res/ribbon1.mfcribbon-ms b/src/windows/leash/res/ribbon1.mfcribbon-ms
deleted file mode 100644
index e8b1bd9..0000000
--- a/src/windows/leash/res/ribbon1.mfcribbon-ms
+++ /dev/null
@@ -1,352 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
-<AFX_RIBBON>
-  <HEADER>
-    <VERSION>1</VERSION>
-  </HEADER>
-  <RIBBON_BAR>
-    <ELEMENT_NAME>RibbonBar</ELEMENT_NAME>
-    <ENABLE_TOOLTIPS>TRUE</ENABLE_TOOLTIPS>
-    <ENABLE_TOOLTIPS_DESCRIPTION>TRUE</ENABLE_TOOLTIPS_DESCRIPTION>
-    <ENABLE_KEYS>TRUE</ENABLE_KEYS>
-    <ENABLE_PRINTPREVIEW>TRUE</ENABLE_PRINTPREVIEW>
-    <ENABLE_DRAWUSINGFONT>FALSE</ENABLE_DRAWUSINGFONT>
-    <BUTTON_MAIN>
-      <ELEMENT_NAME>Button_Main</ELEMENT_NAME>
-      <ID>
-        <NAME>ID_BUTTON2</NAME>
-        <VALUE>32813</VALUE>
-      </ID>
-      <KEYS>f</KEYS>
-      <PALETTE_TOP>FALSE</PALETTE_TOP>
-      <ALWAYS_LARGE>FALSE</ALWAYS_LARGE>
-      <INDEX_SMALL>-1</INDEX_SMALL>
-      <INDEX_LARGE>-1</INDEX_LARGE>
-      <DEFAULT_COMMAND>TRUE</DEFAULT_COMMAND>
-      <IMAGE>
-        <ID>
-          <NAME>IDB_BITMAP2</NAME>
-          <VALUE>268</VALUE>
-        </ID>
-      </IMAGE>
-    </BUTTON_MAIN>
-    <CATEGORY_MAIN>
-      <ELEMENT_NAME>Category_Main</ELEMENT_NAME>
-      <NAME>Category1</NAME>
-      <ELEMENTS>
-        <ELEMENT>
-          <ELEMENT_NAME>Button</ELEMENT_NAME>
-          <ID>
-            <NAME>ID_HELP_KERBEROS_</NAME>
-            <VALUE>32784</VALUE>
-          </ID>
-          <TEXT>&amp;Help</TEXT>
-          <KEYS>h</KEYS>
-          <PALETTE_TOP>FALSE</PALETTE_TOP>
-          <ALWAYS_LARGE>FALSE</ALWAYS_LARGE>
-          <INDEX_SMALL>-1</INDEX_SMALL>
-          <INDEX_LARGE>-1</INDEX_LARGE>
-          <DEFAULT_COMMAND>TRUE</DEFAULT_COMMAND>
-          <ALWAYS_DESCRIPTION>FALSE</ALWAYS_DESCRIPTION>
-        </ELEMENT>
-        <ELEMENT>
-          <ELEMENT_NAME>Button</ELEMENT_NAME>
-          <ID>
-            <NAME>ID_APP_ABOUT</NAME>
-            <VALUE>57664</VALUE>
-          </ID>
-          <TEXT>&amp;About</TEXT>
-          <KEYS>a</KEYS>
-          <PALETTE_TOP>FALSE</PALETTE_TOP>
-          <ALWAYS_LARGE>FALSE</ALWAYS_LARGE>
-          <INDEX_SMALL>-1</INDEX_SMALL>
-          <INDEX_LARGE>-1</INDEX_LARGE>
-          <DEFAULT_COMMAND>TRUE</DEFAULT_COMMAND>
-          <ALWAYS_DESCRIPTION>FALSE</ALWAYS_DESCRIPTION>
-        </ELEMENT>
-        <ELEMENT>
-          <ELEMENT_NAME>Button</ELEMENT_NAME>
-          <ID>
-            <NAME>ID_APP_EXIT</NAME>
-            <VALUE>57665</VALUE>
-          </ID>
-          <TEXT>E&amp;xit</TEXT>
-          <KEYS>x</KEYS>
-          <PALETTE_TOP>FALSE</PALETTE_TOP>
-          <ALWAYS_LARGE>FALSE</ALWAYS_LARGE>
-          <INDEX_SMALL>-1</INDEX_SMALL>
-          <INDEX_LARGE>-1</INDEX_LARGE>
-          <DEFAULT_COMMAND>TRUE</DEFAULT_COMMAND>
-          <ALWAYS_DESCRIPTION>FALSE</ALWAYS_DESCRIPTION>
-        </ELEMENT>
-      </ELEMENTS>
-      <RECENT_FILE_LIST>
-        <ENABLE>FALSE</ENABLE>
-        <LABEL>Recent Documents</LABEL>
-        <WIDTH>300</WIDTH>
-      </RECENT_FILE_LIST>
-    </CATEGORY_MAIN>
-    <CATEGORIES>
-      <CATEGORY>
-        <ELEMENT_NAME>Category</ELEMENT_NAME>
-        <NAME>Home</NAME>
-        <KEYS>h</KEYS>
-        <IMAGE_SMALL>
-          <ID>
-            <NAME>IDB_HOMESMALL</NAME>
-            <VALUE>266</VALUE>
-          </ID>
-        </IMAGE_SMALL>
-        <IMAGE_LARGE>
-          <ID>
-            <NAME>IDB_HOMELARGE</NAME>
-            <VALUE>267</VALUE>
-          </ID>
-        </IMAGE_LARGE>
-        <PANELS>
-          <PANEL>
-            <ELEMENT_NAME>Panel</ELEMENT_NAME>
-            <INDEX>-1</INDEX>
-            <JUSTIFY_COLUMNS>FALSE</JUSTIFY_COLUMNS>
-            <CENTER_COLUMN_VERT>FALSE</CENTER_COLUMN_VERT>
-            <ELEMENTS>
-              <ELEMENT>
-                <ELEMENT_NAME>Button</ELEMENT_NAME>
-                <ID>
-                  <NAME>ID_INIT_TICKET</NAME>
-                  <VALUE>32807</VALUE>
-                </ID>
-                <TEXT>Get &amp;Ticket</TEXT>
-                <KEYS>t</KEYS>
-                <PALETTE_TOP>FALSE</PALETTE_TOP>
-                <ALWAYS_LARGE>TRUE</ALWAYS_LARGE>
-                <INDEX_SMALL>2</INDEX_SMALL>
-                <INDEX_LARGE>2</INDEX_LARGE>
-                <DEFAULT_COMMAND>TRUE</DEFAULT_COMMAND>
-                <ALWAYS_DESCRIPTION>FALSE</ALWAYS_DESCRIPTION>
-              </ELEMENT>
-              <ELEMENT>
-                <ELEMENT_NAME>Button</ELEMENT_NAME>
-                <ID>
-                  <NAME>ID_RENEW_TICKET</NAME>
-                  <VALUE>32776</VALUE>
-                </ID>
-                <TEXT>&amp;Renew Ticket</TEXT>
-                <KEYS>r</KEYS>
-                <PALETTE_TOP>FALSE</PALETTE_TOP>
-                <ALWAYS_LARGE>TRUE</ALWAYS_LARGE>
-                <INDEX_SMALL>3</INDEX_SMALL>
-                <INDEX_LARGE>3</INDEX_LARGE>
-                <DEFAULT_COMMAND>TRUE</DEFAULT_COMMAND>
-                <ALWAYS_DESCRIPTION>FALSE</ALWAYS_DESCRIPTION>
-              </ELEMENT>
-              <ELEMENT>
-                <ELEMENT_NAME>Button</ELEMENT_NAME>
-                <ID>
-                  <NAME>ID_DESTROY_TICKET</NAME>
-                  <VALUE>32777</VALUE>
-                </ID>
-                <TEXT>&amp;Destroy Ticket</TEXT>
-                <KEYS>d</KEYS>
-                <PALETTE_TOP>FALSE</PALETTE_TOP>
-                <ALWAYS_LARGE>TRUE</ALWAYS_LARGE>
-                <INDEX_SMALL>1</INDEX_SMALL>
-                <INDEX_LARGE>8</INDEX_LARGE>
-                <DEFAULT_COMMAND>TRUE</DEFAULT_COMMAND>
-                <ALWAYS_DESCRIPTION>FALSE</ALWAYS_DESCRIPTION>
-              </ELEMENT>
-              <ELEMENT>
-                <ELEMENT_NAME>Button</ELEMENT_NAME>
-                <ID>
-                  <NAME>ID_MAKE_DEFAULT</NAME>
-                  <VALUE>32835</VALUE>
-                </ID>
-                <TEXT>&amp;Make Default</TEXT>
-                <KEYS>m</KEYS>
-                <PALETTE_TOP>FALSE</PALETTE_TOP>
-                <ALWAYS_LARGE>TRUE</ALWAYS_LARGE>
-                <INDEX_SMALL>6</INDEX_SMALL>
-                <INDEX_LARGE>6</INDEX_LARGE>
-                <DEFAULT_COMMAND>TRUE</DEFAULT_COMMAND>
-                <ALWAYS_DESCRIPTION>FALSE</ALWAYS_DESCRIPTION>
-              </ELEMENT>
-            </ELEMENTS>
-          </PANEL>
-          <PANEL>
-            <ELEMENT_NAME>Panel</ELEMENT_NAME>
-            <INDEX>-1</INDEX>
-            <JUSTIFY_COLUMNS>FALSE</JUSTIFY_COLUMNS>
-            <CENTER_COLUMN_VERT>FALSE</CENTER_COLUMN_VERT>
-            <ELEMENTS>
-              <ELEMENT>
-                <ELEMENT_NAME>Button</ELEMENT_NAME>
-                <ID>
-                  <NAME>ID_CHANGE_PASSWORD</NAME>
-                  <VALUE>32779</VALUE>
-                </ID>
-                <TEXT>Change &amp;Password</TEXT>
-                <KEYS>p</KEYS>
-                <PALETTE_TOP>FALSE</PALETTE_TOP>
-                <ALWAYS_LARGE>FALSE</ALWAYS_LARGE>
-                <INDEX_SMALL>5</INDEX_SMALL>
-                <INDEX_LARGE>5</INDEX_LARGE>
-                <DEFAULT_COMMAND>TRUE</DEFAULT_COMMAND>
-                <ALWAYS_DESCRIPTION>FALSE</ALWAYS_DESCRIPTION>
-              </ELEMENT>
-            </ELEMENTS>
-          </PANEL>
-        </PANELS>
-      </CATEGORY>
-      <CATEGORY>
-        <ELEMENT_NAME>Category</ELEMENT_NAME>
-        <NAME>Options</NAME>
-        <KEYS>o</KEYS>
-        <PANELS>
-          <PANEL>
-            <ELEMENT_NAME>Panel</ELEMENT_NAME>
-            <NAME>View Options</NAME>
-            <INDEX>-1</INDEX>
-            <JUSTIFY_COLUMNS>FALSE</JUSTIFY_COLUMNS>
-            <CENTER_COLUMN_VERT>FALSE</CENTER_COLUMN_VERT>
-            <ELEMENTS>
-              <ELEMENT>
-                <ELEMENT_NAME>Button_Check</ELEMENT_NAME>
-                <ID>
-                  <NAME>ID_TIME_ISSUED</NAME>
-                  <VALUE>32810</VALUE>
-                </ID>
-                <TEXT>&amp;Issued</TEXT>
-                <KEYS>i</KEYS>
-                <PALETTE_TOP>FALSE</PALETTE_TOP>
-                <ALWAYS_LARGE>FALSE</ALWAYS_LARGE>
-                <INDEX_SMALL>-1</INDEX_SMALL>
-                <INDEX_LARGE>-1</INDEX_LARGE>
-                <DEFAULT_COMMAND>TRUE</DEFAULT_COMMAND>
-              </ELEMENT>
-              <ELEMENT>
-                <ELEMENT_NAME>Button_Check</ELEMENT_NAME>
-                <ID>
-                  <NAME>ID_RENEWABLE_UNTIL</NAME>
-                  <VALUE>32811</VALUE>
-                </ID>
-                <TEXT>&amp;Renewable Until</TEXT>
-                <KEYS>r</KEYS>
-                <PALETTE_TOP>FALSE</PALETTE_TOP>
-                <ALWAYS_LARGE>FALSE</ALWAYS_LARGE>
-                <INDEX_SMALL>-1</INDEX_SMALL>
-                <INDEX_LARGE>-1</INDEX_LARGE>
-                <DEFAULT_COMMAND>TRUE</DEFAULT_COMMAND>
-              </ELEMENT>
-              <ELEMENT>
-                <ELEMENT_NAME>Button_Check</ELEMENT_NAME>
-                <ID>
-                  <NAME>ID_VALID_UNTIL</NAME>
-                  <VALUE>32828</VALUE>
-                </ID>
-                <TEXT>&amp;Valid Until</TEXT>
-                <KEYS>v</KEYS>
-                <PALETTE_TOP>FALSE</PALETTE_TOP>
-                <ALWAYS_LARGE>FALSE</ALWAYS_LARGE>
-                <INDEX_SMALL>-1</INDEX_SMALL>
-                <INDEX_LARGE>-1</INDEX_LARGE>
-                <DEFAULT_COMMAND>TRUE</DEFAULT_COMMAND>
-              </ELEMENT>
-              <ELEMENT>
-                <ELEMENT_NAME>Button_Check</ELEMENT_NAME>
-                <ID>
-                  <NAME>ID_ENCRYPTION_TYPE</NAME>
-                  <VALUE>32826</VALUE>
-                </ID>
-                <TEXT>&amp;Encryption Type</TEXT>
-                <KEYS>e</KEYS>
-                <PALETTE_TOP>FALSE</PALETTE_TOP>
-                <ALWAYS_LARGE>FALSE</ALWAYS_LARGE>
-                <INDEX_SMALL>-1</INDEX_SMALL>
-                <INDEX_LARGE>-1</INDEX_LARGE>
-                <DEFAULT_COMMAND>TRUE</DEFAULT_COMMAND>
-              </ELEMENT>
-              <ELEMENT>
-                <ELEMENT_NAME>Button_Check</ELEMENT_NAME>
-                <ID>
-                  <NAME>ID_SHOW_TICKET_FLAGS</NAME>
-                  <VALUE>32812</VALUE>
-                </ID>
-                <TEXT>&amp;Flags</TEXT>
-                <KEYS>f</KEYS>
-                <PALETTE_TOP>FALSE</PALETTE_TOP>
-                <ALWAYS_LARGE>FALSE</ALWAYS_LARGE>
-                <INDEX_SMALL>-1</INDEX_SMALL>
-                <INDEX_LARGE>-1</INDEX_LARGE>
-                <DEFAULT_COMMAND>TRUE</DEFAULT_COMMAND>
-              </ELEMENT>
-            </ELEMENTS>
-          </PANEL>
-          <PANEL>
-            <ELEMENT_NAME>Panel</ELEMENT_NAME>
-            <NAME>Ticket Options</NAME>
-            <INDEX>-1</INDEX>
-            <JUSTIFY_COLUMNS>FALSE</JUSTIFY_COLUMNS>
-            <CENTER_COLUMN_VERT>FALSE</CENTER_COLUMN_VERT>
-            <ELEMENTS>
-              <ELEMENT>
-                <ELEMENT_NAME>Button_Check</ELEMENT_NAME>
-                <ID>
-                  <NAME>ID_AUTO_RENEW</NAME>
-                  <VALUE>32808</VALUE>
-                </ID>
-                <TEXT>Automatic &amp;Ticket Renewal</TEXT>
-                <KEYS>t</KEYS>
-                <PALETTE_TOP>FALSE</PALETTE_TOP>
-                <ALWAYS_LARGE>FALSE</ALWAYS_LARGE>
-                <INDEX_SMALL>-1</INDEX_SMALL>
-                <INDEX_LARGE>-1</INDEX_LARGE>
-                <DEFAULT_COMMAND>TRUE</DEFAULT_COMMAND>
-              </ELEMENT>
-              <ELEMENT>
-                <ELEMENT_NAME>Button_Check</ELEMENT_NAME>
-                <ID>
-                  <NAME>ID_LOW_TICKET_ALARM</NAME>
-                  <VALUE>32798</VALUE>
-                </ID>
-                <TEXT>Expiration &amp;Alarm</TEXT>
-                <KEYS>a</KEYS>
-                <PALETTE_TOP>FALSE</PALETTE_TOP>
-                <ALWAYS_LARGE>FALSE</ALWAYS_LARGE>
-                <INDEX_SMALL>-1</INDEX_SMALL>
-                <INDEX_LARGE>-1</INDEX_LARGE>
-                <DEFAULT_COMMAND>TRUE</DEFAULT_COMMAND>
-              </ELEMENT>
-              <ELEMENT>
-                <ELEMENT_NAME>Button_Check</ELEMENT_NAME>
-                <ID>
-                  <NAME>ID_KILL_TIX_ONEXIT</NAME>
-                  <VALUE>32785</VALUE>
-                </ID>
-                <TEXT>&amp;Destroy Tickets on Exit</TEXT>
-                <KEYS>d</KEYS>
-                <PALETTE_TOP>FALSE</PALETTE_TOP>
-                <ALWAYS_LARGE>FALSE</ALWAYS_LARGE>
-                <INDEX_SMALL>-1</INDEX_SMALL>
-                <INDEX_LARGE>-1</INDEX_LARGE>
-                <DEFAULT_COMMAND>TRUE</DEFAULT_COMMAND>
-              </ELEMENT>
-              <ELEMENT>
-                <ELEMENT_NAME>Button_Check</ELEMENT_NAME>
-                <ID>
-                  <NAME>ID_UPPERCASE_REALM</NAME>
-                  <VALUE>32787</VALUE>
-                </ID>
-                <TEXT>Allow &amp;Mixed Case Realm Name</TEXT>
-                <KEYS>m</KEYS>
-                <PALETTE_TOP>FALSE</PALETTE_TOP>
-                <ALWAYS_LARGE>FALSE</ALWAYS_LARGE>
-                <INDEX_SMALL>-1</INDEX_SMALL>
-                <INDEX_LARGE>-1</INDEX_LARGE>
-                <DEFAULT_COMMAND>TRUE</DEFAULT_COMMAND>
-              </ELEMENT>
-            </ELEMENTS>
-          </PANEL>
-        </PANELS>
-      </CATEGORY>
-    </CATEGORIES>
-  </RIBBON_BAR>
-</AFX_RIBBON>
_______________________________________________
cvs-krb5 mailing list
cvs-krb5@mit.edu
https://mailman.mit.edu/mailman/listinfo/cvs-krb5

home help back first fref pref prev next nref lref last post