From: Kevin Wasserman Date: Fri, 20 Jul 2012 15:33:51 +0000 (-0400) Subject: allow multiple Leash options; add -noribbon X-Git-Tag: kfw-4.0-final~118 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=53bc5f7bd93da0ef6bb479ba0ccfa6b8ad540610;p=thirdparty%2Fkrb5.git allow multiple Leash options; add -noribbon Change option parsing to allow more than one option to be given. Use the ribbon UI by default; -noribbon reverts to the old UI. Signed-off-by: Kevin Wasserman (cherry picked from commit d5cafe2f1016e18ac191528a0c24f8dc6fbeb1f2) ticket: 7241 status: resolved --- diff --git a/src/windows/leash/Leash.cpp b/src/windows/leash/Leash.cpp index a4469972ea..0ee617ab57 100644 --- a/src/windows/leash/Leash.cpp +++ b/src/windows/leash/Leash.cpp @@ -68,6 +68,7 @@ HINSTANCE CLeashApp::m_hToolHelp32 = 0; krb5_context CLeashApp::m_krbv5_context = 0; profile_t CLeashApp::m_krbv5_profile = 0; HINSTANCE CLeashApp::m_hKrbLSA = 0; +int CLeashApp::m_useRibbon = TRUE; ///////////////////////////////////////////////////////////////////////////// // CLeashApp @@ -190,10 +191,12 @@ BOOL CLeashApp::InitInstance() // Check for args (switches) LPCTSTR exeFile = __targv[0]; - LPCTSTR optionParam = __targv[1]; + for (int argi = 1; argi < __argc; argi++) { + LPCTSTR optionParam = __targv[argi]; + + if (!optionParam) + continue; - if (optionParam) - { if (*optionParam == '-' || *optionParam == '/') { if (0 == stricmp(optionParam+1, "kinit") || @@ -312,6 +315,10 @@ BOOL CLeashApp::InitInstance() { CreateConsoleEcho(); } + else if (0 == stricmp(optionParam+1, "noribbon")) + { + m_useRibbon = FALSE; + } else { MessageBox(hMsg, diff --git a/src/windows/leash/Leash.h b/src/windows/leash/Leash.h index 43c7da78a5..13b14381a6 100644 --- a/src/windows/leash/Leash.h +++ b/src/windows/leash/Leash.h @@ -119,6 +119,7 @@ public: static krb5_context m_krbv5_context; static profile_t m_krbv5_profile; static HINSTANCE m_hKrbLSA; + static int m_useRibbon; // temporary while ribbon UI in dev CLeashApp(); virtual ~CLeashApp();