From d5cafe2f1016e18ac191528a0c24f8dc6fbeb1f2 Mon Sep 17 00:00:00 2001 From: Kevin Wasserman Date: Fri, 20 Jul 2012 11:33:51 -0400 Subject: 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 ticket: 7241 (new) queue: kfw target_version: 1.10.4 tags: pullup --- src/windows/leash/Leash.cpp | 13 ++++++++++--- src/windows/leash/Leash.h | 1 + 2 files changed, 11 insertions(+), 3 deletions(-) (limited to 'src') 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(); -- cgit