summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTom Yu <tlyu@mit.edu>2011-12-12 20:44:44 +0000
committerTom Yu <tlyu@mit.edu>2011-12-12 20:44:44 +0000
commitf686734c526a405cfb181a42ec6c238e360880ff (patch)
tree5a4e6d7e038a4f1728572e3b742cf3aa96e5732f /src
parent51d93978794d2c3cae56d649ad8b6e4493432c10 (diff)
downloadkrb5-f686734c526a405cfb181a42ec6c238e360880ff.tar.gz
krb5-f686734c526a405cfb181a42ec6c238e360880ff.tar.xz
krb5-f686734c526a405cfb181a42ec6c238e360880ff.zip
LeashView.cpp: only specify TVIF_TEXT if there is actually text
Signed-off-by: Kevin Wasserman <kevin.wasserman@painless-security.com> ticket: 7050 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25543 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src')
-rw-r--r--src/windows/leash/LeashView.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/windows/leash/LeashView.cpp b/src/windows/leash/LeashView.cpp
index 14f9fc131..c16feeff1 100644
--- a/src/windows/leash/LeashView.cpp
+++ b/src/windows/leash/LeashView.cpp
@@ -1010,7 +1010,7 @@ VOID CLeashView::OnUpdateDisplay()
m_tvinsert.hParent = NULL;
m_tvinsert.hInsertAfter = TVI_LAST;
- m_tvinsert.item.mask = TVIF_IMAGE | TVIF_SELECTEDIMAGE | TVIF_TEXT;
+ m_tvinsert.item.mask = TVIF_IMAGE | TVIF_SELECTEDIMAGE;
m_tvinsert.item.hItem = NULL;
m_tvinsert.item.state = 0;
m_tvinsert.item.stateMask = 0; //TVIS_EXPANDED;
@@ -1018,6 +1018,7 @@ VOID CLeashView::OnUpdateDisplay()
if (CLeashApp::m_hKrb5DLL && m_listKrb5) {
m_tvinsert.item.pszText = ticketinfo.Krb5.principal;
+ m_tvinsert.item.mask |= TVIF_TEXT;
switch ( iconStatusKrb5 ) {
case ACTIVE_TICKET:
m_tvinsert.item.iSelectedImage = ACTIVE_PARENT_NODE;
@@ -1033,6 +1034,7 @@ VOID CLeashView::OnUpdateDisplay()
#ifndef NO_KRB4
} else if (CLeashApp::m_hKrb4DLL && m_listKrb4) {
m_tvinsert.item.pszText = ticketinfo.Krb4.principal;
+ m_tvinsert.item.mask |= TVIF_TEXT;
switch ( iconStatusKrb4 ) {
case ACTIVE_TICKET:
m_tvinsert.item.iSelectedImage = ACTIVE_PARENT_NODE;
@@ -1047,6 +1049,7 @@ VOID CLeashView::OnUpdateDisplay()
#endif
} else {
m_tvinsert.item.iSelectedImage = NONE_PARENT_NODE;
+ m_tvinsert.item.pszText = NULL;
}
m_tvinsert.item.iImage = m_tvinsert.item.iSelectedImage;
m_tvinsert.item.cChildren = 0;