- // get absolute path of file and add ".lyx" to the filename if
- // necessary
- string s = FileSearch(string(), filename, "lyx");
- if (s.empty()) {
- s = filename;
- }
-
- // file already open?
- if (exists(s)) {
- if (AskQuestion(_("Document is already open:"),
- MakeDisplayPath(s, 50),
- _("Do you want to reload that document?"))) {
- // Reload is accomplished by closing and then loading
- if (!close(getBuffer(s))) {
- return 0;
- }
- // Fall through to new load. (Asger)
- } else {
- // Here, we pretend that we just loaded the
- // open document
- return getBuffer(s);
- }
- }
- Buffer * b = 0;
- bool ro = false;
- switch (IsFileWriteable(s)) {
- case 0:
- ro = true;
- // Fall through
- case 1:
- b = readFile(s, ro);
- if (b) {
- b->lyxvc.file_found_hook(s);
- }
- break; //fine- it's r/w
- case -1:
- // Here we probably should run
- if (LyXVC::file_not_found_hook(s)) {
- // Ask if the file should be checked out for
- // viewing/editing, if so: load it.
- if (AskQuestion(_("Do you want to retrieve file under version control?"))) {
- // How can we know _how_ to do the checkout?
- // With the current VC support it has to be,
- // a RCS file since CVS do not have special ,v files.
- RCS::retrive(s);
- return loadLyXFile(filename, tolastfiles);
- }
- }
- if (AskQuestion(_("Cannot open specified file:"),
- MakeDisplayPath(s, 50),
- _("Create new document with this name?")))
- {
- // Find a free buffer
- b = newFile(s, string(), true);
- }
- break;
+ BufferStorage::iterator it = bstore.begin();
+ BufferStorage::iterator end = bstore.end();
+ for (; it != end; ++it) {
+ (*it)->params().authors().record(0, Author(name, email));