From 7a89f0f0e1720ee3c9c12a14849ce4cc65e47304 Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Sat, 20 Dec 2014 17:36:29 +0100 Subject: Linux/MacOSX: Add a donation menu entry --- src/Main/Forms/Forms.cpp | 6 ++++++ src/Main/Forms/Forms.h | 1 + src/Main/Forms/MainFrame.h | 1 + src/Main/Forms/TrueCrypt.fbp | 15 +++++++++++++++ 4 files changed, 23 insertions(+) (limited to 'src/Main/Forms') diff --git a/src/Main/Forms/Forms.cpp b/src/Main/Forms/Forms.cpp index 013ad40c..ad732534 100644 --- a/src/Main/Forms/Forms.cpp +++ b/src/Main/Forms/Forms.cpp @@ -185,6 +185,10 @@ MainFrameBase::MainFrameBase( wxWindow* parent, wxWindowID id, const wxString& t HelpMenu->AppendSeparator(); + wxMenuItem* DonateMenuItem; + DonateMenuItem = new wxMenuItem( HelpMenu, wxID_ANY, wxString( _("Donate") ) , wxEmptyString, wxITEM_NORMAL ); + HelpMenu->Append( DonateMenuItem ); + wxMenuItem* ContactMenuItem; ContactMenuItem = new wxMenuItem( HelpMenu, wxID_ANY, wxString( _("Contact") ) , wxEmptyString, wxITEM_NORMAL ); HelpMenu->Append( ContactMenuItem ); @@ -434,6 +438,7 @@ MainFrameBase::MainFrameBase( wxWindow* parent, wxWindowID id, const wxString& t this->Connect( DownloadsMenuItem->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrameBase::OnDownloadsMenuItemSelected ) ); this->Connect( NewsMenuItem->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrameBase::OnNewsMenuItemSelected ) ); this->Connect( VersionHistoryMenuItem->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrameBase::OnVersionHistoryMenuItemSelected ) ); + this->Connect( DonateMenuItem->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrameBase::OnDonateMenuItemSelected ) ); this->Connect( ContactMenuItem->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrameBase::OnContactMenuItemSelected ) ); this->Connect( LegalNoticesMenuItem->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrameBase::OnLegalNoticesMenuItemSelected ) ); this->Connect( AboutMenuItem->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrameBase::OnAboutMenuItemSelected ) ); @@ -495,6 +500,7 @@ MainFrameBase::~MainFrameBase() this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrameBase::OnDownloadsMenuItemSelected ) ); this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrameBase::OnNewsMenuItemSelected ) ); this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrameBase::OnVersionHistoryMenuItemSelected ) ); + this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrameBase::OnDonateMenuItemSelected ) ); this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrameBase::OnContactMenuItemSelected ) ); this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrameBase::OnLegalNoticesMenuItemSelected ) ); this->Disconnect( wxID_ABOUT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MainFrameBase::OnAboutMenuItemSelected ) ); diff --git a/src/Main/Forms/Forms.h b/src/Main/Forms/Forms.h index e56f9919..a59a9bf7 100644 --- a/src/Main/Forms/Forms.h +++ b/src/Main/Forms/Forms.h @@ -129,6 +129,7 @@ namespace VeraCrypt virtual void OnDownloadsMenuItemSelected( wxCommandEvent& event ) { event.Skip(); } virtual void OnNewsMenuItemSelected( wxCommandEvent& event ) { event.Skip(); } virtual void OnVersionHistoryMenuItemSelected( wxCommandEvent& event ) { event.Skip(); } + virtual void OnDonateMenuItemSelected( wxCommandEvent& event ) { event.Skip(); } virtual void OnContactMenuItemSelected( wxCommandEvent& event ) { event.Skip(); } virtual void OnLegalNoticesMenuItemSelected( wxCommandEvent& event ) { event.Skip(); } virtual void OnAboutMenuItemSelected( wxCommandEvent& event ) { event.Skip(); } diff --git a/src/Main/Forms/MainFrame.h b/src/Main/Forms/MainFrame.h index e4c308e6..a759cfcd 100644 --- a/src/Main/Forms/MainFrame.h +++ b/src/Main/Forms/MainFrame.h @@ -76,6 +76,7 @@ namespace VeraCrypt void OnClearSlotSelectionMenuItemSelected (wxCommandEvent& event); void OnClose (wxCloseEvent& event); void OnCloseAllSecurityTokenSessionsMenuItemSelected (wxCommandEvent& event); + void OnDonateMenuItemSelected (wxCommandEvent& event) { Gui->OpenHomepageLink (this, L"donate"); } void OnContactMenuItemSelected (wxCommandEvent& event) { Gui->OpenHomepageLink (this, L"contact"); } void OnCreateKeyfileMenuItemSelected (wxCommandEvent& event) { Gui->CreateKeyfile(); } void OnCreateVolumeButtonClick (wxCommandEvent& event); diff --git a/src/Main/Forms/TrueCrypt.fbp b/src/Main/Forms/TrueCrypt.fbp index 82c1fba6..0e14502d 100644 --- a/src/Main/Forms/TrueCrypt.fbp +++ b/src/Main/Forms/TrueCrypt.fbp @@ -734,6 +734,21 @@ m_separator13 none + + + 0 + 1 + + wxID_ANY + wxITEM_NORMAL + Donate + DonateMenuItem + none + + + OnDonateMenuItemSelected + + 0 -- cgit v1.2.3