@@ -708,7 +708,7 @@ private void createInitLayout(SDKUrlHolder downloadUrls) {
708
708
addPackage (gc ,1 ,packagesPanel ,"SDK PlatformTools: " ,downloadUrls .platformToolsVersion );
709
709
addPackage (gc ,2 ,packagesPanel ,"Android Build Tools: " ,downloadUrls .buildToolsVersion );
710
710
addPackage (gc ,3 ,packagesPanel ,"Android Tools: " ,downloadUrls .toolsVersion );
711
- addPackage (gc ,4 ,packagesPanel ,"Android Emulator: " ,downloadUrls .emulatorVersion );
711
+ //faddPackage (gc,4,packagesPanel,"Android Emulator: ",downloadUrls.emulatorVersion);
712
712
if (Platform .getName ()!="linux" ) addPackage (gc ,5 ,packagesPanel ,"Android Build Tools: " ,downloadUrls .haxmVersion );
713
713
714
714
//SDK_Path selection Panel
@@ -724,11 +724,21 @@ private void createInitLayout(SDKUrlHolder downloadUrls) {
724
724
selectPathButton .addActionListener (new ActionListener () {
725
725
@ Override
726
726
public void actionPerformed (ActionEvent e ) {
727
- JFileChooser fc = new JFileChooser ();
728
- fc .setCurrentDirectory (processing .app .Base .getSketchbookFolder ());
729
- fc .setFileSelectionMode (JFileChooser .DIRECTORIES_ONLY );
730
- fc .showOpenDialog (SDKDownloader .super .rootPane ); //To put it on top of the modalDialog
731
- if (fc .getSelectedFile ()!=null ) locationLabel .setText (fc .getSelectedFile ().getAbsolutePath ());
727
+ if (Platform .isMacOS ()){
728
+ FileDialog fd = new FileDialog (editor ,"Select Download Location" , FileDialog .LOAD );
729
+ fd .setDirectory (processing .app .Base .getSketchbookFolder ().getAbsolutePath ());
730
+ System .setProperty ("apple.awt.fileDialogForDirectories" , "true" );
731
+ fd .setModalityType (Dialog .ModalityType .APPLICATION_MODAL );
732
+ fd .setVisible (true );
733
+ System .setProperty ("apple.awt.fileDialogForDirectories" , "false" );
734
+ } else {
735
+ JFileChooser fc = new JFileChooser ();
736
+ fc .setDialogTitle ("Select Download Location" );
737
+ fc .setCurrentDirectory (processing .app .Base .getSketchbookFolder ());
738
+ fc .setFileSelectionMode (JFileChooser .DIRECTORIES_ONLY );
739
+ fc .showOpenDialog (SDKDownloader .super .rootPane ); //To put it on top of the modalDialog
740
+ if (fc .getSelectedFile () != null ) locationLabel .setText (fc .getSelectedFile ().getAbsolutePath ());
741
+ }
732
742
}
733
743
});
734
744
downloadPathPanel .add (selectPathButton ,BorderLayout .EAST );
0 commit comments