Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Added comments to describe functions in contacteditor/frmContactEditor-Calendar.cpp
[xestiaab/.git] / source / contacteditor / frmContactEditor-Calendar.cpp
1 // frmContactEditor-Calendar.cpp - frmContactEditor Calendar tab subroutines.
2 //
3 // (c) 2012-2016 Xestia Software Development.
4 //
5 // This file is part of Xestia Address Book.
6 //
7 // Xestia Address Book is free software: you can redistribute it and/or modify
8 // it under the terms of the GNU General Public License as published by the
9 // Free Software Foundation, version 3 of the license.
10 //
11 // Xestia Address Book is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
15 //
16 // You should have received a copy of the GNU General Public License along
17 // with Xestia Address Book. If not, see <http://www.gnu.org/licenses/>
19 #include "frmContactEditor.h"
20 #include "frmContactEditorCalAdr.h"
22 void frmContactEditor::AddCalendarAddress( wxCommandEvent& event )
23 {
25         // Bring up the window to add the calendar address.
27         int intResult = 0;
28     
29         frmContactEditorCalAdr *frameCECalAdr = new frmContactEditorCalAdr ( this );
30         frameCECalAdr->SetEditorMode(FALSE);
31         intResult = GetLastInt(&ContactEditorData.CalendarList);
32         frameCECalAdr->SetupPointers(&ContactEditorData.CalendarList,
33                 &ContactEditorData.CalendarListAltID,
34                 &ContactEditorData.CalendarListPID,
35                 &ContactEditorData.CalendarListType,
36                 &ContactEditorData.CalendarListTokens,
37                 &ContactEditorData.CalendarListPref,
38                 lboCalendarAddresses,
39                 (intValueSeek));
40         frameCECalAdr->ShowModal();
41         delete frameCECalAdr;
42         frameCECalAdr = NULL;
43         
44 }
46 void frmContactEditor::ModifyCalendarAddress( wxCommandEvent& event )
47 {
49         // Bring up the window to modify the calendar address.
51         long longSelected = -1;
52         int intSelectedData = 0;
53     
54         if (!GetSelectedItem(lboCalendarAddresses,
55                 &longSelected,
56                 &intSelectedData)){
57                 
58                 return;
59                 
60         }
61     
62         frmContactEditorCalAdr *frameCECalAdr = new frmContactEditorCalAdr ( this );
63         frameCECalAdr->SetupPointers(&ContactEditorData.CalendarList,
64                 &ContactEditorData.CalendarListAltID,
65                 &ContactEditorData.CalendarListPID,
66                 &ContactEditorData.CalendarListType,
67                 &ContactEditorData.CalendarListTokens,
68                 &ContactEditorData.CalendarListPref,
69                 lboCalendarAddresses,
70                 intSelectedData);
71         frameCECalAdr->SetEditorMode(TRUE);
72         frameCECalAdr->ShowModal();
73         delete frameCECalAdr;
74         frameCECalAdr = NULL;
75         
76 }
78 void frmContactEditor::DeleteCalendarAddress( wxCommandEvent& event )
79 {
81         // Bring up the window to delete the calendar address.
83         long longSelected = -1;
84         int intSelectedData = 0;
85     
86         if (!GetSelectedItem(lboCalendarAddresses,
87                 &longSelected,
88                 &intSelectedData)){
89                 
90                 return;
91                 
92         }
93     
94         lboCalendarAddresses->DeleteItem(longSelected);
95     
96         DeleteMapData(intSelectedData, &ContactEditorData.CalendarList, &ContactEditorData.CalendarListAltID,
97                 &ContactEditorData.CalendarListPID, &ContactEditorData.CalendarListType, &ContactEditorData.CalendarListTokens,
98                 &ContactEditorData.CalendarListPref);
99     
102 void frmContactEditor::AddCalendarRequest( wxCommandEvent& event )
105         // Bring up the window to add a calendar request address.
107         int intResult = 0;
108     
109         frmContactEditorCalAdr *frameCECalAdr = new frmContactEditorCalAdr ( this );
110         frameCECalAdr->SetEditorMode(FALSE);
111         intResult = GetLastInt(&ContactEditorData.CalendarRequestList);
112         frameCECalAdr->SetupPointers(&ContactEditorData.CalendarRequestList,
113                 &ContactEditorData.CalendarRequestListAltID,
114                 &ContactEditorData.CalendarRequestListPID,
115                 &ContactEditorData.CalendarRequestListType,
116                 &ContactEditorData.CalendarRequestListTokens,
117                 &ContactEditorData.CalendarRequestListPref,
118                 lboCalendarRequestAddress,
119                 (intValueSeek));
120         frameCECalAdr->ShowModal();
121         delete frameCECalAdr;
122         frameCECalAdr = NULL;
123         
126 void frmContactEditor::ModifyCalendarRequest( wxCommandEvent& event )
129         // Bring up the window to modify a calendar request address.
131         long longSelected = -1;
132         int intSelectedData = 0;
133     
134         if (!GetSelectedItem(lboCalendarRequestAddress,
135                 &longSelected,
136                 &intSelectedData)){
137                 
138                 return;
139                 
140         }
141     
142         frmContactEditorCalAdr *frameCECalAdr = new frmContactEditorCalAdr ( this );
143         frameCECalAdr->SetupPointers(&ContactEditorData.CalendarRequestList,
144                 &ContactEditorData.CalendarRequestListAltID,
145                 &ContactEditorData.CalendarRequestListPID,
146                 &ContactEditorData.CalendarRequestListType,
147                 &ContactEditorData.CalendarRequestListTokens,
148                 &ContactEditorData.CalendarRequestListPref,
149                 lboCalendarRequestAddress,
150                 intSelectedData);
151         frameCECalAdr->SetEditorMode(TRUE);
152         frameCECalAdr->ShowModal();
153         delete frameCECalAdr;
154         frameCECalAdr = NULL;
155         
158 void frmContactEditor::DeleteCalendarRequest( wxCommandEvent& event )
161         // Bring up the window to delete a calendar request address.
163         long longSelected = -1;
164         int intSelectedData = 0;
165     
166         if (!GetSelectedItem(lboCalendarRequestAddress,
167                 &longSelected,
168                 &intSelectedData)){
169                 
170                 return;
171                 
172         }
173     
174         lboCalendarRequestAddress->DeleteItem(longSelected);
175     
176         DeleteMapData(intSelectedData, &ContactEditorData.CalendarRequestList,
177                 &ContactEditorData.CalendarRequestListAltID, &ContactEditorData.CalendarRequestListPID,
178                 &ContactEditorData.CalendarRequestListType, &ContactEditorData.CalendarRequestListTokens,
179                 &ContactEditorData.CalendarRequestListPref);
180                 
183 void frmContactEditor::AddFreeBusy( wxCommandEvent& event )
186         // Bring up the window to add a calendar free/busy address.
188         int intResult = 0;
189     
190         frmContactEditorCalAdr *frameCECalAdr = new frmContactEditorCalAdr ( this );
191         frameCECalAdr->SetEditorMode(FALSE);
192         intResult = GetLastInt(&ContactEditorData.FreeBusyList);
193         frameCECalAdr->SetupPointers(&ContactEditorData.FreeBusyList,
194                 &ContactEditorData.FreeBusyListAltID,
195                 &ContactEditorData.FreeBusyListPID,
196                 &ContactEditorData.FreeBusyListType,
197                 &ContactEditorData.FreeBusyListTokens,
198                 &ContactEditorData.FreeBusyListPref,
199                 lboFreeBusyAddresses,
200                 (intValueSeek));
201         frameCECalAdr->ShowModal();
202         delete frameCECalAdr;
203         frameCECalAdr = NULL;
204         
207 void frmContactEditor::ModifyFreeBusy( wxCommandEvent& event )
210         // Bring up the window to modify a calendar free/busy address.
212         long longSelected = -1;
213         int intSelectedData = 0;
214     
215         if (!GetSelectedItem(lboFreeBusyAddresses,
216                 &longSelected,
217                 &intSelectedData)){
218                 
219                 return;
220                 
221         }
222     
223         frmContactEditorCalAdr *frameCECalAdr = new frmContactEditorCalAdr ( this );
224         frameCECalAdr->SetupPointers(&ContactEditorData.FreeBusyList,
225                 &ContactEditorData.FreeBusyListAltID,
226                 &ContactEditorData.FreeBusyListPID,
227                 &ContactEditorData.FreeBusyListType,
228                 &ContactEditorData.FreeBusyListTokens,
229                 &ContactEditorData.FreeBusyListPref,
230                 lboFreeBusyAddresses,
231                 intSelectedData);
232         frameCECalAdr->SetEditorMode(TRUE);
233         frameCECalAdr->ShowModal();
234         delete frameCECalAdr;
235         frameCECalAdr = NULL;
236         
239 void frmContactEditor::DeleteFreeBusy( wxCommandEvent& event )
242         // Bring up the window to delete a calendar free/busy address.
244         long longSelected = -1;
245         int intSelectedData = 0;
246     
247         if (!GetSelectedItem(lboFreeBusyAddresses,
248                 &longSelected,
249                 &intSelectedData)){
250                 
251                 return;
252                 
253         }
254     
255         lboFreeBusyAddresses->DeleteItem(longSelected);
256     
257         DeleteMapData(intSelectedData, &ContactEditorData.FreeBusyList, &ContactEditorData.FreeBusyListAltID,
258                 &ContactEditorData.FreeBusyListPID, &ContactEditorData.FreeBusyListType, &ContactEditorData.FreeBusyListTokens,
259                 &ContactEditorData.FreeBusyListPref);
260     
Xestia Software Development
Yn Maystri
© 2006 - 2019 Xestia Software Development
Software

Xestia Address Book
Xestia Calendar
Development

Xestia Gelforn
Everything else

About
News
Privacy Policy