[Player-cvs] common/gtk hxbin.cpp,1.9,1.10
nhart at helixcommunity.org nhart at helixcommunity.orgUpdate of /cvsroot/player/common/gtk
In directory cvs-new:/tmp/cvs-serv7956
Modified Files:
hxbin.cpp
Log Message:
play the first file in a drag & drop
Index: hxbin.cpp
===================================================================
RCS file: /cvsroot/player/common/gtk/hxbin.cpp,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- hxbin.cpp 9 Jul 2004 18:24:08 -0000 1.9
+++ hxbin.cpp 22 Jul 2004 23:59:39 -0000 1.10
@@ -384,8 +384,17 @@
/* XXXRGG: we need to parse this into a playlist if
multiple files are being dropped */
- hx_player_open_url(HX_PLAYER(player), (gchar*)selection_data->data);
+ gchar** pURLs = g_strsplit((gchar*)selection_data->data, "\r\n", 0xffff);
+ if (pURLs)
+ {
+ // XXXNH: for now just use the first URL, later we'll turn them into
+ // a playlist
+ hx_player_open_url(HX_PLAYER(player), pURLs[0]);
hx_player_play(HX_PLAYER(player));
+
+ // cleanup
+ g_strfreev(pURLs);
+ }
}
void