Skip to content

Commit

Permalink
Use a custom ribbon status bar to avoid showing the configuration con…
Browse files Browse the repository at this point in the history
…text menu

Signed-off-by: Sven Strickroth <email@cs-ware.de>
  • Loading branch information
csware committed Jul 30, 2015
1 parent 0b33550 commit d0594a0
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 3 deletions.
36 changes: 36 additions & 0 deletions src/TortoiseMerge/CustomMFCRibbonStatusBar.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
// TortoiseGitMerge - a Diff/Patch program

// Copyright (C) 2015 - TortoiseSVN

// 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

/**
* \ingroup TortoiseMerge
* a custom MFC Ribbon status bar to avoid showing the customize context menu
*/

class CCustomMFCRibbonStatusBar : public CMFCRibbonStatusBar
{
public:
CCustomMFCRibbonStatusBar() : CMFCRibbonStatusBar() {}

protected:
virtual void OnPaneContextMenu(CWnd* /*pParentFrame*/, CPoint /*point*/)
{
return;
}
};
6 changes: 3 additions & 3 deletions src/TortoiseMerge/MainFrm.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// TortoiseGitMerge - a Diff/Patch program

// Copyright (C) 2013 - TortoiseGit
// Copyright (C) 2006-2014 - TortoiseSVN
// Copyright (C) 2006-2015 - TortoiseSVN

// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
Expand All @@ -27,7 +27,7 @@
#include "XSplitter.h"
#include "GitPatch.h"
#include "SimpleIni.h"

#include "CustomMFCRibbonStatusBar.h"
#include <tuple>

class CLeftView;
Expand Down Expand Up @@ -238,7 +238,7 @@ class CMainFrame : public CFrameWndEx, public CPatchFilesDlgCallBack //CFrameWnd

protected:
CMFCStatusBar m_wndStatusBar;
CMFCRibbonStatusBar m_wndRibbonStatusBar;
CCustomMFCRibbonStatusBar m_wndRibbonStatusBar;
CLocatorBar m_wndLocatorBar;
CLineDiffBar m_wndLineDiffBar;
CXSplitter m_wndSplitter;
Expand Down
1 change: 1 addition & 0 deletions src/TortoiseMerge/TortoiseMerge.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,7 @@
<ClInclude Include="..\Utils\ProfilingInfo.h" />
<ClInclude Include="..\Utils\SimpleIni.h" />
<ClInclude Include="..\Utils\TaskbarUUID.h" />
<ClInclude Include="CustomMFCRibbonStatusBar.h" />
<ClInclude Include="EditorConfigWrapper.h" />
<ClInclude Include="EncodingDlg.h" />
<ClInclude Include="TempFile.h" />
Expand Down
3 changes: 3 additions & 0 deletions src/TortoiseMerge/TortoiseMerge.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -554,6 +554,9 @@
<ClInclude Include="..\Utils\MiscUI\Tooltip.h">
<Filter>Utils\MiscUI</Filter>
</ClInclude>
<ClInclude Include="CustomMFCRibbonStatusBar.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="..\Resources\download.avi">
Expand Down

0 comments on commit d0594a0

Please sign in to comment.