]> git.scottworley.com Git - picsort/blobdiff - picsorter.js
Change 'e'xposure key to 'B'rightness
[picsort] / picsorter.js
index b8b1804bac0099630ca7ad43330b1d9440a1eaba..cfbf5db7f4754bd16824a1fc0ceb548a331434cb 100644 (file)
@@ -52,7 +52,7 @@ function setpic() {
 
 function say(message) {
   $("#message").text(message).removeClass("fade");
-  setTimeout(function() { $("#message").addClass("fade"); }, 1);
+  setTimeout(function() { $("#message").addClass("fade"); }, 100);
 }
 function announce() {
   say(input_index + " " + (picinfo[files[input_index]].name || ""));
@@ -214,13 +214,25 @@ Mousetrap.bind('X', mark_not_deleted);
 Mousetrap.bind('r', rotate);
 Mousetrap.bind('i', announce);
 Mousetrap.bind('f', function() { say(files[input_index]); });
-Mousetrap.bind('e', function() { say_exposure(); });
+Mousetrap.bind('B', function() { say_exposure(); });
 Mousetrap.bind('c', function() { $("#name").show().focus(); return false; });
 Mousetrap.bind('C', function() { if (last_name) { set_name(last_name); } });
 Mousetrap.bind('%', function() { say((100 * input_index / files.length).toFixed(2) + "%"); });
 Mousetrap.bind('!', show_commands);
 Mousetrap.bind('esc', function() { $("#name").hide(); $("#shell_out").hide(); });
 
+function clean_picinfo() {
+  files_index = {};
+  $.each(files, function(i, f) {
+    files_index[f] = true;
+  });
+  for (f in picinfo) {
+    if (!files_index[f]) {
+      delete picinfo[f];
+    }
+  }
+}
+
 function undelete_all() {
   for (f in picinfo) {
        delete picinfo[f].deleted;