Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Indented code properly 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         int intResult = 0;
26     
27         frmContactEditorCalAdr *frameCECalAdr = new frmContactEditorCalAdr ( this );
28         frameCECalAdr->SetEditorMode(FALSE);
29         intResult = GetLastInt(&ContactEditorData.CalendarList);
30         frameCECalAdr->SetupPointers(&ContactEditorData.CalendarList,
31                 &ContactEditorData.CalendarListAltID,
32                 &ContactEditorData.CalendarListPID,
33                 &ContactEditorData.CalendarListType,
34                 &ContactEditorData.CalendarListTokens,
35                 &ContactEditorData.CalendarListPref,
36                 lboCalendarAddresses,
37                 (intValueSeek));
38         frameCECalAdr->ShowModal();
39         delete frameCECalAdr;
40         frameCECalAdr = NULL;
41         
42 }
44 void frmContactEditor::ModifyCalendarAddress( wxCommandEvent& event )
45 {
47         long longSelected = -1;
48         int intSelectedData = 0;
49     
50         if (!GetSelectedItem(lboCalendarAddresses,
51                 &longSelected,
52                 &intSelectedData)){
53                 
54                 return;
55                 
56         }
57     
58         frmContactEditorCalAdr *frameCECalAdr = new frmContactEditorCalAdr ( this );
59         frameCECalAdr->SetupPointers(&ContactEditorData.CalendarList,
60                 &ContactEditorData.CalendarListAltID,
61                 &ContactEditorData.CalendarListPID,
62                 &ContactEditorData.CalendarListType,
63                 &ContactEditorData.CalendarListTokens,
64                 &ContactEditorData.CalendarListPref,
65                 lboCalendarAddresses,
66                 intSelectedData);
67         frameCECalAdr->SetEditorMode(TRUE);
68         frameCECalAdr->ShowModal();
69         delete frameCECalAdr;
70         frameCECalAdr = NULL;
71         
72 }
74 void frmContactEditor::DeleteCalendarAddress( wxCommandEvent& event )
75 {
77         long longSelected = -1;
78         int intSelectedData = 0;
79     
80         if (!GetSelectedItem(lboCalendarAddresses,
81                 &longSelected,
82                 &intSelectedData)){
83                 
84                 return;
85                 
86         }
87     
88         lboCalendarAddresses->DeleteItem(longSelected);
89     
90         DeleteMapData(intSelectedData, &ContactEditorData.CalendarList, &ContactEditorData.CalendarListAltID,
91                 &ContactEditorData.CalendarListPID, &ContactEditorData.CalendarListType, &ContactEditorData.CalendarListTokens,
92                 &ContactEditorData.CalendarListPref);
93     
94 }
96 void frmContactEditor::AddCalendarRequest( wxCommandEvent& event )
97 {
99         int intResult = 0;
100     
101         frmContactEditorCalAdr *frameCECalAdr = new frmContactEditorCalAdr ( this );
102         frameCECalAdr->SetEditorMode(FALSE);
103         intResult = GetLastInt(&ContactEditorData.CalendarRequestList);
104         frameCECalAdr->SetupPointers(&ContactEditorData.CalendarRequestList,
105                 &ContactEditorData.CalendarRequestListAltID,
106                 &ContactEditorData.CalendarRequestListPID,
107                 &ContactEditorData.CalendarRequestListType,
108                 &ContactEditorData.CalendarRequestListTokens,
109                 &ContactEditorData.CalendarRequestListPref,
110                 lboCalendarRequestAddress,
111                 (intValueSeek));
112         frameCECalAdr->ShowModal();
113         delete frameCECalAdr;
114         frameCECalAdr = NULL;
115         
118 void frmContactEditor::ModifyCalendarRequest( wxCommandEvent& event )
121         long longSelected = -1;
122         int intSelectedData = 0;
123     
124         if (!GetSelectedItem(lboCalendarRequestAddress,
125                 &longSelected,
126                 &intSelectedData)){
127                 
128                 return;
129                 
130         }
131     
132         frmContactEditorCalAdr *frameCECalAdr = new frmContactEditorCalAdr ( this );
133         frameCECalAdr->SetupPointers(&ContactEditorData.CalendarRequestList,
134                 &ContactEditorData.CalendarRequestListAltID,
135                 &ContactEditorData.CalendarRequestListPID,
136                 &ContactEditorData.CalendarRequestListType,
137                 &ContactEditorData.CalendarRequestListTokens,
138                 &ContactEditorData.CalendarRequestListPref,
139                 lboCalendarRequestAddress,
140                 intSelectedData);
141         frameCECalAdr->SetEditorMode(TRUE);
142         frameCECalAdr->ShowModal();
143         delete frameCECalAdr;
144         frameCECalAdr = NULL;
145         
148 void frmContactEditor::DeleteCalendarRequest( wxCommandEvent& event )
151         long longSelected = -1;
152         int intSelectedData = 0;
153     
154         if (!GetSelectedItem(lboCalendarRequestAddress,
155                 &longSelected,
156                 &intSelectedData)){
157                 
158                 return;
159                 
160         }
161     
162         lboCalendarRequestAddress->DeleteItem(longSelected);
163     
164         DeleteMapData(intSelectedData, &ContactEditorData.CalendarRequestList,
165                 &ContactEditorData.CalendarRequestListAltID, &ContactEditorData.CalendarRequestListPID,
166                 &ContactEditorData.CalendarRequestListType, &ContactEditorData.CalendarRequestListTokens,
167                 &ContactEditorData.CalendarRequestListPref);
168                 
171 void frmContactEditor::AddFreeBusy( wxCommandEvent& event )
174         int intResult = 0;
175     
176         frmContactEditorCalAdr *frameCECalAdr = new frmContactEditorCalAdr ( this );
177         frameCECalAdr->SetEditorMode(FALSE);
178         intResult = GetLastInt(&ContactEditorData.FreeBusyList);
179         frameCECalAdr->SetupPointers(&ContactEditorData.FreeBusyList,
180                 &ContactEditorData.FreeBusyListAltID,
181                 &ContactEditorData.FreeBusyListPID,
182                 &ContactEditorData.FreeBusyListType,
183                 &ContactEditorData.FreeBusyListTokens,
184                 &ContactEditorData.FreeBusyListPref,
185                 lboFreeBusyAddresses,
186                 (intValueSeek));
187         frameCECalAdr->ShowModal();
188         delete frameCECalAdr;
189         frameCECalAdr = NULL;
190         
193 void frmContactEditor::ModifyFreeBusy( wxCommandEvent& event )
196         long longSelected = -1;
197         int intSelectedData = 0;
198     
199         if (!GetSelectedItem(lboFreeBusyAddresses,
200                 &longSelected,
201                 &intSelectedData)){
202                 
203                 return;
204                 
205         }
206     
207         frmContactEditorCalAdr *frameCECalAdr = new frmContactEditorCalAdr ( this );
208         frameCECalAdr->SetupPointers(&ContactEditorData.FreeBusyList,
209                 &ContactEditorData.FreeBusyListAltID,
210                 &ContactEditorData.FreeBusyListPID,
211                 &ContactEditorData.FreeBusyListType,
212                 &ContactEditorData.FreeBusyListTokens,
213                 &ContactEditorData.FreeBusyListPref,
214                 lboFreeBusyAddresses,
215                 intSelectedData);
216         frameCECalAdr->SetEditorMode(TRUE);
217         frameCECalAdr->ShowModal();
218         delete frameCECalAdr;
219         frameCECalAdr = NULL;
220         
223 void frmContactEditor::DeleteFreeBusy( wxCommandEvent& event )
226         long longSelected = -1;
227         int intSelectedData = 0;
228     
229         if (!GetSelectedItem(lboFreeBusyAddresses,
230                 &longSelected,
231                 &intSelectedData)){
232                 
233                 return;
234                 
235         }
236     
237         lboFreeBusyAddresses->DeleteItem(longSelected);
238     
239         DeleteMapData(intSelectedData, &ContactEditorData.FreeBusyList, &ContactEditorData.FreeBusyListAltID,
240                 &ContactEditorData.FreeBusyListPID, &ContactEditorData.FreeBusyListType, &ContactEditorData.FreeBusyListTokens,
241                 &ContactEditorData.FreeBusyListPref);
242     
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