TnyGtkAttachListModel

TnyGtkAttachListModel — A tree model for mime part instances

Synopsis




#define             TNY_TYPE_GTK_ATTACH_LIST_MODEL_COLUMN
                    TnyGtkAttachListModel;
GType               tny_gtk_attach_list_model_column_get_type
                                                        (void);
GtkTreeModel*       tny_gtk_attach_list_model_new       (void);

Object Hierarchy


  GObject
   +----GtkListStore
         +----TnyGtkAttachListModel

Implemented Interfaces

TnyGtkAttachListModel implements GtkBuildable, GtkTreeModel, TnyList, GtkTreeDragSource, GtkTreeDragDest and GtkTreeSortable.

Description

A GtkTreeModel for storing TnyMimePart instances.

The implementation inherits the GtkListStore, implements GtkTreeModel and TnyList. If the library was compiled with gnome features, the implementation will handle the mime-type icon automatically.

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

TnyMimePart *part;
gtk_tree_model_get (model, &iter, TNY_ATTACH_LIST_MODEL_INSTANCE_COLUMN, &part, -1);
/* use part */
g_object_unref (G_OBJECT(partr));

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

Details

TNY_TYPE_GTK_ATTACH_LIST_MODEL_COLUMN

#define TNY_TYPE_GTK_ATTACH_LIST_MODEL_COLUMN (tny_gtk_attach_list_model_column_get_type())


TnyGtkAttachListModel

typedef struct _TnyGtkAttachListModel TnyGtkAttachListModel;

A GtkTreeModel for TnyMimePart instances that happen to be attachments too.

Note that a TnyGtkAttachListModel is a TnyList too. You can use the TnyList API on instances of this type too.

Note that you must make sure that you unreference TnyMimePart instances that you get out of the instance column of this type using the GtkTreeModel API gtk_tree_model_get().

free-function: g_object_unref


tny_gtk_attach_list_model_column_get_type ()

GType               tny_gtk_attach_list_model_column_get_type
                                                        (void);

GType system helper function

Returns : a GType

tny_gtk_attach_list_model_new ()

GtkTreeModel*       tny_gtk_attach_list_model_new       (void);

Get a new GtkTreeModel for TnyMimePart instances that are attachments.

Returns : (caller-owns) a new GtkTreeModel TnyMimePart instances

Since 1.0 audience: application-developer

See Also

TnyList, TnyMimePart, GtkTreeModel, GtkListStore, GtkTreeView, TnyGtkAttachListModelColumn