export int Dropped(string file)
{
  string query = sprintf("Open %s\ninto a new buffer or\ninsert it at current po
sition?", file);
  int ret;
  ret = Request(query, "AppQuery", "New|Insert|Cancel");
  if (ret==1) {
    int id = New();
    int before = GetBufferID();
    CurrentBuffer(id);    /* make it the current */
    if(0>Load(file)) {
      Kill(id);           /* failed loading */
    } else {
      CurrentBuffer(id);    /* make it the current */
      Activate(id);       /* popup a view */
    }
  }
  WindowToFront();
  return (ret!=2) ; /* stop the insert operation if "New" or "Cancel" was select
ed! */
}
Hook("IconDrop", "Dropped");
