[GME-commit] GMESRC/GME/Gme ChildFrm.cpp,1.7,1.8 ChildFrm.h,1.3,1.4
GMEApp.cpp,1.139,1.140 GMEApp.h,1.33,1.34 GMEView.cpp,1.179,1.180
MainFrm.cpp,1.33,1.34 MainFrm.h,1.25,1.26
gme-commit at list.isis.vanderbilt.edu
gme-commit at list.isis.vanderbilt.edu
Wed May 3 17:50:29 CDT 2006
Update of /project/gme-repository/GMESRC/GME/Gme
In directory escher:/tmp/cvs-serv31995
Modified Files:
ChildFrm.cpp ChildFrm.h GMEApp.cpp GMEApp.h GMEView.cpp
MainFrm.cpp MainFrm.h
Log Message:
Fixing consistency in titlebar.
CVS User: Zoltan Molnar, ISIS (zolmol)
Index: ChildFrm.cpp
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/Gme/ChildFrm.cpp,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** ChildFrm.cpp 12 Mar 2004 23:29:14 -0000 1.7
--- ChildFrm.cpp 3 May 2006 16:50:26 -0000 1.8
***************
*** 8,11 ****
--- 8,12 ----
#include "GMEView.h"
+ #include ".\childfrm.h"
#ifdef _DEBUG
***************
*** 27,30 ****
--- 28,32 ----
ON_WM_CLOSE()
//}}AFX_MSG_MAP
+ ON_WM_SIZE()
END_MESSAGE_MAP()
***************
*** 119,121 ****
--- 121,138 ----
if(doClose)
CMDIChildWnd::OnClose();
+
+ // CMDIChildWnd::OnClose: when the last ChildWnd is closed
+ // the document is considered closed and the title changes to Paradigm
+ // that's why we call this:
+ theApp.UpdateMainTitle();
+ }
+
+ void CChildFrame::OnSize(UINT nType, int cx, int cy)
+ {
+ CMDIChildWnd::OnSize(nType, cx, cy);
+
+ // it is necessary to change the title manually especially
+ // when the first childwnd is created
+ // when the childwnd's are maximized
+ theApp.UpdateMainTitle();
}
Index: GMEApp.h
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/Gme/GMEApp.h,v
retrieving revision 1.33
retrieving revision 1.34
diff -C2 -d -r1.33 -r1.34
*** GMEApp.h 1 May 2006 17:20:11 -0000 1.33
--- GMEApp.h 3 May 2006 16:50:26 -0000 1.34
***************
*** 148,151 ****
--- 148,153 ----
void GetSettings();
+ void UpdateMainTitle();
+
// Overrides
// ClassWizard generated virtual function overrides
Index: GMEApp.cpp
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/Gme/GMEApp.cpp,v
retrieving revision 1.139
retrieving revision 1.140
diff -C2 -d -r1.139 -r1.140
*** GMEApp.cpp 1 May 2006 17:20:11 -0000 1.139
--- GMEApp.cpp 3 May 2006 16:50:26 -0000 1.140
***************
*** 550,554 ****
if(CMainFrame::theInstance) {
CMainFrame::theInstance->SetTitle(m_pszAppName);
! CMainFrame::theInstance->UpdateTitle("");
}
}
--- 550,554 ----
if(CMainFrame::theInstance) {
CMainFrame::theInstance->SetTitle(m_pszAppName);
! CMainFrame::theInstance->UpdateTitle(0);//WAS: "" .By passing 0 instead of "" we won't get title such as "GME-" after a project was closed
}
}
***************
*** 2684,2686 ****
--- 2684,2692 ----
//int sc = _chdir( pPath);
//return sc == 0;
+ }
+
+ void CGMEApp::UpdateMainTitle()
+ {
+ if( CMainFrame::theInstance)
+ CMainFrame::theInstance->UpdateTitle( projectName);
}
Index: MainFrm.cpp
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/Gme/MainFrm.cpp,v
retrieving revision 1.33
retrieving revision 1.34
diff -C2 -d -r1.33 -r1.34
*** MainFrm.cpp 30 Jan 2006 20:47:54 -0000 1.33
--- MainFrm.cpp 3 May 2006 16:50:26 -0000 1.34
***************
*** 451,455 ****
#endif //_DEBUG
! void CMainFrame::UpdateTitle(CString title)
{
UpdateFrameTitleForDocument(title);
--- 451,455 ----
#endif //_DEBUG
! void CMainFrame::UpdateTitle(LPCTSTR title)
{
UpdateFrameTitleForDocument(title);
Index: MainFrm.h
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/Gme/MainFrm.h,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -d -r1.25 -r1.26
*** MainFrm.h 30 Jan 2006 20:47:54 -0000 1.25
--- MainFrm.h 3 May 2006 16:50:26 -0000 1.26
***************
*** 54,58 ****
void WriteStatusMode(const char *txt);
void WriteStatusText(int pane,const char *txt);
! void UpdateTitle(CString title);
void SetPartBrowser(CGuiMetaModel *meta) { m_partBrowser.SetMetaModel(meta); }
void SetPartBrowserBg(COLORREF bgColor) { m_partBrowser.SetBgColor(bgColor); m_partBrowser.PostMessage(WM_PAINT);}
--- 54,58 ----
void WriteStatusMode(const char *txt);
void WriteStatusText(int pane,const char *txt);
! void UpdateTitle(LPCTSTR title);
void SetPartBrowser(CGuiMetaModel *meta) { m_partBrowser.SetMetaModel(meta); }
void SetPartBrowserBg(COLORREF bgColor) { m_partBrowser.SetBgColor(bgColor); m_partBrowser.PostMessage(WM_PAINT);}
Index: GMEView.cpp
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/Gme/GMEView.cpp,v
retrieving revision 1.179
retrieving revision 1.180
diff -C2 -d -r1.179 -r1.180
*** GMEView.cpp 1 May 2006 17:20:11 -0000 1.179
--- GMEView.cpp 3 May 2006 16:50:26 -0000 1.180
***************
*** 5311,5315 ****
ClearConnSpecs();
}
! CMainFrame::theInstance->UpdateTitle(theApp.projectName);
// CGMEView * gmeviewA = (CGMEView *)pActivateView;
--- 5311,5316 ----
ClearConnSpecs();
}
! //comm'd by zolmol
! //CMainFrame::theInstance->UpdateTitle(theApp.projectName);
// CGMEView * gmeviewA = (CGMEView *)pActivateView;
Index: ChildFrm.h
===================================================================
RCS file: /project/gme-repository/GMESRC/GME/Gme/ChildFrm.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** ChildFrm.h 18 May 2004 16:04:07 -0000 1.3
--- ChildFrm.h 3 May 2006 16:50:26 -0000 1.4
***************
*** 59,62 ****
--- 59,64 ----
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
+ public:
+ afx_msg void OnSize(UINT nType, int cx, int cy);
};
More information about the GME-commit
mailing list