summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gtkplaylist.c6
-rw-r--r--playlist.c41
-rw-r--r--playlist.h3
3 files changed, 3 insertions, 47 deletions
diff --git a/gtkplaylist.c b/gtkplaylist.c
index 09ec386d..eb2991a9 100644
--- a/gtkplaylist.c
+++ b/gtkplaylist.c
@@ -1078,7 +1078,6 @@ gtkps_add_fm_dropped_files (gtkplaylist_t *ps, char *ptr, int length, int drop_y
}
}
free (ptr);
- ps_shuffle ();
// invalidate entire cache - slow, but rare
memset (ps->fmtcache, 0, sizeof (int16_t) * 3 * ps_ncolumns * ps->nvisiblerows);
GDK_THREADS_ENTER();
@@ -1088,6 +1087,7 @@ gtkps_add_fm_dropped_files (gtkplaylist_t *ps, char *ptr, int length, int drop_y
GtkWidget *widget = ps->playlist;
gtkps_draw_playlist (ps, 0, 0, widget->allocation.width, widget->allocation.height);
gtkps_expose (ps, 0, 0, widget->allocation.width, widget->allocation.height);
+ search_refresh ();
GDK_THREADS_LEAVE();
}
@@ -1313,7 +1313,6 @@ gtkps_add_dir (gtkplaylist_t *ps, char *folder) {
GDK_THREADS_LEAVE();
ps_add_dir (folder, gtkps_add_file_info_cb, e);
g_free (folder);
- ps_shuffle ();
GDK_THREADS_ENTER();
gtk_widget_destroy (d);
gtk_widget_set_sensitive (mainwin, TRUE);
@@ -1321,6 +1320,7 @@ gtkps_add_dir (gtkplaylist_t *ps, char *folder) {
GtkWidget *widget = ps->playlist;
gtkps_draw_playlist (ps, 0, 0, widget->allocation.width, widget->allocation.height);
gtkps_expose (ps, 0, 0, widget->allocation.width, widget->allocation.height);
+ search_refresh ();
GDK_THREADS_LEAVE();
}
@@ -1346,7 +1346,6 @@ gtkps_add_files (gtkplaylist_t *ps, GSList *lst) {
GDK_THREADS_LEAVE();
g_slist_foreach(lst, gtkps_addfile_cb, e);
g_slist_free (lst);
- ps_shuffle ();
GDK_THREADS_ENTER();
gtk_widget_destroy (d);
gtk_widget_set_sensitive (mainwin, TRUE);
@@ -1354,6 +1353,7 @@ gtkps_add_files (gtkplaylist_t *ps, GSList *lst) {
GtkWidget *widget = ps->playlist;
gtkps_draw_playlist (ps, 0, 0, widget->allocation.width, widget->allocation.height);
gtkps_expose (ps, 0, 0, widget->allocation.width, widget->allocation.height);
+ search_refresh ();
GDK_THREADS_LEAVE();
}
diff --git a/playlist.c b/playlist.c
index 8624bfc1..3fcb3596 100644
--- a/playlist.c
+++ b/playlist.c
@@ -905,47 +905,6 @@ ps_delete_selected (void) {
}
void
-ps_shuffle (void) {
- return;
-#if 0
- playItem_t *head = NULL;
- playItem_t *tail = NULL;
- playItem_t *it;
- int cnt = 0;
- for (it = playlist_head[PS_MAIN]; it; it = it->next[PS_MAIN]) {
- it->next[PS_SHUFFLE] = head;
- head = it;
- cnt++;
- }
- playlist_head[PS_SHUFFLE] = NULL;
- while (cnt > 0) {
- int idx = (float)rand ()/RAND_MAX * cnt;
- int i = 0;
- playItem_t *prev = NULL;
- for (it = head; it; it = it->next[PS_SHUFFLE], i++) {
- if (i == idx) {
- if (prev) {
- prev->next[PS_SHUFFLE] = it->next[PS_SHUFFLE];
- }
- else {
- head = it->next[PS_SHUFFLE];
- }
- // prepend to shuffled playlist
- it->next[PS_SHUFFLE] = playlist_shuffle_head;
- if (!playlist_shuffle_head) {
- tail = it;
- }
- playlist_shuffle_head = it;
- cnt--;
- break;
- }
- prev = it;
- }
- }
-#endif
-}
-
-void
ps_set_order (int order) {
ps_order = order;
}
diff --git a/playlist.h b/playlist.h
index 6d4bf6c7..d4815d85 100644
--- a/playlist.h
+++ b/playlist.h
@@ -125,9 +125,6 @@ void
ps_delete_selected (void);
void
-ps_shuffle (void);
-
-void
ps_set_order (int order);
void