diff options
author | Alexey Yakovenko <wakeroid@gmail.com> | 2009-09-06 19:57:59 +0200 |
---|---|---|
committer | Alexey Yakovenko <wakeroid@gmail.com> | 2009-09-06 19:57:59 +0200 |
commit | 0c30eba788c3bd5488a06befcbcda8ecb087af7c (patch) | |
tree | 3abd7937e7eca7c80caa7a1b98b07b79788f908e /gtkplaylist.c | |
parent | 494d90094d3bdfafb51aaf899ad43ed887e14605 (diff) |
multiple selection in add folder(s) dialog
Diffstat (limited to 'gtkplaylist.c')
-rw-r--r-- | gtkplaylist.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/gtkplaylist.c b/gtkplaylist.c index 60a2dd04..3a8e7f51 100644 --- a/gtkplaylist.c +++ b/gtkplaylist.c @@ -1376,6 +1376,25 @@ gtkpl_add_dir (gtkplaylist_t *ps, char *folder) { } static void +gtkpl_adddir_cb (gpointer data, gpointer userdata) { + pl_add_dir (data, gtkpl_add_file_info_cb, userdata); + g_free (data); +} + +void +gtkpl_add_dirs (gtkplaylist_t *ps, GSList *lst) { + GDK_THREADS_ENTER(); + progress_show (); + GDK_THREADS_LEAVE(); + g_slist_foreach(lst, gtkpl_adddir_cb, NULL); + g_slist_free (lst); + GDK_THREADS_ENTER(); + progress_hide (); + playlist_refresh (); + GDK_THREADS_LEAVE(); +} + +static void gtkpl_addfile_cb (gpointer data, gpointer userdata) { pl_add_file (data, gtkpl_add_file_info_cb, userdata); g_free (data); |