]> git.scottworley.com Git - picsort/blobdiff - picsorter.js
shell_out shouldn't list deleted pics
[picsort] / picsorter.js
index 213a553ac488356fc9b15d4784c5e2bace04a51b..e8a92a2ed6eec0c5171ef2f427f0757c684d5715 100644 (file)
@@ -152,7 +152,8 @@ function shell_escape(x) {
 function show_commands() {
   var commands = [];
   $.each(files, function(i, f) {
-    if ("name" in picinfo[f] && picinfo[f].name.length > 0) {
+    if ("name" in picinfo[f] && picinfo[f].name.length > 0 &&
+        !("deleted" in picinfo[f])) {
       var command = ["pic-mv"];
       if ("exposure" in picinfo[f]) {
         command.push("-e " + picinfo[f].exposure);
@@ -189,3 +190,4 @@ Mousetrap.bind('r', rotate);
 Mousetrap.bind('c', function() { $("#name").show().focus(); return false; });
 Mousetrap.bind('%', function() { say((100 * input_index / files.length).toFixed(2) + "%"); });
 Mousetrap.bind('!', show_commands);
+Mousetrap.bind('esc', function() { $("#name").hide(); $("#shell_out").hide(); });