summaryrefslogtreecommitdiff
path: root/plugins/gtkui/fileman.c
diff options
context:
space:
mode:
authorGravatar waker <wakeroid@gmail.com>2011-06-17 23:20:45 +0200
committerGravatar waker <wakeroid@gmail.com>2011-06-17 23:20:45 +0200
commitfe1790fd889dfacc6e4f4a32bfebe29789d5a9ed (patch)
treeb6e23533f7aeeedba4e587487c9611fed4952d6c /plugins/gtkui/fileman.c
parent081386fa03e82ca64aa14a5bd5e8bd3ba8b2ba9a (diff)
initial work to add customizable layout support:
defined data structures, few stubs, many regressions, implemented tabbed playlist widget; now it should be possible to have several playlist viewers visible at the same time; playlist keyboard handling is partially broken
Diffstat (limited to 'plugins/gtkui/fileman.c')
-rw-r--r--plugins/gtkui/fileman.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/plugins/gtkui/fileman.c b/plugins/gtkui/fileman.c
index 8947c821..4b1b6949 100644
--- a/plugins/gtkui/fileman.c
+++ b/plugins/gtkui/fileman.c
@@ -104,17 +104,15 @@ static void
open_files_worker (void *data) {
GSList *lst = (GSList *)data;
gtkpl_add_files (lst);
- gtkui_playlist_changed ();
- extern GtkWidget *mainwin;
- DdbListview *pl = DDB_LISTVIEW (lookup_widget (mainwin, "playlist"));
- ddb_listview_set_cursor (pl, 0);
+ deadbeef->pl_set_cursor (PL_MAIN, 0);
+ deadbeef->sendmessage (DB_EV_PLAYLISTCHANGED, 0, 0, 0);
deadbeef->sendmessage (DB_EV_PLAY_CURRENT, 0, 1, 0);
}
void
gtkui_open_files (struct _GSList *lst) {
deadbeef->pl_clear ();
- playlist_refresh ();
+ deadbeef->sendmessage (DB_EV_PLAYLISTCHANGED, 0, 0, 0);
intptr_t tid = deadbeef->thread_start (open_files_worker, lst);
deadbeef->thread_detach (tid);
@@ -164,13 +162,14 @@ strcopy_special (char *dest, const char *src, int len) {
static gboolean
set_dnd_cursor_idle (gpointer data) {
- DdbListview *listview = DDB_LISTVIEW (lookup_widget (mainwin, "playlist"));
if (!data) {
- ddb_listview_set_cursor (listview, -1);
+ deadbeef->pl_set_cursor (PL_MAIN, -1);
+ deadbeef->sendmessage (DB_EV_PLAYLISTCHANGED, 0, 0, 0);
return FALSE;
}
int cursor = deadbeef->pl_get_idx_of (DB_PLAYITEM (data));
- ddb_listview_set_cursor (listview, cursor);
+ deadbeef->pl_set_cursor (PL_MAIN, cursor);
+ deadbeef->sendmessage (DB_EV_PLAYLISTCHANGED, 0, 0, 0);
return FALSE;
}
@@ -182,7 +181,6 @@ gtkpl_add_fm_dropped_files (DB_playItem_t *drop_before, char *ptr, int length) {
deadbeef->plt_unref (plt);
return;
}
- DdbListview *pl = DDB_LISTVIEW (lookup_widget (mainwin, "playlist"));
DdbListviewIter first = NULL;
DdbListviewIter after = NULL;