OssoABookContactEditor

OssoABookContactEditor — Dialog for editing OssoABookContacts

Synopsis

enum                OssoABookContactEditorMode;
                    OssoABookContactEditor;
GtkWidget*          osso_abook_contact_editor_new       (void);
GtkWidget*          osso_abook_contact_editor_new_with_contact
                                                        (GtkWindow *parent,
                                                         OssoABookContact *contact,
                                                         OssoABookContactEditorMode mode);
void                osso_abook_contact_editor_set_contact
                                                        (OssoABookContactEditor *editor,
                                                         OssoABookContact *contact);
OssoABookContact*   osso_abook_contact_editor_get_contact
                                                        (OssoABookContactEditor *editor);
void                osso_abook_contact_editor_set_mode  (OssoABookContactEditor *editor,
                                                         OssoABookContactEditorMode mode);
OssoABookContactEditorMode osso_abook_contact_editor_get_mode
                                                        (OssoABookContactEditor *editor);

Object Hierarchy

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

Implemented Interfaces

OssoABookContactEditor implements AtkImplementorIface and GtkBuildable.

Properties

  "contact"                  OssoABookContact*     : Read / Write
  "mode"                     OssoABookContactEditorMode  : Read / Write

Signals

  "contact-deleted"                                : Run Last
  "contact-saved"                                  : Run Last

Description

This dialog provides an user interface for editing contacts.

Details

enum OssoABookContactEditorMode

typedef enum {
        OSSO_ABOOK_CONTACT_EDITOR_CREATE,
        OSSO_ABOOK_CONTACT_EDITOR_EDIT,
        OSSO_ABOOK_CONTACT_EDITOR_CREATE_SELF,
        OSSO_ABOOK_CONTACT_EDITOR_EDIT_SELF,
} OssoABookContactEditorMode;

The mode defines the contact editor's behavior.

OSSO_ABOOK_CONTACT_EDITOR_CREATE Create a new contact.
OSSO_ABOOK_CONTACT_EDITOR_EDIT Modify an existing contact.
OSSO_ABOOK_CONTACT_EDITOR_CREATE_SELF
OSSO_ABOOK_CONTACT_EDITOR_EDIT_SELF

OssoABookContactEditor

typedef struct _OssoABookContactEditor OssoABookContactEditor;

All the fields of this structure are private to the object's implementation and should never be accessed directly.


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_new_with_contact ()

GtkWidget*          osso_abook_contact_editor_new_with_contact
                                                        (GtkWindow *parent,
                                                         OssoABookContact *contact,
                                                         OssoABookContactEditorMode mode);

Creates a new OssoABookContactEditor object and initializes some of its properties.

parent : the parent window, or NULL
contact : the contact, or NULL
mode : operation mode of the dialog
Returns : A new OssoABookContactEditor object.

osso_abook_contact_editor_set_contact ()

void                osso_abook_contact_editor_set_contact
                                                        (OssoABookContactEditor *editor,
                                                         OssoABookContact *contact);

Set the contact to display in the dialog for editing.

editor : An OssoABookContactEditor
contact : An OssoABookContact

osso_abook_contact_editor_get_contact ()

OssoABookContact*   osso_abook_contact_editor_get_contact
                                                        (OssoABookContactEditor *editor);

Get the contact this editor is currently displaying.

editor : An OssoABookContactEditor
Returns : An OssoABookContact

osso_abook_contact_editor_set_mode ()

void                osso_abook_contact_editor_set_mode  (OssoABookContactEditor *editor,
                                                         OssoABookContactEditorMode mode);

Change the mode of operation for this OssoABookContactEditor.

editor : An OssoABookContactEditor
mode : the new OssoABookContactEditorMode

osso_abook_contact_editor_get_mode ()

OssoABookContactEditorMode osso_abook_contact_editor_get_mode
                                                        (OssoABookContactEditor *editor);

Queries the operation mode of this OssoABookContactEditor.

editor : An OssoABookContactEditor
Returns : The OssoABookContactEditorMode of this editor.

Property Details

The "contact" property

  "contact"                  OssoABookContact*     : Read / Write

The displayed contact.


The "mode" property

  "mode"                     OssoABookContactEditorMode  : Read / Write

Operation mode of the dialog.

Default value: OSSO_ABOOK_CONTACT_EDITOR_EDIT

Signal Details

The "contact-deleted" signal

void                user_function                      (OssoABookContactEditor *editor,
                                                        gpointer                user_data)      : Run Last

This signal is emitted when the editor's contact is deleted.

editor : an OssoABookContactEditor
user_data : user data set when the signal handler was connected.

The "contact-saved" signal

gboolean            user_function                      (OssoABookContactEditor *editor,
                                                        gchar                  *uid,
                                                        gpointer                user_data)      : Run Last

This signal is emitted when the editor's contact is saved (whether the contact is new or not). The callback should return TRUE if processing of the event is complete (so any remaining signal handlers will not be called).

editor : an OssoABookContactEditor
uid : the UID of the OssoABookContact saved
user_data : user data set when the signal handler was connected.