Mercurial > audlegacy-plugins
comparison src/madplug/fileinfo.c @ 1222:aeea3e7b0060
make fileinfo work again.
author | Yoshiki Yazawa <yaz@cc.rim.or.jp> |
---|---|
date | Mon, 09 Jul 2007 17:54:57 +0900 |
parents | 29519d604e8c |
children | 5fe8289b9aed |
comparison
equal
deleted
inserted
replaced
1221:619cd8c8def5 | 1222:aeea3e7b0060 |
---|---|
556 } | 556 } |
557 } | 557 } |
558 } | 558 } |
559 #endif /* !NOGUI */ | 559 #endif /* !NOGUI */ |
560 | 560 |
561 void audmad_get_file_info(char *filename) | 561 void audmad_get_file_info(char *fileurl) |
562 { | 562 { |
563 #ifndef NOGUI | 563 #ifndef NOGUI |
564 gchar *title; | 564 gchar *title; |
565 gchar message[128]; | 565 gchar message[128]; |
566 static char const *const layer_str[3] = { "I", "II", "III" }; | 566 static char const *const layer_str[3] = { "I", "II", "III" }; |
567 static char const *const mode_str[4] = { | 567 static char const *const mode_str[4] = { |
568 ("single channel"), ("dual channel"), "joint stereo", "stereo" | 568 ("single channel"), ("dual channel"), "joint stereo", "stereo" |
569 }; | 569 }; |
570 char *utf_filename; | 570 gchar *tmp, *utf_filename; |
571 | 571 |
572 #ifdef DEBUG | 572 #ifdef DEBUG |
573 { | 573 { |
574 gchar *tmp = str_to_utf8(filename); | 574 tmp = str_to_utf8(fileurl); |
575 g_message("f: audmad_get_file_info: %s", tmp); | 575 g_message("f: audmad_get_file_info: %s", tmp); |
576 g_free(tmp); | 576 g_free(tmp); |
577 tmp = NULL; | |
577 } | 578 } |
578 #endif | 579 #endif |
579 | 580 |
580 if(!g_file_test(filename, G_FILE_TEST_EXISTS)) { | 581 if(!vfs_file_test(fileurl, G_FILE_TEST_EXISTS)) { |
581 return; | 582 return; |
582 } | 583 } |
583 | 584 |
584 input_init(&info, filename); | 585 input_init(&info, fileurl); |
585 | 586 |
586 if(audmad_is_remote(filename)) { | 587 if(audmad_is_remote(fileurl)) { |
587 info.remote = TRUE; | 588 info.remote = TRUE; |
588 return; //file info dialog for remote streaming doesn't make sense. | 589 return; //file info dialog for remote streaming doesn't make sense. |
589 } | 590 } |
590 | 591 |
591 utf_filename = str_to_utf8(filename); | 592 tmp = g_filename_from_uri(fileurl, NULL, NULL); |
593 utf_filename = str_to_utf8(tmp); | |
594 g_free(tmp); | |
595 tmp = NULL; | |
592 create_window(); | 596 create_window(); |
593 | 597 |
594 info.fileinfo_request = TRUE; | 598 info.fileinfo_request = TRUE; |
595 input_get_info(&info, info.remote ? TRUE : FALSE); | 599 input_get_info(&info, info.remote ? TRUE : FALSE); |
596 | 600 |