summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorGravatar waker <wakeroid@gmail.com>2009-08-16 14:01:49 +0200
committerGravatar waker <wakeroid@gmail.com>2009-08-16 14:01:49 +0200
commitf8a8120b4f9d466a9663088fce899e9602e331bd (patch)
tree8e238beafccab82db19fee6af54844ba72faaeb1 /main.c
parenteffb118e2d367db74fb97489a040c7a8ac131ba0 (diff)
fixed some more redraw issues
Diffstat (limited to 'main.c')
-rw-r--r--main.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/main.c b/main.c
index a1bba6ef..e40f6a15 100644
--- a/main.c
+++ b/main.c
@@ -38,6 +38,7 @@
#include "gtkplaylist.h"
#include "codec.h"
#include "streamer.h"
+#include "search.h"
GtkWidget *mainwin;
GtkWidget *searchwin;
@@ -192,6 +193,10 @@ exec_command_line (const char *cmdline, int len, int filter) {
parg++;
}
}
+ if (exitcode == 2 || exitcode == 3) {
+ // added some files, need to redraw
+ messagepump_push (M_PLAYLISTREFRESH, 0, 0, 0);
+ }
return exitcode;
}
@@ -330,6 +335,12 @@ player_thread (uintptr_t ctx) {
case M_FMDRAGDROP:
gtkpl_add_fm_dropped_files (&main_playlist, (char *)ctx, p1, p2);
break;
+ case M_PLAYLISTREFRESH:
+ GDK_THREADS_ENTER();
+ playlist_refresh ();
+ search_refresh ();
+ GDK_THREADS_LEAVE();
+ break;
}
}
usleep(1000);