fixed building on Windows
there are some temporary hacks around picture and file choosers
elinated more duplicated code around plugins