Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
win32/xestiaab: Moved Source Files into top of project tree instead of in Resource...
[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.
26     
27         frmContactEditorCalAdr *frameCECalAdr = new frmContactEditorCalAdr ( this );
28         frameCECalAdr->SetEditorMode(FALSE);
29         frameCECalAdr->SetupPointers(&ContactEditorData.CalendarList,
30                 &ContactEditorData.CalendarListAltID,
31                 &ContactEditorData.CalendarListPID,
32                 &ContactEditorData.CalendarListType,
33                 &ContactEditorData.CalendarListTokens,
34                 &ContactEditorData.CalendarListPref,
35                 lboCalendarAddresses,
36                 (intValueSeek));
37         frameCECalAdr->ShowModal();
38         delete frameCECalAdr;
39         frameCECalAdr = NULL;
40     intValueSeek++;
42 }
44 void frmContactEditor::ModifyCalendarAddress( wxCommandEvent& event )
45 {
47         // Bring up the window to modify the calendar address.
49         long longSelected = -1;
50         int intSelectedData = 0;
51     
52         if (lboCalendarAddresses->GetItemCount() == 0 || !GetSelectedItem(lboCalendarAddresses,
53                 &longSelected,
54                 &intSelectedData)){
55                 
56                 return;
57                 
58         }
59     
60         frmContactEditorCalAdr *frameCECalAdr = new frmContactEditorCalAdr ( this );
61         frameCECalAdr->SetupPointers(&ContactEditorData.CalendarList,
62                 &ContactEditorData.CalendarListAltID,
63                 &ContactEditorData.CalendarListPID,
64                 &ContactEditorData.CalendarListType,
65                 &ContactEditorData.CalendarListTokens,
66                 &ContactEditorData.CalendarListPref,
67                 lboCalendarAddresses,
68                 intSelectedData);
69         frameCECalAdr->SetEditorMode(TRUE);
70         frameCECalAdr->ShowModal();
71         delete frameCECalAdr;
72         frameCECalAdr = NULL;
73         
74 }
76 void frmContactEditor::DeleteCalendarAddress( wxCommandEvent& event )
77 {
79         // Bring up the window to delete the calendar address.
81         long longSelected = -1;
82         int intSelectedData = 0;
83     
84         if (lboCalendarAddresses->GetItemCount() == 0 || !GetSelectedItem(lboCalendarAddresses,
85                 &longSelected,
86                 &intSelectedData)){
87                 
88                 return;
89                 
90         }
91     
92         lboCalendarAddresses->DeleteItem(longSelected);
93     
94         DeleteMapData(intSelectedData, &ContactEditorData.CalendarList, &ContactEditorData.CalendarListAltID,
95                 &ContactEditorData.CalendarListPID, &ContactEditorData.CalendarListType, &ContactEditorData.CalendarListTokens,
96                 &ContactEditorData.CalendarListPref);
97     
98 }
100 void frmContactEditor::AddCalendarRequest( wxCommandEvent& event )
103         // Bring up the window to add a calendar request address.
104     
105         frmContactEditorCalAdr *frameCECalAdr = new frmContactEditorCalAdr ( this );
106         frameCECalAdr->SetEditorMode(FALSE);
107         frameCECalAdr->SetupPointers(&ContactEditorData.CalendarRequestList,
108                 &ContactEditorData.CalendarRequestListAltID,
109                 &ContactEditorData.CalendarRequestListPID,
110                 &ContactEditorData.CalendarRequestListType,
111                 &ContactEditorData.CalendarRequestListTokens,
112                 &ContactEditorData.CalendarRequestListPref,
113                 lboCalendarRequestAddress,
114                 (intValueSeek));
115         frameCECalAdr->ShowModal();
116         delete frameCECalAdr;
117         frameCECalAdr = NULL;
118     intValueSeek++;
122 void frmContactEditor::ModifyCalendarRequest( wxCommandEvent& event )
125         // Bring up the window to modify a calendar request address.
127         long longSelected = -1;
128         int intSelectedData = 0;
129     
130         if (lboCalendarRequestAddress->GetItemCount() == 0 || !GetSelectedItem(lboCalendarRequestAddress,
131                 &longSelected,
132                 &intSelectedData)){
133                 
134                 return;
135                 
136         }
137     
138         frmContactEditorCalAdr *frameCECalAdr = new frmContactEditorCalAdr ( this );
139         frameCECalAdr->SetupPointers(&ContactEditorData.CalendarRequestList,
140                 &ContactEditorData.CalendarRequestListAltID,
141                 &ContactEditorData.CalendarRequestListPID,
142                 &ContactEditorData.CalendarRequestListType,
143                 &ContactEditorData.CalendarRequestListTokens,
144                 &ContactEditorData.CalendarRequestListPref,
145                 lboCalendarRequestAddress,
146                 intSelectedData);
147         frameCECalAdr->SetEditorMode(TRUE);
148         frameCECalAdr->ShowModal();
149         delete frameCECalAdr;
150         frameCECalAdr = NULL;
151         
154 void frmContactEditor::DeleteCalendarRequest( wxCommandEvent& event )
157         // Bring up the window to delete a calendar request address.
159         long longSelected = -1;
160         int intSelectedData = 0;
161     
162         if (lboCalendarRequestAddress->GetItemCount() == 0 || !GetSelectedItem(lboCalendarRequestAddress,
163                 &longSelected,
164                 &intSelectedData)){
165                 
166                 return;
167                 
168         }
169     
170         lboCalendarRequestAddress->DeleteItem(longSelected);
171     
172         DeleteMapData(intSelectedData, &ContactEditorData.CalendarRequestList,
173                 &ContactEditorData.CalendarRequestListAltID, &ContactEditorData.CalendarRequestListPID,
174                 &ContactEditorData.CalendarRequestListType, &ContactEditorData.CalendarRequestListTokens,
175                 &ContactEditorData.CalendarRequestListPref);
176                 
179 void frmContactEditor::AddFreeBusy( wxCommandEvent& event )
182         // Bring up the window to add a calendar free/busy address.
183     
184         frmContactEditorCalAdr *frameCECalAdr = new frmContactEditorCalAdr ( this );
185         frameCECalAdr->SetEditorMode(FALSE);
186         frameCECalAdr->SetupPointers(&ContactEditorData.FreeBusyList,
187                 &ContactEditorData.FreeBusyListAltID,
188                 &ContactEditorData.FreeBusyListPID,
189                 &ContactEditorData.FreeBusyListType,
190                 &ContactEditorData.FreeBusyListTokens,
191                 &ContactEditorData.FreeBusyListPref,
192                 lboFreeBusyAddresses,
193                 (intValueSeek));
194         frameCECalAdr->ShowModal();
195         delete frameCECalAdr;
196         frameCECalAdr = NULL;
197     intValueSeek++;
201 void frmContactEditor::ModifyFreeBusy( wxCommandEvent& event )
204         // Bring up the window to modify a calendar free/busy address.
206         long longSelected = -1;
207         int intSelectedData = 0;
208     
209         if (lboFreeBusyAddresses->GetItemCount() == 0 || !GetSelectedItem(lboFreeBusyAddresses,
210                 &longSelected,
211                 &intSelectedData)){
212                 
213                 return;
214                 
215         }
216     
217         frmContactEditorCalAdr *frameCECalAdr = new frmContactEditorCalAdr ( this );
218         frameCECalAdr->SetupPointers(&ContactEditorData.FreeBusyList,
219                 &ContactEditorData.FreeBusyListAltID,
220                 &ContactEditorData.FreeBusyListPID,
221                 &ContactEditorData.FreeBusyListType,
222                 &ContactEditorData.FreeBusyListTokens,
223                 &ContactEditorData.FreeBusyListPref,
224                 lboFreeBusyAddresses,
225                 intSelectedData);
226         frameCECalAdr->SetEditorMode(TRUE);
227         frameCECalAdr->ShowModal();
228         delete frameCECalAdr;
229         frameCECalAdr = NULL;
230         
233 void frmContactEditor::DeleteFreeBusy( wxCommandEvent& event )
236         // Bring up the window to delete a calendar free/busy address.
238         long longSelected = -1;
239         int intSelectedData = 0;
240     
241         if (lboFreeBusyAddresses->GetItemCount() == 0 || !GetSelectedItem(lboFreeBusyAddresses,
242                 &longSelected,
243                 &intSelectedData)){
244                 
245                 return;
246                 
247         }
248     
249         lboFreeBusyAddresses->DeleteItem(longSelected);
250     
251         DeleteMapData(intSelectedData, &ContactEditorData.FreeBusyList, &ContactEditorData.FreeBusyListAltID,
252                 &ContactEditorData.FreeBusyListPID, &ContactEditorData.FreeBusyListType, &ContactEditorData.FreeBusyListTokens,
253                 &ContactEditorData.FreeBusyListPref);
254     
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