5, frames2tc(app->playlist.item[i].dur, 25.0, tc2),
6, app->playlist.item[i].title,
7, i,
+ 8, (app->playlist.item[i].error != 0),
+ 9, (app->playlist.item[i].error & PLAYLIST_ITEM_ERROR_LIB)?"red":"orange",
-1 );
}
5, frames2tc(app->playlist.item[i].dur, 25.0, tc2),
6, app->playlist.item[i].title,
7, i,
+ 8, (app->playlist.item[i].error != 0),
+ 9, (app->playlist.item[i].error & PLAYLIST_ITEM_ERROR_LIB)?"red":"orange",
-1 );
return TRUE;
treeview = gtk_tree_view_new ();
gtk_widget_show (treeview);
+ gtk_tree_view_set_rules_hint(GTK_TREE_VIEW(treeview), TRUE);
selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(treeview));
gtk_tree_selection_set_mode(selection, GTK_SELECTION_MULTIPLE);
for(i = 0, count = 0; columns[i].title; i++, count++)
list_store_types[i] = (columns[i].type == G_TYPE_OBJECT)?GDK_TYPE_PIXBUF:columns[i].type;
list_store_types[count] = G_TYPE_INT;
+ list_store_types[count + 1] = G_TYPE_BOOLEAN;
+ list_store_types[count + 2] = G_TYPE_STRING;
- list_store = gtk_list_store_newv(count + 1, list_store_types);
+ list_store = gtk_list_store_newv(count + 3, list_store_types);
gtk_tree_view_set_model( GTK_TREE_VIEW( treeview ), GTK_TREE_MODEL( list_store ) );
for(i = 0; columns[i].title; i++)
{
char* prop;
+ column = NULL;
if(columns[i].type == G_TYPE_OBJECT)
{
{
renderer = gtk_cell_renderer_text_new();
prop = "text";
+
+ column = gtk_tree_view_column_new_with_attributes(
+ columns[i].title, renderer,
+ prop, i,
+ "background-set", count + 1,
+ "background", count + 2,
+ NULL);
}
- column = gtk_tree_view_column_new_with_attributes(
- columns[i].title, renderer, prop, i, NULL);
+ if(!column)
+ column = gtk_tree_view_column_new_with_attributes(
+ columns[i].title, renderer,
+ prop, i,
+ NULL);
+
gtk_tree_view_append_column(GTK_TREE_VIEW( treeview ), column);
};