SyncDlg: Disallow in/out changes to include local context menu
[TortoiseGit.git] / src / TortoiseProc / Commands / RTFMCommand.h
blobf51c44ed24349f74ba837405ab9280b1aae6a897
1 // TortoiseGit - a Windows shell extension for easy version control
3 // Copyright (C) 2014 - TortoiseGit
4 // Copyright (C) 2007 - TortoiseSVN
6 // This program is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU General Public License
8 // as published by the Free Software Foundation; either version 2
9 // of the License, or (at your option) any later version.
11 // This program is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
16 // You should have received a copy of the GNU General Public License
17 // along with this program; if not, write to the Free Software Foundation,
18 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20 #pragma once
21 #include "Command.h"
22 #include <ShlObj.h>
23 #include "AppUtils.h"
24 #include "MessageBox.h"
26 /**
27 * \ingroup TortoiseProc
28 * Shows a dialog telling the user what TSVN is and to RTFM, then starts an
29 * instance of the explorer.
31 class RTFMCommand : public Command
33 public:
34 /**
35 * Executes the command.
37 virtual bool Execute()
39 // If the user tries to start TortoiseProc from the link in the programs start menu
40 // show an explanation about what TSVN is (shell extension) and open up an explorer window
41 if (CMessageBox::Show(hwndExplorer, IDS_PROC_RTFM, IDS_APPNAME, 1, IDI_INFORMATION, IDS_OKBUTTON, IDS_MENUHELP) == 2)
42 return ((INT_PTR)ShellExecute(hwndExplorer, L"open", theApp.m_pszHelpFilePath, nullptr, nullptr, SW_SHOWNORMAL) > 32);
43 TCHAR path[MAX_PATH] = {0};
44 SHGetFolderPath(hwndExplorer, CSIDL_PERSONAL, nullptr, SHGFP_TYPE_CURRENT, path);
45 CAppUtils::ExploreTo(hwndExplorer, path);
46 return true;