Fix frequently ocurring typos :)
[claws.git] / src / editaddress_other_attributes_ldap.h
1 /*
2  * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
3  * Copyright (C) 1999-2012 Michael Rasmussen and the Claws Mail team
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 3 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program. If not, see <http://www.gnu.org/licenses/>.
17  * 
18  */
19
20 /*
21  * Edit address item data.
22  */
23
24 #ifndef __EDITADDRESS_OTHER_ATTRIBUTES_LDAP_H__
25 #define __EDITADDRESS_OTHER_ATTRIBUTES_LDAP_H__
26
27 #include <glib.h>
28 #include <glib/gi18n.h>
29 #include <gdk/gdkkeysyms.h>
30 #include <gtk/gtk.h>
31
32 typedef struct _PersonEdit_dlg PersonEditDlg;
33 struct _PersonEdit_dlg {
34         GtkWidget *container;
35         GtkWidget *notebook;
36         GtkWidget *ok_btn;
37         GtkWidget *cancel_btn;
38         GtkWidget *statusbar;   /* used when prefs_common.addressbook_use_editaddress_dialog is TRUE */
39         GtkWidget *title;       /* used when prefs_common.addressbook_use_editaddress_dialog is FALSE */
40         gint status_cid;
41
42         /* User data tab */
43         GtkWidget *image;
44         gboolean picture_set;
45         GtkWidget *entry_name;
46         GtkWidget *entry_first;
47         GtkWidget *entry_last;
48         GtkWidget *entry_nick;
49
50         /* EMail data tab */
51         GtkWidget *entry_email;
52         GtkWidget *entry_alias;
53         GtkWidget *entry_remarks;
54         GtkWidget *clist_email;
55         GtkWidget *email_up;
56         GtkWidget *email_down;
57         GtkWidget *email_del;
58         GtkWidget *email_mod;
59         GtkWidget *email_add;
60
61         /* Attribute data tab */
62         GtkWidget *entry_atname;
63         GtkWidget *entry_atvalue;
64         GtkWidget *clist_attrib;
65         GtkWidget *attrib_add;
66         GtkWidget *attrib_del;
67         GtkWidget *attrib_mod;
68
69         gint rowIndEMail;
70         gint rowIndAttrib;
71         gboolean editNew;
72         gboolean read_only;
73         gboolean ldap;
74 };
75
76 #ifdef USE_LDAP
77
78 static const char *ATTRIBUTE[] = {
79         "telephoneNumber",
80         /*"description (Remarks)",*/
81         "title",
82         "telexNumber",
83         "facsimileTelephoneNumber",
84         "street",
85         "postOfficeBox",
86         "postalCode",
87         "postalAddress",
88         "st", /* state or province */
89         "l", /* locality Name */
90         "departmentNumber",
91         "homePhone",
92         "homePostalAddress",
93         "initials",
94         "labeledURI",
95         "mobile",
96         "pager",
97         "roomNumber",
98         "jpegPhoto",
99         NULL
100 };
101
102 static const int ATTRIBUTE_SIZE = (sizeof(ATTRIBUTE) / sizeof(*ATTRIBUTE)) - 1;
103
104 /* Function proto types */
105 void addressbook_edit_person_page_attrib_ldap(PersonEditDlg *personEditDlg, gint pageNum, gchar *pageLbl);
106 int get_attribute_index(const gchar *string_literal);
107
108 #endif  /* USE_LDAP */
109
110 #endif /* __EDITADDRESS_OTHER_ATTRIBUTES_LDAP_H__ */