[commit] r1405 - trunk/GME/Gme
GMESRC Repository Notifications
gme-commit at list.isis.vanderbilt.edu
Sun Jul 17 18:11:23 CDT 2011
Author: ksmyth
Date: Sun Jul 17 18:11:23 2011
New Revision: 1405
Log:
Reverse-merge r1404.
Modified:
trunk/GME/Gme/ (props changed)
trunk/GME/Gme/ChildFrm.cpp
trunk/GME/Gme/GMEApp.cpp
trunk/GME/Gme/GMEOLEIt.cpp
trunk/GME/Gme/GUIObject.cpp
trunk/GME/Gme/MainFrm.cpp
trunk/GME/Gme/MainFrm.h
trunk/GME/Gme/ModelPropertiesDlgBar.cpp
trunk/GME/Gme/StdAfx.h
Modified: trunk/GME/Gme/ChildFrm.cpp
==============================================================================
--- trunk/GME/Gme/ChildFrm.cpp Sun Jul 17 18:10:07 2011 (r1404)
+++ trunk/GME/Gme/ChildFrm.cpp Sun Jul 17 18:11:23 2011 (r1405)
@@ -125,7 +125,7 @@
// int zoomvals[] = {ZOOM_NO, 150, 200, 250, 300, 350, 400, 0}; // for test
propBar.SetZoomList(zoomvals);
propBar.DockToFrameWindow(CBRS_ALIGN_TOP);
- propBar.SetMinSize(CSize(50, 25 * GetDC()->GetDeviceCaps(LOGPIXELSY) / 96));
+ propBar.SetMinSize(CSize(10, 25));
ShowPane(&propBar, true, false, true);
}
Modified: trunk/GME/Gme/GMEApp.cpp
==============================================================================
--- trunk/GME/Gme/GMEApp.cpp Sun Jul 17 18:10:07 2011 (r1404)
+++ trunk/GME/Gme/GMEApp.cpp Sun Jul 17 18:11:23 2011 (r1405)
@@ -1754,7 +1754,7 @@
long l;
COMTHROW(mgaProject->get_ProjectStatus(&l));
if (IsUndoPossible() && (l & PROJECT_STATUS_CHANGED))
- ret = AfxMessageBox(_T("Save project '") + projectName + _T("'?"), MB_YESNO);
+ ret = AfxMessageBox(_T("Save project '") + projectName + _T("'?"), MB_YESNOCANCEL);
if (ret == IDCANCEL) {
return FALSE;
} else if (ret == IDNO) {
@@ -1762,10 +1762,9 @@
OnFileAbortProject();
} else {
((CMainFrame*)m_pMainWnd)->clearMgaProj();
- SafeCloseProject();
+ return SafeCloseProject();
}
}
- ((CMainFrame*)m_pMainWnd)->clearGmeOleApp();
return TRUE;
}
Modified: trunk/GME/Gme/GMEOLEIt.cpp
==============================================================================
--- trunk/GME/Gme/GMEOLEIt.cpp Sun Jul 17 18:10:07 2011 (r1404)
+++ trunk/GME/Gme/GMEOLEIt.cpp Sun Jul 17 18:11:23 2011 (r1405)
@@ -795,18 +795,6 @@
if ( hEmf ) {
DeleteEnhMetaFile(hEmf);
}
- // XXX DONT COMMIT this only works with Vista/7 (GDI+ 1.1)
- /*HDC hdc = ::CreateCompatibleDC(NULL);
- Gdiplus::Graphics g(hdc);
- g.SetSmoothingMode(Gdiplus::SmoothingMode::SmoothingModeHighQuality);
- g.SetTextRenderingHint(Gdiplus::TextRenderingHint::TextRenderingHintAntiAlias);
- {
- Gdiplus::Metafile mf(filePath);
- mf.ConvertToEmfPlus(&g, CString(filePath) + "plus");
- }
- MoveFile(CString(filePath) + "plus", filePath);
- ::DeleteDC(hdc);
- */
}
void CGMEOLEIt::CheckConstraints()
Modified: trunk/GME/Gme/GUIObject.cpp
==============================================================================
--- trunk/GME/Gme/GUIObject.cpp Sun Jul 17 18:10:07 2011 (r1404)
+++ trunk/GME/Gme/GUIObject.cpp Sun Jul 17 18:11:23 2011 (r1405)
@@ -1914,16 +1914,8 @@
else
COMTHROW(GetCurrentAspect()->GetDecorator()->Draw((ULONG)pDC));
}
- catch (hresult_exception &e) {
- CComQIPtr<ISupportErrorInfo> errorInfo = GetCurrentAspect()->GetDecorator();
- _bstr_t error;
- if (errorInfo) {
- GetErrorInfo(error.GetAddress());
- } else {
- GetErrorInfo(e.hr, error.GetAddress());
- }
- // FIXME: KMS: won't Draw() be called after the MessageBox is dismissed?
- AfxMessageBox(CString(_T("Error in decorator [method Draw()]: ")) + static_cast<const TCHAR*>(error));
+ catch (hresult_exception &) {
+ AfxMessageBox(_T("Error in decorator [method Draw()]"));
}
// #define _ARDEBUG
Modified: trunk/GME/Gme/MainFrm.cpp
==============================================================================
--- trunk/GME/Gme/MainFrm.cpp Sun Jul 17 18:10:07 2011 (r1404)
+++ trunk/GME/Gme/MainFrm.cpp Sun Jul 17 18:11:23 2011 (r1405)
@@ -104,6 +104,7 @@
MSG_MAP_VIEW_PANE(ID_VIEW_CONSOLE, CGMEConsole, m_console)
MSG_MAP_VIEW_PANE(ID_VIEW_GMEBROWSER, CGMEBrowser, m_browser)
MSG_MAP_VIEW_PANE(ID_VIEW_SEARCH, CGMESearch, m_search)
+ ON_WM_CLOSE()
ON_WM_DROPFILES()
ON_UPDATE_COMMAND_UI_RANGE(ID_VIEW_APPLOOK_WIN_2000, ID_VIEW_APPLOOK_OFF_2007_AQUA, &CMainFrame::OnUpdateApplicationLook)
ON_COMMAND(ID_WINDOW_MANAGER, &CMainFrame::OnWindowManager)
@@ -219,6 +220,12 @@
m_console.SetGMEProj( 0 );
}
+void CMainFrame::OnNcDestroy()
+{
+ clearGmeOleApp();
+ CMDIFrameWndEx::OnNcDestroy();
+}
+
int CMainFrame::CreateToolBars()
{
@@ -909,6 +916,11 @@
return TRUE;
}
+BOOL CMainFrame::DestroyWindow()
+{
+ return CMDIFrameWndEx::DestroyWindow();
+}
+
void CMainFrame::ShowObjectInspector()
{
ShowPane(&m_objectInspector, TRUE, FALSE, TRUE);
Modified: trunk/GME/Gme/MainFrm.h
==============================================================================
--- trunk/GME/Gme/MainFrm.h Sun Jul 17 18:10:07 2011 (r1404)
+++ trunk/GME/Gme/MainFrm.h Sun Jul 17 18:11:23 2011 (r1405)
@@ -74,6 +74,7 @@
//{{AFX_VIRTUAL(CMainFrame)
public:
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
+ virtual BOOL DestroyWindow();
virtual BOOL PreTranslateMessage(MSG* pMsg);
//}}AFX_VIRTUAL
@@ -146,6 +147,7 @@
}
afx_msg void OnUpdateWindowNew(CCmdUI* pCmdUI);
+ afx_msg void OnNcDestroy();
public:
afx_msg void OnDropFiles(HDROP p_hDropInfo);
protected:
Modified: trunk/GME/Gme/ModelPropertiesDlgBar.cpp
==============================================================================
--- trunk/GME/Gme/ModelPropertiesDlgBar.cpp Sun Jul 17 18:10:07 2011 (r1404)
+++ trunk/GME/Gme/ModelPropertiesDlgBar.cpp Sun Jul 17 18:11:23 2011 (r1405)
@@ -27,7 +27,6 @@
void CModelPropertiesDlgBar::ShowType()
{
- // FIXME: fix for DPI
GetDlgItem(IDC_TYPEMARK)->MoveWindow(6,8,16,16);
GetDlgItem(IDC_TYPEMARK)->ShowWindow(SW_SHOW);
GetDlgItem(IDC_INSTANCEMARK)->ShowWindow(SW_HIDE);
@@ -36,7 +35,6 @@
void CModelPropertiesDlgBar::ShowInstance()
{
- // FIXME: fix for DPI
GetDlgItem(IDC_TYPEMARK)->ShowWindow(SW_HIDE);
GetDlgItem(IDC_INSTANCEMARK)->MoveWindow(6,8,16,16);
GetDlgItem(IDC_INSTANCEMARK)->ShowWindow(SW_SHOW);
Modified: trunk/GME/Gme/StdAfx.h
==============================================================================
--- trunk/GME/Gme/StdAfx.h Sun Jul 17 18:10:07 2011 (r1404)
+++ trunk/GME/Gme/StdAfx.h Sun Jul 17 18:11:23 2011 (r1405)
@@ -8,9 +8,6 @@
#pragma once
-// XXX DONT COMMIT this only works with Vista/7 (GDI+ 1.1)
-//#define GDIPVER 0x0110
-
#ifndef _SECURE_ATL
#define _SECURE_ATL 1
#endif
More information about the gme-commit
mailing list