OssoABookContactEditor

OssoABookContactEditor — Dialog exposing the fields of an EContact for editing.

Synopsis




            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);


Object Hierarchy


  GObject
   +----GtkObject
         +----GtkWidget
               +----GtkContainer
                     +----GtkBin
                           +----GtkWindow
                                 +----GtkDialog
                                       +----OssoABookContactEditor

Implemented Interfaces

OssoABookContactEditor implements AtkImplementorIface.

Properties


  "book-view"            EBookView             : Read / Write
  "contact"              EContact              : Read / Write
  "editable"             gboolean              : Read / Write
  "new"                  gboolean              : Read / Write

Description

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.

Details

OssoABookContactEditor

typedef struct _OssoABookContactEditor OssoABookContactEditor;

There are no public fields in OssoABookContactEditor.


osso_abook_contact_editor_new ()

GtkWidget*  osso_abook_contact_editor_new   (void);

Creates a new OssoABookContactEditor object.

Returns : A new OssoABookContactEditor object.

osso_abook_contact_editor_set_book_view ()

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

osso_abook_contact_editor_get_book_view ()

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

osso_abook_contact_editor_set_contact ()

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

osso_abook_contact_editor_get_contact ()

EContact*   osso_abook_contact_editor_get_contact
                                            (OssoABookContactEditor *editor);

Get the contact this editor is currently displaying.

editor : An OssoABookContactEditor
Returns : An EContact

osso_abook_contact_editor_set_editable ()

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

osso_abook_contact_editor_get_editable ()

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.

osso_abook_contact_editor_get_new ()

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.

osso_abook_contact_editor_set_added_cb ()

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

osso_abook_contact_editor_set_new ()

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

Properties

The "book-view" property

  "book-view"            EBookView             : Read / Write

The associated EBookView.


The "contact" property

  "contact"              EContact              : Read / Write

The displayed EContact.


The "editable" property

  "editable"             gboolean              : Read / Write

If the data in the dialog is editable or not.

Default value: TRUE


The "new" property

  "new"                  gboolean              : Read / Write

If the contact should be newly created.

Default value: FALSE

See Also

OssoABookContactStarter, EContact.