Fix wrong xdg config string
[TortoiseGit.git] / src / TortoiseProc / DeleteConflictDlg.cpp
bloba3167593c84efeb461b4058b592e7507698ef94a
1 // TortoiseGit - a Windows shell extension for easy version control
3 // Copyright (C) 2009-2012 - TortoiseGit
5 // This program is free software; you can redistribute it and/or
6 // modify it under the terms of the GNU General Public License
7 // as published by the Free Software Foundation; either version 2
8 // of the License, or (at your option) any later version.
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
15 // You should have received a copy of the GNU General Public License
16 // along with this program; if not, write to the Free Software Foundation,
17 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 // DeleteConflictDlg.cpp : implementation file
22 #include "stdafx.h"
23 #include "resource.h"
24 #include "DeleteConflictDlg.h"
25 #include "AppUtils.h"
27 // CDeleteConflictDlg dialog
29 IMPLEMENT_DYNAMIC(CDeleteConflictDlg, CStandAloneDialog)
31 CDeleteConflictDlg::CDeleteConflictDlg(CWnd* pParent /*=NULL*/)
32 : CStandAloneDialog(CDeleteConflictDlg::IDD, pParent)
34 , m_LocalStatus(_T(""))
35 , m_RemoteStatus(_T(""))
37 m_bShowModifiedButton = FALSE;
38 m_bIsDelete =FALSE;
41 CDeleteConflictDlg::~CDeleteConflictDlg()
45 void CDeleteConflictDlg::DoDataExchange(CDataExchange* pDX)
47 CDialog::DoDataExchange(pDX);
49 DDX_Text(pDX, IDC_LOCAL_STATUS, m_LocalStatus);
50 DDX_Text(pDX, IDC_REMOTE_STATUS, m_RemoteStatus);
51 DDX_Text(pDX, IDC_FROMHASH, m_LocalHash);
52 DDX_Text(pDX, IDC_TOHASH, m_RemoteHash);
56 BEGIN_MESSAGE_MAP(CDeleteConflictDlg, CStandAloneDialog)
57 ON_BN_CLICKED(IDC_LOG, OnBnClickedLog)
58 ON_BN_CLICKED(IDC_LOG2, OnBnClickedLog2)
59 ON_BN_CLICKED(IDC_DELETE, &CDeleteConflictDlg::OnBnClickedDelete)
60 ON_BN_CLICKED(IDC_MODIFY, &CDeleteConflictDlg::OnBnClickedModify)
61 END_MESSAGE_MAP()
64 BOOL CDeleteConflictDlg::OnInitDialog()
66 CStandAloneDialog::OnInitDialog();
68 if(this->m_bShowModifiedButton )
69 this->GetDlgItem(IDC_MODIFY)->SetWindowText(CString(MAKEINTRESOURCE(IDS_SVNACTION_MODIFIED)));
70 else
71 this->GetDlgItem(IDC_MODIFY)->SetWindowText(CString(MAKEINTRESOURCE(IDS_PROC_CREATED)));
72 if (m_LocalHash.IsEmpty())
73 GetDlgItem(IDC_LOG)->ShowWindow(SW_HIDE);
74 if (m_RemoteHash.IsEmpty())
75 GetDlgItem(IDC_LOG2)->ShowWindow(SW_HIDE);
77 CString sWindowTitle;
78 GetWindowText(sWindowTitle);
79 CAppUtils::SetWindowTitle(m_hWnd, this->m_File, sWindowTitle);
81 return TRUE;
83 // CDeleteConflictDlg message handlers
85 void CDeleteConflictDlg::OnBnClickedLog()
87 ShowLog(m_LocalHash);
90 void CDeleteConflictDlg::OnBnClickedLog2()
92 ShowLog(m_RemoteHash);
95 void CDeleteConflictDlg::OnBnClickedDelete()
97 m_bIsDelete = TRUE;
98 OnOK();
101 void CDeleteConflictDlg::OnBnClickedModify()
103 m_bIsDelete = FALSE;
104 OnOK();
107 void CDeleteConflictDlg::ShowLog(CString hash)
109 CString sCmd;
110 sCmd.Format(_T("/command:log /path:\"%s\" /endrev:%s"), g_Git.CombinePath(m_File), hash);
111 CAppUtils::RunTortoiseGitProc(sCmd, false, false);