filter dragged files by file type - leave text files only

This commit is contained in:
Vadim Lopatin 2015-02-13 13:40:49 +03:00
parent f60032cc4a
commit b874f3e060
1 changed files with 6 additions and 1 deletions

View File

@ -617,10 +617,15 @@ class IDEFrame : AppFrame {
setBackgroundOperation(op);
}
/// handle files dropped to application window
void onFilesDropped(string[] filenames) {
//Log.d("onFilesDropped(", filenames, ")");
bool first = true;
for (int i = 0; i < filenames.length; i++) {
openSourceFile(filenames[i], null, i == 0);
if (isSupportedSourceTextFileFormat(filenames[i])) {
openSourceFile(filenames[i], null, first);
first = false;
}
}
}
}