ocarina: Add a tooltip column to the liststore
The tooltip is the filepath of the selected track. This should help me figure out what some non-tagged tracks are... Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
This commit is contained in:
parent
f72447decc
commit
a3c8128bbe
|
@ -30,6 +30,7 @@ void SongList::insert(libsaria::Track *track)
|
|||
4, track->get_artist().c_str(),
|
||||
5, track->get_album().c_str(),
|
||||
6, track->get_year(),
|
||||
7, track->get_filepath().c_str(),
|
||||
-1);
|
||||
ins_next++;
|
||||
}
|
||||
|
|
|
@ -21,13 +21,14 @@ struct column_info {
|
|||
};
|
||||
|
||||
static struct column_info columns[] = {
|
||||
column_info( "Id", G_TYPE_LONG, 2, false),
|
||||
column_info( "#", G_TYPE_INT, 20, true),
|
||||
column_info( "Title", G_TYPE_STRING, 300, true),
|
||||
column_info("Length", G_TYPE_STRING, 60, true),
|
||||
column_info("Artist", G_TYPE_STRING, 125, true),
|
||||
column_info( "Album", G_TYPE_STRING, 125, true),
|
||||
column_info( "Year", G_TYPE_INT, 50, true),
|
||||
column_info( "Id", G_TYPE_LONG, 2, false),
|
||||
column_info( "#", G_TYPE_INT, 20, true),
|
||||
column_info( "Title", G_TYPE_STRING, 300, true),
|
||||
column_info( "Length", G_TYPE_STRING, 60, true),
|
||||
column_info( "Artist", G_TYPE_STRING, 125, true),
|
||||
column_info( "Album", G_TYPE_STRING, 125, true),
|
||||
column_info( "Year", G_TYPE_INT, 50, true),
|
||||
column_info("Filepath", G_TYPE_STRING, 2, false),
|
||||
};
|
||||
|
||||
#define NUM_COLUMNS (sizeof(columns) / sizeof(column_info))
|
||||
|
@ -73,6 +74,7 @@ static GtkWidget *setup_treeview(GtkTreeModel *model, SongList *list)
|
|||
GTK_CONNECT(treeview, "button-release-event", songlist_button_click, list);
|
||||
gtk_tree_view_set_rules_hint(GTK_TREE_VIEW(treeview), TRUE);
|
||||
gtk_tree_view_set_model(GTK_TREE_VIEW(treeview), model);
|
||||
gtk_tree_view_set_tooltip_column(GTK_TREE_VIEW(treeview), 7);
|
||||
return treeview;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue