Mercurial > audlegacy
comparison audacious/util.c @ 2087:bc47a2129067 trunk
[svn] - update these files
author | nenolod |
---|---|
date | Mon, 11 Dec 2006 04:30:50 -0800 |
parents | c725daec3849 |
children | f18a5b617c34 |
comparison
equal
deleted
inserted
replaced
2086:c547fe73f290 | 2087:bc47a2129067 |
---|---|
775 GSList * files) | 775 GSList * files) |
776 { | 776 { |
777 GSList *cur; | 777 GSList *cur; |
778 gchar *ptr; | 778 gchar *ptr; |
779 guint ctr = 0; | 779 guint ctr = 0; |
780 Playlist *playlist = playlist_get_active(); | |
780 | 781 |
781 if (GTK_IS_WIDGET(mainwin_jtf)) | 782 if (GTK_IS_WIDGET(mainwin_jtf)) |
782 gtk_widget_set_sensitive(mainwin_jtf, FALSE); | 783 gtk_widget_set_sensitive(mainwin_jtf, FALSE); |
783 | 784 |
784 for (cur = files; cur; cur = g_slist_next(cur)) { | 785 for (cur = files; cur; cur = g_slist_next(cur)) { |
785 | 786 |
786 if (g_file_test(cur->data,G_FILE_TEST_IS_DIR)) { | 787 if (g_file_test(cur->data,G_FILE_TEST_IS_DIR)) { |
787 playlist_add_dir((const gchar *) cur->data); | 788 playlist_add_dir(playlist, (const gchar *) cur->data); |
788 } else { | 789 } else { |
789 playlist_add((const gchar *) cur->data); | 790 playlist_add(playlist, (const gchar *) cur->data); |
790 } | 791 } |
791 | 792 |
792 if (++ctr == 20) { | 793 if (++ctr == 20) { |
793 playlistwin_update_list(); | 794 playlistwin_update_list(); |
794 ctr = 0; | 795 ctr = 0; |
830 | 831 |
831 files = gtk_file_chooser_get_filenames(GTK_FILE_CHOOSER(browser)); | 832 files = gtk_file_chooser_get_filenames(GTK_FILE_CHOOSER(browser)); |
832 | 833 |
833 if (!files) return; | 834 if (!files) return; |
834 | 835 |
835 playlist_clear(); | 836 playlist_clear(playlist_get_active()); |
836 | 837 |
837 filebrowser_add_files(browser, files); | 838 filebrowser_add_files(browser, files); |
838 g_slist_foreach(files, (GFunc) g_free, NULL); | 839 g_slist_foreach(files, (GFunc) g_free, NULL); |
839 g_slist_free(files); | 840 g_slist_free(files); |
840 | 841 |
1109 static void filebrowser_add_files_classic(gchar ** files, | 1110 static void filebrowser_add_files_classic(gchar ** files, |
1110 GtkFileSelection * filesel) | 1111 GtkFileSelection * filesel) |
1111 { | 1112 { |
1112 int ctr = 0; | 1113 int ctr = 0; |
1113 char *ptr; | 1114 char *ptr; |
1115 Playlist *playlist = playlist_get_active(); | |
1114 | 1116 |
1115 if (GTK_IS_WIDGET(mainwin_jtf)) | 1117 if (GTK_IS_WIDGET(mainwin_jtf)) |
1116 gtk_widget_set_sensitive(mainwin_jtf, FALSE); | 1118 gtk_widget_set_sensitive(mainwin_jtf, FALSE); |
1117 | 1119 |
1118 while (files[ctr] != NULL) { | 1120 while (files[ctr] != NULL) { |
1119 playlist_add(files[ctr++]); | 1121 playlist_add(playlist, files[ctr++]); |
1120 } | 1122 } |
1121 playlistwin_update_list(); | 1123 playlistwin_update_list(); |
1122 | 1124 |
1123 if (GTK_IS_WIDGET(mainwin_jtf)) | 1125 if (GTK_IS_WIDGET(mainwin_jtf)) |
1124 gtk_widget_set_sensitive(mainwin_jtf, TRUE); | 1126 gtk_widget_set_sensitive(mainwin_jtf, TRUE); |
1146 gchar **files; | 1148 gchar **files; |
1147 | 1149 |
1148 if (util_filebrowser_is_dir_classic | 1150 if (util_filebrowser_is_dir_classic |
1149 (GTK_FILE_SELECTION(GTK_FILE_SELECTION(filesel)))) | 1151 (GTK_FILE_SELECTION(GTK_FILE_SELECTION(filesel)))) |
1150 return; | 1152 return; |
1151 playlist_clear(); | 1153 playlist_clear(playlist_get_active()); |
1152 files = gtk_file_selection_get_selections(GTK_FILE_SELECTION(filesel)); | 1154 files = gtk_file_selection_get_selections(GTK_FILE_SELECTION(filesel)); |
1153 filebrowser_add_files_classic(files, GTK_FILE_SELECTION(filesel)); | 1155 filebrowser_add_files_classic(files, GTK_FILE_SELECTION(filesel)); |
1154 gtk_widget_destroy(filesel); | 1156 gtk_widget_destroy(filesel); |
1155 bmp_playback_initiate(); | 1157 bmp_playback_initiate(); |
1156 } | 1158 } |