Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Version 0.18 release
[xestiaab/.git] / source / contacteditor / frmContactEditor-Init.cpp
1 // frmContactEditor-Init.cpp - frmContactEditor Initalisation subroutines.
2 //
3 // (c) 2012-2015 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"
21 void frmContactEditor::SetupHeaders()
22 {
23         
24         // Setup the list control headers.
25         
26         /* Items for the General Tab */
27     
28         SetupColumn(CE_NICKNAME, lboNicknames);
29         SetupColumn(CE_ADDRESS, lboAddresses);
30         SetupColumn(CE_EMAIL, lboEmails);
31         SetupColumn(CE_IM, lboIM);
32         SetupColumn(CE_TELEPHONE, lboTelephone);
33         SetupColumn(CE_LANG, lboLanguages);
34         SetupColumn(CE_TZ, lboTimezones);
35         SetupColumn(CE_GEOPOSITION, lboGeoposition);
36         SetupColumn(CE_RELATED, lboRelated);
37         SetupColumn(CE_WEBSITE, lboWebsites);
38         SetupColumn(CE_TITLE, lboTitles);
39         SetupColumn(CE_ROLE, lboRoles);
40         SetupColumn(CE_ORG, lboOrganisations);
41         SetupColumn(CE_NOTE, lboNotes);
42     
43         /* Items for the Home Tab */
44     
45         SetupColumn(CE_NICKNAME, lboHomeNicknames);
46         SetupColumn(CE_ADDRESS, lboHomeAddresses);
47         SetupColumn(CE_EMAIL, lboHomeEmails);
48         SetupColumn(CE_IM, lboHomeIM);
49         SetupColumn(CE_TELEPHONE, lboHomeTelephone);    
50         SetupColumn(CE_LANG, lboHomeLanguages);
51         SetupColumn(CE_TZ, lboHomeTimezones);
52         SetupColumn(CE_GEOPOSITION, lboHomeGeoposition);
53         SetupColumn(CE_WEBSITE, lboHomeWebsites);
54         SetupColumn(CE_TITLE, lboHomeTitles);
55         SetupColumn(CE_ROLE, lboHomeRoles);
56         SetupColumn(CE_ORG, lboHomeOrganisations);
57         SetupColumn(CE_NOTE, lboHomeNotes);
58     
59         /* Items for the Business Tab */
61         SetupColumn(CE_NICKNAME, lboBusinessNicknames);
62         SetupColumn(CE_ADDRESS, lboBusinessAddresses);
63         SetupColumn(CE_EMAIL, lboBusinessEmail);
64         SetupColumn(CE_IM, lboBusinessIM);
65         SetupColumn(CE_TELEPHONE, lboBusinessTelephone);        
66         SetupColumn(CE_LANG, lboBusinessLanguages);
67         SetupColumn(CE_TZ, lboBusinessTimezones);
68         SetupColumn(CE_GEOPOSITION, lboBusinessGeoposition);
69         SetupColumn(CE_WEBSITE, lboBusinessWebsites);
70         SetupColumn(CE_TITLE, lboBusinessTitles);
71         SetupColumn(CE_ROLE, lboBusinessRoles);
72         SetupColumn(CE_ORG, lboBusinessOrganisations);
73         SetupColumn(CE_NOTE, lboBusinessNotes); 
74     
75         /* Items for the Categories Tab */
76     
77         SetupColumn(CE_CATEGORIES, lboCategories);
78     
79         /* Items for the Groups Tab */
80     
81         SetupColumn(CE_GROUPS, lboGroups);
82     
83         /* Items for the Pictures and Logos Tab */
84     
85         SetupColumn(CE_PICTURES, lboPictures);
86         SetupColumn(CE_PICTURES, lboLogos);     
87     
88         /* Items for the Sounds Tab */
89     
90         SetupColumn(CE_SOUNDS, lboSounds);
91     
92         /* Items for the Calendaring Tab */
93     
94         SetupColumn(CE_CALENDAR, lboCalendarAddresses);
95         SetupColumn(CE_CALENDAR, lboCalendarRequestAddress);
96         SetupColumn(CE_CALENDAR, lboFreeBusyAddresses); 
97     
98         /* Items for the Security Tab */
99     
100         SetupColumn(CE_KEY, lboKeys);
101     
102         /* Items for the Other Tab */
103     
104         SetupColumn(CE_TOKEN, lboVendorNamespace);
105         SetupColumn(CE_TOKEN, lboXToken);
106     
109 void frmContactEditor::SetupColumn(wxString ColumnType, wxListCtrl *ListCtrl)
111         
112         // Setup the columns.
113     
114         wxListItem coldata;     
115     
116         if (ColumnType == CE_NICKNAME){
117         
118                 coldata.SetId(0);
119                 coldata.SetText(_("Nickname"));
120                 coldata.SetWidth(128);
121                 ListCtrl->InsertColumn(0, coldata);
122         
123                 coldata.SetId(1);
124                 coldata.SetText(_("Pri."));
125                 coldata.SetWidth(32);
126                 ListCtrl->InsertColumn(1, coldata);             
127         
128         } else if (ColumnType == CE_ADDRESS){
129         
130                 coldata.SetId(0);
131                 coldata.SetText(_("Address"));
132                 coldata.SetWidth(128);
133                 ListCtrl->InsertColumn(0, coldata);
134         
135                 coldata.SetId(1);
136                 coldata.SetText(_("Town"));
137                 coldata.SetWidth(64);
138                 ListCtrl->InsertColumn(1, coldata);             
139         
140                 coldata.SetId(2);
141                 coldata.SetText(_("County"));
142                 coldata.SetWidth(64);
143                 ListCtrl->InsertColumn(2, coldata);
144         
145                 coldata.SetId(3);
146                 coldata.SetText(_("Post code"));
147                 coldata.SetWidth(48);
148                 ListCtrl->InsertColumn(3, coldata);
149         
150                 coldata.SetId(4);
151                 coldata.SetText(_("Pri."));
152                 coldata.SetWidth(32);
153                 ListCtrl->InsertColumn(4, coldata);             
154         
155         } else if (ColumnType == CE_EMAIL){
156         
157                 coldata.SetId(0);
158                 coldata.SetText(_("Email address"));
159                 coldata.SetWidth(304);
160                 ListCtrl->InsertColumn(0, coldata);
161         
162                 coldata.SetId(1);
163                 coldata.SetText(_("Pri."));
164                 coldata.SetWidth(32);
165                 ListCtrl->InsertColumn(1, coldata);
166         
167         } else if (ColumnType == CE_IM){
168         
169                 coldata.SetId(0);
170                 coldata.SetText(_("Type"));
171                 coldata.SetWidth(64);
172                 ListCtrl->InsertColumn(0, coldata);
173         
174                 coldata.SetId(1);
175                 coldata.SetText(_("Address"));
176                 coldata.SetWidth(240);
177                 ListCtrl->InsertColumn(1, coldata);
178         
179                 coldata.SetId(2);
180                 coldata.SetText(_("Pri."));
181                 coldata.SetWidth(32);
182                 ListCtrl->InsertColumn(2, coldata);             
183         
184         } else if (ColumnType == CE_TELEPHONE){
185         
186                 coldata.SetId(0);
187                 coldata.SetText(_("Telephone number"));
188                 coldata.SetWidth(128);
189                 ListCtrl->InsertColumn(0, coldata);
190         
191                 coldata.SetId(1);
192                 coldata.SetText(_("Type"));
193                 coldata.SetWidth(64);
194                 ListCtrl->InsertColumn(1, coldata);             
195         
196                 coldata.SetId(2);
197                 coldata.SetText(_("Pri."));
198                 coldata.SetWidth(32);
199                 ListCtrl->InsertColumn(2, coldata);             
200         
201         } else if (ColumnType == CE_LANG){
202         
203                 coldata.SetId(0);
204                 coldata.SetText(_("Language"));
205                 coldata.SetWidth(128);
206                 ListCtrl->InsertColumn(0, coldata);
207         
208                 coldata.SetId(1);
209                 coldata.SetText(_("Pri."));
210                 coldata.SetWidth(32);
211                 ListCtrl->InsertColumn(1, coldata);             
212         
213         } else if (ColumnType == CE_TZ){
214         
215                 coldata.SetId(0);
216                 coldata.SetText(_("Timezone"));
217                 coldata.SetWidth(192);
218                 ListCtrl->InsertColumn(0, coldata);
219         
220                 coldata.SetId(1);
221                 coldata.SetText(_("Pri."));
222                 coldata.SetWidth(32);
223                 ListCtrl->InsertColumn(1, coldata);             
224         
225         } else if (ColumnType == CE_RELATED){
226         
227                 coldata.SetId(0);
228                 coldata.SetText(_("Type"));
229                 coldata.SetWidth(64);
230                 ListCtrl->InsertColumn(0, coldata);
231         
232                 coldata.SetId(1);
233                 coldata.SetText(_("Name/Description"));
234                 coldata.SetWidth(192);
235                 ListCtrl->InsertColumn(1, coldata);
236         
237                 coldata.SetId(2);
238                 coldata.SetText(_("Pri."));
239                 coldata.SetWidth(32);
240                 ListCtrl->InsertColumn(2, coldata);
241         
242         } else if (ColumnType == CE_WEBSITE){
243         
244                 coldata.SetId(0);
245                 coldata.SetText(_("Website"));
246                 coldata.SetWidth(288);
247                 ListCtrl->InsertColumn(0, coldata);
248         
249                 coldata.SetId(1);
250                 coldata.SetText(_("Pri."));
251                 coldata.SetWidth(32);
252                 ListCtrl->InsertColumn(1, coldata);
253         
254         } else if (ColumnType == CE_TITLE){
255         
256                 coldata.SetId(0);
257                 coldata.SetText(_("Title"));
258                 coldata.SetWidth(288);
259                 ListCtrl->InsertColumn(0, coldata);
260         
261                 coldata.SetId(1);
262                 coldata.SetText(_("Pri."));
263                 coldata.SetWidth(32);
264                 ListCtrl->InsertColumn(1, coldata);
265         
266         } else if (ColumnType == CE_ROLE){
267         
268                 coldata.SetId(0);
269                 coldata.SetText(_("Role"));
270                 coldata.SetWidth(288);
271                 ListCtrl->InsertColumn(0, coldata);
272         
273                 coldata.SetId(1);
274                 coldata.SetText(_("Pri."));
275                 coldata.SetWidth(32);
276                 ListCtrl->InsertColumn(1, coldata);
277         
278         } else if (ColumnType == CE_ORG){
279         
280                 coldata.SetId(0);
281                 coldata.SetText(_("Organisation"));
282                 coldata.SetWidth(288);
283                 ListCtrl->InsertColumn(0, coldata);
284         
285                 coldata.SetId(1);
286                 coldata.SetText(_("Pri."));
287                 coldata.SetWidth(32);
288                 ListCtrl->InsertColumn(1, coldata);
289         
290         } else if (ColumnType == CE_NOTE){
291         
292                 coldata.SetId(0);
293                 coldata.SetText(_("Notes"));
294                 coldata.SetWidth(288);
295                 ListCtrl->InsertColumn(0, coldata);
296         
297                 coldata.SetId(1);
298                 coldata.SetText(_("Pri."));
299                 coldata.SetWidth(32);
300                 ListCtrl->InsertColumn(1, coldata);     
301         
302         } else if (ColumnType == CE_CATEGORIES){
303         
304                 coldata.SetId(0);
305                 coldata.SetText(_("Category"));
306                 coldata.SetWidth(320);
307                 ListCtrl->InsertColumn(0, coldata);
308         
309                 coldata.SetId(1);
310                 coldata.SetText(_("Pri."));
311                 coldata.SetWidth(32);
312                 ListCtrl->InsertColumn(1, coldata);
313         
314         } else if (ColumnType == CE_GROUPS){
315         
316                 coldata.SetId(0);
317                 coldata.SetText(_("Member"));
318                 coldata.SetWidth(320);
319                 ListCtrl->InsertColumn(0, coldata);
320         
321         } else if (ColumnType == CE_GEOPOSITION){
322         
323                 coldata.SetId(0);
324                 coldata.SetText(_("Geoposition"));
325                 coldata.SetWidth(320);
326                 ListCtrl->InsertColumn(0, coldata);
327         
328                 coldata.SetId(1);
329                 coldata.SetText(_("Pri."));
330                 coldata.SetWidth(32);
331                 ListCtrl->InsertColumn(1, coldata);
332         
333         } else if (ColumnType == CE_PICTURES){
335                 coldata.SetId(0);
336                 coldata.SetText(_("Pictures"));
337                 coldata.SetWidth(128);
338                 ListCtrl->InsertColumn(0, coldata);
339         
340                 coldata.SetId(1);
341                 coldata.SetText(_("Type"));
342                 coldata.SetWidth(64);
343                 ListCtrl->InsertColumn(1, coldata);             
344         
345                 coldata.SetId(2);
346                 coldata.SetText(_("Pri."));
347                 coldata.SetWidth(32);
348                 ListCtrl->InsertColumn(2, coldata);
349         
350         } else if (ColumnType == CE_SOUNDS){
351         
352                 coldata.SetId(0);
353                 coldata.SetText(_("Sounds"));
354                 coldata.SetWidth(128);
355                 ListCtrl->InsertColumn(0, coldata);
356         
357                 coldata.SetId(1);
358                 coldata.SetText(_("Type"));
359                 coldata.SetWidth(64);
360                 ListCtrl->InsertColumn(1, coldata);             
361         
362                 coldata.SetId(2);
363                 coldata.SetText(_("Pri."));
364                 coldata.SetWidth(32);
365                 ListCtrl->InsertColumn(2, coldata);
366         
367         } else if (ColumnType == CE_CALENDAR){
368         
369                 coldata.SetId(0);
370                 coldata.SetText(_("Calendar Address"));
371                 coldata.SetWidth(224);
372                 ListCtrl->InsertColumn(0, coldata);
373         
374                 coldata.SetId(1);
375                 coldata.SetText(_("Type"));
376                 coldata.SetWidth(64);
377                 ListCtrl->InsertColumn(1, coldata);             
378         
379                 coldata.SetId(2);
380                 coldata.SetText(_("Pri."));
381                 coldata.SetWidth(32);
382                 ListCtrl->InsertColumn(2, coldata);
383         
384         } else if (ColumnType == CE_KEY){
385         
386                 coldata.SetId(0);
387                 coldata.SetText(_("Key information"));
388                 coldata.SetWidth(224);
389                 ListCtrl->InsertColumn(0, coldata);
390         
391                 coldata.SetId(1);
392                 coldata.SetText(_("Type"));
393                 coldata.SetWidth(64);
394                 ListCtrl->InsertColumn(1, coldata);             
395         
396                 coldata.SetId(2);
397                 coldata.SetText(_("Pri."));
398                 coldata.SetWidth(32);
399                 ListCtrl->InsertColumn(2, coldata);
400         
401         } else if (ColumnType == CE_TOKEN){
402         
403                 coldata.SetId(0);
404                 coldata.SetText(_("Token"));
405                 coldata.SetWidth(320);
406                 ListCtrl->InsertColumn(0, coldata);
407         
408         }
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