From: Frank Li Date: Sun, 19 Jul 2009 06:03:25 +0000 (+0800) Subject: Add SYNC dialog X-Git-Url: http://git.osdn.net/view?p=tortoisegit%2FTortoiseGitJp.git;a=commitdiff_plain;h=9d59228347247a34dbaa35a96a8f070a893b3951 Add SYNC dialog Signed-off-by: Frank Li --- diff --git a/src/Resources/TortoiseProcENG.rc b/src/Resources/TortoiseProcENG.rc index 6aea821..2ad7304 100644 Binary files a/src/Resources/TortoiseProcENG.rc and b/src/Resources/TortoiseProcENG.rc differ diff --git a/src/TortoiseProc/Commands/Command.cpp b/src/TortoiseProc/Commands/Command.cpp index 22bf3a2..28f9abc 100644 --- a/src/TortoiseProc/Commands/Command.cpp +++ b/src/TortoiseProc/Commands/Command.cpp @@ -64,6 +64,7 @@ #include "RefBrowseCommand.h" #include "SVNDCommitCommand.h" #include "SVNRebaseCommand.h" +#include "SyncCommand.h" #if 0 @@ -182,6 +183,7 @@ typedef enum cmdRefBrowse, cmdSVNDCommit, cmdSVNRebase, + cmdSync, } TGitCommand; @@ -259,6 +261,7 @@ static const struct CommandInfo { cmdRefBrowse, _T("refbrowse") }, { cmdSVNDCommit, _T("svndcommit") }, { cmdSVNRebase, _T("svnrebase") }, + { cmdSync, _T("sync") }, }; @@ -374,6 +377,8 @@ Command * CommandServer::GetCommand(const CString& sCmd) return new SVNDCommitCommand; case cmdSVNRebase: return new SVNRebaseCommand; + case cmdSync: + return new SyncCommand; #if 0 diff --git a/src/TortoiseProc/Commands/SyncCommand.cpp b/src/TortoiseProc/Commands/SyncCommand.cpp new file mode 100644 index 0000000..7228977 --- /dev/null +++ b/src/TortoiseProc/Commands/SyncCommand.cpp @@ -0,0 +1,38 @@ +// TortoiseGit - a Windows shell extension for easy version control + +// Copyright (C) 2008-2009 - TortoiseGit + +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software Foundation, +// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +// +#include "stdafx.h" +#include "TortoiseProc.h" +#include "messagebox.h" +#include "DirFileEnum.h" +#include "SyncDlg.h" +//#include "SVNConfig.h" +#include "Registry.h" +#include "CommonResource.h" +#include "SyncCommand.h" + +bool SyncCommand::Execute() +{ + bool bRet = false; + CSyncDlg dlg; + if(dlg.DoModal() == IDOK) + bRet=true; + + return bRet; +} + diff --git a/src/TortoiseProc/Commands/SyncCommand.h b/src/TortoiseProc/Commands/SyncCommand.h new file mode 100644 index 0000000..52147d4 --- /dev/null +++ b/src/TortoiseProc/Commands/SyncCommand.h @@ -0,0 +1,36 @@ +// TortoiseGit - a Windows shell extension for easy version control + +// Copyright (C) 2008-2009 - TortoiseGit + +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software Foundation, +// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +// + +#pragma once +#include "Command.h" + +/** + * \ingroup TortoiseProc + * Shows the add dialog. + */ +class SyncCommand : public Command +{ +public: + /** + * Executes the command. + */ + virtual bool Execute(); +}; + + diff --git a/src/TortoiseProc/SyncDlg.cpp b/src/TortoiseProc/SyncDlg.cpp new file mode 100644 index 0000000..97ee96f --- /dev/null +++ b/src/TortoiseProc/SyncDlg.cpp @@ -0,0 +1,87 @@ +// TortoiseGit - a Windows shell extension for easy version control + +// Copyright (C) 2008-2009 - TortoiseGit + +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software Foundation, +// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +// + +// SyncDlg.cpp : implementation file +// + +#include "stdafx.h" +#include "TortoiseProc.h" +#include "SyncDlg.h" + + +// CSyncDlg dialog + +IMPLEMENT_DYNAMIC(CSyncDlg, CDialog) + +CSyncDlg::CSyncDlg(CWnd* pParent /*=NULL*/) + : CDialog(CSyncDlg::IDD, pParent) + , m_bAutoLoadPuttyKey(FALSE) +{ + +} + +CSyncDlg::~CSyncDlg() +{ +} + +void CSyncDlg::DoDataExchange(CDataExchange* pDX) +{ + CDialog::DoDataExchange(pDX); + DDX_Check(pDX, IDC_CHECK_PUTTY_KEY, m_bAutoLoadPuttyKey); + DDX_Control(pDX, IDC_COMBOBOXEX_LOCAL_BRANCH, m_ctrlLocalBranch); + DDX_Control(pDX, IDC_COMBOBOXEX_REMOTE_BRANCH, m_ctrlRemoteBranch); + DDX_Control(pDX, IDC_COMBOBOXEX_URL, m_ctrlURL); + DDX_Control(pDX, IDC_BUTTON_TABCTRL, m_ctrlDumyButton); + DDX_Control(pDX, IDC_BUTTON_PULL, m_ctrlPull); + DDX_Control(pDX, IDC_BUTTON_PUSH, m_ctrlPush); + DDX_Control(pDX, IDC_STATIC_STATUS, m_ctrlStatus); + DDX_Control(pDX, IDC_PROGRESS_SYNC, m_ctrlProgress); + DDX_Control(pDX, IDC_ANIMATE_SYNC, m_ctrlAnimate); +} + + +BEGIN_MESSAGE_MAP(CSyncDlg, CDialog) + ON_BN_CLICKED(IDC_BUTTON_PULL, &CSyncDlg::OnBnClickedButtonPull) + ON_BN_CLICKED(IDC_BUTTON_PUSH, &CSyncDlg::OnBnClickedButtonPush) + ON_BN_CLICKED(IDC_BUTTON_APPLY, &CSyncDlg::OnBnClickedButtonApply) + ON_BN_CLICKED(IDC_BUTTON_EMAIL, &CSyncDlg::OnBnClickedButtonEmail) +END_MESSAGE_MAP() + + +// CSyncDlg message handlers + +void CSyncDlg::OnBnClickedButtonPull() +{ + // TODO: Add your control notification handler code here +} + +void CSyncDlg::OnBnClickedButtonPush() +{ + // TODO: Add your control notification handler code here +} + +void CSyncDlg::OnBnClickedButtonApply() +{ + // TODO: Add your control notification handler code here +} + +void CSyncDlg::OnBnClickedButtonEmail() +{ + // TODO: Add your control notification handler code here +} diff --git a/src/TortoiseProc/SyncDlg.h b/src/TortoiseProc/SyncDlg.h new file mode 100644 index 0000000..4e6dfd7 --- /dev/null +++ b/src/TortoiseProc/SyncDlg.h @@ -0,0 +1,57 @@ +// TortoiseGit - a Windows shell extension for easy version control + +// Copyright (C) 2008-2009 - TortoiseGit + +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software Foundation, +// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +// + +#pragma once +#include "afxcmn.h" +#include "afxwin.h" + + +// CSyncDlg dialog + +class CSyncDlg : public CDialog +{ + DECLARE_DYNAMIC(CSyncDlg) + +public: + CSyncDlg(CWnd* pParent = NULL); // standard constructor + virtual ~CSyncDlg(); + +// Dialog Data + enum { IDD = IDD_SYNC }; + +protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + + DECLARE_MESSAGE_MAP() +public: + BOOL m_bAutoLoadPuttyKey; + CComboBoxEx m_ctrlLocalBranch; + CComboBoxEx m_ctrlRemoteBranch; + CComboBoxEx m_ctrlURL; + CButton m_ctrlDumyButton; + CButton m_ctrlPull; + CButton m_ctrlPush; + CStatic m_ctrlStatus; + afx_msg void OnBnClickedButtonPull(); + afx_msg void OnBnClickedButtonPush(); + afx_msg void OnBnClickedButtonApply(); + afx_msg void OnBnClickedButtonEmail(); + CProgressCtrl m_ctrlProgress; + CAnimateCtrl m_ctrlAnimate; +}; diff --git a/src/TortoiseProc/TortoiseProc.vcproj b/src/TortoiseProc/TortoiseProc.vcproj index 5dc37c5..e980a58 100644 --- a/src/TortoiseProc/TortoiseProc.vcproj +++ b/src/TortoiseProc/TortoiseProc.vcproj @@ -588,11 +588,11 @@ > + + + + + + + + + +