protected: // create from serialization only\r
CMainFrame();\r
DECLARE_DYNCREATE(CMainFrame)\r
-\r
+ virtual void OnUpdateFrameTitle(BOOL bAddToTitle)\r
+ {\r
+ CFrameWndEx::OnUpdateFrameTitle( bAddToTitle);\r
+ };\r
// Attributes\r
public:\r
\r
>\r
</File>\r
<File\r
- RelativePath="..\Resources\blameres\output_wnd.ico"\r
+ RelativePath=".\res\output_wnd.ico"\r
>\r
</File>\r
<File\r
- RelativePath=".\res\output_wnd.ico"\r
+ RelativePath="..\Resources\blameres\output_wnd.ico"\r
>\r
</File>\r
<File\r
- RelativePath="..\Resources\blameres\output_wnd_hc.ico"\r
+ RelativePath=".\res\output_wnd_hc.ico"\r
>\r
</File>\r
<File\r
- RelativePath=".\res\output_wnd_hc.ico"\r
+ RelativePath="..\Resources\blameres\output_wnd_hc.ico"\r
>\r
</File>\r
<File\r
>\r
</File>\r
<File\r
- RelativePath=".\res\properties_hc.bmp"\r
+ RelativePath="..\Resources\blameres\properties_hc.bmp"\r
>\r
</File>\r
<File\r
- RelativePath="..\Resources\blameres\properties_hc.bmp"\r
+ RelativePath=".\res\properties_hc.bmp"\r
>\r
</File>\r
<File\r
- RelativePath=".\res\properties_wnd.ico"\r
+ RelativePath="..\Resources\blameres\properties_wnd.ico"\r
>\r
</File>\r
<File\r
- RelativePath="..\Resources\blameres\properties_wnd.ico"\r
+ RelativePath=".\res\properties_wnd.ico"\r
>\r
</File>\r
<File\r
>\r
</File>\r
<File\r
- RelativePath=".\res\Toolbar.bmp"\r
+ RelativePath="..\Resources\blameres\Toolbar.bmp"\r
>\r
</File>\r
<File\r
- RelativePath="..\Resources\blameres\Toolbar.bmp"\r
+ RelativePath=".\res\Toolbar.bmp"\r
>\r
</File>\r
<File\r
- RelativePath=".\res\Toolbar256.bmp"\r
+ RelativePath="..\Resources\blameres\Toolbar256.bmp"\r
>\r
</File>\r
<File\r
- RelativePath="..\Resources\blameres\Toolbar256.bmp"\r
+ RelativePath=".\res\Toolbar256.bmp"\r
>\r
</File>\r
<File\r
</FileConfiguration>\r
</File>\r
<File\r
- RelativePath=".\res\TortoiseGitBlameDoc.ico"\r
+ RelativePath="..\Resources\blameres\TortoiseGitBlameDoc.ico"\r
>\r
</File>\r
<File\r
- RelativePath="..\Resources\blameres\TortoiseGitBlameDoc.ico"\r
+ RelativePath=".\res\TortoiseGitBlameDoc.ico"\r
>\r
</File>\r
<File\r
<DebugSettings\r
Command="$(TargetPath)"\r
WorkingDirectory=""\r
- CommandArguments=""\r
+ CommandArguments="D:\Profiles\b20596\git\alloc.c"\r
Attach="false"\r
DebuggerType="3"\r
Remote="1"\r
SQLDebugging=""\r
Environment=""\r
EnvironmentMerge="true"\r
- DebuggerFlavor=""\r
+ DebuggerFlavor="0"\r
MPIRunCommand=""\r
MPIRunArguments=""\r
MPIRunWorkingDirectory=""\r
\r
return TRUE;\r
}\r
-\r
BOOL CTortoiseGitBlameDoc::OnOpenDocument(LPCTSTR lpszPathName)\r
{\r
+ return OnOpenDocument(lpszPathName,_T(""));\r
+}\r
+\r
+BOOL CTortoiseGitBlameDoc::OnOpenDocument(LPCTSTR lpszPathName,CString Rev)\r
+{\r
if (!CDocument::OnOpenDocument(lpszPathName))\r
return FALSE;\r
\r
m_CurrentFileName=lpszPathName;\r
\r
+ m_Rev=Rev;\r
+\r
// TODO: add reinitialization code here\r
// (SDI documents will reuse this document)\r
if(!CGit::CheckMsysGitDir())\r
CString cmd;\r
CTGitPath path;\r
path.SetFromWin(lpszPathName);\r
- cmd.Format(_T("git.exe blame -s -l -- \"%s\""),path.GetGitPathString());\r
+ cmd.Format(_T("git.exe blame -s -l %s -- \"%s\""),Rev,path.GetGitPathString());\r
m_BlameData.Empty();\r
if(g_Git.Run(cmd,&m_BlameData))\r
{\r
\r
}\r
CTortoiseGitBlameView *pView=DYNAMIC_DOWNCAST(CTortoiseGitBlameView,GetMainFrame()->GetActiveView());\r
- pView->UpdateInfo();\r
- \r
+ if(pView == NULL)\r
+ {\r
+ CWnd* pWnd = GetMainFrame()->GetDescendantWindow(AFX_IDW_PANE_FIRST, TRUE);\r
+ if (pWnd != NULL && pWnd->IsKindOf(RUNTIME_CLASS(CTortoiseGitBlameView)))\r
+ {\r
+ pView = (CTortoiseGitBlameView*)pWnd;\r
+ }\r
+ else\r
+ {\r
+ return FALSE;\r
+ }\r
+ }\r
+ pView->UpdateInfo(); \r
}\r
\r
return TRUE;\r
}\r
\r
+void CTortoiseGitBlameDoc::SetPathName(LPCTSTR lpszPathName, BOOL bAddToMRU)\r
+{\r
+ CDocument::SetPathName(lpszPathName,bAddToMRU);\r
+\r
+ CString title;\r
+ if(m_Rev.IsEmpty())\r
+ title=CString(lpszPathName)+_T(":HEAD");\r
+ else\r
+ title=CString(lpszPathName)+_T(":")+m_Rev;\r
+\r
+ this->SetTitle(title);\r
+}\r
\r
// CTortoiseGitBlameDoc serialization\r
\r
virtual BOOL OnNewDocument();\r
virtual void Serialize(CArchive& ar);\r
virtual BOOL OnOpenDocument(LPCTSTR lpszPathName);\r
+ virtual BOOL OnOpenDocument(LPCTSTR lpszPathName,CString Rev);\r
+ virtual void SetPathName(LPCTSTR lpszPathName, BOOL bAddToMRU = TRUE);\r
+ \r
+ \r
// Implementation\r
public:\r
virtual ~CTortoiseGitBlameDoc();\r
\r
protected:\r
\r
- \r
+ CString m_Rev;\r
// Generated message map functions\r
protected:\r
DECLARE_MESSAGE_MAP()\r
m_ToolTip.Create(this->GetParent()); \r
m_ToolTip.AddTool(this,_T("Test"));\r
\r
+ ::AfxGetApp()->GetMainWnd();\r
return CView::OnCreate(lpcs);\r
+ \r
}\r
\r
void CTortoiseGitBlameView::OnSize(UINT nType,int cx, int cy)\r