[GME-commit] GMESRC/GME/Search SearchDlg.cpp,1.20,1.21

gme-commit at list.isis.vanderbilt.edu gme-commit at list.isis.vanderbilt.edu
Wed Aug 15 11:09:39 CDT 2007


Update of /project/gme-repository/GMESRC/GME/Search
In directory escher:/tmp/cvs-serv2913

Modified Files:
	SearchDlg.cpp 
Log Message:
If Search is performed with Attribute Name & Value specified, then a 4th column will show the actual values found in attributes (since the search looks for substrings by default)


CVS User: Zoltan Molnar, ISIS (zolmol)

Index: SearchDlg.cpp
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/Search/SearchDlg.cpp,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** SearchDlg.cpp	4 Dec 2006 18:19:23 -0000	1.20
--- SearchDlg.cpp	15 Aug 2007 16:09:37 -0000	1.21
***************
*** 111,114 ****
--- 111,115 ----
  	m_lstResults.InsertColumn(2, "Path", LVCFMT_LEFT, 210, 2);
  	m_lstResults.InsertColumn(3, "Type", LVCFMT_LEFT, 95, 3);
+ 	m_lstResults.InsertColumn(4, "Value", LVCFMT_LEFT, 210, 4);
  
  	specialSearchFCO = NULL;
***************
*** 321,325 ****
  	int count = 0;
  	CString name;
! 	CString path, type;
  
  	if(!m_chkSplSearch) //only want to wipe this out on a regular search
--- 322,327 ----
  	int count = 0;
  	CString name;
! 	CString path, type, valu;
! 	bool attr_value_to_be_shown = !m_edtAttrValue.IsEmpty() && !m_edtAttrName.IsEmpty();
  
  	if(!m_chkSplSearch) //only want to wipe this out on a regular search
***************
*** 344,347 ****
--- 346,350 ----
  		name = "";
  		type = "";
+ 		valu = "";
  		CBstr bstr;
  		COMTHROW( MGACOLL_ITER->get_Name(bstr) );
***************
*** 365,368 ****
--- 368,383 ----
  		m_lstResults.SetItemText(count, 1, path);
  		m_lstResults.SetItemText(count, 2, type);
+ 		if( attr_value_to_be_shown)
+ 		{
+ 			try {
+ 				CComBSTR bstr;
+ 				COMTHROW( MGACOLL_ITER->get_StrAttrByName( CComBSTR( m_edtAttrName), &bstr));
+ 				valu += bstr;
+ 				m_lstResults.SetItemText(count, 3, valu);
+ 			}
+ 			catch(hresult_exception&) { // prepare for the unexpected
+ 				m_lstResults.SetItemText(count, 3, "<<Not found>>");
+ 			}
+ 		}
  		
  		count++;



More information about the GME-commit mailing list