Osso Addressbook Reference Manual |
---|
OssoABookContactEditorOssoABookContactEditor — Dialog exposing the fields of an EContact for editing. |
OssoABookContactEditor; GtkWidget* osso_abook_contact_editor_new (void); void osso_abook_contact_editor_set_book_view (OssoABookContactEditor *editor, EBookView *book_view); EBookView* osso_abook_contact_editor_get_book_view (OssoABookContactEditor *editor); void osso_abook_contact_editor_set_contact (OssoABookContactEditor *editor, EContact *contact); EContact* osso_abook_contact_editor_get_contact (OssoABookContactEditor *editor); void osso_abook_contact_editor_set_editable (OssoABookContactEditor *editor, gboolean editable); gboolean osso_abook_contact_editor_get_editable (OssoABookContactEditor *editor); gboolean osso_abook_contact_editor_get_new (OssoABookContactEditor *editor); void osso_abook_contact_editor_set_added_cb (OssoABookContactEditor *editor, contact_added_cb cb, gpointer userdata); void osso_abook_contact_editor_set_new (OssoABookContactEditor *editor, gboolean new);
GObject +----GtkObject +----GtkWidget +----GtkContainer +----GtkBin +----GtkWindow +----GtkDialog +----OssoABookContactEditor
"book-view" EBookView : Read / Write "contact" EContact : Read / Write "editable" gboolean : Read / Write "new" gboolean : Read / Write
An OssoABookContactEditor is a GtkDialog which displays fields, allowing the
user to edit an EContact. If the book
property is set, then when the user
presses "Done" the modified contact will be committed back to the book. The
dialog also doubles as a New Contact dialog, by setting contact
to NULL and
book
to the book the contact should be added to.
If the editable
property is set to FALSE, the dialog's fields are read-only.
The dialog has an Edit button which will set the editable
property to TRUE,
changing the interface.
typedef struct _OssoABookContactEditor OssoABookContactEditor;
There are no public fields in OssoABookContactEditor.
GtkWidget* osso_abook_contact_editor_new (void);
Creates a new OssoABookContactEditor object.
Returns : | A new OssoABookContactEditor object. |
void osso_abook_contact_editor_set_book_view (OssoABookContactEditor *editor, EBookView *book_view);
Set the book view that the contact this editor is displaying is originally from.
editor : |
An OssoABookContactEditor |
book_view : |
An EBookView |
EBookView* osso_abook_contact_editor_get_book_view (OssoABookContactEditor *editor);
Get the book view that the contact this editor is currently displaying is originally from.
editor : |
An OssoABookContactEditor |
Returns : | An EBookView |
void osso_abook_contact_editor_set_contact (OssoABookContactEditor *editor, EContact *contact);
Set the contact to display in the dialog for editing.
editor : |
An OssoABookContactEditor |
contact : |
An EContact |
EContact* osso_abook_contact_editor_get_contact (OssoABookContactEditor *editor);
Get the contact this editor is currently displaying.
editor : |
An OssoABookContactEditor |
Returns : | An EContact |
void osso_abook_contact_editor_set_editable (OssoABookContactEditor *editor, gboolean editable);
Sets whether this OssoABookContactEditor is editable or not.
editor : |
An OssoABookContactEditor |
editable : |
a gboolean |
gboolean osso_abook_contact_editor_get_editable (OssoABookContactEditor *editor);
Return TRUE if this dialog is editable, otherwise FALSE.
editor : |
An OssoABookContactEditor |
Returns : | TRUE if this dialog is editable, otherwise FALSE. |
gboolean osso_abook_contact_editor_get_new (OssoABookContactEditor *editor);
Return TRUE if the OssoABookContactEditor is editing an existing EContact and yet it will be added to the book, not modified.
editor : |
An OssoABookContactEditor |
Returns : | TRUE if an existing EContact will be added to the EBook. |
void osso_abook_contact_editor_set_added_cb (OssoABookContactEditor *editor, contact_added_cb cb, gpointer userdata);
Set this if you want to get a callback when a contact is freshly added to the addressbook. This is only called if a new contact is successfully added to the addressbook, not when an existing contact is modified.
This generally isn't very useful as EBookView does this in a better way.
editor : |
An OssoABookContactEditor |
cb : |
a contact_added_cb |
userdata : |
user data to pass to the callback |
void osso_abook_contact_editor_set_new (OssoABookContactEditor *editor, gboolean new);
Set this to true if the OssoABookContactEditor is editing an existing EContact, but that contact should be added to the EBook rather than modified.
This is useful if you want to pre-fill a New Contact dialog with data.
editor : |
An OssoABookContactEditor |
new : |
a gboolean |
<< OssoABookBlockManager | OssoABookContactGroupEditor >> |