From 1c7cc70f56c2cef85aa483eff11a5ea778974340 Mon Sep 17 00:00:00 2001 From: Iain Milne Date: Tue, 3 Sep 2019 13:39:57 +0100 Subject: [PATCH] - BUG: JRE11 had stopped supporting the osxadapter code. This meant About/Prefs/etc options on macOS were no longer working. --- build.xml | 1 - installer/Tablet.install4j | 6 ++-- lib/osxadapter.jar | Bin 3723 -> 0 bytes src/tablet/gui/Tablet.java | 68 +++++++++++++++++-------------------- 4 files changed, 33 insertions(+), 42 deletions(-) delete mode 100644 lib/osxadapter.jar diff --git a/build.xml b/build.xml index fb833181..d8447be2 100644 --- a/build.xml +++ b/build.xml @@ -73,7 +73,6 @@ - + @@ -33,9 +33,7 @@ - - @@ -2562,7 +2560,7 @@ context.goForward(1, true, true); - + diff --git a/lib/osxadapter.jar b/lib/osxadapter.jar deleted file mode 100644 index 2001cf0b603fe813eb25d732aad0ec9b4a028e18..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3723 zcmb7H2T)V#8V$XM9;(udp_fQUlpur>2%!Z;AT(j=gf2zO(nPv|fPfSM=|x1U3rLr$ zh@e2|3Q|NRh>I^QZv|a<=DmOB=DYLXbIy13=VazP2pu9~O2E;Ahx*9>b@Sg3QhY^w zc(~Y0AiiS|KVgoT#~3?r%qbl5CmiSp90u)*m$h}bJ1u?g#*gi}|Bd2~@kiUCJ-qF` z{%XjC$B_g0@oYqJ9fukr0ANE507(B2Y<)x2rDGv}DREmDGzN3a@T&dcPRtULJrMfs_n4q)f@wo^Obkp&Yg`?}-mL%SrVNVFg=|KT=?0 zvA0O^G}B1n37PS#n5XGN`uf~_)Z~UKsWK%R@p`v>!LF@QAU>aKryG;a-NqZvQe`&D zDFqv>0<(^nr}IrVa-7GyZfC(`Y&>RW=Pj=iQ!~CgSN%CY?ZIZ_wU`4F$7IXu3ue** zGIX;+rSQHu+o>vjPal;BeTDhFw+uj+hh+F;RUp3p5#-X@!ItT+n+Nu6&2b_qYu35= zDDK4van4P{l7TgJ!f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!uCP%*sxB&5x3Z!Zu!Q$fh*AT4=WKRc(n6gL5!0!xVKuJ&)^%2A!1g*@ zD2V9xF4@%?Aux)i%+4i4wnHV{#>=tr@MDZFpG4i1SE+X-ml<%`ru4qQuyZDx%WXf7 z(ChT`s#Joi%!G9gfqdoXdh=bVKG^zBb;7)0c&+DYx@TY1^DHJ=d@W^h*z z>Lp$k=h9GVe!PP~FDg7oLL?d5!i;M<5JW6=r2&q+qLcmwCgO2fP*xrp3AT9{ za~@uiXo7)Fc;MV(U4lW;x`x|qZgzVab2xY5$0>`iwxdWw24`=E6)>~7N998IpZRJg>P}%4MTLtyb zXE{rB#R86?etJQ(Lq`yWPmJZ`mmK;m74>;CY645EY)umLoUMJ;JsCAr5)|7tU7I-O48hmoc9IO4g`R%{^?D?cVq$H$5B0)-;vUMMO1~+%9 zQb}DA0|)j6t1+LYS50duc5~MNFUj`pXwx1&;p9X-2`0*xZx}yp!Qj4%ZvOU|Q$CM& zpLf$d!P=HN320IM@Mo2ZwAm`lrg8wo$FB} zmh~i%bzOf|bAB<;;!omA99j8b3H55IK{onBg|&u0lvJ66vae%4l;H2l008LmfvV$& zf$xg~e+R#8bV*E0Pvg`KJ&A|OQPbKT%;RJONQr;0LqNy``1jEt-wnU$j?4ET zaKiaj6gUPSarp7q>0ofe`&BeJ;pzUs`ynWtNc<`)oJfTJo5T;n;YjUdQ2RML9IJ8T zOWXgT_Rk=3e7Gn2KM#T@`uaqt59-txKJ~UI`p0A8k-F+%Z~rSZ9UcAAI{F!$s7`r? z62N`54 osxAbout()); + desktop.setPreferencesHandler(e -> osxPreferences()); + desktop.setQuitHandler((e,r) -> osxShutdown()); + desktop.setOpenFileHandler(this); } /** "Preferences" on the OS X system menu. */ @@ -342,14 +344,19 @@ public boolean osxShutdown() return true; } - public void osxOpen(String path) + /** Deal with desktop-double clicking of registered files */ + public void openFiles(OpenFilesEvent e) { + String[] paths = new String[e.getFiles().size()]; + for (int i = 0; i < paths.length; i++) + paths[i] = e.getFiles().get(i).toString(); + // If Tablet is already open, then open the file straight away if (winMain != null && winMain.isVisible()) { // TODO: If we have project modified checks, do them here too TabletFile tabletFile = - TabletFileHandler.createFromFileList(new String[] { path }); + TabletFileHandler.createFromFileList(paths); winMain.getCommands().fileOpen(tabletFile); } @@ -357,20 +364,7 @@ public void osxOpen(String path) else { initialFiles = new String[1]; - initialFiles[0] = path; + initialFiles[0] = paths[0]; } } - - public static File getLogFile() - { - try - { - File root = new File(System.getProperty("user.home")); - File folder = new File(root, ".scri-bioinf"); - File logFile = new File(folder, "tablet.log"); - - return logFile; - } - catch (Throwable e) { return new File(""); } - } } \ No newline at end of file