// frmContactEditor-Calendar.cpp - frmContactEditor Calendar tab subroutines. // // (c) 2012-2015 Xestia Software Development. // // This file is part of Xestia Address Book. // // Xestia Address Book 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, version 3 of the license. // // Xestia Address Book 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 Xestia Address Book. If not, see #include "frmContactEditor.h" #include "frmContactEditorCalAdr.h" void frmContactEditor::AddCalendarAddress( wxCommandEvent& event ) { int intResult = 0; frmContactEditorCalAdr *frameCECalAdr = new frmContactEditorCalAdr ( this ); frameCECalAdr->SetEditorMode(FALSE); intResult = GetLastInt(&CalendarList); frameCECalAdr->SetupPointers(&CalendarList, &CalendarListAltID, &CalendarListPID, &CalendarListType, &CalendarListTokens, &CalendarListPref, lboCalendarAddresses, (intValueSeek)); frameCECalAdr->ShowModal(); delete frameCECalAdr; frameCECalAdr = NULL; } void frmContactEditor::ModifyCalendarAddress( wxCommandEvent& event ) { long longSelected = -1; int intSelectedData = 0; if (!GetSelectedItem(lboCalendarAddresses, &longSelected, &intSelectedData)){ return; } frmContactEditorCalAdr *frameCECalAdr = new frmContactEditorCalAdr ( this ); frameCECalAdr->SetupPointers(&CalendarList, &CalendarListAltID, &CalendarListPID, &CalendarListType, &CalendarListTokens, &CalendarListPref, lboCalendarAddresses, intSelectedData); frameCECalAdr->SetEditorMode(TRUE); frameCECalAdr->ShowModal(); delete frameCECalAdr; frameCECalAdr = NULL; } void frmContactEditor::DeleteCalendarAddress( wxCommandEvent& event ) { long longSelected = -1; int intSelectedData = 0; if (!GetSelectedItem(lboCalendarAddresses, &longSelected, &intSelectedData)){ return; } lboCalendarAddresses->DeleteItem(longSelected); DeleteMapData(intSelectedData, &CalendarList, &CalendarListAltID, &CalendarListPID, &CalendarListType, &CalendarListTokens, &CalendarListPref); } void frmContactEditor::AddCalendarRequest( wxCommandEvent& event ) { int intResult = 0; frmContactEditorCalAdr *frameCECalAdr = new frmContactEditorCalAdr ( this ); frameCECalAdr->SetEditorMode(FALSE); intResult = GetLastInt(&CalendarRequestList); frameCECalAdr->SetupPointers(&CalendarRequestList, &CalendarRequestListAltID, &CalendarRequestListPID, &CalendarRequestListType, &CalendarRequestListTokens, &CalendarRequestListPref, lboCalendarRequestAddress, (intValueSeek)); frameCECalAdr->ShowModal(); delete frameCECalAdr; frameCECalAdr = NULL; } void frmContactEditor::ModifyCalendarRequest( wxCommandEvent& event ) { long longSelected = -1; int intSelectedData = 0; if (!GetSelectedItem(lboCalendarRequestAddress, &longSelected, &intSelectedData)){ return; } frmContactEditorCalAdr *frameCECalAdr = new frmContactEditorCalAdr ( this ); frameCECalAdr->SetupPointers(&CalendarList, &CalendarRequestListAltID, &CalendarRequestListPID, &CalendarRequestListType, &CalendarRequestListTokens, &CalendarRequestListPref, lboCalendarRequestAddress, intSelectedData); frameCECalAdr->SetEditorMode(TRUE); frameCECalAdr->ShowModal(); delete frameCECalAdr; frameCECalAdr = NULL; } void frmContactEditor::DeleteCalendarRequest( wxCommandEvent& event ) { long longSelected = -1; int intSelectedData = 0; if (!GetSelectedItem(lboCalendarRequestAddress, &longSelected, &intSelectedData)){ return; } lboCalendarRequestAddress->DeleteItem(longSelected); DeleteMapData(intSelectedData, &CalendarRequestList, &CalendarRequestListAltID, &CalendarRequestListPID, &CalendarRequestListType, &CalendarRequestListTokens, &CalendarRequestListPref); } void frmContactEditor::AddFreeBusy( wxCommandEvent& event ) { int intResult = 0; frmContactEditorCalAdr *frameCECalAdr = new frmContactEditorCalAdr ( this ); frameCECalAdr->SetEditorMode(FALSE); intResult = GetLastInt(&FreeBusyList); frameCECalAdr->SetupPointers(&FreeBusyList, &FreeBusyListAltID, &FreeBusyListPID, &FreeBusyListType, &FreeBusyListTokens, &FreeBusyListPref, lboFreeBusyAddresses, (intValueSeek)); frameCECalAdr->ShowModal(); delete frameCECalAdr; frameCECalAdr = NULL; } void frmContactEditor::ModifyFreeBusy( wxCommandEvent& event ) { long longSelected = -1; int intSelectedData = 0; if (!GetSelectedItem(lboFreeBusyAddresses, &longSelected, &intSelectedData)){ return; } frmContactEditorCalAdr *frameCECalAdr = new frmContactEditorCalAdr ( this ); frameCECalAdr->SetupPointers(&FreeBusyList, &FreeBusyListAltID, &FreeBusyListPID, &FreeBusyListType, &FreeBusyListTokens, &FreeBusyListPref, lboFreeBusyAddresses, intSelectedData); frameCECalAdr->SetEditorMode(TRUE); frameCECalAdr->ShowModal(); delete frameCECalAdr; frameCECalAdr = NULL; } void frmContactEditor::DeleteFreeBusy( wxCommandEvent& event ) { long longSelected = -1; int intSelectedData = 0; if (!GetSelectedItem(lboFreeBusyAddresses, &longSelected, &intSelectedData)){ return; } lboFreeBusyAddresses->DeleteItem(longSelected); DeleteMapData(intSelectedData, &FreeBusyList, &FreeBusyListAltID, &FreeBusyListPID, &FreeBusyListType, &FreeBusyListTokens, &FreeBusyListPref); }