- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
private void cb_activated(TreePath path, TreeViewColumn column) {
Totem.Object t = (Totem.Object)this.object;
uint selected = path.get_indices()[0];
uint current = t.get_playlist_pos();
if (selected > current) {
for (int i = 0; i < selected - current; i++)
t.remote_command(RemoteCommand.NEXT, "");
} else if (current > selected) {
for (int i = 0; i < current - selected; i++)
t.remote_command(RemoteCommand.PREVIOUS, "");
}
}
Vala. Тормозит эта хуйня жутко, так как Totem открывает все файлы в плейлисте, пока не доберётся до выбранного.