OssoABookTreeView

OssoABookTreeView — Base class for displaying contacts or accounts in a list.

Synopsis

enum                OssoABookTreeViewPanMode;
                    OssoABookTreeView;
void                osso_abook_tree_view_set_empty_text (OssoABookTreeView *view,
                                                         const char *text);
const char*         osso_abook_tree_view_get_empty_text (OssoABookTreeView *view);
GtkTreeModel*       osso_abook_tree_view_get_model      (OssoABookTreeView *view);
OssoABookListStore* osso_abook_tree_view_get_base_model (OssoABookTreeView *view);
void                osso_abook_tree_view_set_base_model (OssoABookTreeView *view,
                                                         OssoABookListStore *model);
OssoABookFilterModel* osso_abook_tree_view_get_filter_model
                                                        (OssoABookTreeView *view);
void                osso_abook_tree_view_set_filter_model
                                                        (OssoABookTreeView *view,
                                                         OssoABookFilterModel *model);
GtkTreeView*        osso_abook_tree_view_get_tree_view  (OssoABookTreeView *view);
GtkWidget*          osso_abook_tree_view_get_pannable_area
                                                        (OssoABookTreeView *view);
GtkTreeSelection*   osso_abook_tree_view_get_tree_selection
                                                        (OssoABookTreeView *view);
void                osso_abook_tree_view_set_avatar_view
                                                        (OssoABookTreeView *view,
                                                         gboolean enable);
void                osso_abook_tree_view_set_aggregation_account
                                                        (OssoABookTreeView *view,
                                                         McAccount *account);
McAccount*          osso_abook_tree_view_get_aggregation_account
                                                        (OssoABookTreeView *view);
void                osso_abook_tree_view_set_ui_mode    (OssoABookTreeView *view,
                                                         HildonUIMode mode);
HildonUIMode        osso_abook_tree_view_get_ui_mode    (OssoABookTreeView *view);
void                osso_abook_tree_view_select_first   (OssoABookTreeView *view);
gboolean            osso_abook_tree_view_pan_to_contact (OssoABookTreeView *view,
                                                         OssoABookContact *contact,
                                                         OssoABookTreeViewPanMode pan_mode);

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----GtkObject
               +----GtkWidget
                     +----GtkContainer
                           +----GtkBox
                                 +----GtkVBox
                                       +----OssoABookTreeView
                                             +----OssoABookContactView

Implemented Interfaces

OssoABookTreeView implements AtkImplementorIface and GtkBuildable.

Properties

  "aggregation-account"      McAccount*            : Read / Write
  "base-model"               OssoABookListStore*   : Read / Write / Construct Only
  "empty-text"               gchar*                : Read / Write
  "filter-model"             OssoABookFilterModel*  : Read / Write / Construct Only
  "hildon-ui-mode"           HildonUIMode          : Read / Write
  "model"                    GtkTreeModel*         : Read / Write / Construct Only
  "sensitive-caps"           guint                 : Write
  "show-contact-avatar"      gboolean              : Read / Write
  "show-contact-name"        gboolean              : Read / Write
  "show-contact-presence"    gboolean              : Read / Write
  "show-contact-telephone"   gboolean              : Read / Write
  "tree-view"                GtkTreeView*          : Read
  "use-sim-avatar"           gboolean              : Read / Write

Description

OssoABookTreeView is a base class from which all other classes that display contacts as a list are derived.

Details

enum OssoABookTreeViewPanMode

typedef enum {
        OSSO_ABOOK_TREE_VIEW_PAN_MODE_TOP,
        OSSO_ABOOK_TREE_VIEW_PAN_MODE_MIDDLE,
} OssoABookTreeViewPanMode;

The various possible places where a contact is to be positioned when panning the treeview.

OSSO_ABOOK_TREE_VIEW_PAN_MODE_TOP pan to the top of the visible area
OSSO_ABOOK_TREE_VIEW_PAN_MODE_MIDDLE pan to the center of the visible area

OssoABookTreeView

typedef struct _OssoABookTreeView OssoABookTreeView;

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


osso_abook_tree_view_set_empty_text ()

void                osso_abook_tree_view_set_empty_text (OssoABookTreeView *view,
                                                         const char *text);

Sets the label text for the empty widget. The empty widget is shown when no contacts are available to be shown in the tree view.

view : An OssoABookTreeView widget
text : The text to be shown as the empty widget's label. This label text is copied internally, and text can be freed later by the caller.

osso_abook_tree_view_get_empty_text ()

const char*         osso_abook_tree_view_get_empty_text (OssoABookTreeView *view);

Returns the label text which is displayed in the empty widget. The empty widget is shown when no contacts are available to be shown in the tree view.

view : An OssoABookTreeView widget
Returns : The empty widget's label text. This string is owned by the widget and must not be modified or freed.

osso_abook_tree_view_get_model ()

GtkTreeModel*       osso_abook_tree_view_get_model      (OssoABookTreeView *view);

Retrieves the top contained GtkTreeModel. This can be either an OssoABookListStore subclass or an OssoABookFilterModel.

view : An OssoABookTreeView
Returns : The top contained GtkTreeModel.

osso_abook_tree_view_get_base_model ()

OssoABookListStore* osso_abook_tree_view_get_base_model (OssoABookTreeView *view);

Retrieves the contained OssoABookRowModel.

view : An OssoABookTreeView
Returns : The contained OssoABookRowModel.

osso_abook_tree_view_set_base_model ()

void                osso_abook_tree_view_set_base_model (OssoABookTreeView *view,
                                                         OssoABookListStore *model);

Changes the contained OssoABookRowModel.

view : An OssoABookTreeView
model : The new OssoABookRowModel.

osso_abook_tree_view_get_filter_model ()

OssoABookFilterModel* osso_abook_tree_view_get_filter_model
                                                        (OssoABookTreeView *view);

Retrieves the contained OssoABookFilterModel, if any.

view : An OssoABookTreeView
Returns : The contained OssoABookFilterModel, or NULL.

osso_abook_tree_view_set_filter_model ()

void                osso_abook_tree_view_set_filter_model
                                                        (OssoABookTreeView *view,
                                                         OssoABookFilterModel *model);

Changes the contained OssoABookFilterModel.

view : An OssoABookTreeView
model : The new OssoABookFilterModel, or NULL.

osso_abook_tree_view_get_tree_view ()

GtkTreeView*        osso_abook_tree_view_get_tree_view  (OssoABookTreeView *view);

Retrieves the contained GtkTreeView widget.

view : An OssoABookTreeView
Returns : The contained GtkTreeView widget.

osso_abook_tree_view_get_pannable_area ()

GtkWidget*          osso_abook_tree_view_get_pannable_area
                                                        (OssoABookTreeView *view);

Retrieves the contained HildonPannableArea widget.

view : An OssoABookTreeView
Returns : The contained HildonPannableArea widget.

osso_abook_tree_view_get_tree_selection ()

GtkTreeSelection*   osso_abook_tree_view_get_tree_selection
                                                        (OssoABookTreeView *view);

Returns the selection of the OssoABookTreeView. The selection is returned from an internal GtkTreeView.

view : An OssoABookTreeView widget
Returns : The tree selection

osso_abook_tree_view_set_avatar_view ()

void                osso_abook_tree_view_set_avatar_view
                                                        (OssoABookTreeView *view,
                                                         gboolean enable);

Enables the avatar view on view. An avatar will be displayed for each contact listed in the OssoABookTreeView widget.

view : a OssoABookTreeView
enable : TRUE to enable the avatar view

osso_abook_tree_view_set_aggregation_account ()

void                osso_abook_tree_view_set_aggregation_account
                                                        (OssoABookTreeView *view,
                                                         McAccount *account);

Sets an McAccount to selectively aggregate the presence icon and avatar shown in the view.

For example, suppose account A includes roster contacts 1 and 2, account B includes contact 3, and a master contact C includes roster contacts 1 (who is available), 2 (who is away), and 3 (who is offline). Normally, master contact C would appear in the view as most_online ([available, away, offline]) = available. However, if you set the selective aggregation account to account B, contact C will appear as most_online ([offline]) = offline.

This function has a corresponding effect with avatars (though a user-set avatar will always have priority over any account avatar, regardless of the account set with this function).

view : An OssoABookTreeView
account : An McAccount, or NULL to aggregate across all enabled accounts (the default)
Returns : The selective-aggregation McAccount.

osso_abook_tree_view_get_aggregation_account ()

McAccount*          osso_abook_tree_view_get_aggregation_account
                                                        (OssoABookTreeView *view);

Retrieves the McAccount used as described in osso_abook_tree_view_set_aggregation_account().

view : An OssoABookTreeView
Returns : The selective-aggregation McAccount.

osso_abook_tree_view_set_ui_mode ()

void                osso_abook_tree_view_set_ui_mode    (OssoABookTreeView *view,
                                                         HildonUIMode mode);

This function sets the passed HildonUIMode on the embedded GtkTreeView widget.

view : An OssoABookTreeView
mode : The HildonUIMode to set for the treeview

osso_abook_tree_view_get_ui_mode ()

HildonUIMode        osso_abook_tree_view_get_ui_mode    (OssoABookTreeView *view);

This function returns the HildonUIMode which is set on the embedded GtkTreeView widget.

view : An OssoABookTreeView
Returns : The HildonUIMode for the treeview

osso_abook_tree_view_select_first ()

void                osso_abook_tree_view_select_first   (OssoABookTreeView *view);

Warning

osso_abook_tree_view_select_first is deprecated and should not be used in newly-written code.


osso_abook_tree_view_pan_to_contact ()

gboolean            osso_abook_tree_view_pan_to_contact (OssoABookTreeView *view,
                                                         OssoABookContact *contact,
                                                         OssoABookTreeViewPanMode pan_mode);

This function vertically pans the treeview so that the passed contact comes into view.

view : An OssoABookTreeView
contact : The contact to pan to
mode : Where to position the contact
Returns : TRUE on success, FALSE otherwise

Property Details

The "aggregation-account" property

  "aggregation-account"      McAccount*            : Read / Write

A single MC Account to aggregate presence and avatar from (as opposed to all accounts).


The "base-model" property

  "base-model"               OssoABookListStore*   : Read / Write / Construct Only

The contained OssoABookListStore.


The "empty-text" property

  "empty-text"               gchar*                : Read / Write

The text to show if there are not contacts.

Default value: "addr_ia_no_contacts"


The "filter-model" property

  "filter-model"             OssoABookFilterModel*  : Read / Write / Construct Only

The contained OssoABookFilterModel, if any.


The "hildon-ui-mode" property

  "hildon-ui-mode"           HildonUIMode          : Read / Write

The Hildon UI mode according to which the tree view should behave.

Default value: HILDON_UI_MODE_NORMAL


The "model" property

  "model"                    GtkTreeModel*         : Read / Write / Construct Only

The top contained GtkTreeModel.


The "sensitive-caps" property

  "sensitive-caps"           guint                 : Write

OssoABookCapsFlags mask that determines whichentries are sensitive. A 0 value disables thisfeature.

Default value: 0


The "show-contact-avatar" property

  "show-contact-avatar"      gboolean              : Read / Write

TRUE if avatars should be shown.

Default value: FALSE


The "show-contact-name" property

  "show-contact-name"        gboolean              : Read / Write

TRUE if contact names should be shown.

Default value: TRUE


The "show-contact-presence" property

  "show-contact-presence"    gboolean              : Read / Write

TRUE if presence should be shown.

Default value: TRUE


The "show-contact-telephone" property

  "show-contact-telephone"   gboolean              : Read / Write

TRUE if telephone number should be shown.

Default value: FALSE


The "tree-view" property

  "tree-view"                GtkTreeView*          : Read

The contained GtkTreeView widget.


The "use-sim-avatar" property

  "use-sim-avatar"           gboolean              : Read / Write

TRUE if not setted avatar use sim-card 'avatar' instead of default.

Default value: FALSE