comparison src/audacious/ui_fileinfopopup.c @ 2362:424bc51df918 trunk

[svn] - ensure that year/tracknumber/length fields are cleared if necessary
author giacomo
date Thu, 18 Jan 2007 07:32:07 -0800
parents 139d2358f617
children b047268eec32
comparison
equal deleted inserted replaced
2361:f24ae4f40e29 2362:424bc51df918
527 filepopup_entry_set_text_free(filepopup_win, "label_tracklen", g_strdup_printf("%d:%02d", tuple->length / 60000, (tuple->length / 1000) % 60)); 527 filepopup_entry_set_text_free(filepopup_win, "label_tracklen", g_strdup_printf("%d:%02d", tuple->length / 60000, (tuple->length / 1000) % 60));
528 g_object_set_data( G_OBJECT(filepopup_win), "length" , GINT_TO_POINTER(tuple->length) ); 528 g_object_set_data( G_OBJECT(filepopup_win), "length" , GINT_TO_POINTER(tuple->length) );
529 } 529 }
530 else 530 else
531 { 531 {
532 filepopup_entry_set_text(filepopup_win, "label_tracklen", "");
532 g_object_set_data( G_OBJECT(filepopup_win), "length" , GINT_TO_POINTER(-1) ); 533 g_object_set_data( G_OBJECT(filepopup_win), "length" , GINT_TO_POINTER(-1) );
533 } 534 }
534 535
535 if (tuple->year != 0) 536 if (tuple->year != 0)
536 filepopup_entry_set_text_free(filepopup_win, "label_year", g_strdup_printf("%d", tuple->year)); 537 filepopup_entry_set_text_free(filepopup_win, "label_year", g_strdup_printf("%d", tuple->year));
538 else
539 filepopup_entry_set_text(filepopup_win, "label_year", "");
537 540
538 if (tuple->track_number != 0) 541 if (tuple->track_number != 0)
539 filepopup_entry_set_text_free(filepopup_win, "label_tracknum", g_strdup_printf("%d", tuple->track_number)); 542 filepopup_entry_set_text_free(filepopup_win, "label_tracknum", g_strdup_printf("%d", tuple->track_number));
543 else
544 filepopup_entry_set_text(filepopup_win, "label_tracknum", "");
540 545
541 tmp = fileinfo_recursive_get_image(tuple->file_path, tuple->file_name, 0); 546 tmp = fileinfo_recursive_get_image(tuple->file_path, tuple->file_name, 0);
542 if (tmp) { // picture found 547 if (tmp) { // picture found
543 if (!last_artwork || strcmp(last_artwork, tmp)) { // new picture 548 if (!last_artwork || strcmp(last_artwork, tmp)) { // new picture
544 filepopup_entry_set_image(filepopup_win, "image_artwork", tmp); 549 filepopup_entry_set_image(filepopup_win, "image_artwork", tmp);