TnyGtkAccountListModel

TnyGtkAccountListModel — A tree model for account instances

Synopsis




#define             TNY_TYPE_GTK_ACCOUNT_LIST_MODEL_COLUMN
                    TnyGtkAccountListModel;
GType               tny_gtk_account_list_model_column_get_type
                                                        (void);
GtkTreeModel*       tny_gtk_account_list_model_new      (void);

Object Hierarchy


  GObject
   +----GtkListStore
         +----TnyGtkAccountListModel

Implemented Interfaces

TnyGtkAccountListModel implements GtkTreeModel, TnyList, GtkTreeDragSource, GtkTreeDragDest and GtkTreeSortable.

Description

A GtkTreeModel implementation for storing TnyStoreAccount instances.

The implementation inherits the GtkTreeStore, implements GtkTreeModel and TnyList. It can for example be used to display the accounts in a GtkComboBox or GtkTreeView. If, however, you want to show both the account names and the folder names in a tree view style, consider using the TnyGtkAccountTreeModel in stead.

It's very important to unreference the instance you will get when doing something like this:

TnyAccount *account;
gtk_tree_model_get (model, &iter,
  TNY_ACCOUNT_LIST_MODEL_INSTANCE_COLUMN,
  &account, -1);
/* use account */
g_object_unref (G_OBJECT(account));

The column is indeed a G_TYPE_OBJECT column and getting it from the GtkTreeModel will indeed add a reference.

Details

TNY_TYPE_GTK_ACCOUNT_LIST_MODEL_COLUMN

#define TNY_TYPE_GTK_ACCOUNT_LIST_MODEL_COLUMN (tny_gtk_account_list_model_column_get_type())


TnyGtkAccountListModel

typedef struct _TnyGtkAccountListModel TnyGtkAccountListModel;


tny_gtk_account_list_model_column_get_type ()

GType               tny_gtk_account_list_model_column_get_type
                                                        (void);

GType system helper function

Returns : a GType

tny_gtk_account_list_model_new ()

GtkTreeModel*       tny_gtk_account_list_model_new      (void);

Create a new GtkTreeModel instance suitable for showing a TnyMimePart.

Returns : a new GtkTreeModel instance suitable for showing a TnyMimePart