+ const gchar *nexttemp = (const gchar*) buf;
+ for ( ; ; )
+ {
+ int len = 0;
+ const gchar *temp = nexttemp;
+ for (;;)
+ {
+ if (temp[len] == 0)
+ {
+ if (len > 0)
+ {
+ // if an app omits '\r''\n'
+ nexttemp = temp+len;
+ break;
+ }
+
+ return true;
+ }
+ if (temp[len] == '\r')
+ {
+ if (temp[len+1] == '\n')
+ nexttemp = temp+len+2;
+ else
+ nexttemp = temp+len+1;
+ break;
+ }
+ len++;
+ }
+
+ if (len == 0)
+ break;
+
+ // required to give it a trailing zero
+ gchar *uri = g_strndup( temp, len );
+
+ gchar *fn = g_filename_from_uri( uri, NULL, NULL );
+
+ g_free( uri );
+
+ if (fn)
+ {
+ AddFile( wxConvFileName->cMB2WX( fn ) );
+ g_free( fn );
+ }
+ }
+
+ return true;
+}
+
+void wxFileDataObject::AddFile( const wxString &filename )
+{
+ m_filenames.Add( filename );