VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2014-12-20 17:36:29 +0100
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2014-12-20 17:37:36 +0100
commit7a89f0f0e1720ee3c9c12a14849ce4cc65e47304 (patch)
tree31b99a4babb65579eb9acb8384a48e4334a0a06c /src
parent496701851f31bf46486ad71f5bcf500fd0385603 (diff)
downloadVeraCrypt-7a89f0f0e1720ee3c9c12a14849ce4cc65e47304.tar.gz
VeraCrypt-7a89f0f0e1720ee3c9c12a14849ce4cc65e47304.zip
Linux/MacOSX: Add a donation menu entry
Diffstat (limited to 'src')
-rw-r--r--src/Main/Forms/Forms.cpp6
-rw-r--r--src/Main/Forms/Forms.h1
-rw-r--r--src/Main/Forms/MainFrame.h1
-rw-r--r--src/Main/Forms/TrueCrypt.fbp15
4 files changed, 23 insertions, 0 deletions
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
@@ -741,6 +741,21 @@
<property name="help"></property>
<property name="id">wxID_ANY</property>
<property name="kind">wxITEM_NORMAL</property>
+ <property name="label">Donate</property>
+ <property name="name">DonateMenuItem</property>
+ <property name="permission">none</property>
+ <property name="shortcut"></property>
+ <property name="unchecked_bitmap"></property>
+ <event name="OnMenuSelection">OnDonateMenuItemSelected</event>
+ <event name="OnUpdateUI"></event>
+ </object>
+ <object class="wxMenuItem" expanded="1">
+ <property name="bitmap"></property>
+ <property name="checked">0</property>
+ <property name="enabled">1</property>
+ <property name="help"></property>
+ <property name="id">wxID_ANY</property>
+ <property name="kind">wxITEM_NORMAL</property>
<property name="label">Contact</property>
<property name="name">ContactMenuItem</property>
<property name="permission">none</property>