![]() |
![]() |
![]() |
GNOME Video Arcade Reference Manual | ![]() |
---|---|---|---|---|
GtkTreeViewColumn* gva_columns_new_from_id (GvaGameStoreColumn column_id); GtkTreeViewColumn* gva_columns_new_from_name (const gchar *column_name); gboolean gva_columns_lookup_id (const gchar *column_name, GvaGameStoreColumn *column_id); const gchar* gva_columns_lookup_name (GvaGameStoreColumn column_id); void gva_columns_load (GtkTreeView *view); void gva_columns_save (GtkTreeView *view); GSList* gva_columns_get_names (GtkTreeView *view, gboolean visible_only); GSList* gva_columns_get_names_full (GtkTreeView *view);
GtkTreeViewColumn* gva_columns_new_from_id (GvaGameStoreColumn column_id);
Creates a new GtkTreeViewColumn from the given column_id
, configured
for use in the main tree view.
|
the ID of the column to create |
Returns : |
a new GtkTreeViewColumn |
GtkTreeViewColumn* gva_columns_new_from_name (const gchar *column_name);
Creates a new GtkTreeViewColumn from the given column_name
(as stored
in GConf), configured for use in the main tree view.
|
the name of the column to create |
Returns : |
a new GtkTreeViewColumn |
gboolean gva_columns_lookup_id (const gchar *column_name, GvaGameStoreColumn *column_id);
Looks up the numeric column ID corresponding to column_name
, and write
the result to column_id
if found.
|
the name of the column to lookup |
|
return location for the column ID |
Returns : |
TRUE if a column ID was found, FALSE otherwise
|
const gchar* gva_columns_lookup_name (GvaGameStoreColumn column_id);
Looks up the column name corresponding to column_id
.
|
the ID of the column to lookup |
Returns : |
the column name, or NULL if not found
|
void gva_columns_load (GtkTreeView *view);
Loads view
with columns in the order stored in the GConf key
/apps/gnome-video-arcade/all-columns
, but only
makes visible those columns listed in
/apps/gnome-video-arcade/columns
. Newly supported
columns are appended to view
but remain invisible until explicitly
selected in the Preferences window.
Each column is loaded by reading the column name from GConf and passing
it to gva_columns_new_from_name()
to create the GtkTreeViewColumn.
|
a GtkTreeView |
void gva_columns_save (GtkTreeView *view);
Writes the column order and visible columns of view
to the GConf
keys /apps/gnome-video-arcade/all-columns
and
/apps/gnome-video-arcade/columns
respectively,
using gva_columns_get_names()
to extract the column names.
|
a GtkTreeView |
GSList* gva_columns_get_names (GtkTreeView *view, gboolean visible_only);
Extracts a list of column names from view
, using gva_columns_lookup_name()
to convert each numeric column ID to a name. If visible_only
is TRUE
then only visible columns are included in the list. The column name
strings are owned by view
and should not be freed; only the list itself
should be freed using g_slist_free()
.
|
a GtkTreeView |
|
only extract visible columns |
Returns : |
a GSList of column names |
GSList* gva_columns_get_names_full (GtkTreeView *view);
Extracts a list of column names from view
, plus any additional column
names from the game database necessary to render the tree view cells.
The column name strings are owned by view
and should not be freed;
only the list itself should be freed using g_slist_free()
.
|
a GtkTreeView |
Returns : |
a GSList of column names |