From 4972856e5453c22c25b900f18172a174d8091cbe Mon Sep 17 00:00:00 2001 From: "Brenton M. Wiernik" Date: Fri, 13 Dec 2019 08:52:32 -0500 Subject: [PATCH] Better handle multi-file arguments on Windows --- .gitignore | 3 ++- build.sh | 6 +----- chrome/content/Bridge.cs | 4 ++-- chrome/content/Bridge.exe | Bin 5120 -> 5120 bytes chrome/content/zoteroquicklook.js | 10 ++++++++-- install-altwindows.rdf | 28 ---------------------------- install.rdf | 2 +- update-altwindows.rdf | 6 +++--- update.rdf | 6 +++--- 9 files changed, 20 insertions(+), 45 deletions(-) delete mode 100644 install-altwindows.rdf diff --git a/.gitignore b/.gitignore index ec2a80e..430649f 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -builds \ No newline at end of file +builds +github.token \ No newline at end of file diff --git a/build.sh b/build.sh index ff97eab..dc9c6ad 100755 --- a/build.sh +++ b/build.sh @@ -1,8 +1,4 @@ #!/bin/bash +"C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin\Roslyn\csc.exe" /target:winexe /out:./chrome/content/Bridge.exe "./chrome/content/Bridge.cs" zip -r builds/zoteroquicklook.zoteroplugin chrome defaults install.rdf chrome.manifest -x .* -mv install.rdf install-base.rdf -mv install-altwindows.rdf install.rdf -zip -r builds/zoteroquicklook-altwindows.zoteroplugin chrome defaults install.rdf chrome.manifest -x .* -mv install.rdf install-altwindows.rdf -mv install-base.rdf install.rdf \ No newline at end of file diff --git a/chrome/content/Bridge.cs b/chrome/content/Bridge.cs index 694f21e..1fe68a1 100644 --- a/chrome/content/Bridge.cs +++ b/chrome/content/Bridge.cs @@ -10,7 +10,7 @@ internal static class Program { private static void Main(string[] args) { - if (args.Length != 1) + if (args.Length == 0) { MessageBox.Show("Usage: Bridge.exe \"\""); return; @@ -42,7 +42,7 @@ private static void SendMessage(string pipeMessage, string path = null) } catch (Exception e) { - MessageBox.Show("QuickLook not found. Please install QuickLook (http://pooi.moe/QuickLook/) or specify a custom view command instead."); + MessageBox.Show("QuickLook cannot be reached. Please run/install QuickLook (http://pooi.moe/QuickLook/) or specify a custom view command instead."); } } } diff --git a/chrome/content/Bridge.exe b/chrome/content/Bridge.exe index e0de08ebd588b8d3785cd3b0efe162fedc6d7430..6e749b14f74940a7504f78c707dcaa1a3384f5db 100644 GIT binary patch delta 1303 zcmZuxU27aw7=GUQ+>c~3vyCA!sZ7{5*`)bek?Pi3Q#3S%Qre_Js{|91sB4?dW;aoK z)7_LJxhUc?6s5Eg8mK5DXrOo@=szfh-Y6vqdJ(*-p!K4N^*JZ02s(%JocDRZ-*aGU zxmxanRqMg!-zMvqI^;n8)0bo`7U_;{E2pq2Jkg_B=4fVPEFXjxUvq3vX6b-miHfca(i%9G5tbPhIxN z#L*XdUM1f`eBJD-W=I*SHwTB>P55mPvdXN+bRsLLK=t05>*?n4nN<4G*yZSqC@!3ocyMqEL^afn!w7uduP7}cJ~ z;30umkwGKYFu-@dN!*2RiS5|5_%4sfui4pwF*K_db$41IjA2QOs^drB81A$4_zU}b zTy#!teD4$`9!cD&uE1ACwVvZ2+&^Cv6wO(oF^+>bij~Z0tIBF7f$7_i_v7fXi@%&Ho>mRLp zhp+il`!9TV>lav|NWu&uHiaNCT`_D((Bmat%gD54c4s=>&=k)L`jtl}@4)o zkU4CH$c!+97Z;P4+g#C4;_v*q6zNrRSnq6+j`(4!$9}jM;V^$)w>G?n2exsrun}bL INqxxu8&!SAkpKVy delta 1267 zcmX|BU1(cn7=GT9q=+s+H}$q)O06El{Ny>)S1y4>A6$H@V z2Gj)sq0LWqj)&9b=apCTyHj;G7Zwu%K97s|kghlHA;y_M=b@iu!tj_FMEv z1ojQ;iwyKP7ga`Ts_~l-uvkJk-sMt5T$(Ptc%hCuzD@@$dg57G+s>2+#AGb8M zTUBYeyxyv(u6D8oRu@jDAcdBbV7$xs;%KJIfiNbYKs~d|Rr?)QO6ZKX8VKz@{*Ijo z16IUM7j>q6sry45D1H$rQLnjtqGaa_b453;pR<2W9iN=QcjOF1d}wlbfch8O32`=k z9py%vjPyRv3ipfFY(I7FY`t~hZ_nl_;v@VjDsFkWif^R>D$}UAju6*RCb4=N!0L+>n-DP&wYSy6`y*16fS>GIZS+2T-=AlZXdPcLcJmpJSjui zLoVn=j)hOJOcTcpcV`7la)X{y&AJ=w9I?60^EH1d@1r_gxt(1Ljv*3J&?`HzDZ=?T zS#%FkLl-fE(^ycN&_}+X_^={4PM*XCJfNhpjCmgKG7d885>_~EFZRn3yoed)7;#=D8U zl8W&rdVFGF z;`+_67I$B082)5S>*X-$8xi?%h{r}WS=#&wz+5(vk%(&**P<7 z&CF-V>liXx5fei?cKMhh_hlX7|rzRN8il=0w9?{9*jt4x``sCi2sUUUw&;boXsU KV}D8|9sCbxY~J4h diff --git a/chrome/content/zoteroquicklook.js b/chrome/content/zoteroquicklook.js index 58bec48..1f3fb58 100644 --- a/chrome/content/zoteroquicklook.js +++ b/chrome/content/zoteroquicklook.js @@ -453,10 +453,16 @@ Checks the attachment file or writes a content of a note to a file and then push // A boolean indicating if we have notes this far. var notesFound=false; - var filesFound=false; - //Combine all filenames into an array + if (!Zotero.isWin || this.customviewcommand !== "") { + + } else { + + } + + // Combine all filenames into an array + // Note that for default Windows behavior, only the first time will be displayed for (item in items){ diff --git a/install-altwindows.rdf b/install-altwindows.rdf deleted file mode 100644 index 3a99e75..0000000 --- a/install-altwindows.rdf +++ /dev/null @@ -1,28 +0,0 @@ - - - - zoteroquicklook@gmail.com - 2 - ZoteroQuickLook - 1.4.0 - Mikko Ronkko - Brenton M. Wiernik - Quick Look Utility for Zotero. - https://raw.githubusercontent.com/mronkko/ZoteroQuickLook/master/update-altwindows.rdf - WINNT - - - zotero@chnm.gmu.edu - 4.0 - 5.* - - - - - juris-m@juris-m.github.io - 4.0 - 5.* - - - - diff --git a/install.rdf b/install.rdf index 46b9701..b40a403 100644 --- a/install.rdf +++ b/install.rdf @@ -4,7 +4,7 @@ zoteroquicklook@gmail.com 2 ZoteroQuickLook - 1.4.1 + 1.4.2 Mikko Ronkko Brenton M. Wiernik Quick Look Utility for Zotero. diff --git a/update-altwindows.rdf b/update-altwindows.rdf index 899a286..97834fa 100644 --- a/update-altwindows.rdf +++ b/update-altwindows.rdf @@ -5,13 +5,13 @@ - 1.4.1 + 1.4.2 zotero@chnm.gmu.edu 4.0 5.* - https://github.com/mronkko/ZoteroQuickLook/releases/download/1.4.1/zoteroquicklook-altwindows.zoteroplugin + https://github.com/mronkko/ZoteroQuickLook/releases/download/1.4.2/zoteroquicklook.zoteroplugin @@ -19,7 +19,7 @@ juris-m@juris-m.github.io 4.0 5.* - https://github.com/mronkko/ZoteroQuickLook/releases/download/1.4.1/zoteroquicklook-altwindows.zoteroplugin + https://github.com/mronkko/ZoteroQuickLook/releases/download/1.4.2/zoteroquicklook.zoteroplugin diff --git a/update.rdf b/update.rdf index c00e1d0..97834fa 100644 --- a/update.rdf +++ b/update.rdf @@ -5,13 +5,13 @@ - 1.4.1 + 1.4.2 zotero@chnm.gmu.edu 4.0 5.* - https://github.com/mronkko/ZoteroQuickLook/releases/download/1.4.1/zoteroquicklook.zoteroplugin + https://github.com/mronkko/ZoteroQuickLook/releases/download/1.4.2/zoteroquicklook.zoteroplugin @@ -19,7 +19,7 @@ juris-m@juris-m.github.io 4.0 5.* - https://github.com/mronkko/ZoteroQuickLook/releases/download/1.4.1/zoteroquicklook.zoteroplugin + https://github.com/mronkko/ZoteroQuickLook/releases/download/1.4.2/zoteroquicklook.zoteroplugin