GTK_WINDOW (app->window),
GTK_FILE_CHOOSER_ACTION_SAVE,
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
- GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT,
+ GTK_STOCK_SAVE, GTK_RESPONSE_ACCEPT,
NULL);
gtk_file_chooser_set_do_overwrite_confirmation(GTK_FILE_CHOOSER(dialog), TRUE);
for(i = 0;i < app->playlist.count; i++)
{
+ char ch[3];
+
+ if(OMNPLAY_PLAYLIST_BLOCK_BEGIN & app->playlist.item[i].type)
+ snprintf(ch, sizeof(ch), "%c", 'A' + app->playlist.item[i].player);
+ else
+ ch[0] = 0;
+
gtk_list_store_append(list_store, &iter);
gtk_list_store_set(list_store, &iter,
0, "",
1, app->playlist.block_icons[app->playlist.item[i].type],
- 2, (0 == app->playlist.item[i].player)?"A":"B",
+ 2, ch,
3, app->playlist.item[i].id,
4, frames2tc(app->playlist.item[i].in, 25.0, tc1),
5, frames2tc(app->playlist.item[i].dur, 25.0, tc2),
path = gtk_tree_path_new_from_indices(sels[1], -1);
gtk_tree_selection_select_path(gtk_tree_view_get_selection(GTK_TREE_VIEW(app->playlist_grid)), path);
gtk_tree_view_set_cursor(GTK_TREE_VIEW(app->playlist_grid), path, NULL, FALSE);
+ gtk_tree_view_scroll_to_cell(GTK_TREE_VIEW(app->playlist_grid), path, NULL, FALSE, 0, 0);
gtk_tree_path_free(path);
free(sels);
{
int i;
char tc1[12], tc2[12];
+ char ch[3];
omnplay_playlist_draw_item_t* item = (omnplay_playlist_draw_item_t*)user_data;
omnplay_instance_t* app = item->app;
if(i != item->idx) return FALSE;
+ if(OMNPLAY_PLAYLIST_BLOCK_BEGIN & app->playlist.item[i].type)
+ snprintf(ch, sizeof(ch), "%c", 'A' + app->playlist.item[i].player);
+ else
+ ch[0] = 0;
+
gtk_list_store_set(item->list_store, iter,
0, "",
1, app->playlist.block_icons[app->playlist.item[i].type],
- 2, (0 == app->playlist.item[i].player)?"A":"B",
+ 2, ch,
3, app->playlist.item[i].id,
4, frames2tc(app->playlist.item[i].in, 25.0, tc1),
5, frames2tc(app->playlist.item[i].dur, 25.0, tc2),