summaryrefslogtreecommitdiffstats
path: root/src/windows/leash
diff options
context:
space:
mode:
authorKevin Wasserman <kevin.wasserman@painless-security.com>2012-06-28 18:16:21 -0400
committerBen Kaduk <kaduk@mit.edu>2012-08-27 11:48:13 -0400
commit3b976d4c094f0d0589468fda5f4debbb50345f20 (patch)
tree87abc00f88ab7d0a8d9b6dca5f6ae5f722267a8d /src/windows/leash
parentb9e412c29acc4469b50e86a070d3532751e66b61 (diff)
downloadkrb5-3b976d4c094f0d0589468fda5f4debbb50345f20.tar.gz
krb5-3b976d4c094f0d0589468fda5f4debbb50345f20.tar.xz
krb5-3b976d4c094f0d0589468fda5f4debbb50345f20.zip
KfW GUI -- clean up 'About' dialog
By default, hide the debug list of loaded modules; change LeashView.cpp and recompile to get the list. Signed-off-by: Kevin Wasserman <kevin.wasserman@painless-security.com> ticket: 7291 (new) queue: kfw target_version: 1.10.4 tags: pullup
Diffstat (limited to 'src/windows/leash')
-rw-r--r--src/windows/leash/LeashAboutBox.cpp43
-rw-r--r--src/windows/leash/LeashAboutBox.h1
-rw-r--r--src/windows/leash/LeashView.cpp2
3 files changed, 37 insertions, 9 deletions
diff --git a/src/windows/leash/LeashAboutBox.cpp b/src/windows/leash/LeashAboutBox.cpp
index 8c6f7f425b..d8e3fde09c 100644
--- a/src/windows/leash/LeashAboutBox.cpp
+++ b/src/windows/leash/LeashAboutBox.cpp
@@ -33,6 +33,7 @@ static char THIS_FILE[] = __FILE__;
CLeashAboutBox::CLeashAboutBox(CWnd* pParent /*=NULL*/)
: CDialog(CLeashAboutBox::IDD, pParent)
+ , m_bListModules(FALSE)
{
m_missingFileError = FALSE;
@@ -244,20 +245,44 @@ BOOL CLeashAboutBox::OnInitDialog()
CDialog::OnInitDialog();
// XXX - we need to add some sensible behavior on error.
+ // We need to get the version info and display it...
SetVersionInfo(IDC_ABOUT_VERSION, IDC_ABOUT_COPYRIGHT);
if (!CLeashApp::m_hToolHelp32 && !CLeashApp::m_hPsapi)
m_missingFileError = TRUE;
- m_radio_LeashDLLs.SetCheck(TRUE);
- OnLeashModules();
-
- // We need to get the version info and display it...
- HighlightFirstItem();
-
- if (!CLeashApp::m_hPsapi)
- GetDlgItem(IDC_PROPERTIES)->EnableWindow(FALSE);
-
+ if (m_bListModules) {
+ m_radio_LeashDLLs.SetCheck(TRUE);
+ OnLeashModules();
+
+ HighlightFirstItem();
+
+ if (!CLeashApp::m_hPsapi)
+ GetDlgItem(IDC_PROPERTIES)->EnableWindow(FALSE);
+ } else {
+ m_radio_LeashDLLs.ShowWindow(SW_HIDE);
+ GetDlgItem(IDC_NOT_LOADED_MODULES)->ShowWindow(SW_HIDE);
+ GetDlgItem(IDC_ALL_MODULES)->ShowWindow(SW_HIDE);
+ GetDlgItem(IDC_PROPERTIES)->ShowWindow(SW_HIDE);
+ GetDlgItem(IDC_STATIC_MODULES_LOADED)->ShowWindow(SW_HIDE);
+ GetDlgItem(IDC_STATIC_NO_OF_MODULES)->ShowWindow(SW_HIDE);
+ m_LB_DLLsLoaded.ShowWindow(SW_HIDE);
+ // shrink window, move 'OK' button
+ const int hideDiff = 175;
+ RECT okRect;
+ CWnd* pOK = GetDlgItem(IDOK);
+ pOK->GetWindowRect(&okRect);
+ ScreenToClient(&okRect);
+ pOK->SetWindowPos(0, okRect.left, okRect.top - hideDiff,
+ 0, 0, SWP_NOZORDER | SWP_NOSIZE);
+ RECT dlgRect;
+ GetWindowRect( &dlgRect );
+
+ SetWindowPos(0,0,0,
+ dlgRect.right-dlgRect.left,
+ dlgRect.bottom-dlgRect.top - hideDiff,
+ SWP_NOZORDER|SWP_NOMOVE);
+ }
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
diff --git a/src/windows/leash/LeashAboutBox.h b/src/windows/leash/LeashAboutBox.h
index 34e1dac313..c6dbfc1772 100644
--- a/src/windows/leash/LeashAboutBox.h
+++ b/src/windows/leash/LeashAboutBox.h
@@ -45,6 +45,7 @@ public:
CButton m_radio_LeashDLLs;
CListBox m_LB_DLLsLoaded;
CString m_fileItem;
+ BOOL m_bListModules;
//}}AFX_DATA
diff --git a/src/windows/leash/LeashView.cpp b/src/windows/leash/LeashView.cpp
index cfa985c6d6..34b6b7d8e7 100644
--- a/src/windows/leash/LeashView.cpp
+++ b/src/windows/leash/LeashView.cpp
@@ -2110,6 +2110,8 @@ LRESULT CLeashView::OnTrayIcon(WPARAM wParam, LPARAM lParam)
VOID CLeashView::OnAppAbout()
{
CLeashAboutBox leashAboutBox;
+ // To debug loaded dlls:
+ // leashAboutBox.m_bListModules = TRUE;
leashAboutBox.DoModal();
}