From 26523a1ba309b07a865b4a9e4720216cc40c7e87 Mon Sep 17 00:00:00 2001 From: Steve Brokenshire Date: Sun, 29 Nov 2015 13:21:25 +0000 Subject: [PATCH] Added Save buttons in the pictures, logos and sounds tabs of the contact editor. --- source/AppXestiaAddrBk.cpp | 47 ++++++++++++++++++++++++++------------ source/AppXestiaAddrBk.h | 8 ++++++- 2 files changed, 40 insertions(+), 15 deletions(-) diff --git a/source/AppXestiaAddrBk.cpp b/source/AppXestiaAddrBk.cpp index 0755c34..b6a4de7 100644 --- a/source/AppXestiaAddrBk.cpp +++ b/source/AppXestiaAddrBk.cpp @@ -1771,7 +1771,7 @@ frmContactEditorADT::frmContactEditorADT( wxWindow* parent, wxWindowID id, const tabGeneral->SetSizer( bSizer18 ); tabGeneral->Layout(); bSizer18->Fit( tabGeneral ); - nbkContact->AddPage( tabGeneral, wxT("General"), false ); + nbkContact->AddPage( tabGeneral, wxT("General"), true ); tabHome = new wxScrolledWindow( nbkContact, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL ); tabHome->SetScrollRate( 5, 5 ); wxBoxSizer* bSizer181; @@ -2959,20 +2959,25 @@ frmContactEditorADT::frmContactEditorADT( wxWindow* parent, wxWindowID id, const wxBoxSizer* bSizer212; bSizer212 = new wxBoxSizer( wxVERTICAL ); - wxBoxSizer* bSizer213; - bSizer213 = new wxBoxSizer( wxHORIZONTAL ); + wxFlexGridSizer* fgSizer46; + fgSizer46 = new wxFlexGridSizer( 2, 3, 0, 0 ); + fgSizer46->SetFlexibleDirection( wxBOTH ); + fgSizer46->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); btnAddPicture = new wxButton( tabPictures, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 ); - bSizer213->Add( btnAddPicture, 0, wxALL, 5 ); + fgSizer46->Add( btnAddPicture, 0, wxALL, 5 ); btnModifyPicture = new wxButton( tabPictures, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 ); - bSizer213->Add( btnModifyPicture, 0, wxALL, 5 ); + fgSizer46->Add( btnModifyPicture, 0, wxALL, 5 ); btnDeletePicture = new wxButton( tabPictures, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 ); - bSizer213->Add( btnDeletePicture, 0, wxALL, 5 ); + fgSizer46->Add( btnDeletePicture, 0, wxALL, 5 ); + btnSavePicture = new wxButton( tabPictures, wxID_ANY, wxT("Save"), wxDefaultPosition, wxDefaultSize, 0 ); + fgSizer46->Add( btnSavePicture, 0, wxALL, 5 ); - bSizer212->Add( bSizer213, 1, wxEXPAND, 5 ); + + bSizer212->Add( fgSizer46, 1, wxEXPAND, 5 ); bSizer211->Add( bSizer212, 0, wxEXPAND, 5 ); @@ -3002,20 +3007,25 @@ frmContactEditorADT::frmContactEditorADT( wxWindow* parent, wxWindowID id, const wxBoxSizer* bSizer2121; bSizer2121 = new wxBoxSizer( wxVERTICAL ); - wxBoxSizer* bSizer2131; - bSizer2131 = new wxBoxSizer( wxHORIZONTAL ); + wxFlexGridSizer* fgSizer47; + fgSizer47 = new wxFlexGridSizer( 2, 3, 0, 0 ); + fgSizer47->SetFlexibleDirection( wxBOTH ); + fgSizer47->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); btnAddLogo = new wxButton( tabLogo, wxID_ANY, wxT("Add"), wxDefaultPosition, wxDefaultSize, 0 ); - bSizer2131->Add( btnAddLogo, 0, wxALL, 5 ); + fgSizer47->Add( btnAddLogo, 0, wxALL, 5 ); btnModifyLogo = new wxButton( tabLogo, wxID_ANY, wxT("Modify"), wxDefaultPosition, wxDefaultSize, 0 ); - bSizer2131->Add( btnModifyLogo, 0, wxALL, 5 ); + fgSizer47->Add( btnModifyLogo, 0, wxALL, 5 ); btnDeleteLogo = new wxButton( tabLogo, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 ); - bSizer2131->Add( btnDeleteLogo, 0, wxALL, 5 ); + fgSizer47->Add( btnDeleteLogo, 0, wxALL, 5 ); + + btnSaveLogo = new wxButton( tabLogo, wxID_ANY, wxT("Save"), wxDefaultPosition, wxDefaultSize, 0 ); + fgSizer47->Add( btnSaveLogo, 0, wxALL, 5 ); - bSizer2121->Add( bSizer2131, 1, wxEXPAND, 5 ); + bSizer2121->Add( fgSizer47, 1, wxEXPAND, 5 ); bSizer2111->Add( bSizer2121, 0, wxEXPAND, 5 ); @@ -3054,6 +3064,9 @@ frmContactEditorADT::frmContactEditorADT( wxWindow* parent, wxWindowID id, const btnDeleteSound = new wxButton( tabSounds, wxID_ANY, wxT("Delete"), wxDefaultPosition, wxDefaultSize, 0 ); bSizer472111->Add( btnDeleteSound, 0, wxALL, 5 ); + btnSaveSound = new wxButton( tabSounds, wxID_ANY, wxT("Save"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer472111->Add( btnSaveSound, 0, wxALL, 5 ); + m_staticline1 = new wxStaticLine( tabSounds, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); bSizer472111->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 ); @@ -3086,7 +3099,7 @@ frmContactEditorADT::frmContactEditorADT( wxWindow* parent, wxWindowID id, const tabSounds->SetSizer( szrAddresses1111 ); tabSounds->Layout(); szrAddresses1111->Fit( tabSounds ); - nbkContact->AddPage( tabSounds, wxT("Sounds"), true ); + nbkContact->AddPage( tabSounds, wxT("Sounds"), false ); tabCalendaring = new wxScrolledWindow( nbkContact, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL ); tabCalendaring->SetScrollRate( 5, 5 ); wxBoxSizer* bSizer1821; @@ -3543,13 +3556,16 @@ frmContactEditorADT::frmContactEditorADT( wxWindow* parent, wxWindowID id, const btnAddPicture->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddPicture ), NULL, this ); btnModifyPicture->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyPicture ), NULL, this ); btnDeletePicture->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeletePicture ), NULL, this ); + btnSavePicture->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::SavePicture ), NULL, this ); lboLogos->Connect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( frmContactEditorADT::LoadLogo ), NULL, this ); btnAddLogo->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddLogo ), NULL, this ); btnModifyLogo->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyLogo ), NULL, this ); btnDeleteLogo->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteLogo ), NULL, this ); + btnSaveLogo->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::SaveLogo ), NULL, this ); btnAddSound->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddSound ), NULL, this ); btnModifySound->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifySound ), NULL, this ); btnDeleteSound->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteSound ), NULL, this ); + btnSaveSound->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::SaveSound ), NULL, this ); btnPlay->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::PlaySound ), NULL, this ); btnStop->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::StopSound ), NULL, this ); btnAddCalendarAddress->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddCalendarAddress ), NULL, this ); @@ -3720,13 +3736,16 @@ frmContactEditorADT::~frmContactEditorADT() btnAddPicture->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddPicture ), NULL, this ); btnModifyPicture->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyPicture ), NULL, this ); btnDeletePicture->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeletePicture ), NULL, this ); + btnSavePicture->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::SavePicture ), NULL, this ); lboLogos->Disconnect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( frmContactEditorADT::LoadLogo ), NULL, this ); btnAddLogo->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddLogo ), NULL, this ); btnModifyLogo->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifyLogo ), NULL, this ); btnDeleteLogo->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteLogo ), NULL, this ); + btnSaveLogo->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::SaveLogo ), NULL, this ); btnAddSound->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddSound ), NULL, this ); btnModifySound->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::ModifySound ), NULL, this ); btnDeleteSound->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::DeleteSound ), NULL, this ); + btnSaveSound->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::SaveSound ), NULL, this ); btnPlay->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::PlaySound ), NULL, this ); btnStop->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::StopSound ), NULL, this ); btnAddCalendarAddress->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( frmContactEditorADT::AddCalendarAddress ), NULL, this ); diff --git a/source/AppXestiaAddrBk.h b/source/AppXestiaAddrBk.h index 72fe433..aeecee4 100644 --- a/source/AppXestiaAddrBk.h +++ b/source/AppXestiaAddrBk.h @@ -640,17 +640,20 @@ class frmContactEditorADT : public wxFrame wxButton* btnAddPicture; wxButton* btnModifyPicture; wxButton* btnDeletePicture; + wxButton* btnSavePicture; wxScrolledWindow* tabLogo; wxStaticBitmap* imgLogo; wxListCtrl* lboLogos; wxButton* btnAddLogo; wxButton* btnModifyLogo; wxButton* btnDeleteLogo; + wxButton* btnSaveLogo; wxScrolledWindow* tabSounds; wxListCtrl* lboSounds; wxButton* btnAddSound; wxButton* btnModifySound; wxButton* btnDeleteSound; + wxButton* btnSaveSound; wxStaticLine* m_staticline1; wxBitmapButton* btnPlay; wxBitmapButton* btnStop; @@ -825,13 +828,16 @@ class frmContactEditorADT : public wxFrame virtual void AddPicture( wxCommandEvent& event ) { event.Skip(); } virtual void ModifyPicture( wxCommandEvent& event ) { event.Skip(); } virtual void DeletePicture( wxCommandEvent& event ) { event.Skip(); } + virtual void SavePicture( wxCommandEvent& event ) { event.Skip(); } virtual void LoadLogo( wxListEvent& event ) { event.Skip(); } virtual void AddLogo( wxCommandEvent& event ) { event.Skip(); } virtual void ModifyLogo( wxCommandEvent& event ) { event.Skip(); } virtual void DeleteLogo( wxCommandEvent& event ) { event.Skip(); } + virtual void SaveLogo( wxCommandEvent& event ) { event.Skip(); } virtual void AddSound( wxCommandEvent& event ) { event.Skip(); } virtual void ModifySound( wxCommandEvent& event ) { event.Skip(); } virtual void DeleteSound( wxCommandEvent& event ) { event.Skip(); } + virtual void SaveSound( wxCommandEvent& event ) { event.Skip(); } virtual void PlaySound( wxCommandEvent& event ) { event.Skip(); } virtual void StopSound( wxCommandEvent& event ) { event.Skip(); } virtual void AddCalendarAddress( wxCommandEvent& event ) { event.Skip(); } @@ -861,7 +867,7 @@ class frmContactEditorADT : public wxFrame public: - frmContactEditorADT( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Contact Editor"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 769,517 ), long style = wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL ); + frmContactEditorADT( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Contact Editor"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 765,517 ), long style = wxDEFAULT_FRAME_STYLE|wxTAB_TRAVERSAL ); ~frmContactEditorADT(); -- 2.39.5