[commit] r1312 - trunk/GME/GMEActiveBrowser
GMESRC Repository Notifications
gme-commit at list.isis.vanderbilt.edu
Mon May 16 14:47:22 CDT 2011
Author: ksmyth
Date: Mon May 16 14:47:21 2011
New Revision: 1312
Log:
Start file browsers for attach library next to current file
Modified:
trunk/GME/GMEActiveBrowser/ActiveBrowserPropertyPage.cpp
trunk/GME/GMEActiveBrowser/AttachLibDlg.cpp
trunk/GME/GMEActiveBrowser/AttachLibDlg.h
Modified: trunk/GME/GMEActiveBrowser/ActiveBrowserPropertyPage.cpp
==============================================================================
--- trunk/GME/GMEActiveBrowser/ActiveBrowserPropertyPage.cpp Mon May 16 10:12:19 2011 (r1311)
+++ trunk/GME/GMEActiveBrowser/ActiveBrowserPropertyPage.cpp Mon May 16 14:47:21 2011 (r1312)
@@ -1532,6 +1532,9 @@
CMgaContext* pMgaContext=&pApp->m_CurrentProject.m_MgaContext;
CAttachLibDlg dlg;
+ _bstr_t conn;
+ COMTHROW(pMgaContext->m_ccpProject->get_ProjectConnStr(conn.GetAddress()));
+ dlg.m_strParentConnection = static_cast<const wchar_t*>(conn);
dlg.m_strCaption=_T("Attach Library");
if(dlg.DoModal() == IDOK && !dlg.m_strConnString.IsEmpty())
@@ -1646,6 +1649,9 @@
}
CAttachLibDlg dlg;
+ _bstr_t conn;
+ COMTHROW(pMgaContext->m_ccpProject->get_ProjectConnStr(conn.GetAddress()));
+ dlg.m_strParentConnection = static_cast<const wchar_t*>(conn);
dlg.m_strConnString=bszLibName;
dlg.m_strCaption=_T("Refresh Library");
dlg.m_bOptimized = was_opt;
Modified: trunk/GME/GMEActiveBrowser/AttachLibDlg.cpp
==============================================================================
--- trunk/GME/GMEActiveBrowser/AttachLibDlg.cpp Mon May 16 10:12:19 2011 (r1311)
+++ trunk/GME/GMEActiveBrowser/AttachLibDlg.cpp Mon May 16 14:47:21 2011 (r1312)
@@ -61,6 +61,18 @@
static TCHAR BASED_CODE szFilter[] = _T("Binary Project Files (*.mga)|*.mga|Multiuser Project Files (*.mgx)|*.mgx|All Files (*.*)|*.*||");
CFileDialog dlg(TRUE,_T("mga"),NULL,NULL,szFilter, this);
+ TCHAR currentMgaPath[MAX_PATH];
+ if (m_strParentConnection.GetLength() > 4 && m_strParentConnection.Left(4) == "MGA=") {
+ const TCHAR* zsConn = m_strParentConnection;
+ zsConn += 4; // skip MGA=
+ TCHAR* filename;
+ if (!GetFullPathName(zsConn, MAX_PATH, currentMgaPath, &filename) || filename == 0) {
+ } else {
+ *filename = _T('\0');
+ dlg.GetOFN().lpstrInitialDir = currentMgaPath;
+ }
+ }
+
if(dlg.DoModal()!=IDOK) return;
bool is_mga = dlg.GetFileExt().CompareNoCase( _T("mga")) == 0;
Modified: trunk/GME/GMEActiveBrowser/AttachLibDlg.h
==============================================================================
--- trunk/GME/GMEActiveBrowser/AttachLibDlg.h Mon May 16 10:12:19 2011 (r1311)
+++ trunk/GME/GMEActiveBrowser/AttachLibDlg.h Mon May 16 14:47:21 2011 (r1312)
@@ -15,6 +15,7 @@
// Construction
public:
CString m_strCaption;
+ CString m_strParentConnection;
CAttachLibDlg(CWnd* pParent = NULL); // standard constructor
// Dialog Data
More information about the gme-commit
mailing list