Source handling the tree store for tracks. More...
Go to the source code of this file.
Functions | |
FUNCTION_CDECL_AS_gboolean | track_store_remove (BYVAL_AS_GtkTreeModel_PTR Model, BYVAL_AS_GtkTreePath_PTR Path, BYVAL_AS_GtkTreeIter_PTR Iter, BYVAL_AS_gpointer UserData) |
Callback for unloading all tracks. More... | |
SUB | TS_finalize () |
Remove all tracks from store. More... | |
SUB | TS_remove (BYVAL_AS_GtkTreeIter_PTR Child) |
Remove a track from store. More... | |
SUB | TS_select (BYVAL_AS_STRING Path) |
Handle new selection. More... | |
SUB | TS_preference (BYVAL_AS_TrackLoader_PTR Loa) |
Open the preference dialog. More... | |
Source handling the tree store for tracks.
The track data is stored in a GtkTreeStore. The source in this file handles the tree store operations.
Definition in file track_store.bas.
FUNCTION_CDECL_AS_gboolean track_store_remove | ( | BYVAL_AS_GtkTreeModel_PTR | Model, |
BYVAL_AS_GtkTreePath_PTR | Path, | ||
BYVAL_AS_GtkTreeIter_PTR | Iter, | ||
BYVAL_AS_gpointer | UserData | ||
) |
Callback for unloading all tracks.
Model | tree model |
Path | line in Model |
Iter | iter in Model |
UserData | unused |
This function is designed as a gtk_tree_model_foreach callback. It checks if the tree store line contains a TrackLoader (DELETEing that instance) or gchararray pointers (g_free() that memory).
Definition at line 134 of file track_store.bas.
SUB TS_finalize | ( | ) |
Remove all tracks from store.
Function checking each store row: in case of a track (no folder) it DELETEs the TrackLoader instance and frees the gchararray memory. Finally it clears the remaining folder entries.
Definition at line 165 of file track_store.bas.
SUB TS_remove | ( | BYVAL_AS_GtkTreeIter_PTR | Child | ) |
Remove a track from store.
Child | The iter where to find the track |
Procedure to remove a single track from the store, DELETEing the TrackLoader structure.
Definition at line 182 of file track_store.bas.
SUB TS_select | ( | BYVAL_AS_STRING | Path | ) |
Handle new selection.
Path | The path in the tree model as STRING |
This procedure handles a selection change in the tree model. The priviously seleted radio button (if any) gets inactive, and the new one gets active.
Definition at line 332 of file track_store.bas.
SUB TS_preference | ( | BYVAL_AS_TrackLoader_PTR | Loa | ) |
Open the preference dialog.
Loa | The track to open for |
This procedure handles the preference dialog for a track, loading its parameters in the user interface and providing the dialog to the user. On OK
button it reads the new values from the user interface mask and stores them in the track store model.
Definition at line 368 of file track_store.bas.