]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
Send kfw 'obtain ticket' messages to main frame
authorKevin Wasserman <kevin.wasserman@painless-security.com>
Fri, 15 Jun 2012 02:57:59 +0000 (22:57 -0400)
committerBen Kaduk <kaduk@mit.edu>
Fri, 24 Aug 2012 19:54:50 +0000 (15:54 -0400)
Previous versions of kfw would attempt to send 'obtain tickets' messages
directly to the 'view' window by sending to the first child of the main
frame.  But with the ribbon UI, the ribbon toolbar is now the first child,
so that method no longer works.  Instead we now send the message to the
main frame and the main frame forwards to the active view.

Signed-off-by: Kevin Wasserman <kevin.wasserman@painless-security.com>
ticket: 7273 (new)
queue: kfw
target_version: 1.10.4
tags: pullup

src/windows/leash/MainFrm.cpp
src/windows/leashdll/lshfunc.c

index c66486eeb2ec5eb498f7431bccbe6240e59c2bbb..54815868ab786b9ff0b68580114facb32e711ad6 100644 (file)
@@ -418,6 +418,10 @@ LRESULT CMainFrame::WindowProc(UINT message, WPARAM wParam, LPARAM lParam)
             break;
         }
         break;
+    case ID_OBTAIN_TGT_WITH_LPARAM:
+        GetActiveView()->SendMessage(ID_OBTAIN_TGT_WITH_LPARAM, wParam,
+                                     lParam);
+        break;
        }
 
     if ( oldMin != m_isMinimum ) {
index 614bb799eb13b441519f2b10444b02fdcdb4f631..bd12121aa1b3afa4305536e008040e3e1e901354 100644 (file)
@@ -2662,23 +2662,6 @@ Leash_reset_defaults(void)
     Leash_reset_default_preserve_kinit_settings();
 }
 
-static BOOL CALLBACK
-EnumChildProc(HWND hwnd, LPARAM lParam)
-{
-    HWND * h = (HWND *)lParam;
-    *h = hwnd;
-    return FALSE;
-}
-
-
-static HWND
-FindFirstChildWindow(HWND parent)
-{
-    HWND hFirstChild = 0;
-    EnumChildWindows(parent, EnumChildProc, (LPARAM) &hFirstChild);
-    return hFirstChild;
-}
-
 static int
 acquire_tkt_send_msg(krb5_context ctx, const char * title,
                     const char * ccachename,
@@ -2775,7 +2758,6 @@ acquire_tkt_send_msg(krb5_context ctx, const char * title,
     } else {
        HGLOBAL                 hData;
        HWND hLeash = FindWindow("LEASH.0WNDCLASS", NULL);
-       hLeash = FindFirstChildWindow(hLeash);
 
        /* construct a marshalling of data
         *   <title><principal><realm><ccache>