OssoABookTreeView

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

Synopsis

                    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_select_first   (OssoABookTreeView *view);

Object Hierarchy

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

Implemented Interfaces

OssoABookTreeView implements GtkBuildable and AtkImplementorIface.

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 / Construct Only
  "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

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

void                osso_abook_tree_view_select_first   (OssoABookTreeView *view);

Selects the first row in view when the contained EBookView is done loading. It will not select if the view is empty, or if the user scrolls or selects a row before the EBookView is done loading.

view : An OssoABookTreeView

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 / Construct Only

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