[svn-upgrade] Integrating new upstream version, jabref (2.3~beta3) upstream/2.3_beta3
authorgregor herrmann <gregoa@debian.org>
Mon, 8 Oct 2007 19:51:03 +0000 (19:51 -0000)
committergregor herrmann <gregoa@debian.org>
Mon, 8 Oct 2007 19:51:03 +0000 (19:51 -0000)
154 files changed:
PrepRelease.class [deleted file]
PrepRelease.java [deleted file]
build.number
build.xml
jabref.log [deleted file]
src/help/About.html
src/help/CustomExports.html
src/help/LabelPatterns.html
src/help/de/About.html
src/help/de/CustomExports.html
src/help/de/LabelPatterns.html
src/help/fr/About.html
src/help/fr/CustomExports.html
src/help/fr/LabelPatterns.html
src/images/JabRef-icon-32.png [new file with mode: 0644]
src/images/JabRef-icon.svg [new file with mode: 0644]
src/images/absIcon.png [new file with mode: 0644]
src/images/add.png [new file with mode: 0644]
src/images/autumn.png [new file with mode: 0644]
src/images/completeItem.png [new file with mode: 0644]
src/images/contents.png [new file with mode: 0644]
src/images/document-save-as.png [new file with mode: 0644]
src/images/document-save.png [new file with mode: 0644]
src/images/doismall.png [new file with mode: 0644]
src/images/duplicate.png [new file with mode: 0644]
src/images/edit-copy.png [new file with mode: 0644]
src/images/edit-cut.png [new file with mode: 0644]
src/images/edit-delete.png [new file with mode: 0644]
src/images/edit-find.png [new file with mode: 0644]
src/images/edit-paste.png [new file with mode: 0644]
src/images/edit-redo.png [new file with mode: 0644]
src/images/edit-undo.png [new file with mode: 0644]
src/images/editor.png [new file with mode: 0644]
src/images/emacs.png [new file with mode: 0644]
src/images/emblem-web-small.png [new file with mode: 0644]
src/images/emblem-web.png [new file with mode: 0644]
src/images/fileclose.png [new file with mode: 0644]
src/images/fileclose2.png [new file with mode: 0644]
src/images/filenew.png [new file with mode: 0644]
src/images/fileopen.png [new file with mode: 0644]
src/images/genIcon.png [new file with mode: 0644]
src/images/go-down.png [new file with mode: 0644]
src/images/go-next.png [new file with mode: 0644]
src/images/go-previous.png [new file with mode: 0644]
src/images/go-up.png [new file with mode: 0644]
src/images/groupIncluding.png [new file with mode: 0644]
src/images/groupRefining.png [new file with mode: 0644]
src/images/grouping_morten.png [new file with mode: 0644]
src/images/groupsHighlightAll.png [new file with mode: 0644]
src/images/groupsHighlightAny.png [new file with mode: 0644]
src/images/help-about.png [new file with mode: 0644]
src/images/help-browser.png [new file with mode: 0644]
src/images/integrity.png [new file with mode: 0644]
src/images/lyx2.png [new file with mode: 0644]
src/images/mark.png [new file with mode: 0644]
src/images/messageFail.png [new file with mode: 0644]
src/images/messageInfo.png [new file with mode: 0644]
src/images/messageWarn.png [new file with mode: 0755]
src/images/optIcon.png [new file with mode: 0644]
src/images/pdf-new.png [new file with mode: 0644]
src/images/pdf.png [new file with mode: 0644]
src/images/postscript.png [new file with mode: 0644]
src/images/preamble.png [new file with mode: 0644]
src/images/preferences.png [new file with mode: 0644]
src/images/remove.png [new file with mode: 0644]
src/images/reqIcon.png [new file with mode: 0644]
src/images/search.png [new file with mode: 0644]
src/images/splash-2.1.svg [new file with mode: 0644]
src/images/splash-2.1beta.png [new file with mode: 0644]
src/images/splash-2.3.svg [new file with mode: 0644]
src/images/splash.svg [new file with mode: 0644]
src/images/splashBackground.png [new file with mode: 0644]
src/images/strings.png [new file with mode: 0644]
src/images/unmark.png [new file with mode: 0644]
src/images/user-home.png [new file with mode: 0644]
src/images/view-refresh.png [new file with mode: 0644]
src/images/viewsource.gif [new file with mode: 0644]
src/images/winedt.png [new file with mode: 0644]
src/images/wizard.png [new file with mode: 0644]
src/images/wrongItem.png [new file with mode: 0644]
src/images/wwwciteseer.png [new file with mode: 0644]
src/java/net/sf/jabref/BasePanel.java
src/java/net/sf/jabref/BibtexFields.java
src/java/net/sf/jabref/EntryComparator.java
src/java/net/sf/jabref/EntryEditor.java
src/java/net/sf/jabref/FieldComparator.java
src/java/net/sf/jabref/GUIGlobals.java
src/java/net/sf/jabref/GeneralTab.java
src/java/net/sf/jabref/Globals.java
src/java/net/sf/jabref/JabRef.java
src/java/net/sf/jabref/JabRefFrame.java
src/java/net/sf/jabref/JabRefMain.java [new file with mode: 0644]
src/java/net/sf/jabref/JabRefPreferences.java
src/java/net/sf/jabref/MetaData.java
src/java/net/sf/jabref/PreviewPrefsTab.java
src/java/net/sf/jabref/SearchManager2.java
src/java/net/sf/jabref/Util.java
src/java/net/sf/jabref/XmpPrefsTab.java
src/java/net/sf/jabref/about/About2.java
src/java/net/sf/jabref/about/AboutPanel.java
src/java/net/sf/jabref/about/AboutTextLine.java
src/java/net/sf/jabref/about/AnimationListener.java
src/java/net/sf/jabref/about/ExtendedInfoPanel.java
src/java/net/sf/jabref/about/NewAboutAction.java
src/java/net/sf/jabref/about/TextBlock.java
src/java/net/sf/jabref/export/ExportFormats.java
src/java/net/sf/jabref/export/ExportToClipboardAction.java
src/java/net/sf/jabref/export/ModsExportFormat.java
src/java/net/sf/jabref/export/OOCalcDatabase.java
src/java/net/sf/jabref/export/OpenDocumentRepresentation.java
src/java/net/sf/jabref/export/layout/AbstractParamLayoutFormatter.java
src/java/net/sf/jabref/export/layout/LayoutEntry.java
src/java/net/sf/jabref/export/layout/format/AuthorAbbreviator.java
src/java/net/sf/jabref/export/layout/format/AuthorLastFirstAbbreviator.java
src/java/net/sf/jabref/export/layout/format/FileLink.java
src/java/net/sf/jabref/export/layout/format/Replace.java
src/java/net/sf/jabref/export/layout/format/WrapFileLinks.java [new file with mode: 0644]
src/java/net/sf/jabref/external/AutoSetExternalFileForEntries.java
src/java/net/sf/jabref/external/DownloadExternalFile.java
src/java/net/sf/jabref/external/DroppedFileHandler.java
src/java/net/sf/jabref/external/ExternalFileType.java
src/java/net/sf/jabref/external/ExternalFileTypeEditor.java
src/java/net/sf/jabref/external/PushToWinEdt.java
src/java/net/sf/jabref/external/SynchronizeFileField.java
src/java/net/sf/jabref/external/WriteXMPAction.java
src/java/net/sf/jabref/external/WriteXMPEntryEditorAction.java [new file with mode: 0644]
src/java/net/sf/jabref/groups/EntryTableTransferHandler.java
src/java/net/sf/jabref/gui/FileListEditor.java
src/java/net/sf/jabref/gui/FileListEntryEditor.java
src/java/net/sf/jabref/gui/FileListTableModel.java
src/java/net/sf/jabref/gui/MainTable.java
src/java/net/sf/jabref/gui/MainTableSelectionListener.java
src/java/net/sf/jabref/imports/EndnoteImporter.java
src/java/net/sf/jabref/imports/IEEEXploreFetcher.java
src/java/net/sf/jabref/imports/MedlineFetcher.java
src/java/net/sf/jabref/imports/OvidImporter.java
src/java/net/sf/jabref/journals/ManageJournalsPanel.java
src/java/net/sf/jabref/labelPattern/LabelPatternUtil.java
src/java/net/sf/jabref/net/URLDownload.java
src/java/net/sf/jabref/util/MassSetFieldAction.java
src/java/net/sf/jabref/util/XMPSchemaBibtex.java
src/resource/IEEEJournalList.txt [new file with mode: 0644]
src/resource/JabRef_de.properties
src/resource/JabRef_du.properties
src/resource/JabRef_en.properties
src/resource/JabRef_fr.properties
src/resource/JabRef_it.properties
src/resource/JabRef_no.properties
src/resource/Menu_es.properties [new file with mode: 0644]
src/resource/build.properties
src/resource/build.properties.orig [new file with mode: 0644]
src/resource/layout/bibtexml.layout
src/txt/README
src/txt/TODO

diff --git a/PrepRelease.class b/PrepRelease.class
deleted file mode 100644 (file)
index 74d4765..0000000
Binary files a/PrepRelease.class and /dev/null differ
diff --git a/PrepRelease.java b/PrepRelease.java
deleted file mode 100644 (file)
index 5d60da7..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-import java.io.*;
-
-/**
- * This little program traverses the file structure from the current
- * directory, and removes all CVS directories and all files starting
- * with ".#" or ending with "~", e.g. backup files. This is to make the
- * source tree ready for release.
- */
-public class PrepRelease {
-
-    public static void main(String[] args) {
-       File start = new File(System.getProperty("user.dir"));
-       System.out.println(start.getPath());
-       traverse(start);
-    }
-
-    private static void traverse(File f) {
-       //System.out.println(f.getPath());
-       File[] fs = f.listFiles();
-       for (int i=0; i<fs.length; i++) {
-           if (fs[i].getName().equals("CVS") || fs[i].getName().equalsIgnoreCase(".svn")) {
-               delete(fs[i]);
-               fs[i].delete();
-               System.out.println("Deleting dir: "+fs[i].getPath());
-           } else if (fs[i].isDirectory()) {
-               traverse(fs[i]);
-           } else if (fs[i].getName().endsWith("~") ||
-                      fs[i].getName().startsWith(".#")) {
-               System.out.println("Deleting: "+fs[i].getPath());
-               fs[i].delete();
-           }
-       }
-    }
-
-    private static void delete(File f) {
-       File[] fs = f.listFiles();
-       for (int i=0; i<fs.length; i++) {
-           System.out.println("Deleting: "+fs[i].getPath());
-           if (fs[i].isDirectory())
-               delete(fs[i]);
-           fs[i].delete();
-       }
-    }
-}
index db657ad..41727ba 100644 (file)
@@ -1,3 +1,3 @@
 #Build Number for ANT. Do not edit!
-#Wed Aug 29 21:36:09 CEST 2007
-build.number=118
+#Sat Oct 06 17:22:01 CEST 2007
+build.number=197
index 412dca6..53dfdb9 100644 (file)
--- a/build.xml
+++ b/build.xml
@@ -22,8 +22,8 @@
    Compiler: Ant
    Authors:  Joerg K. Wegner, wegnerj@informatik.uni-tuebingen.de
              Morten O. Alver
-   Version:  $Revision: 2301 $
-             $Date: 2007-08-27 20:51:07 +0200 (Mon, 27 Aug 2007) $
+   Version:  $Revision: 2408 $
+             $Date: 2007-10-02 22:32:13 +0200 (Tue, 02 Oct 2007) $
              $Author: mortenalver $
 
    modified:
@@ -47,7 +47,7 @@
      ========================================================================================== -->
 
        <!-- some version information -->
-       <property name="jabref.version" value="2.3b2" />
+       <property name="jabref.version" value="2.3b3" />
        <property name="jabref.placeholder.version" value="@version@" />
        <!-- used by replace task -->
 
        </path>
 
        <target name="run" depends="build">
-               <java classname="net.sf.jabref.JabRef" fork="true">
+               <java classname="net.sf.jabref.JabRefMain" fork="true">
                        <classpath refid="classpath" />
                </java>
        </target>
 
        <!-- Runs project -->
        <target name="runFromJar" depends="jars">
-               <java classname="net.sf.jabref.JabRef" fork="true">
+               <java classname="net.sf.jabref.JabRefMain" fork="true">
                        <classpath>
                                <pathelement location="${build.lib}/${build.jar}" />
                        </classpath>
                                <include name="README" />
                        </fileset>
                        <manifest>
-                               <attribute name="Main-Class" value="net.sf.jabref.JabRef" />
+                               <attribute name="Main-Class" value="net.sf.jabref.JabRefMain" />
                        </manifest>
                </jar>
 
diff --git a/jabref.log b/jabref.log
deleted file mode 100644 (file)
index 5e20d54..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="US-ASCII" standalone="no"?>
-<!DOCTYPE log SYSTEM "logger.dtd">
-<log>
-<record>
-  <date>2005-06-26T23:07:12</date>
-  <millis>1119827232590</millis>
-  <sequence>0</sequence>
-  <logger>global</logger>
-  <level>INFO</level>
-  <class>net.sf.jabref.Globals</class>
-  <method>logger</method>
-  <thread>10</thread>
-  <message>Warning: could not get translation for "Preserve formatting of non-BibTeX fields"</message>
-</record>
-</log>
index e80de49..9b9001d 100755 (executable)
@@ -43,6 +43,7 @@
 
         <p>Michael Beckmann,
         Oliver Beckmann,
+        Aaron Chen,
         Fabrice Dessaint,
         Nathan Dunn,
         Brian Van Essen,
index 4db3f94..258f220 100644 (file)
         <li><code>AuthorLastFirst</code> : formats author/editor
         fields with the last names first.</li>
 
-        <li><code>AuthorLastFirstAbbreviator</code> : abbreviates
-        first and middle names of all authors. This formatter
-        requires AuthorLastFirst to have been run earlier.</li>
+        <li><code>AuthorAbbreviator</code> or <code>AuthorLastFirstAbbreviator</code>
+            : abbreviates first and middle names of all authors. This formatter
+        returns names with the last name first. Follow this formatter with
+        AuthorFirstFirst to get abbreviated names with the initials first.</li>
 
         <li><code>AuthorLastFirstCommas</code> : to be
         documented.</li>
         first" all others in "first last". First names are
         abbreviated.</li>
 
-        <li><code>AuthorAbbreviator</code> : to be documented.</li>
-
         <li><code>AuthorNatBib</code> : formats author names in
         NatBib style, with last names only, separating names by
         "and" if there are two authors, and giving the first author
         <li><code>FormatPagesForXML</code> : replaces "--" with an
         XML en-dash.</li>
 
-       <li><code>Replace(regexp,replacewith)</code> : does a regular expression replacement.
-               To use this formatter, a two-part argument must be given. The parts are
-               separated by a comma. To indicate the comma character, use an escape
-               sequence: \,<br>&nbsp;<br>
-               The first part is the regular expression to search for. The regular expression
-               is written normally, without extra escape sequences for backslashes. A description
-               of Java regular expressions can be found at:<br>
-               &nbsp;http://java.sun.com/j2se/1.4.2/docs/api/java/util/regex/Pattern.html
-                <br>&nbsp;<br>
-               The second part is the text to replace all matches with.
+    <li><code>Replace(regexp,replacewith)</code> : does a regular expression replacement.
+        To use this formatter, a two-part argument must be given. The parts are
+        separated by a comma. To indicate the comma character, use an escape
+        sequence: \,<br>&nbsp;<br>
+        The first part is the regular expression to search for. The regular expression
+        is written normally, without extra escape sequences for backslashes. A description
+        of Java regular expressions can be found at:<br>
+        &nbsp;http://java.sun.com/j2se/1.4.2/docs/api/java/util/regex/Pattern.html
+         <br>&nbsp;<br>
+        The second part is the text to replace all matches with.</li>
 
         <li><code>RemoveBrackets</code> : removes all curly
         brackets "{" or "}".</li>
index 5fb4f74..c0b5bd1 100644 (file)
@@ -34,6 +34,9 @@
         <li><b>[<code>authors</code>]</b>: The last name of all
         authors<br /></li>
 
+        <li><b>[<code>authorLast</code>]</b>: The last name of the last
+        author<br /></li>
+
         <li><b>[<code>authorsN</code>]</b>: The last name of up to
         N authors. If there are more authors, "EtAl" is
         appended.<br /></li>
@@ -89,6 +92,9 @@
         <li><b>[<code>editors</code>]</b>: The last name of all
         editors<br /></li>
 
+        <li><b>[<code>editorLast</code>]</b>: The last name of the last
+        editor<br /></li>
+
         <li><b>[<code>editorIni</code>]</b>: The first 5 characters
         of the first editor's last name, and the last name initials
         of the remaining editors.<br /></li>
index 90c1fe1..b663948 100644 (file)
@@ -43,6 +43,7 @@
 
         <p>Michael Beckmann,
         Oliver B&ouml;ckmann,
+        Aaron Chen,
         Fabrice Dessaint,
         Nathan Dunn,
         Brian Van Essen,
index 09fb510..1f1e3a2 100644 (file)
         <li><code>AuthorLastFirst</code> : formatiert die Felder
         author/editor mit den Nachnamen zuerst.</li>
 
-        <li><code>AuthorLastFirstAbbreviator</code> : k&uuml;rzt
-        die Vornamen aller Autoren. Dieser Formatierer kann nur
-        angewendet werden, wenn <code>AuthorLastFirst</code>
-        bereits benutzt wurde.</li>
+        <li><code>AuthorAbbreviator</code> oder <code>AuthorLastFirstAbbreviator</code> :
+        k&uuml;rzt die Vornamen und mittleren Namen aller Autoren. Dieser Formatierer gibt
+        Nachnamen zuerst aus. Wenn Sie abgek&uuml;rzte Namen mit vorangestellten Initialen
+        wollen, wenden Sie anschlie&szlig;end den Formatierer <code>AuthorFirstFirst</code> an.
 
         <li><code>AuthorLastFirstCommas</code> : Dokumentation
         folgt.</li>
index b791590..63a6956 100644 (file)
@@ -39,6 +39,9 @@
         <li><b>[<code>authors</code>]</b>: Die Nachnamen aller
         Autoren.<br /></li>
 
+        <li><b>[<code>authorLast</code>]</b>: Der Nachname des
+        letzten Autors<br /></li>
+
         <li><b>[<code>authorsN</code>]</b>: Die Nachnamen von bis
         zu N Autoren. Falls es mehr Autoren gibt, wird EtAl
         angeh&auml;ngt.<br /></li>
 
     <ul>
         <li><b>[<code>edtr</code>]</b>: Der Nachname des ersten
-        Editors.<br /></li>
+        Herausgebers.<br /></li>
 
         <li><b>[<code>editors</code>]</b>: Die Nachnamen aller
-        Editoren.<br /></li>
+        Herausgeber.<br /></li>
+
+        <li><b>[<code>editorLast</code>]</b>: Der Nachname des letzten
+        Herausgebers.<br /></li>
 
         <li><b>[<code>edtrIniN</code>]</b>: Der Anfang des
-        Nachnamens von jedem Editor, wobei nicht mehr als N
+        Nachnamens von jedem Herausgeber, wobei nicht mehr als N
         Buchstaben verwendet werden.<br /></li>
 
         <li><b>[<code>editorIni</code>]</b>: Die ersten 5
-        Buchstaben des Nachnamens des Editors und die Initialen der
-        Nachnamen der restlichen Editoren.<br /></li>
+        Buchstaben des Nachnamens des Herausgebers und die Initialen der
+        Nachnamen der restlichen Herausgeber.<br /></li>
 
         <li><b>[<code>edtrN</code>]</b>: Die ersten N Buchstaben
-        des Nachnamens des ersten Editors.<br /></li>
+        des Nachnamens des ersten Herausgebers.<br /></li>
 
         <li><b>[<code>edtrN_M</code>]</b>: Die ersten N Buchstaben
-        des Nachnamens des M. Editors.<br /></li>
+        des Nachnamens des M. Herausgebers.<br /></li>
 
         <li><b>[<code>edtr.edtr.ea</code>]</b>: Der Nachname der
-        ersten beiden Editoren und ".ea", falls es mehr als zwei
-        Editoren sind.<br /></li>
+        ersten beiden Herausgeber und ".ea", falls es mehr als zwei
+        Herausgeber sind.<br /></li>
 
         <li><b>[<code>edtrshort</code>]</b>: Der Nachname bei einem
-        Editor; der erste Buchstabe der Nachnamen von bis zu drei
-        Editoren, falls mehr als ein Editor vorhanden ist. Ein Plus
-        (+) wird angeh&auml;ngt, falls es mehr als drei Editoren
+        Herausgeber; der erste Buchstabe der Nachnamen von bis zu drei
+        Herausgebern, falls mehr als ein Herausgeber vorhanden ist. Ein Plus
+        (+) wird angeh&auml;ngt, falls es mehr als drei Herausgeber
         gibt.<br /></li>
 
         <li><b>[<code>firstpage</code>]</b>: Die erste Seitenzahl
index 3cb2c7c..af4d0a0 100644 (file)
@@ -43,6 +43,7 @@
 
         <p>Michael Beckmann,
         Oliver Beckmann,
+        Aaron Chen,
         Fabrice Dessaint,
         Nathan Dunn,
         Brian Van Essen,
index f32721f..66ffa8b 100644 (file)
     certains formateurs, par exemple le formateur CurrentDate (voir
     ci-dessous).</p>
 
+  <p>
+    Certains formateurs prennent un argument suppl&eacute;mentaire, donn&eacute; entre parenth&egrave;ses
+    imm&eacute;diatement apr&egrave;s le nom du formateur. L'argument peut-&ecirc;tre mis
+    entre guillemets, ce qui est n&eacute;cessaire s'il inclut des caract&egrave;res parenth&egrave;ses.
+    Par exemple, <code>\format[Replace("\s,_")]{\journal}</code> lance
+    le formateur <b>Replace</b> avec l'argument <b>\s,_</b> (cela retourne
+    le champ "journal" avec les espaces remplac&eacute;es par des soulignements).
+    </p>
+
     <p>JabRef fournit les formateurs suivants, certains d'entre eux
     d&eacute;pendant d'autres formateurs&nbsp;:</p>
 
         &agrave; leurs initiales. Ce formateur n&eacute;cessite
         d'avoir pr&eacute;alablement utilis&eacute;
         AuthorLastFirst.</li>
+        
+        <li><code>AuthorAbbreviator</code> ou <code>AuthorLastFirstAbbreviator</code>&nbsp;:
+        abr&egrave;ge les pr&eacute;noms de tous les auteurs. Ce formateur renvoie les noms avec
+        le nom propre en premier. Faire suivre ce formateur d'AuthorFirstFirst pour
+        avoir les noms abr&eacute;g&eacute;s avec les initiales en premier.
 
         <li><code>AuthorLastFirstCommas</code>&nbsp;: &agrave;
         documenter.</li>
         entre les initiales des pr&eacute;noms sont
         supprim&eacute;s.</li>
 
-        <li><code>FileLink</code> : sans argument, ce formateur renvoie
+        <li><code>FileLink(TypeDeFichier)</code> : sans argument, ce formateur renvoie
         le premier lien apparaissant dans le champ. Pour fonctionner, ce formateur doit
         &ecirc;tre aliment&eacute; par le contenu du champ "file" (fichier).
         <p>Ce formateur prend comme argument optionnel l'extension du type de fichier externe
         <li><code>FormatPagesForXML</code>&nbsp;: remplace "--" par
         un tiret XML.</li>
 
+        <li><code>Replace(ExpReg,RemplaceAvec)</code>&nbsp;: effectue le remplacement d'une expression r&eacute;guli&egrave;re.
+        Pour utiliser ce formateur, un argument en deux parties doit &ecirc;tre fourni. Les parties sont
+        s&eacute;par&eacute;es par une virgule. Pour indiquer le caract&egrave;re virgule, utilisez la s&eacute;quence
+        d'&eacute;chappement&nbsp;: \,<br>&nbsp;<br>
+        La premi&egrave;re partie est l'expression r&eacute;guli&egrave;re &agrave; rechercher. L'expression r&eacute;guli&egrave;re
+        s'&eacute;crit normalement, sans s&eacute;quence d'&eacute;chappement suppl&eacute;mentaire pour les anti-slash ("backslashes"). Une description
+        des expression r&eacute;guli&egrave;res de Java peut &ecirc;tre trouv&eacute;e &agrave;&nbsp;:<br>
+        &nbsp;http://java.sun.com/j2se/1.4.2/docs/api/java/util/regex/Pattern.html
+         <br>&nbsp;<br>
+        La seconde partie est le texte qui remplace tous les correspondances.</li>
+
+       <li><code>Replace(regexp,replacewith)</code>&nbsp;: effectue le remplacement d'une expression r&eacute;guli&egrave;re.
+        Pour utiliser ce formateur, un argument en deux parties doit &ecirc;tre fourni.  Les parties sont
+        s&eacute;par&eacute;es par une virgule. Pour indiquer le caract&egrave;re virgule, utilisez la s&eacute;quence
+        d'&eacute;chappement&nbsp;: \,<br>&nbsp;<br>
+        La premi&egrave;re partie est l'expression r&eacute;guli&egrave;re &agrave; rechercher. L'expression r&eacute;guli&egrave;re
+        s'&eacute;crit normalement, sans s&eacute;quence d'&eacute;chappement suppl&eacute;mentaire pour les anti-slash ("backslashes"). Une description
+        des expressions r&eacute;guli&egrave;res de Java peut &ecirc;tre trouv&eacute;e &agrave;&nbsp;:<br>
+        &nbsp;http://java.sun.com/j2se/1.4.2/docs/api/java/util/regex/Pattern.html
+         <br>&nbsp;<br>
+        La seconde partie est le texte qui remplace tous les correspondances.</li>
+
         <li><code>RemoveBrackets</code>&nbsp;: supprime toutes les
         accolades "{" ou "}".</li>
 
 
         <li><code>ResolvePDF</code>&nbsp;: &agrave;
         documenter.</li>
+
+    <li></li>
     </ul>
 
     <p>Si aucun des formateurs disponibles ne peut faire ce que
index 693d846..83130d1 100644 (file)
@@ -41,6 +41,9 @@
         <li><b>[<code>authors</code>]</b>&nbsp;: Le nom de tous les
         auteurs<br /></li>
 
+        <li><b>[<code>authorLast</code>]</b>: Le nom propre du dernier
+        auteur<br /></li>
+
         <li><b>[<code>authorsN</code>]</b>: Les noms des N premiers
         auteurs. S'il y a plus d'auteurs, "EtAl" est
         ajout&eacute;.<br /></li>
         <li><b>[<code>editors</code>]</b>&nbsp;: Le nom des chacun
         des &eacute;diteurs<br /></li>
 
+        <li><b>[<code>editorLast</code>]</b>: Le nom propre du dernier
+        &eacute;diteur<br /></li>
+        
         <li><b>[<code>editorIni</code>]</b>&nbsp;: Les cinq
         premi&egrave;res lettres du nom du premier &eacute;diteur
         suivi des initiales du nom des &eacute;diteurs
diff --git a/src/images/JabRef-icon-32.png b/src/images/JabRef-icon-32.png
new file mode 100644 (file)
index 0000000..65d5885
Binary files /dev/null and b/src/images/JabRef-icon-32.png differ
diff --git a/src/images/JabRef-icon.svg b/src/images/JabRef-icon.svg
new file mode 100644 (file)
index 0000000..1204858
--- /dev/null
@@ -0,0 +1,207 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://web.resource.org/cc/"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="744.09448819"
+   height="1052.3622047"
+   id="svg2"
+   sodipodi:version="0.32"
+   inkscape:version="0.44"
+   sodipodi:docbase="/home/alver/Documents"
+   sodipodi:docname="jabrefIkon.svg">
+  <defs
+     id="defs4">
+    <linearGradient
+       id="linearGradient2915">
+      <stop
+         id="stop2917"
+         offset="0"
+         style="stop-color:white;stop-opacity:1;" />
+      <stop
+         id="stop2919"
+         offset="1"
+         style="stop-color:#dadce0;stop-opacity:1;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient2909">
+      <stop
+         id="stop2911"
+         offset="0"
+         style="stop-color:white;stop-opacity:1;" />
+      <stop
+         id="stop2913"
+         offset="1"
+         style="stop-color:#cfd1d7;stop-opacity:1;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient2897">
+      <stop
+         style="stop-color:#dadee7;stop-opacity:1;"
+         offset="0"
+         id="stop2899" />
+      <stop
+         style="stop-color:#1e68c6;stop-opacity:1;"
+         offset="1"
+         id="stop2901" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient2889">
+      <stop
+         style="stop-color:#e0e4ee;stop-opacity:1;"
+         offset="0"
+         id="stop2891" />
+      <stop
+         style="stop-color:#e0e4ee;stop-opacity:0;"
+         offset="1"
+         id="stop2893" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2915"
+       id="linearGradient2971"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.115225,0,0,1,-1.889007,46.1244)"
+       x1="329.18756"
+       y1="289.87192"
+       x2="598.66205"
+       y2="548.62866" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2909"
+       id="linearGradient2974"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.082601,0,0,1,-1.374219,40)"
+       x1="145.45497"
+       y1="332.74286"
+       x2="326.12537"
+       y2="576.18854" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2909"
+       id="linearGradient2983"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(8.119652e-2,0,0,7.966468e-2,422.1323,954.272)"
+       x1="145.45497"
+       y1="332.74286"
+       x2="326.12537"
+       y2="576.18854" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2915"
+       id="linearGradient2985"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(8.119652e-2,0,0,7.966468e-2,424.2434,954.7598)"
+       x1="329.18756"
+       y1="289.87192"
+       x2="598.66205"
+       y2="548.62866" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2909"
+       id="linearGradient3878"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(3.824753e-2,0,0,3.538487e-2,403.2956,1005.814)"
+       x1="145.45497"
+       y1="332.74286"
+       x2="326.12537"
+       y2="576.18854" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2915"
+       id="linearGradient3880"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(3.863231e-2,4.140938e-3,-3.672702e-3,3.351102e-2,404.9189,1005.265)"
+       x1="329.18756"
+       y1="289.87192"
+       x2="598.66205"
+       y2="548.62866" />
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     gridtolerance="50"
+     guidetolerance="10"
+     objecttolerance="10"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="21.286454"
+     inkscape:cx="416.46054"
+     inkscape:cy="31.511436"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer1"
+     showgrid="false"
+     inkscape:guide-bbox="false"
+     showguides="true"
+     inkscape:window-width="1118"
+     inkscape:window-height="944"
+     inkscape:window-x="0"
+     inkscape:window-y="0" />
+  <metadata
+     id="metadata7">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer"
+     id="layer1">
+    <rect
+       style="opacity:1;fill:#4f5f8f;fill-opacity:1"
+       id="rect2905"
+       width="716.55713"
+       height="730.3371"
+       x="10.717734"
+       y="89.297173" />
+    <path
+       style="fill:url(#linearGradient2974);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="M 122.04224,150.95548 C 208.65029,150.95548 286.97046,184.73542 286.97046,184.73542 C 286.97046,184.73542 372.48612,237.27117 327.52453,611.24332 C 314.57556,683.68157 250.81542,747.98797 172.90939,747.98797 C 95.003363,747.98797 50.24884,702.05483 50.24884,648.46615 C 119.867,694.3993 168.69957,681.54848 189.48514,672.96384 C 199.45516,668.84613 251.63441,636.1731 257.44572,548.94433 C 264.07602,449.42251 247.50026,297.84312 122.04224,150.95548 z "
+       id="path1972"
+       sodipodi:nodetypes="cccscssc" />
+    <path
+       style="fill:url(#linearGradient2971);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.05348015px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="M 322.49657,164.88378 C 533.15821,196.83799 712.94701,311.87314 516.81377,452.47165 C 462.33232,497.20754 627.59274,671.35798 692.97048,751.2435 C 544.0545,717.69157 402.40271,580.28849 400.58666,476.43731 C 398.77062,401.34492 516.81377,393.35637 516.81377,347.02276 C 516.81377,300.68916 344.28916,262.34411 322.49657,164.88378 z "
+       id="path1993"
+       sodipodi:nodetypes="cccc" />
+    <rect
+       style="opacity:1;fill:#4f5f8f;fill-opacity:1"
+       id="rect3872"
+       width="24.96747"
+       height="24.892717"
+       x="403.74191"
+       y="1008.134"
+       inkscape:export-xdpi="173.03"
+       inkscape:export-ydpi="173.03"
+       inkscape:export-filename="/home/alver/div/smalltheme/jabrefIkon-48.png" />
+    <path
+       style="fill:url(#linearGradient3878);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="M 407.84626,1010.4236 C 410.90607,1010.4236 413.43489,1010.4972 413.43489,1010.4972 C 413.43489,1010.4972 416.50376,1012.7951 414.91528,1026.0281 C 414.45779,1028.5913 412.2052,1030.8669 409.45284,1030.8669 C 406.70046,1030.8669 405.11931,1029.2413 405.11931,1027.3453 C 407.95995,1028.6292 410.06622,1027.9794 410.80057,1027.6755 C 411.15281,1027.5298 412.46165,1026.9172 412.43944,1023.8236 C 412.38788,1016.6442 413.08837,1015.0847 407.84626,1010.4236 z "
+       id="path3874"
+       sodipodi:nodetypes="cccscssc"
+       inkscape:export-filename="/home/alver/div/smalltheme/jabrefIkon-48.png"
+       inkscape:export-xdpi="173.03"
+       inkscape:export-ydpi="173.03" />
+    <path
+       style="fill:url(#linearGradient3880);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.05348015px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+       d="M 415.71976,1010.449 C 423.13477,1010.8154 428.70544,1016.8245 421.39485,1020.8079 C 419.34326,1022.1048 424.42839,1028.5544 426.39975,1031.4741 C 421.3644,1029.7968 416.96212,1024.6664 417.28063,1021.1794 C 417.49352,1018.6562 421.61195,1018.8269 421.78212,1017.2742 C 421.95228,1015.7216 419.07637,1015.8865 415.71976,1010.449 z "
+       id="path3876"
+       sodipodi:nodetypes="ccccsc"
+       inkscape:export-filename="/home/alver/div/smalltheme/jabrefIkon-48.png"
+       inkscape:export-xdpi="173.03"
+       inkscape:export-ydpi="173.03" />
+  </g>
+</svg>
diff --git a/src/images/absIcon.png b/src/images/absIcon.png
new file mode 100644 (file)
index 0000000..f249fda
Binary files /dev/null and b/src/images/absIcon.png differ
diff --git a/src/images/add.png b/src/images/add.png
new file mode 100644 (file)
index 0000000..6b636fe
Binary files /dev/null and b/src/images/add.png differ
diff --git a/src/images/autumn.png b/src/images/autumn.png
new file mode 100644 (file)
index 0000000..77b7590
Binary files /dev/null and b/src/images/autumn.png differ
diff --git a/src/images/completeItem.png b/src/images/completeItem.png
new file mode 100644 (file)
index 0000000..5eeadc7
Binary files /dev/null and b/src/images/completeItem.png differ
diff --git a/src/images/contents.png b/src/images/contents.png
new file mode 100644 (file)
index 0000000..6e44fa7
Binary files /dev/null and b/src/images/contents.png differ
diff --git a/src/images/document-save-as.png b/src/images/document-save-as.png
new file mode 100644 (file)
index 0000000..7a1591f
Binary files /dev/null and b/src/images/document-save-as.png differ
diff --git a/src/images/document-save.png b/src/images/document-save.png
new file mode 100644 (file)
index 0000000..0311e47
Binary files /dev/null and b/src/images/document-save.png differ
diff --git a/src/images/doismall.png b/src/images/doismall.png
new file mode 100644 (file)
index 0000000..3c9595b
Binary files /dev/null and b/src/images/doismall.png differ
diff --git a/src/images/duplicate.png b/src/images/duplicate.png
new file mode 100644 (file)
index 0000000..5599a18
Binary files /dev/null and b/src/images/duplicate.png differ
diff --git a/src/images/edit-copy.png b/src/images/edit-copy.png
new file mode 100644 (file)
index 0000000..efec317
Binary files /dev/null and b/src/images/edit-copy.png differ
diff --git a/src/images/edit-cut.png b/src/images/edit-cut.png
new file mode 100644 (file)
index 0000000..7e750c9
Binary files /dev/null and b/src/images/edit-cut.png differ
diff --git a/src/images/edit-delete.png b/src/images/edit-delete.png
new file mode 100644 (file)
index 0000000..0ac3589
Binary files /dev/null and b/src/images/edit-delete.png differ
diff --git a/src/images/edit-find.png b/src/images/edit-find.png
new file mode 100644 (file)
index 0000000..b98e348
Binary files /dev/null and b/src/images/edit-find.png differ
diff --git a/src/images/edit-paste.png b/src/images/edit-paste.png
new file mode 100644 (file)
index 0000000..577e9c2
Binary files /dev/null and b/src/images/edit-paste.png differ
diff --git a/src/images/edit-redo.png b/src/images/edit-redo.png
new file mode 100644 (file)
index 0000000..712a8ee
Binary files /dev/null and b/src/images/edit-redo.png differ
diff --git a/src/images/edit-undo.png b/src/images/edit-undo.png
new file mode 100644 (file)
index 0000000..4652df0
Binary files /dev/null and b/src/images/edit-undo.png differ
diff --git a/src/images/editor.png b/src/images/editor.png
new file mode 100644 (file)
index 0000000..a653bfe
Binary files /dev/null and b/src/images/editor.png differ
diff --git a/src/images/emacs.png b/src/images/emacs.png
new file mode 100644 (file)
index 0000000..6b76f52
Binary files /dev/null and b/src/images/emacs.png differ
diff --git a/src/images/emblem-web-small.png b/src/images/emblem-web-small.png
new file mode 100644 (file)
index 0000000..3d81a37
Binary files /dev/null and b/src/images/emblem-web-small.png differ
diff --git a/src/images/emblem-web.png b/src/images/emblem-web.png
new file mode 100644 (file)
index 0000000..49f7290
Binary files /dev/null and b/src/images/emblem-web.png differ
diff --git a/src/images/fileclose.png b/src/images/fileclose.png
new file mode 100644 (file)
index 0000000..033326f
Binary files /dev/null and b/src/images/fileclose.png differ
diff --git a/src/images/fileclose2.png b/src/images/fileclose2.png
new file mode 100644 (file)
index 0000000..c1e5f4d
Binary files /dev/null and b/src/images/fileclose2.png differ
diff --git a/src/images/filenew.png b/src/images/filenew.png
new file mode 100644 (file)
index 0000000..7274a21
Binary files /dev/null and b/src/images/filenew.png differ
diff --git a/src/images/fileopen.png b/src/images/fileopen.png
new file mode 100644 (file)
index 0000000..7c9f7a6
Binary files /dev/null and b/src/images/fileopen.png differ
diff --git a/src/images/genIcon.png b/src/images/genIcon.png
new file mode 100644 (file)
index 0000000..5bedaa2
Binary files /dev/null and b/src/images/genIcon.png differ
diff --git a/src/images/go-down.png b/src/images/go-down.png
new file mode 100644 (file)
index 0000000..970d43a
Binary files /dev/null and b/src/images/go-down.png differ
diff --git a/src/images/go-next.png b/src/images/go-next.png
new file mode 100644 (file)
index 0000000..cfee8f4
Binary files /dev/null and b/src/images/go-next.png differ
diff --git a/src/images/go-previous.png b/src/images/go-previous.png
new file mode 100644 (file)
index 0000000..3311c05
Binary files /dev/null and b/src/images/go-previous.png differ
diff --git a/src/images/go-up.png b/src/images/go-up.png
new file mode 100644 (file)
index 0000000..4ee50ef
Binary files /dev/null and b/src/images/go-up.png differ
diff --git a/src/images/groupIncluding.png b/src/images/groupIncluding.png
new file mode 100644 (file)
index 0000000..6f2bd08
Binary files /dev/null and b/src/images/groupIncluding.png differ
diff --git a/src/images/groupRefining.png b/src/images/groupRefining.png
new file mode 100644 (file)
index 0000000..2ba0a26
Binary files /dev/null and b/src/images/groupRefining.png differ
diff --git a/src/images/grouping_morten.png b/src/images/grouping_morten.png
new file mode 100644 (file)
index 0000000..9b29f68
Binary files /dev/null and b/src/images/grouping_morten.png differ
diff --git a/src/images/groupsHighlightAll.png b/src/images/groupsHighlightAll.png
new file mode 100644 (file)
index 0000000..c6e1a97
Binary files /dev/null and b/src/images/groupsHighlightAll.png differ
diff --git a/src/images/groupsHighlightAny.png b/src/images/groupsHighlightAny.png
new file mode 100644 (file)
index 0000000..1bc2e28
Binary files /dev/null and b/src/images/groupsHighlightAny.png differ
diff --git a/src/images/help-about.png b/src/images/help-about.png
new file mode 100644 (file)
index 0000000..90ce540
Binary files /dev/null and b/src/images/help-about.png differ
diff --git a/src/images/help-browser.png b/src/images/help-browser.png
new file mode 100644 (file)
index 0000000..6de563b
Binary files /dev/null and b/src/images/help-browser.png differ
diff --git a/src/images/integrity.png b/src/images/integrity.png
new file mode 100644 (file)
index 0000000..4343947
Binary files /dev/null and b/src/images/integrity.png differ
diff --git a/src/images/lyx2.png b/src/images/lyx2.png
new file mode 100644 (file)
index 0000000..84a742f
Binary files /dev/null and b/src/images/lyx2.png differ
diff --git a/src/images/mark.png b/src/images/mark.png
new file mode 100644 (file)
index 0000000..6f8ab3a
Binary files /dev/null and b/src/images/mark.png differ
diff --git a/src/images/messageFail.png b/src/images/messageFail.png
new file mode 100644 (file)
index 0000000..474f63f
Binary files /dev/null and b/src/images/messageFail.png differ
diff --git a/src/images/messageInfo.png b/src/images/messageInfo.png
new file mode 100644 (file)
index 0000000..ecdc991
Binary files /dev/null and b/src/images/messageInfo.png differ
diff --git a/src/images/messageWarn.png b/src/images/messageWarn.png
new file mode 100755 (executable)
index 0000000..55a6f01
Binary files /dev/null and b/src/images/messageWarn.png differ
diff --git a/src/images/optIcon.png b/src/images/optIcon.png
new file mode 100644 (file)
index 0000000..64562b3
Binary files /dev/null and b/src/images/optIcon.png differ
diff --git a/src/images/pdf-new.png b/src/images/pdf-new.png
new file mode 100644 (file)
index 0000000..cda12b9
Binary files /dev/null and b/src/images/pdf-new.png differ
diff --git a/src/images/pdf.png b/src/images/pdf.png
new file mode 100644 (file)
index 0000000..d5eab07
Binary files /dev/null and b/src/images/pdf.png differ
diff --git a/src/images/postscript.png b/src/images/postscript.png
new file mode 100644 (file)
index 0000000..5065c98
Binary files /dev/null and b/src/images/postscript.png differ
diff --git a/src/images/preamble.png b/src/images/preamble.png
new file mode 100644 (file)
index 0000000..cf9d89d
Binary files /dev/null and b/src/images/preamble.png differ
diff --git a/src/images/preferences.png b/src/images/preferences.png
new file mode 100644 (file)
index 0000000..426460b
Binary files /dev/null and b/src/images/preferences.png differ
diff --git a/src/images/remove.png b/src/images/remove.png
new file mode 100644 (file)
index 0000000..0815d3f
Binary files /dev/null and b/src/images/remove.png differ
diff --git a/src/images/reqIcon.png b/src/images/reqIcon.png
new file mode 100644 (file)
index 0000000..5d2439c
Binary files /dev/null and b/src/images/reqIcon.png differ
diff --git a/src/images/search.png b/src/images/search.png
new file mode 100644 (file)
index 0000000..a555de8
Binary files /dev/null and b/src/images/search.png differ
diff --git a/src/images/splash-2.1.svg b/src/images/splash-2.1.svg
new file mode 100644 (file)
index 0000000..1f931f6
--- /dev/null
@@ -0,0 +1,229 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://web.resource.org/cc/"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   inkscape:export-ydpi="90.000000"
+   inkscape:export-xdpi="90.000000"
+   inkscape:export-filename="/home/alver/jabref-2.1b/src/images/splash-2.1beta.png"
+   sodipodi:docname="splash-2.1.svg"
+   sodipodi:docbase="/home/alver/jabref_newcvs/jabref/src/images"
+   inkscape:version="0.44"
+   sodipodi:version="0.32"
+   id="svg2138"
+   height="1052.3622047"
+   width="744.09448819">
+  <defs
+     id="defs2140">
+    <pattern
+       patternTransform="translate(316.0000,1046.362)"
+       id="pattern9054"
+       xlink:href="#pattern9048"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient5361"
+       inkscape:collect="always">
+      <stop
+         id="stop5363"
+         offset="0"
+         style="stop-color:#000000;stop-opacity:1;" />
+      <stop
+         id="stop5365"
+         offset="1"
+         style="stop-color:#000000;stop-opacity:0;" />
+    </linearGradient>
+    <marker
+       style="overflow:visible;"
+       id="Arrow2Send"
+       refX="0.0"
+       refY="0.0"
+       orient="auto"
+       inkscape:stockid="Arrow2Send">
+      <path
+         transform="scale(0.3) rotate(180) translate(-5,0)"
+         d="M 8.7185878,4.0337352 L -2.2072895,0.016013256 L 8.7185884,-4.0017078 C 6.9730900,-1.6296469 6.9831476,1.6157441 8.7185878,4.0337352 z "
+         style="font-size:12.0;fill-rule:evenodd;stroke-width:0.62500000;stroke-linejoin:round;"
+         id="path3046"
+         sodipodi:nodetypes="cccc" />
+    </marker>
+    <linearGradient
+       gradientUnits="userSpaceOnUse"
+       y2="300.91277"
+       x2="491.20592"
+       y1="300.91277"
+       x1="445.01770"
+       id="linearGradient5367"
+       xlink:href="#linearGradient5361"
+       inkscape:collect="always" />
+    <pattern
+       id="pattern9048"
+       patternTransform="translate(231.0000,284.3622)"
+       height="428.00000"
+       width="572.00000"
+       patternUnits="userSpaceOnUse">
+      <image
+         transform="translate(-231.0000,-284.3622)"
+         style="opacity:1.0000000;stroke:#000000;stroke-width:5.0000000;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
+         inkscape:export-ydpi="90.000000"
+         inkscape:export-xdpi="90.000000"
+         inkscape:export-filename="/home/alver/Desktop/bilder/jabref/splash4.png"
+         y="284.36218"
+         x="231.00000"
+         xlink:href="behandlet.png"
+         sodipodi:absref="/home/alver/Desktop/bilder/jabref/behandlet.png"
+         width="572.00000"
+         height="428.00000"
+         id="image9050" />
+    </pattern>
+  </defs>
+  <sodipodi:namedview
+     inkscape:window-y="53"
+     inkscape:window-x="15"
+     inkscape:window-height="856"
+     inkscape:window-width="853"
+     inkscape:current-layer="layer1"
+     inkscape:document-units="px"
+     inkscape:cy="698.1925"
+     inkscape:cx="364.52617"
+     inkscape:zoom="1"
+     inkscape:pageshadow="2"
+     inkscape:pageopacity="0.0"
+     borderopacity="1.0"
+     bordercolor="#666666"
+     pagecolor="#ffffff"
+     id="base" />
+  <metadata
+     id="metadata2143">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     id="layer1"
+     inkscape:groupmode="layer"
+     inkscape:label="Layer 1">
+    <rect
+       inkscape:export-ydpi="75.000000"
+       inkscape:export-xdpi="75.000000"
+       inkscape:export-filename="/home/alver/jabref-2.1rc/src/images/splash-2.1.png"
+       y="170.36218"
+       x="77.500000"
+       height="432.00000"
+       width="576.00000"
+       id="rect6833"
+       style="opacity:1.0000000;fill:#6b6b75;fill-opacity:1.0000000;stroke:none;stroke-width:5.0000000;stroke-linecap:round;stroke-linejoin:bevel;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000" />
+    <image
+       id="image1821"
+       height="428"
+       width="572"
+       sodipodi:absref="/home/alver/jabref/src/images/splashBackground.png"
+       xlink:href="/home/alver/jabref/src/images/splashBackground.png"
+       x="79"
+       y="172.36218"
+       inkscape:export-filename="/home/alver/jabref-2.1rc/src/images/splash-2.1.png"
+       inkscape:export-xdpi="75"
+       inkscape:export-ydpi="75" />
+    <flowRoot
+       inkscape:export-ydpi="75.000000"
+       inkscape:export-xdpi="75.000000"
+       inkscape:export-filename="/home/alver/jabref-2.1rc/src/images/splash-2.1.png"
+       style="opacity:1.0000000;fill:#635578;fill-opacity:1.0000000;stroke:#b5b5c7;stroke-width:0.48137558;stroke-linejoin:bevel;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000"
+       transform="matrix(1.875133,0.000000,0.000000,2.542210,-129.6969,-372.8897)"
+       id="flowRoot2189"
+       xml:space="preserve">
+      <flowRegion
+   id="flowRegion2191">
+        <rect
+   style="fill:#635578;fill-opacity:1.0000000;stroke:#b5b5c7;stroke-opacity:1.0000000;stroke-width:0.48137557;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-linejoin:bevel"
+   y="199.10532"
+   x="128.49385"
+   height="127.49445"
+   width="283.51782"
+   id="rect2193" />
+      </flowRegion>
+      <flowPara
+   style="font-size:90.000000px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125.00000%;writing-mode:lr-tb;text-anchor:start;fill:#635578;fill-opacity:1.0000000;stroke:#b5b5c7;stroke-width:0.48137558;stroke-linejoin:bevel;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;font-family:AR PL KaitiM GB"
+   id="flowPara2201">JabRef</flowPara>
+    </flowRoot>    <flowRoot
+       inkscape:export-ydpi="75.000000"
+       inkscape:export-xdpi="75.000000"
+       inkscape:export-filename="/home/alver/jabref-2.1b/src/images/splash-2.1beta.png"
+       style="font-size:34.96500015px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:104.16220427%;writing-mode:lr-tb;text-anchor:start;opacity:1;fill:#ffffff;fill-opacity:1;stroke:#5cc757;stroke-width:0.64448702;stroke-linecap:round;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:0.64448701 0.64448701 ;stroke-dashoffset:0.45114091;stroke-opacity:1;font-family:FreeSans"
+       transform="matrix(2.869197,-1.415830e-2,2.234317e-2,3.356271,-832.1435,-652.0185)"
+       id="flowRoot2203"
+       xml:space="preserve">
+      <flowRegion
+   style="stroke:url(#linearGradient5367);stroke-width:0.64448702;stroke-miterlimit:4;stroke-dasharray:0.64448701 0.64448701 ;stroke-dashoffset:0.45114091"
+   id="flowRegion2205">
+        <rect
+   style="font-size:34.96500015px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:104.16220427%;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:#322b5b;stroke-width:0.64448702;stroke-linecap:round;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:0.64448701 0.64448701 ;stroke-dashoffset:0.45114091;stroke-opacity:1;font-family:FreeSans"
+   y="286.45224"
+   x="443.95346"
+   height="119.83134"
+   width="173.972"
+   id="rect2207" />
+      </flowRegion>
+      <flowPara
+   style="font-size:34.96500015px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:104.16220427%;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:#322b5b;stroke-width:0.64448702;stroke-linecap:round;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:0.64448701 0.64448701 ;stroke-dashoffset:0.45114091;stroke-opacity:1;font-family:FreeSans"
+   id="flowPara2211">2.1</flowPara>
+    </flowRoot>    <flowRoot
+       inkscape:export-ydpi="75.000000"
+       inkscape:export-xdpi="75.000000"
+       inkscape:export-filename="/home/alver/jabref-2.1rc/src/images/splash-2.1.png"
+       transform="matrix(0.972246,0.000000,0.000000,1.325301,6.054966,-126.1181)"
+       style="font-size:11.9999996;font-style:oblique;font-variant:normal;font-weight:bold;font-stretch:normal;fill:#797580;fill-opacity:1.0000000;font-family:Bitstream Vera Sans;text-anchor:middle;writing-mode:lr;text-align:center;line-height:100%"
+       id="flowRoot3076"
+       xml:space="preserve"><flowRegion
+         id="flowRegion3078">
+        <rect
+   style="fill:#797580;fill-opacity:1.0000000;font-family:Bitstream Vera Sans;font-weight:bold;font-style:oblique;font-stretch:normal;font-variant:normal;font-size:11.9999996;text-anchor:middle;text-align:center;writing-mode:lr;line-height:100%"
+   y="514.56494"
+   x="115.50008"
+   height="78.684433"
+   width="506.03476"
+   id="rect3080" />
+      </flowRegion><flowPara
+         id="flowPara1339">This program is distributed under the terms of the General Public License.</flowPara><flowPara
+         id="flowPara1341">Copyright (2003-2006) Morten O. Alver, Nizar Batada and all contributors.</flowPara></flowRoot>    <text
+       inkscape:export-ydpi="75.000000"
+       inkscape:export-xdpi="75.000000"
+       inkscape:export-filename="/home/alver/jabref-2.1rc/src/images/splash-2.1.png"
+       transform="scale(0.853277,1.171952)"
+       sodipodi:linespacing="100%"
+       id="text1393"
+       y="315.20035"
+       x="163.38908"
+       style="font-size:183.29680;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;fill:#413b62;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Nimbus Roman No9 L;text-anchor:start;writing-mode:lr-tb"
+       xml:space="preserve"><tspan
+         y="315.20035"
+         x="163.38908"
+         id="tspan1395"
+         sodipodi:role="line">JabRef</tspan></text>
+    <text
+       inkscape:export-ydpi="75.000000"
+       inkscape:export-xdpi="75.000000"
+       inkscape:export-filename="/home/alver/jabref-2.1rc/src/images/splash-2.1.png"
+       transform="scale(0.853347,1.171856)"
+       sodipodi:linespacing="100%"
+       id="text2179"
+       y="397.84811"
+       x="149.99753"
+       style="font-size:44.00000436;font-style:italic;font-variant:normal;font-weight:bold;font-stretch:normal;fill:#805b41;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Nimbus Roman No9 L;text-anchor:start;writing-mode:lr;text-align:start;line-height:100%"
+       xml:space="preserve"><tspan
+         y="397.84811"
+         x="149.99753"
+         id="tspan2181"
+         sodipodi:role="line">reference manager</tspan></text>
+  </g>
+</svg>
diff --git a/src/images/splash-2.1beta.png b/src/images/splash-2.1beta.png
new file mode 100644 (file)
index 0000000..4304131
Binary files /dev/null and b/src/images/splash-2.1beta.png differ
diff --git a/src/images/splash-2.3.svg b/src/images/splash-2.3.svg
new file mode 100644 (file)
index 0000000..199d5db
--- /dev/null
@@ -0,0 +1,294 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://web.resource.org/cc/"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   inkscape:export-ydpi="90.000000"
+   inkscape:export-xdpi="90.000000"
+   inkscape:export-filename="/home/alver/jabref_head/jabref/src/images/jabref_splash-2.2.png"
+   sodipodi:docname="splash-2.3.svg"
+   sodipodi:docbase="/home/alver/jabref/src/images"
+   inkscape:version="0.45"
+   sodipodi:version="0.32"
+   id="svg2138"
+   height="1052.3622047"
+   width="744.09448819"
+   inkscape:output_extension="org.inkscape.output.svg.inkscape"
+   sodipodi:modified="TRUE">
+  <defs
+     id="defs2140">
+    <linearGradient
+       id="linearGradient2974">
+      <stop
+         style="stop-color:#505b77;stop-opacity:1;"
+         offset="0"
+         id="stop2976" />
+      <stop
+         style="stop-color:#596a97;stop-opacity:1;"
+         offset="1"
+         id="stop2978" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient2883">
+      <stop
+         style="stop-color:#c5c1c1;stop-opacity:1;"
+         offset="0"
+         id="stop2885" />
+      <stop
+         style="stop-color:white;stop-opacity:1;"
+         offset="1"
+         id="stop2887" />
+    </linearGradient>
+    <pattern
+       patternTransform="translate(316.0000,1046.362)"
+       id="pattern9054"
+       xlink:href="#pattern9048"
+       inkscape:collect="always" />
+    <marker
+       style="overflow:visible;"
+       id="Arrow2Send"
+       refX="0.0"
+       refY="0.0"
+       orient="auto"
+       inkscape:stockid="Arrow2Send">
+      <path
+         transform="scale(0.3) rotate(180) translate(-5,0)"
+         d="M 8.7185878,4.0337352 L -2.2072895,0.016013256 L 8.7185884,-4.0017078 C 6.9730900,-1.6296469 6.9831476,1.6157441 8.7185878,4.0337352 z "
+         style="font-size:12.0;fill-rule:evenodd;stroke-width:0.62500000;stroke-linejoin:round;"
+         id="path3046"
+         sodipodi:nodetypes="cccc" />
+    </marker>
+    <pattern
+       id="pattern9048"
+       patternTransform="translate(231.0000,284.3622)"
+       height="428.00000"
+       width="572.00000"
+       patternUnits="userSpaceOnUse">
+      <image
+         transform="translate(-231.0000,-284.3622)"
+         style="opacity:1.0000000;stroke:#000000;stroke-width:5.0000000;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
+         inkscape:export-ydpi="90.000000"
+         inkscape:export-xdpi="90.000000"
+         inkscape:export-filename="/home/alver/Desktop/bilder/jabref/splash4.png"
+         y="284.36218"
+         x="231.00000"
+         xlink:href="behandlet.png"
+         sodipodi:absref="/home/alver/Desktop/bilder/jabref/behandlet.png"
+         width="572.00000"
+         height="428.00000"
+         id="image9050" />
+    </pattern>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2883"
+       id="radialGradient2889"
+       cx="255.5"
+       cy="330.36218"
+       fx="255.5"
+       fy="330.36218"
+       r="135.88549"
+       gradientTransform="matrix(-0.799579,-5.606082e-2,6.979161e-2,-1.00875,436.7358,677.9388)"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2883"
+       id="linearGradient2909"
+       x1="443.79153"
+       y1="351.89935"
+       x2="602.17139"
+       y2="351.89935"
+       gradientUnits="userSpaceOnUse" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2883"
+       id="radialGradient2796"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.799579,-5.606082e-2,6.979161e-2,-1.00875,436.7358,677.9388)"
+       cx="255.5"
+       cy="330.36218"
+       fx="255.5"
+       fy="330.36218"
+       r="135.88549" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2883"
+       id="radialGradient2798"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.799579,-5.606082e-2,6.979161e-2,-1.00875,436.7358,677.9388)"
+       cx="255.5"
+       cy="330.36218"
+       fx="255.5"
+       fy="330.36218"
+       r="135.88549" />
+  </defs>
+  <sodipodi:namedview
+     inkscape:window-y="25"
+     inkscape:window-x="0"
+     inkscape:window-height="949"
+     inkscape:window-width="1280"
+     inkscape:current-layer="layer1"
+     inkscape:document-units="px"
+     inkscape:cy="677.8697"
+     inkscape:cx="414.10531"
+     inkscape:zoom="1"
+     inkscape:pageshadow="2"
+     inkscape:pageopacity="0.0"
+     borderopacity="1.0"
+     bordercolor="#666666"
+     pagecolor="#ffffff"
+     id="base" />
+  <metadata
+     id="metadata2143">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     id="layer1"
+     inkscape:groupmode="layer"
+     inkscape:label="Layer 1">
+    <rect
+       inkscape:export-ydpi="75.000000"
+       inkscape:export-xdpi="75.000000"
+       inkscape:export-filename="/home/alver/jabref/src/images/splash.png"
+       y="170.36218"
+       x="77.500000"
+       height="432.00000"
+       width="576.00000"
+       id="rect6833"
+       style="opacity:1.0000000;fill:#6b6b75;fill-opacity:1.0000000;stroke:none;stroke-width:5.0000000;stroke-linecap:round;stroke-linejoin:bevel;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000" />
+    <image
+       id="image1821"
+       height="428"
+       width="572"
+       sodipodi:absref="/home/alver/jabref/src/images/splashBackground.png"
+       xlink:href="splashBackground.png"
+       x="79"
+       y="172.36218"
+       inkscape:export-filename="/home/alver/jabref/src/images/splash.png"
+       inkscape:export-xdpi="75"
+       inkscape:export-ydpi="75" />
+    <flowRoot
+       inkscape:export-ydpi="75.000000"
+       inkscape:export-xdpi="75.000000"
+       inkscape:export-filename="/home/alver/jabref/src/images/splash.png"
+       style="opacity:1.0000000;fill:#635578;fill-opacity:1.0000000;stroke:#b5b5c7;stroke-width:0.48137558;stroke-linejoin:bevel;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000"
+       transform="matrix(1.875133,0.000000,0.000000,2.542210,-129.6969,-372.8897)"
+       id="flowRoot2189"
+       xml:space="preserve">
+      <flowRegion
+   id="flowRegion2191">
+        <rect
+   style="fill:#635578;fill-opacity:1.0000000;stroke:#b5b5c7;stroke-opacity:1.0000000;stroke-width:0.48137557;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-linejoin:bevel"
+   y="199.10532"
+   x="128.49385"
+   height="127.49445"
+   width="283.51782"
+   id="rect2193" />
+      </flowRegion>
+      <flowPara
+   style="font-size:90.000000px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125.00000%;writing-mode:lr-tb;text-anchor:start;fill:#635578;fill-opacity:1.0000000;stroke:#b5b5c7;stroke-width:0.48137558;stroke-linejoin:bevel;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;font-family:AR PL KaitiM GB"
+   id="flowPara2201">JabRef</flowPara>
+    </flowRoot>    <flowRoot
+       inkscape:export-ydpi="75.000000"
+       inkscape:export-xdpi="75.000000"
+       inkscape:export-filename="/home/alver/jabref/src/images/splash.png"
+       transform="matrix(0.972246,0,0,1.325301,6.054966,-126.1181)"
+       style="font-size:12px;font-style:oblique;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:center;line-height:100%;writing-mode:lr-tb;text-anchor:middle;fill:#797580;fill-opacity:1;font-family:Bitstream Vera Sans"
+       id="flowRoot3076"
+       xml:space="preserve"><flowRegion
+         id="flowRegion3078">
+        <rect
+   style="font-size:12px;font-style:oblique;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:center;line-height:100%;writing-mode:lr-tb;text-anchor:middle;fill:#797580;fill-opacity:1;font-family:Bitstream Vera Sans"
+   y="514.56494"
+   x="115.50008"
+   height="78.684433"
+   width="506.03476"
+   id="rect3080" />
+      </flowRegion><flowPara
+         id="flowPara1339">This program is distributed under the terms of the General Public License.</flowPara><flowPara
+         id="flowPara1341">Copyright (2003-2007) Morten O. Alver, Nizar Batada and all contributors.</flowPara></flowRoot>    <text
+       inkscape:export-ydpi="75.000000"
+       inkscape:export-xdpi="75.000000"
+       inkscape:export-filename="/home/alver/jabref/src/images/splash.png"
+       transform="scale(0.853347,1.171856)"
+       sodipodi:linespacing="100%"
+       id="text2179"
+       y="450.75409"
+       x="187.49605"
+       style="font-size:43.99980927px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:100%;writing-mode:lr-tb;text-anchor:start;fill:#805b41;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;font-family:URW Palladio L"
+       xml:space="preserve"><tspan
+         y="450.75409"
+         x="187.49605"
+         id="tspan2181"
+         sodipodi:role="line">JabRef reference manager</tspan></text>
+    <g
+       id="g2867"
+       transform="matrix(1.14435,0,0,1.103688,-34.88143,-26.75429)"
+       style="fill:#3d3d5f;fill-opacity:1;stroke:url(#radialGradient2889);stroke-width:1.99301183;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+       inkscape:export-filename="/home/alver/jabref/src/images/splash.png"
+       inkscape:export-xdpi="75"
+       inkscape:export-ydpi="75">
+      <path
+         inkscape:export-ydpi="57.68"
+         inkscape:export-xdpi="57.68"
+         inkscape:export-filename="/home/alver/Documents/jabrefIkon.png"
+         sodipodi:nodetypes="cccscssc"
+         id="path3874"
+         d="M 157.96931,200.83693 C 195.68133,200.83693 226.84892,201.74266 226.84892,201.74266 C 226.84892,201.74266 264.67261,230.02095 245.09466,392.86816 C 239.45611,424.41127 211.69305,452.41514 177.77033,452.41514 C 143.84738,452.41514 124.35978,432.41027 124.35978,409.07782 C 159.37053,424.87768 185.33022,416.88114 194.38104,413.14131 C 198.72239,411.3483 214.85378,403.80956 214.58004,365.73926 C 213.94457,277.38853 222.57808,258.1971 157.96931,200.83693 z "
+         style="fill:#3d3d5f;fill-opacity:1;fill-rule:evenodd;stroke:url(#radialGradient2796);stroke-width:1.99301183;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+      <path
+         inkscape:export-ydpi="57.68"
+         inkscape:export-xdpi="57.68"
+         inkscape:export-filename="/home/alver/Documents/jabrefIkon.png"
+         sodipodi:nodetypes="ccccsc"
+         id="path3876"
+         d="M 255.00983,201.1495 C 346.39949,205.65848 415.05774,279.60734 324.95506,328.62763 C 299.6693,344.58746 362.3433,423.95718 386.64022,459.88743 C 324.57976,439.24633 270.32186,376.11089 274.24748,333.19936 C 276.87135,302.14849 327.63081,304.24915 329.72814,285.1414 C 331.82536,266.03489 296.3799,268.06417 255.00983,201.1495 z "
+         style="fill:#3d3d5f;fill-opacity:1;fill-rule:evenodd;stroke:url(#radialGradient2798);stroke-width:1.99301183;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+    </g>
+    <text
+       xml:space="preserve"
+       style="font-size:57.1212616px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:100%;writing-mode:lr-tb;text-anchor:start;opacity:1;fill:#ffffff;fill-opacity:1;stroke:#727888;stroke-width:1.80000031;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;font-family:Nimbus Sans L"
+       x="462.20135"
+       y="426.2529"
+       id="text2911"
+       sodipodi:linespacing="100%"
+       transform="scale(0.917932,1.089405)"
+       inkscape:export-filename="/home/alver/jabref/src/images/splash.png"
+       inkscape:export-xdpi="75"
+       inkscape:export-ydpi="75"><tspan
+         sodipodi:role="line"
+         id="tspan2913"
+         x="462.20135"
+         y="426.2529"
+         style="font-size:119.00263214px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:100%;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:#727888;stroke-width:1.80000031;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;font-family:Bitstream Vera Sans">2.3</tspan></text>
+    <flowRoot
+       xml:space="preserve"
+       id="flowRoot2272"
+       style="font-size:64px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:100%;writing-mode:lr-tb;text-anchor:start;fill:#ef2421;fill-opacity:0.68208092;font-family:Bitstream Vera Sans"
+       transform="matrix(0.9738368,-0.2272485,0.2272485,0.9738368,-57.970505,148.42613)"
+       inkscape:transform-center-x="30.526535"
+       inkscape:transform-center-y="-9.9731132"
+       inkscape:export-filename="/home/alver/jabref/src/images/splash.png"
+       inkscape:export-xdpi="75"
+       inkscape:export-ydpi="75"><flowRegion
+         id="flowRegion2274"><rect
+           id="rect2276"
+           width="244"
+           height="120"
+           x="446"
+           y="418.36218"
+           style="font-size:64px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:100%;writing-mode:lr-tb;text-anchor:start;fill:#ef2421;fill-opacity:0.68208092;font-family:Bitstream Vera Sans" /></flowRegion><flowPara
+         id="flowPara2278">beta</flowPara></flowRoot>  </g>
+</svg>
diff --git a/src/images/splash.svg b/src/images/splash.svg
new file mode 100644 (file)
index 0000000..628543b
--- /dev/null
@@ -0,0 +1,229 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://web.resource.org/cc/"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://inkscape.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   inkscape:export-ydpi="90.000000"
+   inkscape:export-xdpi="90.000000"
+   inkscape:export-filename="/home/alver/Desktop/bilder/jabref/splash6.png"
+   sodipodi:docname="splash.svg"
+   sodipodi:docbase="/home/alver/jabref_beta/jabref/src/images"
+   inkscape:version="0.42+0.43pre1"
+   sodipodi:version="0.32"
+   id="svg2138"
+   height="1052.3622047"
+   width="744.09448819">
+  <defs
+     id="defs2140">
+    <pattern
+       patternTransform="translate(316.0000,1046.362)"
+       id="pattern9054"
+       xlink:href="#pattern9048"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient5361"
+       inkscape:collect="always">
+      <stop
+         id="stop5363"
+         offset="0"
+         style="stop-color:#000000;stop-opacity:1;" />
+      <stop
+         id="stop5365"
+         offset="1"
+         style="stop-color:#000000;stop-opacity:0;" />
+    </linearGradient>
+    <marker
+       style="overflow:visible;"
+       id="Arrow2Send"
+       refX="0.0"
+       refY="0.0"
+       orient="auto"
+       inkscape:stockid="Arrow2Send">
+      <path
+         transform="scale(0.3) rotate(180) translate(-5,0)"
+         d="M 8.7185878,4.0337352 L -2.2072895,0.016013256 L 8.7185884,-4.0017078 C 6.9730900,-1.6296469 6.9831476,1.6157441 8.7185878,4.0337352 z "
+         style="font-size:12.0;fill-rule:evenodd;stroke-width:0.62500000;stroke-linejoin:round;"
+         id="path3046"
+         sodipodi:nodetypes="cccc" />
+    </marker>
+    <linearGradient
+       gradientUnits="userSpaceOnUse"
+       y2="300.91277"
+       x2="491.20592"
+       y1="300.91277"
+       x1="445.01770"
+       id="linearGradient5367"
+       xlink:href="#linearGradient5361"
+       inkscape:collect="always" />
+    <pattern
+       id="pattern9048"
+       patternTransform="translate(231.0000,284.3622)"
+       height="428.00000"
+       width="572.00000"
+       patternUnits="userSpaceOnUse">
+      <image
+         transform="translate(-231.0000,-284.3622)"
+         style="opacity:1.0000000;stroke:#000000;stroke-width:5.0000000;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-opacity:1.0000000"
+         inkscape:export-ydpi="90.000000"
+         inkscape:export-xdpi="90.000000"
+         inkscape:export-filename="/home/alver/Desktop/bilder/jabref/splash4.png"
+         y="284.36218"
+         x="231.00000"
+         xlink:href="behandlet.png"
+         sodipodi:absref="/home/alver/Desktop/bilder/jabref/behandlet.png"
+         width="572.00000"
+         height="428.00000"
+         id="image9050" />
+    </pattern>
+  </defs>
+  <sodipodi:namedview
+     inkscape:window-y="80"
+     inkscape:window-x="8"
+     inkscape:window-height="856"
+     inkscape:window-width="750"
+     inkscape:current-layer="layer1"
+     inkscape:document-units="px"
+     inkscape:cy="698.1925"
+     inkscape:cx="364.52617"
+     inkscape:zoom="1"
+     inkscape:pageshadow="2"
+     inkscape:pageopacity="0.0"
+     borderopacity="1.0"
+     bordercolor="#666666"
+     pagecolor="#ffffff"
+     id="base" />
+  <metadata
+     id="metadata2143">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     id="layer1"
+     inkscape:groupmode="layer"
+     inkscape:label="Layer 1">
+    <rect
+       inkscape:export-ydpi="75.000000"
+       inkscape:export-xdpi="75.000000"
+       inkscape:export-filename="/home/alver/jabref_beta/jabref/jabref-2.0-splash.png"
+       y="170.36218"
+       x="77.500000"
+       height="432.00000"
+       width="576.00000"
+       id="rect6833"
+       style="opacity:1.0000000;fill:#6b6b75;fill-opacity:1.0000000;stroke:none;stroke-width:5.0000000;stroke-linecap:round;stroke-linejoin:bevel;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000" />
+    <image
+       inkscape:export-ydpi="75.000000"
+       inkscape:export-xdpi="75.000000"
+       inkscape:export-filename="/home/alver/jabref_beta/jabref/jabref-2.0-splash.png"
+       y="172.36218"
+       x="79.000000"
+       id="image1390"
+       height="428.00000"
+       width="572.00000"
+       sodipodi:absref="/home/alver/oldhome/bilder/bilder/jabref/behandlet.png"
+       xlink:href="/home/alver/oldhome/bilder/bilder/jabref/behandlet.png" />
+    <flowRoot
+       inkscape:export-ydpi="75.000000"
+       inkscape:export-xdpi="75.000000"
+       inkscape:export-filename="/home/alver/jabref_beta/jabref/jabref-2.0-splash.png"
+       style="opacity:1.0000000;fill:#635578;fill-opacity:1.0000000;stroke:#b5b5c7;stroke-width:0.48137558;stroke-linejoin:bevel;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000"
+       transform="matrix(1.875133,0.000000,0.000000,2.542210,-129.6969,-372.8897)"
+       id="flowRoot2189"
+       xml:space="preserve">
+      <flowRegion
+   id="flowRegion2191">
+        <rect
+   style="fill:#635578;fill-opacity:1.0000000;stroke:#b5b5c7;stroke-opacity:1.0000000;stroke-width:0.48137557;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-linejoin:bevel"
+   y="199.10532"
+   x="128.49385"
+   height="127.49445"
+   width="283.51782"
+   id="rect2193" />
+      </flowRegion>
+      <flowPara
+   style="font-size:90.000000px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125.00000%;writing-mode:lr-tb;text-anchor:start;fill:#635578;fill-opacity:1.0000000;stroke:#b5b5c7;stroke-width:0.48137558;stroke-linejoin:bevel;stroke-miterlimit:4.0000000;stroke-dasharray:none;stroke-dashoffset:0.0000000;stroke-opacity:1.0000000;font-family:AR PL KaitiM GB"
+   id="flowPara2201">JabRef</flowPara>
+    </flowRoot>    <flowRoot
+       inkscape:export-ydpi="75.000000"
+       inkscape:export-xdpi="75.000000"
+       inkscape:export-filename="/home/alver/jabref_beta/jabref/jabref-2.0-splash.png"
+       style="font-size:34.96500015px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:104.16220427%;writing-mode:lr-tb;text-anchor:start;opacity:1;fill:#ffffff;fill-opacity:1;stroke:#5cc757;stroke-width:0.64448702;stroke-linecap:round;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:0.64448701 0.64448701 ;stroke-dashoffset:0.45114091;stroke-opacity:1;font-family:FreeSans"
+       transform="matrix(2.869197,-1.415830e-2,2.234317e-2,3.356271,-832.1435,-652.0185)"
+       id="flowRoot2203"
+       xml:space="preserve">
+      <flowRegion
+   style="stroke:url(#linearGradient5367);stroke-width:0.64448702;stroke-miterlimit:4;stroke-dasharray:0.64448701 0.64448701 ;stroke-dashoffset:0.45114091"
+   id="flowRegion2205">
+        <rect
+   style="font-size:34.96500015px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:104.16220427%;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:#322b5b;stroke-width:0.64448702;stroke-linecap:round;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:0.64448701 0.64448701 ;stroke-dashoffset:0.45114091;stroke-opacity:1;font-family:FreeSans"
+   y="286.45224"
+   x="443.95346"
+   height="119.83134"
+   width="173.972"
+   id="rect2207" />
+      </flowRegion>
+      <flowPara
+   style="font-size:34.96500015px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:104.16220427%;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:#322b5b;stroke-width:0.64448702;stroke-linecap:round;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:0.64448701 0.64448701 ;stroke-dashoffset:0.45114091;stroke-opacity:1;font-family:FreeSans"
+   id="flowPara2211">2.0</flowPara>
+    </flowRoot>    <flowRoot
+       inkscape:export-ydpi="75.000000"
+       inkscape:export-xdpi="75.000000"
+       inkscape:export-filename="/home/alver/jabref_beta/jabref/jabref-2.0-splash.png"
+       transform="matrix(0.972246,0.000000,0.000000,1.325301,6.054966,-126.1181)"
+       style="font-size:11.9999996;font-style:oblique;font-variant:normal;font-weight:bold;font-stretch:normal;fill:#797580;fill-opacity:1.0000000;font-family:Bitstream Vera Sans;text-anchor:middle;writing-mode:lr;text-align:center;line-height:100%"
+       id="flowRoot3076"
+       xml:space="preserve"><flowRegion
+         id="flowRegion3078">
+        <rect
+   style="fill:#797580;fill-opacity:1.0000000;font-family:Bitstream Vera Sans;font-weight:bold;font-style:oblique;font-stretch:normal;font-variant:normal;font-size:11.9999996;text-anchor:middle;text-align:center;writing-mode:lr;line-height:100%"
+   y="514.56494"
+   x="115.50008"
+   height="78.684433"
+   width="506.03476"
+   id="rect3080" />
+      </flowRegion><flowPara
+         id="flowPara1339">This program is distributed under the terms of the General Public License.</flowPara><flowPara
+         id="flowPara1341">Copyright (2003-2006) Morten O. Alver, Nizar Batada and all contributors.</flowPara></flowRoot>    <text
+       inkscape:export-ydpi="75.000000"
+       inkscape:export-xdpi="75.000000"
+       inkscape:export-filename="/home/alver/jabref_beta/jabref/jabref-2.0-splash.png"
+       transform="scale(0.853277,1.171952)"
+       sodipodi:linespacing="100%"
+       id="text1393"
+       y="315.20035"
+       x="163.38908"
+       style="font-size:183.29680;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;fill:#413b62;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Nimbus Roman No9 L;text-anchor:start;writing-mode:lr-tb"
+       xml:space="preserve"><tspan
+         y="315.20035"
+         x="163.38908"
+         id="tspan1395"
+         sodipodi:role="line">JabRef</tspan></text>
+    <text
+       inkscape:export-ydpi="75.000000"
+       inkscape:export-xdpi="75.000000"
+       inkscape:export-filename="/home/alver/jabref_beta/jabref/jabref-2.0-splash.png"
+       transform="scale(0.853347,1.171856)"
+       sodipodi:linespacing="100%"
+       id="text2179"
+       y="397.84811"
+       x="149.99753"
+       style="font-size:45.702374;font-style:italic;font-variant:normal;font-weight:bold;font-stretch:normal;fill:#805b41;fill-opacity:1.0000000;stroke:none;stroke-width:1.0000000px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000;font-family:Times New Roman;text-anchor:start;writing-mode:lr-tb"
+       xml:space="preserve"><tspan
+         y="397.84811"
+         x="149.99753"
+         id="tspan2181"
+         sodipodi:role="line">reference manager</tspan></text>
+  </g>
+</svg>
diff --git a/src/images/splashBackground.png b/src/images/splashBackground.png
new file mode 100644 (file)
index 0000000..d5a048e
Binary files /dev/null and b/src/images/splashBackground.png differ
diff --git a/src/images/strings.png b/src/images/strings.png
new file mode 100644 (file)
index 0000000..649899f
Binary files /dev/null and b/src/images/strings.png differ
diff --git a/src/images/unmark.png b/src/images/unmark.png
new file mode 100644 (file)
index 0000000..92ac338
Binary files /dev/null and b/src/images/unmark.png differ
diff --git a/src/images/user-home.png b/src/images/user-home.png
new file mode 100644 (file)
index 0000000..a3c4765
Binary files /dev/null and b/src/images/user-home.png differ
diff --git a/src/images/view-refresh.png b/src/images/view-refresh.png
new file mode 100644 (file)
index 0000000..952b5f7
Binary files /dev/null and b/src/images/view-refresh.png differ
diff --git a/src/images/viewsource.gif b/src/images/viewsource.gif
new file mode 100644 (file)
index 0000000..3ef9a2e
Binary files /dev/null and b/src/images/viewsource.gif differ
diff --git a/src/images/winedt.png b/src/images/winedt.png
new file mode 100644 (file)
index 0000000..cded1a7
Binary files /dev/null and b/src/images/winedt.png differ
diff --git a/src/images/wizard.png b/src/images/wizard.png
new file mode 100644 (file)
index 0000000..b5d81d3
Binary files /dev/null and b/src/images/wizard.png differ
diff --git a/src/images/wrongItem.png b/src/images/wrongItem.png
new file mode 100644 (file)
index 0000000..8b2f1eb
Binary files /dev/null and b/src/images/wrongItem.png differ
diff --git a/src/images/wwwciteseer.png b/src/images/wwwciteseer.png
new file mode 100644 (file)
index 0000000..1885445
Binary files /dev/null and b/src/images/wwwciteseer.png differ
index 04888b2..11292f5 100644 (file)
@@ -170,12 +170,15 @@ public class BasePanel extends JPanel implements ClipboardOwner, FileUpdateListe
      */
     //GroupSelector groupSelector;
 
-    public boolean sortingBySearchResults = false,
-        coloringBySearchResults = false,
-    hidingNonHits = false,
-        sortingByGroup = false,
-        sortingByCiteSeerResults = false,
-        coloringByGroup = false;
+    public boolean
+            showingSearch = false,
+            showingGroup = false,
+            sortingBySearchResults = false,
+            coloringBySearchResults = false,
+            hidingNonHits = false,
+            sortingByGroup = false,
+            sortingByCiteSeerResults = false,
+            coloringByGroup = false;
         //previewEnabled = Globals.prefs.getBoolean("previewEnabled");
     int lastSearchHits = -1; // The number of hits in the latest search.
     // Potential use in hiding non-hits completely.
@@ -1841,11 +1844,20 @@ public class BasePanel extends JPanel implements ClipboardOwner, FileUpdateListe
             form = (EntryEditor)entryEditors.get
                 ((entry.getType().getName()));
 
+            // If the cached editor is not the same as the currently shown one,
+            // make sure the current one stores its current edit:
+            if ((visibleNow != null) && (form != visibleNow)) {
+                visibleNow.storeCurrentEdit();
+            }
+            
             form.switchTo(entry);
             //if (visName != null)
             //    form.setVisiblePanel(visName);
         } else {
-            // We must instantiate a new editor for this type.
+            // We must instantiate a new editor for this type. First make sure the old one
+            // stores its last edit:
+            storeCurrentEdit();
+            // Then start the new one:
             form = new EntryEditor(frame, BasePanel.this, entry);
             //if (visName != null)
             //    form.setVisiblePanel(visName);
@@ -2098,21 +2110,40 @@ public class BasePanel extends JPanel implements ClipboardOwner, FileUpdateListe
 
     public void setSearchMatcher(SearchMatcher matcher) {
         searchFilterList.setMatcher(matcher);
+        showingSearch = true;
     }
 
     public void setGroupMatcher(Matcher matcher) {
         groupFilterList.setMatcher(matcher);
+        showingGroup = true;
     }
 
     public void stopShowingSearchResults() {
         searchFilterList.setMatcher(NoSearchMatcher.INSTANCE);
+        showingSearch = false;
     }
 
     public void stopShowingGroup() {
         groupFilterList.setMatcher(NoSearchMatcher.INSTANCE);
-
+        showingGroup = false;
      }
 
+    /**
+     * Query whether this BasePanel is in the mode where a float search result is shown.
+     * @return true if showing float search, false otherwise.
+     */
+    public boolean isShowingFloatSearch() {
+        return mainTable.isShowingFloatSearch();
+    }
+
+    /**
+     * Query whether this BasePanel is in the mode where a filter search result is shown.
+     * @return true if showing filter search, false otherwise.
+     */
+    public boolean isShowingFilterSearch() {
+        return showingSearch;
+    }
+
      public BibtexDatabase getDatabase(){
         return database ;
     }
index a3475c2..660c872 100644 (file)
@@ -108,7 +108,7 @@ public class BibtexFields
     add( new BibtexSingleField( "key", true ) ) ;
     add( new BibtexSingleField( "month", true, GUIGlobals.SMALL_W ) ) ;
     add( new BibtexSingleField( "note", true, GUIGlobals.MEDIUM_W  ) ) ;
-    add( new BibtexSingleField( "number", true, GUIGlobals.SMALL_W, 60  ) ) ;
+    add( new BibtexSingleField( "number", true, GUIGlobals.SMALL_W, 60  ).setNumeric(true) ) ;
     add( new BibtexSingleField( "organization", true, GUIGlobals.MEDIUM_W  ) ) ;
     add( new BibtexSingleField( "pages", true, GUIGlobals.SMALL_W ) ) ;
     add( new BibtexSingleField( "publisher", true, GUIGlobals.MEDIUM_W  ) ) ;
@@ -116,8 +116,8 @@ public class BibtexFields
     add( new BibtexSingleField( "series", true, GUIGlobals.SMALL_W  ) ) ;
     add( new BibtexSingleField( "title", true, 400 ) ) ;
     add( new BibtexSingleField( "type", true, GUIGlobals.SMALL_W  ) ) ;
-    add( new BibtexSingleField( "volume", true, GUIGlobals.SMALL_W, 60  ) ) ;
-    add( new BibtexSingleField( "year", true, GUIGlobals.SMALL_W, 60 ) ) ;
+    add( new BibtexSingleField( "volume", true, GUIGlobals.SMALL_W, 60  ).setNumeric(true) ) ;
+    add( new BibtexSingleField( "year", true, GUIGlobals.SMALL_W, 60 ).setNumeric(true) ) ;
 
     // some semi-standard fields
     dummy = new BibtexSingleField( KEY_FIELD, true ) ;
@@ -133,10 +133,12 @@ public class BibtexFields
     dummy.setPrivate();
     add( dummy ) ;
 
+    add(new BibtexSingleField("pmid", false, GUIGlobals.SMALL_W, 60).setNumeric(true));
 
     // additional fields ------------------------------------------------------
     dummy =  new BibtexSingleField( "citeseercitationcount", false,
                                                  GUIGlobals.SMALL_W, 75) ;
+    dummy.setNumeric(true);
     dummy.setAlternativeDisplayName("Popularity") ;
     add(dummy) ;
     add( new BibtexSingleField( "location", false ) ) ;
@@ -376,6 +378,15 @@ public class BibtexFields
     return false ;
   }
 
+    public static boolean isNumeric( String field ) {
+        BibtexSingleField sField = getField( field ) ;
+        if (sField != null)
+        {
+            return sField.isNumeric() ;
+        }
+        return false ;
+    }
+
   /** returns an string-array with all fieldnames */
   public static Object[] getAllFieldNames()
   {
@@ -436,7 +447,11 @@ public class BibtexFields
     // function to this field, for instance a "browse" button for the "pdf" field.
     private String extras = null ;
 
-    // a comma separated list of alternative bibtex-fieldnames, e.g.
+    // This value defines whether contents of this field are expected to be
+    // numeric values. This can be used to sort e.g. volume numbers correctly:
+    private boolean numeric = false;
+
+      // a comma separated list of alternative bibtex-fieldnames, e.g.
     // "LCCN" is the same like "lib-congress"
     // private String otherNames = null ;
 
@@ -529,6 +544,8 @@ public class BibtexFields
     // -----------------------------------------------------------------------
     // -----------------------------------------------------------------------
 
+
+
     private void setFlag( boolean onOff, int flagID)
     {
       if (onOff)  // set the flag
@@ -652,5 +669,21 @@ public class BibtexFields
       return name ;
     }
 
+
+      /**
+       * Set this field's numeric propery
+       * @param numeric true to indicate that this is a numeric field.
+       * @return this BibtexSingleField instance. Makes it easier to call this
+       *   method on the fly while initializing without using a local variable.
+       */
+      public BibtexSingleField setNumeric(boolean numeric) {
+          this.numeric = numeric;
+          return this;
+      }
+
+      public boolean isNumeric() {
+          return numeric;
+      }
+
   }
 }
index f33c2fd..3d790c4 100644 (file)
@@ -41,7 +41,7 @@ import java.util.Comparator;
 public class EntryComparator implements Comparator {
 
     String sortField;
-    boolean descending, binary=false;
+    boolean descending, binary=false, numeric;
     Comparator next;
 
     public EntryComparator(boolean binary, boolean desc, String field, Comparator next) {
@@ -49,6 +49,7 @@ public class EntryComparator implements Comparator {
         this.sortField = field;
         this.descending = desc;
         this.next = next;
+        this.numeric = BibtexFields.isNumeric(sortField);
     }
 
     public EntryComparator(boolean binary, boolean desc, String field) {
@@ -56,6 +57,7 @@ public class EntryComparator implements Comparator {
         this.sortField = field;
         this.descending = desc;
         this.next = null;
+        this.numeric = BibtexFields.isNumeric(sortField);
     }
 
 
@@ -105,7 +107,18 @@ public class EntryComparator implements Comparator {
           f1 = e1.getType().getName();
           f2 = e2.getType().getName();
         }
-
+    else if (numeric) {
+        try {
+            Integer i1 = Integer.parseInt((String)f1);
+            Integer i2 = Integer.parseInt((String)f2);
+            // Ok, parsing was successful. Update f1 and f2:
+            f1 = i1;
+            f2 = i2;
+        } catch (NumberFormatException ex) {
+            // Parsing failed. Give up treating these as numbers.
+            // TODO: should we check which of them failed, and sort based on that?
+        }
+    }
 
     if ((f1 == null) && (f2 == null)) return (next != null ? next.compare(o1, o2) : idCompare(e1, e2));
        if ((f1 != null) && (f2 == null)) return -1;
index 898e4dd..bf866be 100644 (file)
@@ -44,11 +44,10 @@ import net.sf.jabref.imports.BibtexParser;
 import net.sf.jabref.labelPattern.LabelPatternUtil;
 import net.sf.jabref.undo.*;
 import net.sf.jabref.external.ExternalFilePanel;
+import net.sf.jabref.external.WriteXMPEntryEditorAction;
 import net.sf.jabref.journals.JournalAbbreviations;
 import net.sf.jabref.gui.date.*;
 import net.sf.jabref.gui.AutoCompleter;
-import com.jgoodies.forms.builder.DefaultFormBuilder;
-import com.jgoodies.forms.layout.FormLayout;
 
 /**
  * GUI component that allows editing of the fields of a BibtexEntry. EntryEditor
@@ -89,6 +88,8 @@ public class EntryEditor extends JPanel implements VetoableChangeListener {
     // The action which generates a bibtexkey for this entry.
     public GenerateKeyAction generateKeyAction;
 
+    public AbstractAction writeXmp;
+
     SaveDatabaseAction saveDatabaseAction = new SaveDatabaseAction();
 
     JPanel mainPanel = new JPanel();
@@ -166,6 +167,7 @@ public class EntryEditor extends JPanel implements VetoableChangeListener {
         copyKeyAction = new CopyKeyAction();
         generateKeyAction = new GenerateKeyAction(frame);
         storeFieldAction = new StoreFieldAction();
+        writeXmp = new WriteXMPEntryEditorAction(panel_, this);
 
         BorderLayout bl = new BorderLayout();
         setLayout(bl);
@@ -277,6 +279,7 @@ public class EntryEditor extends JPanel implements VetoableChangeListener {
         // tlb.add(copyKeyAction);
         tlb.addSeparator();
         tlb.add(generateKeyAction);
+        tlb.add(writeXmp);
         tlb.addSeparator();
 
         // tlb.add(undoAction);
@@ -607,7 +610,7 @@ public class EntryEditor extends JPanel implements VetoableChangeListener {
      */
     public void storeCurrentEdit() {
         Component comp = Globals.focusListener.getFocused();
-        if ((comp instanceof FieldEditor) && this.isAncestorOf(comp)) {
+        if ((comp == source) || ((comp instanceof FieldEditor) && this.isAncestorOf(comp))) {
             storeFieldAction.actionPerformed(new ActionEvent(comp, 0, ""));
         }
     }
@@ -658,8 +661,6 @@ public class EntryEditor extends JPanel implements VetoableChangeListener {
         if (entry == be)
             return;
 
-        // Util.pr("EntryEditor.switchTo(BibtexEntry): "+entry.getCiteKey());
-        // Util.pr("::EntryEditor.switchTo(BibtexEntry): "+this.type.getName());
         storeCurrentEdit();
 
         // Remove this instance as property listener for the entry:
@@ -1250,6 +1251,10 @@ public class EntryEditor extends JPanel implements VetoableChangeListener {
             // 1. get Bitexentry for selected index (already have)
             // 2. run the LabelMaker by it
             try {
+                // Store the current edit in case this action is called during the
+                // editing of a field:
+                storeCurrentEdit();
+
                 // this updates the table automatically, on close, but not
                 // within the tab
                 Object oldValue = entry.getField(BibtexFields.KEY_FIELD);
@@ -1411,4 +1416,5 @@ public class EntryEditor extends JPanel implements VetoableChangeListener {
         }
     }
 
+
 }
index 61fb208..6491432 100644 (file)
@@ -14,7 +14,7 @@ import java.util.Comparator;
  * Current Version:
  * 
  * @author $Author: mortenalver $
- * @version $Revision: 2165 $ ($Date: 2007-07-07 17:21:54 +0200 (Sat, 07 Jul 2007) $)
+ * @version $Revision: 2375 $ ($Date: 2007-09-19 21:40:38 +0200 (Wed, 19 Sep 2007) $)
  * 
  * TODO: Testcases
  * 
@@ -23,7 +23,7 @@ public class FieldComparator implements Comparator {
 
        String field;
 
-       boolean isNameField, isTypeHeader, isYearField, isMonthField;
+       boolean isNameField, isTypeHeader, isYearField, isMonthField, isNumeric;
 
        int multiplier;
 
@@ -39,7 +39,8 @@ public class FieldComparator implements Comparator {
                isNameField = (field.equals("author") || field.equals("editor"));
                isYearField = field.equals("year");
                isMonthField = field.equals("month");
-       }
+        isNumeric = BibtexFields.isNumeric(field);
+    }
 
        public int compare(Object o1, Object o2) {
                BibtexEntry e1 = (BibtexEntry) o1, e2 = (BibtexEntry) o2;
@@ -98,9 +99,44 @@ public class FieldComparator implements Comparator {
                        f2 = new Integer(Util.getMonthNumber((String)f2));
                }
 
-               int result = 0;
+        if (isNumeric) {
+            boolean numeric1 = false, numeric2 = false;
+            Integer i1 = null, i2 = null;
+            try {
+                i1 = Integer.parseInt((String)f1);
+                numeric1 = true;
+            } catch (NumberFormatException ex) {
+                // Parsing failed.
+            }
+
+            try {
+                i2 = Integer.parseInt((String)f2);
+                numeric2 = true;
+            } catch (NumberFormatException ex) {
+                // Parsing failed.
+            }
+
+            if (numeric1 && numeric2) {
+                // Ok, parsing was successful. Update f1 and f2:
+                f1 = i1;
+                f2 = i2;
+            } else if (numeric1) {
+                // The first one was parseable, but not the second one.
+                // This means we consider one < two
+                f1 = i1;
+                f2 = new Integer(i1.intValue()+1);
+            } else if (numeric2) {
+                // The second one was parseable, but not the first one.
+                // This means we consider one > two
+                f2 = i2;
+                f1 = new Integer(i2.intValue()+1);
+            }
+            // Else none of them were parseable, and we can fall back on comparing strings.    
+        }
+
+        int result = 0;
                if ((f1 instanceof Integer) && (f2 instanceof Integer)) {
-                       result = -(((Integer) f1).compareTo((Integer) f2));
+                       result = (((Integer) f1).compareTo((Integer) f2));
                } else if (f2 instanceof Integer) {
                        Integer f1AsInteger = new Integer(f1.toString());
                        result = -((f1AsInteger).compareTo((Integer) f2));
index 6aa2d24..e0c8110 100644 (file)
@@ -235,7 +235,7 @@ public class GUIGlobals {
                LANGUAGES.put("Italiano", "it");
         LANGUAGES.put("Nederlands", "du");
         LANGUAGES.put("Norsk", "no");
-
+        LANGUAGES.put("EspaƱol", "es");
        }
 
        /**
index 725f97e..8dcb06a 100644 (file)
@@ -150,10 +150,10 @@ public class GeneralTab extends JPanel implements PrefsTab {
 
         builder2.nextLine();
         builder2.append(useTimeStamp);
-        builder2.append(timeStampField);
+        builder2.append(timeStampFormat);
         builder2.append(overwriteTimeStamp);
         builder2.append(Globals.lang("Field name")+":");
-        builder2.append(timeStampFormat);
+        builder2.append(timeStampField);
         hlp = new JButton(timeStampHelp);
         hlp.setText(null);
         hlp.setPreferredSize(new Dimension(24, 24));
index 6038b50..82b437b 100644 (file)
@@ -98,12 +98,13 @@ public class Globals {
                // Charset.availableCharsets().keySet().toArray(new
                // String[]{});
                new String[] { "ISO8859_1", "UTF8", "UTF-16", "ASCII", "Cp1250", "Cp1251", "Cp1252",
-                       "Cp1253", "Cp1254", "Cp1257", "JIS", "SJIS",
+                       "Cp1253", "Cp1254", "Cp1257", "SJIS",
                        "EUC_JP", // Added Japanese encodings.
                        "Big5", "Big5_HKSCS", "GBK", "ISO8859_2", "ISO8859_3", "ISO8859_4", "ISO8859_5",
                        "ISO8859_6", "ISO8859_7", "ISO8859_8", "ISO8859_9", "ISO8859_13", "ISO8859_15" };
+    public static Map<String,String> ENCODING_NAMES_LOOKUP;
 
-       // String array that maps from month number to month string label:
+    // String array that maps from month number to month string label:
        public static String[] MONTHS = new String[] { "jan", "feb", "mar", "apr", "may", "jun", "jul",
                "aug", "sep", "oct", "nov", "dec" };
 
@@ -133,7 +134,35 @@ public class Globals {
                }
                ENCODINGS = encodings.toArray(new String[0]);
 
-       }
+        // Build a map for translating Java encoding names into common encoding names:
+        ENCODING_NAMES_LOOKUP = new HashMap<String,String>();
+        ENCODING_NAMES_LOOKUP.put("Cp1250", "windows-1250");
+        ENCODING_NAMES_LOOKUP.put("Cp1251", "windows-1251");
+        ENCODING_NAMES_LOOKUP.put("Cp1252", "windows-1252");
+        ENCODING_NAMES_LOOKUP.put("Cp1253", "windows-1253");
+        ENCODING_NAMES_LOOKUP.put("Cp1254", "windows-1254");
+        ENCODING_NAMES_LOOKUP.put("Cp1257", "windows-1257");
+        ENCODING_NAMES_LOOKUP.put("ISO8859_1", "ISO-8859-1");
+        ENCODING_NAMES_LOOKUP.put("ISO8859_2", "ISO-8859-2");
+        ENCODING_NAMES_LOOKUP.put("ISO8859_3", "ISO-8859-3");
+        ENCODING_NAMES_LOOKUP.put("ISO8859_4", "ISO-8859-4");
+        ENCODING_NAMES_LOOKUP.put("ISO8859_5", "ISO-8859-5");
+        ENCODING_NAMES_LOOKUP.put("ISO8859_6", "ISO-8859-6");
+        ENCODING_NAMES_LOOKUP.put("ISO8859_7", "ISO-8859-7");
+        ENCODING_NAMES_LOOKUP.put("ISO8859_8", "ISO-8859-8");
+        ENCODING_NAMES_LOOKUP.put("ISO8859_9", "ISO-8859-9");
+        ENCODING_NAMES_LOOKUP.put("ISO8859_13", "ISO-8859-13");
+        ENCODING_NAMES_LOOKUP.put("ISO8859_15", "ISO-8859-15");
+        ENCODING_NAMES_LOOKUP.put("KOI8_R", "KOI8-R");
+        ENCODING_NAMES_LOOKUP.put("UTF8", "UTF-8");
+        ENCODING_NAMES_LOOKUP.put("UTF-16", "UTF-16");
+        ENCODING_NAMES_LOOKUP.put("SJIS", "Shift_JIS");
+        ENCODING_NAMES_LOOKUP.put("GBK", "GBK");
+        ENCODING_NAMES_LOOKUP.put("Big5_HKSCS", "Big5-HKSCS");
+        ENCODING_NAMES_LOOKUP.put("Big5", "Big5");
+        ENCODING_NAMES_LOOKUP.put("EUC_JP", "EUC-JP");
+        ENCODING_NAMES_LOOKUP.put("ASCII", "US-ASCII");
+    }
 
        public static GlobalFocusListener focusListener = new GlobalFocusListener();
 
@@ -153,8 +182,9 @@ public class Globals {
     public static final int NEWLINE_LENGTH = System.getProperty("line.separator").length();
 
     // Instantiate logger:
-    private static Logger logger = Logger.getLogger(Logger.GLOBAL_LOGGER_NAME);
-
+    // TODO: Doesn't work in Java 5:
+    // private static Logger logger = Logger.getLogger(Logger.GLOBAL_LOGGER_NAME);
+    private static Logger logger = Logger.global;
     /**
         * true if we have unix newlines
         */
@@ -453,7 +483,9 @@ public class Globals {
                String description, OpenFileFilter off, int dialogType, boolean updateWorkingDirectory,
                boolean dirOnly, boolean multipleSelection, JComponent accessory) {
 
-               if (/*ON_MAC && */prefs.getBoolean("useNativeFileDialogOnMac")) {
+        // Added the !dirOnly condition below as a workaround to the native file dialog
+        // not supporting directory selection:
+        if (!dirOnly && prefs.getBoolean("useNativeFileDialogOnMac")) {
 
                        return getNewFileForMac(owner, directory, extension, dialogType,
                                updateWorkingDirectory, dirOnly, off);
@@ -544,7 +576,7 @@ public class Globals {
                }
 
                fc.setVisible(true); // fc.show(); -> deprecated since 1.5
-
+        
                if (fc.getFile() != null) {
                        Globals.prefs.put("workingDirectory", fc.getDirectory() + fc.getFile());
                        return fc.getDirectory() + fc.getFile();
index 363e115..edfbd36 100644 (file)
@@ -81,6 +81,8 @@ public class JabRef {
 
         ths = this;
 
+       System.setProperty("swing.aatext", "true");
+
         // The following two lines signal that the system proxy settings should be used:
         System.setProperty("java.net.useSystemProxies", "true");
         System.getProperties().put( "proxySet", "true" );
@@ -371,6 +373,13 @@ public class JabRef {
                     // This signals that the latest import should be stored in the given
                     // format to the given file.
                     ParserResult pr = (ParserResult) loaded.elementAt(loaded.size() - 1);
+
+                    // Set the global variable for this database's file directory before exporting,
+                    // so formatters can resolve linked files correctly.
+                    // (This is an ugly hack!)
+                    MetaData metaData = new MetaData(pr.getMetaData(), pr.getDatabase());
+                    metaData.setFile(pr.getFile());
+                    Globals.prefs.fileDirForDatabase = metaData.getFileDirectory(GUIGlobals.FILE_FIELD);
                     System.out.println(Globals.lang("Exporting") + ": " + data[0]);
                     ExportFormat format = ExportFormats.getExportFormat(data[1]);
                     if (format != null) {
index cfa5a9c..992bfb9 100644 (file)
@@ -2134,6 +2134,24 @@ class FetchCiteSeerAction
 
     }
 
+
+    /**
+     * Sets the indeterminate status of the progress bar.
+     *
+     * If not called on the event dispatch thread, this method uses
+     * SwingUtilities.invokeLater() to do the actual operation on the EDT.
+     */
+    public void setProgressBarIndeterminate(final boolean value) {
+        if (SwingUtilities.isEventDispatchThread())
+            progressBar.setIndeterminate(value);
+        else SwingUtilities.invokeLater(new Runnable() {
+            public void run() {
+                progressBar.setIndeterminate(value);
+            }
+        });
+
+    }
+
     /**
      * Sets the maximum value of the progress bar. Always call this method
      * before using the progress bar, to set a maximum value appropriate to
diff --git a/src/java/net/sf/jabref/JabRefMain.java b/src/java/net/sf/jabref/JabRefMain.java
new file mode 100644 (file)
index 0000000..54f1d06
--- /dev/null
@@ -0,0 +1,165 @@
+package net.sf.jabref;\r
+\r
+import java.awt.Component;\r
+import java.awt.Dimension;\r
+import java.io.PrintWriter;\r
+import java.io.StringWriter;\r
+import java.lang.reflect.InvocationTargetException;\r
+import java.lang.reflect.Method;\r
+\r
+import javax.swing.BorderFactory;\r
+import javax.swing.JEditorPane;\r
+import javax.swing.JOptionPane;\r
+import javax.swing.JScrollPane;\r
+\r
+/**\r
+ * This is a class compiled under Java 1.4.2 that will start the real JabRef and\r
+ * print some warnings if no Java 1.5 and higher and no JRE from Sun\r
+ * Microsystems is found.\r
+ * \r
+ * Caution: We cannot use any other class from JabRef here (for instance no\r
+ * calls to Globals.lang() are possible), since then it could not be run using\r
+ * Java 1.4.\r
+ * \r
+ * @author oezbek\r
+ * \r
+ */\r
+public class JabRefMain {\r
+   \r
+    public static String exceptionToString(Throwable t){\r
+        StringWriter stackTraceWriter = new StringWriter();\r
+        t.printStackTrace(new PrintWriter(stackTraceWriter));\r
+        return stackTraceWriter.toString();\r
+    }\r
+    \r
+    /**\r
+     * @param args\r
+     *            We will pass these arguments to JabRef later.\r
+     */\r
+    public static void main(String[] args) {\r
+\r
+        String javaVersion = System.getProperty("java.version", null);\r
+\r
+        if (javaVersion.compareTo("1.5") < 0) {\r
+            String javaVersionWarning = "\n" + \r
+                "WARNING: You are running Java version 1.4 or lower (" + javaVersion + " to be exact).\n" +\r
+                "         JabRef needs at least a Java Runtime Environment 1.5 or higher.\n" +\r
+                "         JabRef should not start properly and output an error message\n" +\r
+                "         (probably java.lang.UnsupportedClassVersionError ... (Unsupported major.minor version 49.0)\n" +\r
+                "         See http://jabref.sf.net/faq.php for more information.\n";\r
+\r
+            System.out.println(javaVersionWarning);\r
+        }\r
+\r
+        String javaVendor = System.getProperty("java.vendor", null);\r
+        if (javaVendor.indexOf("Sun Microsystems") == -1) {\r
+            System.out.println("\n" + \r
+                    "WARNING: You are not running a Java version from Sun Microsystems.\n" +\r
+                    "         Your java vendor is: " + javaVendor + "\n" +\r
+                    "         If JabRef crashes please consider switching to a Sun Java Runtime.\n" +\r
+                    "         See http://jabref.sf.net/faq.php for more information.\n");\r
+        }\r
+\r
+        try {\r
+            // We need to load this class dynamically, or otherwise the Java \r
+            // runtime would crash while loading JabRefMain itself.\r
+            Method method = Class.forName("net.sf.jabref.JabRef").getMethod(\r
+                "main", new Class[] { args.getClass() });\r
+            method.invoke(null, new Object[] { args });\r
+\r
+        } catch (InvocationTargetException e) {\r
+            \r
+            String errorMessage = \r
+                "\nERROR while starting or running JabRef:\n\n" + \r
+                exceptionToString(e.getCause()) + "\n" + \r
+                "Please first check if this problem and a solution is already known. Find our...\n" +\r
+                "  * ...FAQ at http://jabref.sf.net/faq.php and our...\n" +\r
+                "  * ...user mailing-list at http://sf.net/mailarchive/forum.php?forum_name=jabref-users\n\n" + \r
+                "If you do not find a solution there, please let us know about the problem by writing a bug report.\n" +\r
+                "You can find our bug tracker at http://sourceforge.net/tracker/?atid=600306&group_id=92314\n\n" +\r
+                "  * If the bug has already been reported there, please add your comments to the existing bug.\n" +\r
+                "  * If the bug has not been reported yet, then we need the complete error message given above\n" +\r
+                "    and a description of what you did before the error occured.\n\n" +\r
+                "We also need the following information (you can copy and paste all this):\n" +\r
+                "  * Java Version: " + javaVersion + "\n" + \r
+                "  * Java Vendor: " + javaVendor + "\n" + \r
+                "  * Operating System: " + System.getProperty("os.name") + " (" + System.getProperty("os.version") + ")\n" +\r
+                "  * Hardware Architecture: " + System.getProperty("os.arch") + "\n\n" +\r
+                       "We are sorry for the trouble and thanks for reporting problems with JabRef!\n";\r
+            \r
+            System.out.println(errorMessage);\r
+            \r
+            JEditorPane pane = new JEditorPane("text/html", \r
+                "<html>The following error occurred while running JabRef:<p><font color=\"red\">" +\r
+                exceptionToString(e.getCause()).replaceAll("\\n", "<br>") + \r
+                "</font></p>" + \r
+                "<p>Please first check if this problem and a solution is already known. Find our...</p>" +\r
+                "<ul><li>...FAQ at <b>http://jabref.sf.net/faq.php</b> and our..." +\r
+                "<li>...user mailing-list at <b>http://sf.net/mailarchive/forum.php?forum_name=jabref-users</b></ul>" + \r
+                "If you do not find a solution there, please let us know about the problem by writing a bug report.<br>" +\r
+                "You can find our bug tracker at <b>http://sourceforge.net/tracker/?atid=600306&group_id=92314</b>.<br>"  +\r
+                "<ul><li>If the bug has already been reported there, please add your comments to the existing bug.<br>" +\r
+                "<li>If the bug has not been reported yet, then we need the complete error message given above<br>" +\r
+                "and a description of what you did before the error occured.</ul>" +\r
+                "We also need the following information (you can copy and paste all this):</p>" +\r
+                "<ul><li>Java Version: " + javaVersion +\r
+                "<li>Java Vendor: " + javaVendor +  \r
+                "<li>Operating System: " + System.getProperty("os.name") + " (" + System.getProperty("os.version") + ")" +\r
+                "<li>Hardware Architecture: " + System.getProperty("os.arch") + "</ul>" +\r
+                "We are sorry for the trouble and thanks for reporting problems with JabRef!</html>");\r
+            pane.setEditable(false);\r
+            pane.setOpaque(false);\r
+            pane.putClientProperty(JEditorPane.HONOR_DISPLAY_PROPERTIES, Boolean.TRUE);\r
+            \r
+            Component componentToDisplay;\r
+            if (pane.getPreferredSize().getHeight() > 700){\r
+                JScrollPane sPane = new JScrollPane(pane, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);\r
+                sPane.setBorder(BorderFactory.createEmptyBorder());\r
+                sPane.setPreferredSize(new Dimension((int)pane.getPreferredSize().getWidth() + 30, 700));\r
+                componentToDisplay = sPane;\r
+            } else {\r
+                componentToDisplay = pane;\r
+            }\r
+            \r
+            JOptionPane.showMessageDialog(null, componentToDisplay, "An error occurred while running JabRef", JOptionPane.ERROR_MESSAGE);\r
+        } catch (SecurityException e) {\r
+            System.out.println("ERROR: You are running JabRef in a sandboxed"\r
+                + " environment that does not allow it to be started.");\r
+            e.printStackTrace();\r
+        } catch (NoSuchMethodException e) {\r
+            System.out\r
+                .println("This error should not happen."\r
+                    + " Write an email to the JabRef developers and tell them 'NoSuchMethodException in JabRefMain'");\r
+        } catch (ClassNotFoundException e) {\r
+            System.out\r
+                .println("This error should not happen."\r
+                    + " Write an email to the JabRef developers and tell them 'ClassNotFoundException in JabRefMain'");\r
+        } catch (IllegalArgumentException e) {\r
+            System.out\r
+                .println("This error should not happen."\r
+                    + " Write an email to the JabRef developers and tell them 'IllegalArgumentException in JabRefMain'");\r
+        } catch (IllegalAccessException e) {\r
+            System.out\r
+                .println("This error should not happen."\r
+                    + " Write an email to the JabRef developers and tell them 'IllegalAccessException in JabRefMain'");\r
+        } catch (UnsupportedClassVersionError e){\r
+            \r
+            String errorMessage = \r
+                exceptionToString(e) + "\n" +\r
+                "This means that your Java version (" + javaVersion + ") is not high enough to run JabRef.\n" +\r
+                               "Please update your Java Runtime Environment to a version 1.5 or higher.\n";\r
+            \r
+            System.out.println(errorMessage);\r
+            \r
+            JEditorPane pane = new JEditorPane("text/html", \r
+                "<html>You are using Java version " + javaVersion + ", but JabRef needs version 1.5 or higher." +\r
+                "<p>Please update your Java Runtime Environment.</p>" +\r
+                "<p>For more information visit <b>http://jabref.sf.net/faq.php</b>.</p></html>");\r
+            pane.setEditable(false);\r
+            pane.setOpaque(false);\r
+            pane.putClientProperty(JEditorPane.HONOR_DISPLAY_PROPERTIES, Boolean.TRUE);\r
+            \r
+            JOptionPane.showMessageDialog(null, pane, "Insufficient Java Version Installed", JOptionPane.ERROR_MESSAGE);\r
+        }\r
+    }\r
+}\r
index b0b76ab..6e041f1 100644 (file)
@@ -75,6 +75,13 @@ public class JabRefPreferences {
     // Map containing all registered external file types:
     private TreeSet externalFileTypes = new TreeSet();
 
+    // The following field is used as a global variable during the export of a database.
+    // By setting this field to the path of the database's default file directory, formatters
+    // that should resolve external file paths can access this field. This is an ugly hack
+    // to solve the problem of formatters not having access to any context except for the
+    // string to be formatted and possible formatter arguments.
+    public String fileDirForDatabase = null;
+
     // The only instance of this class:
     private static JabRefPreferences singleton = null;
 
@@ -102,7 +109,7 @@ public class JabRefPreferences {
             defaults.put("winEdtPath", "C:\\Program Files\\WinEdt Team\\WinEdt\\WinEdt.exe");
             defaults.put("latexEditorPath", "C:\\Program Files\\LEd\\LEd.exe");
         } else {
-                       defaults.put("pdfviewer", "acroread");
+                       defaults.put("pdfviewer", "evince");
                        defaults.put("psviewer", "gv");
                        defaults.put("htmlviewer", "mozilla");
                        defaults.put("lookAndFeel", "com.jgoodies.plaf.plastic.Plastic3DLookAndFeel");
@@ -254,8 +261,8 @@ public class JabRefPreferences {
         defaults.put("preview0", "<font face=\"arial\">"
                      +"<b><i>\\bibtextype</i><a name=\"\\bibtexkey\">\\begin{bibtexkey} (\\bibtexkey)</a>"
                      +"\\end{bibtexkey}</b><br>__NEWLINE__"
-                     +"\\begin{author} \\format[AuthorLastFirst,HTMLChars,AuthorAbbreviator,AuthorAndsReplacer]{\\author}<BR>\\end{author}__NEWLINE__"
-                     +"\\begin{editor} \\format[AuthorLastFirst,HTMLChars,AuthorAbbreviator,AuthorAndsReplacer]{\\editor} <i>(ed.)</i><BR>\\end{editor}__NEWLINE__"
+                     +"\\begin{author} \\format[HTMLChars,AuthorAbbreviator,AuthorAndsReplacer]{\\author}<BR>\\end{author}__NEWLINE__"
+                     +"\\begin{editor} \\format[HTMLChars,AuthorAbbreviator,AuthorAndsReplacer]{\\editor} <i>(ed.)</i><BR>\\end{editor}__NEWLINE__"
                      +"\\begin{title} \\format[HTMLChars]{\\title} \\end{title}<BR>__NEWLINE__"
                      +"\\begin{chapter} \\format[HTMLChars]{\\chapter}<BR>\\end{chapter}__NEWLINE__"
                      +"\\begin{journal} <em>\\format[HTMLChars]{\\journal}, </em>\\end{journal}__NEWLINE__"
@@ -271,8 +278,8 @@ public class JabRefPreferences {
         defaults.put("preview1", "<font face=\"arial\">"
                      +"<b><i>\\bibtextype</i><a name=\"\\bibtexkey\">\\begin{bibtexkey} (\\bibtexkey)</a>"
                      +"\\end{bibtexkey}</b><br>__NEWLINE__"
-                     +"\\begin{author} \\format[AuthorLastFirst,HTMLChars,AuthorAbbreviator,AuthorAndsReplacer]{\\author}<BR>\\end{author}__NEWLINE__"
-                     +"\\begin{editor} \\format[AuthorLastFirst,HTMLChars,AuthorAbbreviator,AuthorAndsReplacer]{\\editor} <i>(ed.)</i><BR>\\end{editor}__NEWLINE__"
+                     +"\\begin{author} \\format[HTMLChars,AuthorAbbreviator,AuthorAndsReplacer]{\\author}<BR>\\end{author}__NEWLINE__"
+                     +"\\begin{editor} \\format[HTMLChars,AuthorAbbreviator,AuthorAndsReplacer]{\\editor} <i>(ed.)</i><BR>\\end{editor}__NEWLINE__"
                      +"\\begin{title} \\format[HTMLChars]{\\title} \\end{title}<BR>__NEWLINE__"
                      +"\\begin{chapter} \\format[HTMLChars]{\\chapter}<BR>\\end{chapter}__NEWLINE__"
                      +"\\begin{journal} <em>\\format[HTMLChars]{\\journal}, </em>\\end{journal}__NEWLINE__"
@@ -759,10 +766,10 @@ public class JabRefPreferences {
         defKeyBinds.put("Synchronize PS", "ctrl F4");
         defKeyBinds.put("Abbreviate", "ctrl alt A");
         defKeyBinds.put("Unabbreviate", "ctrl alt shift A");
-        defKeyBinds.put("Search IEEXplore", "F8");
+        defKeyBinds.put("Search IEEEXplore", "F8");
         defKeyBinds.put("Fetch ArXiv.org", "shift F8");
         defKeyBinds.put("Write XMP", "ctrl F4");
-
+        defKeyBinds.put("New file link", "ctrl N");
         //defKeyBinds.put("Select value", "ctrl B");
     }
 
@@ -873,6 +880,7 @@ public class JabRefPreferences {
         list.add(new ExternalFileType("PNG image", "png", "gimp", "picture"));
         list.add(new ExternalFileType("GIF image", "gif", "gimp", "picture"));
         list.add(new ExternalFileType("JPG image", "jpg", "gimp", "picture"));
+
         list.add(new ExternalFileType("Text file", "txt", "emacs", "emacs"));
         ExternalFileType tp = new ExternalFileType("URL", "html", "firefox", "www");
         list.add(tp);
index 2acdc97..8af7832 100644 (file)
@@ -157,8 +157,6 @@ public class MetaData {
         else
             dir = Globals.prefs.get(key);
 
-
-        //System.out.println("MetaData: dir: '"+dir+"' relative: "+(new File(dir)).isAbsolute());
         return dir;
     }
 
index 1c1c177..f9b86f8 100644 (file)
@@ -160,7 +160,7 @@ public class PreviewPrefsTab extends JPanel implements PrefsTab {
                entry
                        .setField(
                                "author",
-                               "L. E. C. Conceic{\\~a}o and T. van der Meeren and J. A. J. Verreth and M. S. Evjen and D. F. Houlihan and H. J. Fyhn");
+                               "Luis E. C. Conceic{\\~a}o and Terje van der Meeren and Johan A. J. Verreth and M S. Evjen and D. F. Houlihan and H. J. Fyhn");
                entry
                        .setField(
                                "title",
index d146fbe..320be47 100644 (file)
@@ -440,10 +440,10 @@ settings.add(select);
     }
 
     public void clearSearch() {
-        if (startedFloatSearch) {
+        if (panel.isShowingFloatSearch()) {
             startedFloatSearch = false;
             panel.mainTable.stopShowingFloatSearch();
-        } else if (startedFilterSearch) {
+        } else if (panel.isShowingFilterSearch()) {
             startedFilterSearch = false;
             panel.stopShowingSearchResults();
         }
@@ -583,4 +583,14 @@ settings.add(select);
     public void reportError(String errorMessage, Exception exception) {
         reportError(errorMessage);
     }
+
+
+    public void setActiveBasePanel(BasePanel panel) {
+        super.setActiveBasePanel(panel);
+        if (panel != null)
+            escape.setEnabled(panel.isShowingFloatSearch()
+                    || panel.isShowingFilterSearch());
+        else
+            escape.setEnabled(false);
+    }
 }
index f12b8cd..93a8fab 100644 (file)
@@ -462,7 +462,7 @@ public class Util {
 
                if (fieldName.equals("ps") || fieldName.equals("pdf")) {
 
-                       // Find the default directory for this field type:
+            // Find the default directory for this field type:
                        String dir = metaData.getFileDirectory(fieldName);
 
                        File file = expandFilename(link, new String[] { dir, "." });
@@ -483,7 +483,11 @@ public class Util {
                                        || (split.length >= 3 && split[split.length - 2].equalsIgnoreCase("ps")))
                                        fieldName = "ps";
                        }
-               } else if (fieldName.equals("doi")) {
+
+            // Find the file type descriptor:
+            ExternalFileType type = Globals.prefs.getExternalFileTypeByExt(fieldName);
+
+        } else if (fieldName.equals("doi")) {
                        fieldName = "url";
                        // Check to see if link field already contains a well formated URL
                        if (!link.startsWith("http://")) {
@@ -532,7 +536,9 @@ public class Util {
                } else if (fieldName.equals("ps")) {
                        try {
                                if (Globals.ON_MAC) {
-                                       String[] cmd = { "/usr/bin/open", "-a", Globals.prefs.get("psviewer"), link };
+                    ExternalFileType type = Globals.prefs.getExternalFileTypeByExt("ps");
+                    String viewer = type != null ? type.getOpenWith() : Globals.prefs.get("psviewer");
+                    String[] cmd = { "/usr/bin/open", "-a", viewer, link };
                                        Process child = Runtime.getRuntime().exec(cmd);
                                } else if (Globals.ON_WIN) {
                                        openFileOnWindows(link, true);
@@ -542,7 +548,9 @@ public class Util {
                                         * cmdArray[0] + " " + cmdArray[1]);
                                         */
                                } else {
-                                       cmdArray[0] = Globals.prefs.get("psviewer");
+                    ExternalFileType type = Globals.prefs.getExternalFileTypeByExt("ps");
+                    String viewer = type != null ? type.getOpenWith() : Globals.prefs.get("psviewer");
+                    cmdArray[0] = viewer;
                                        cmdArray[1] = link;
                                        Process child = Runtime.getRuntime().exec(cmdArray);
                                }
@@ -553,7 +561,9 @@ public class Util {
                } else if (fieldName.equals("pdf")) {
                        try {
                                if (Globals.ON_MAC) {
-                                       String[] cmd = { "/usr/bin/open", "-a", Globals.prefs.get("pdfviewer"), link };
+                    ExternalFileType type = Globals.prefs.getExternalFileTypeByExt("pdf");
+                    String viewer = type != null ? type.getOpenWith() : Globals.prefs.get("psviewer");
+                    String[] cmd = { "/usr/bin/open", "-a", viewer, link };
                                        Process child = Runtime.getRuntime().exec(cmd);
                                } else if (Globals.ON_WIN) {
                                        openFileOnWindows(link, true);
@@ -569,7 +579,9 @@ public class Util {
                                         * Process child = Runtime.getRuntime().exec(cmd);
                                         */
                                } else {
-                                       cmdArray[0] = Globals.prefs.get("pdfviewer");
+                    ExternalFileType type = Globals.prefs.getExternalFileTypeByExt("pdf");
+                    String viewer = type != null ? type.getOpenWith() : Globals.prefs.get("psviewer");
+                    cmdArray[0] = viewer;
                                        cmdArray[1] = link;
                                        // Process child = Runtime.getRuntime().exec(cmdArray[0]+"
                                        // "+cmdArray[1]);
index b83da0d..6f16c87 100644 (file)
@@ -26,7 +26,7 @@ import com.jgoodies.forms.layout.FormLayout;
  * Allows the user to enable and configure the XMP privacy filter.
  * 
  * @author $Author: mortenalver $
- * @version $Revision: 1922 $ ($Date: 2007-01-31 17:52:09 +0100 (Wed, 31 Jan 2007) $)
+ * @version $Revision: 2377 $ ($Date: 2007-09-20 19:39:59 +0200 (Thu, 20 Sep 2007) $)
  * 
  */
 class XmpPrefsTab extends JPanel implements PrefsTab {
@@ -213,8 +213,10 @@ class XmpPrefsTab extends JPanel implements PrefsTab {
                }
 
                // Now we need to make sense of the contents the user has made to the
-               // table setup table.
-               if (tableChanged) {
+               // table setup table. This needs to be done either if changes were made, or
+        // if the checkbox is checked and no field values have been stored previously: 
+        if (tableChanged ||
+                (privacyFilterCheckBox.isSelected() && !Globals.prefs.hasKey("xmpPrivacyFilters"))) {
 
                        // First we remove all rows with empty names.
                        for (int i = tableRows.size() - 1; i >= 0; i--) {
index de7891c..d545816 100644 (file)
@@ -33,10 +33,6 @@ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 //
 // function : new about dialog
 //
-// todo     :
-//
-// modified :
-
 
 package net.sf.jabref.about ;
 
index f4f3c4b..06d1ecc 100644 (file)
@@ -30,8 +30,6 @@ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
 // created by : r.nagel 05.05.2005
 //
-// todo     :
-//
 // modified :
 
 
index 7119f76..83b0cc5 100644 (file)
@@ -33,9 +33,7 @@ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 //
 // function : a animated line for about dialog
 //
-// todo     :
-//
-// modified :
+
 
 package net.sf.jabref.about ;
 
index 4abe446..fdf5ad3 100644 (file)
@@ -32,8 +32,6 @@ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 //
 // function : listener for animation actions
 //
-// todo     :
-//
 // modified :
 
 package net.sf.jabref.about ;
index 538ca0b..572ff81 100644 (file)
@@ -34,8 +34,6 @@ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 //
 // function : content for the about dialog
 //
-// todo     :
-//
 // modified :
 //            28.07.2005
 //            - hide license button
index 0f358ca..161d3b9 100644 (file)
@@ -33,8 +33,6 @@ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 //
 // function : about action, used in JabrefFrame
 //
-// todo     :
-//
 // modified :
 
 package net.sf.jabref.about ;
index d2206dd..ffa3890 100644 (file)
@@ -33,8 +33,6 @@ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 //
 // function : set of animated lines
 //
-// todo     :
-//
 // modified :
 
 package net.sf.jabref.about ;
index d177fb9..f588375 100644 (file)
@@ -161,6 +161,12 @@ public class ExportFormats {
                         }
                     }
 
+                    // Set the global variable for this database's file directory before exporting,
+                    // so formatters can resolve linked files correctly.
+                    // (This is an ugly hack!)
+                    Globals.prefs.fileDirForDatabase = frame.basePanel().metaData()
+                            .getFileDirectory(GUIGlobals.FILE_FIELD);                    
+
                     // Make sure we remember which filter was used, to set
                     // the default for next time:
                     Globals.prefs.put("lastUsedExport", format.getConsoleName());
index f6ce8a2..b82384f 100644 (file)
@@ -77,6 +77,12 @@ public class ExportToClipboardAction extends AbstractWorker {
 
         ExportFormat format = formats[list.getSelectedIndex()];
 
+        // Set the global variable for this database's file directory before exporting,
+        // so formatters can resolve linked files correctly.
+        // (This is an ugly hack!)
+        Globals.prefs.fileDirForDatabase = frame.basePanel().metaData()
+                .getFileDirectory(GUIGlobals.FILE_FIELD);
+        
         /*final boolean custom = (list.getSelectedIndex() >= Globals.STANDARD_EXPORT_COUNT);
         String dir = null;
         if (custom) {
index 8f84386..b0ce8f7 100644 (file)
@@ -27,8 +27,6 @@ class ModsExportFormat extends ExportFormat {
         VerifyingWriter ps = ss.getWriter();
         MODSDatabase md = new MODSDatabase(database, keySet);
 
-        // PS: DOES NOT SUPPORT EXPORTING ONLY A SET OF ENTRIES
-
         try {
             DOMSource source = new DOMSource(md.getDOMrepresentation());
             StreamResult result = new StreamResult(ps);
index 507b503..f6054a4 100644 (file)
@@ -18,8 +18,6 @@ import ca.odell.glazedlists.SortedList;
  * @author Morten O. Alver.
  * Based on net.sf.jabref.MODSDatabase by Michael Wrighton
  *
- * TODO To change the template for this generated type comment go to
- * Window - Preferences - Java - Code Style - Code Templates
  */
 public class OOCalcDatabase {
     protected Collection entries;
index 80b1553..08c0f8f 100644 (file)
@@ -19,8 +19,6 @@ import ca.odell.glazedlists.BasicEventList;
  * @author Morten O. Alver.
  * Based on net.sf.jabref.MODSDatabase by Michael Wrighton
  *
- * TODO To change the template for this generated type comment go to
- * Window - Preferences - Java - Code Style - Code Templates
  */
 public class OpenDocumentRepresentation {
     protected Collection entries;
index e4e92f7..1ac98e6 100644 (file)
@@ -5,10 +5,20 @@ import net.sf.jabref.export.layout.LayoutFormatter;
 import java.util.List;
 import java.util.ArrayList;
 
+/**
+ * This is an abstract implementation of ParamLayoutFormatter, which provides some
+ * functionality for the handling of argument strings.
+ */
 public abstract class AbstractParamLayoutFormatter implements ParamLayoutFormatter {
 
     private static char SEPARATOR = ',';
-       
+
+    /**
+     * Parse an argument string and return the parts of the argument. The parts are
+     * separated by commas, and escaped commas are reduced to literal commas.
+     * @param arg The argument string.
+     * @return An array of strings representing the parts of the argument.
+     */
     public static String[] parseArgument(String arg) {
         List<String> parts = new ArrayList<String>();
         StringBuilder current = new StringBuilder();
@@ -24,17 +34,22 @@ public abstract class AbstractParamLayoutFormatter implements ParamLayoutFormatt
                 } else
                     escaped = true;
             } else if (escaped) {
-                if ((arg.charAt(i) != ',') && (arg.charAt(i) != '"'))
-                    current.append('\\');
-                current.append(arg.charAt(i));
+                // Handle newline and tab:
+                if (arg.charAt(i)=='n')
+                    current.append('\n');
+                else if (arg.charAt(i)=='t')
+                    current.append('\t');
+                else {
+                    if ((arg.charAt(i) != ',') && (arg.charAt(i) != '"'))
+                        current.append('\\');
+                    current.append(arg.charAt(i));
+                }
                 escaped = false;
             } else
                 current.append(arg.charAt(i));
         }
         parts.add(current.toString());
-       return parts.toArray(new String[parts.size()]);
-
+           return parts.toArray(new String[parts.size()]);
     }
 
-
 }
index fee690b..e89bcf0 100755 (executable)
@@ -42,7 +42,7 @@ import wsi.ra.types.StringInt;
  * DOCUMENT ME!
  * 
  * @author $author$
- * @version $Revision: 2301 $
+ * @version $Revision: 2331 $
  */
 public class LayoutEntry {
        // ~ Instance fields
@@ -293,7 +293,9 @@ public class LayoutEntry {
 
                        return field;
                } else if (type == LayoutHelper.IS_ENCODING_NAME) {
-            return encoding;
+            // Try to translate from Java encoding name to common name:
+            String commonName = Globals.ENCODING_NAMES_LOOKUP.get(encoding);
+            return commonName != null ? commonName : encoding;
         }
                return "";
        }
index 75d858d..b409bd5 100644 (file)
@@ -25,6 +25,7 @@
 package net.sf.jabref.export.layout.format;
 
 import net.sf.jabref.export.layout.LayoutFormatter;
+import net.sf.jabref.AuthorList;
 
 /**
  * Duplicate of AuthorLastFirstAbbreviator.
@@ -41,9 +42,9 @@ public class AuthorAbbreviator implements LayoutFormatter {
         * @see net.sf.jabref.export.layout.LayoutFormatter#format(java.lang.String)
         */
        public String format(String fieldText) {
-               // It seems to me that this formatter and AuthorLastFirstAbbreviator
-               // are duplicates. Since the latter was patched to improve handling of
-               // some names, we refer the operation there:
-               return (new AuthorLastFirstAbbreviator()).format(fieldText);
+
+        AuthorList list = AuthorList.getAuthorList(fieldText);
+        return list.getAuthorsLastFirstAnds(true);
+        
        }
 }
index 977324d..7e035b0 100644 (file)
@@ -23,14 +23,15 @@ public class AuthorLastFirstAbbreviator implements LayoutFormatter {
         * @see net.sf.jabref.export.layout.LayoutFormatter#format(java.lang.String)
         */
        public String format(String fieldText) {
-               
-               // return AuthorList.fixAuthor_lastNameFirst(fieldText, true);
-               
-               try {
-                 return getAbbreviations(fieldText.split(" and "));
-               } catch(Exception e){
-            return fieldText;
-               }
+
+        /**
+         * This formatter is a duplicate of AuthorAbbreviator, so we simply
+         * call that one.
+         *
+         * TODO: Note that this makes the remaining methods in this formatter obsolete. 
+         */
+        return (new AuthorAbbreviator()).format(fieldText);
+
        }
 
        /**
index d05b251..9b50d2b 100644 (file)
@@ -9,6 +9,7 @@ import net.sf.jabref.Util;
 import net.sf.jabref.GUIGlobals;
 
 import java.io.File;
+import java.io.IOException;
 
 /**
  * Export formatter that handles the file link list of JabRef 2.3 and later, by
@@ -45,12 +46,19 @@ public class FileLink implements ParamLayoutFormatter {
         
         if (link == null)
             return "";
-        // Search in the standard file directory:
-        /* TODO: oops, this part is not sufficient. We need access to the
-         database's metadata in order to check if the database overrides
-         the standard file directory */
-        String dir = Globals.prefs.get(GUIGlobals.FILE_FIELD+"Directory");
-               File f = Util.expandFilename(link, new String[] { dir, "." });
+
+
+        String dir;
+        // We need to resolve the file directory from the database's metadata,
+        // but that is not available from a formatter. Therefore, as an
+        // ugly hack, the export routine has set a global variable before
+        // starting the export, which contains the database's file directory:
+        if (Globals.prefs.fileDirForDatabase != null)
+            dir = Globals.prefs.fileDirForDatabase;
+        else
+            dir = Globals.prefs.get(GUIGlobals.FILE_FIELD + "Directory");
+        
+               File f = Util.expandFilename(link, new String[] { dir });
 
         /*
                 * Stumbled over this while investigating
@@ -58,8 +66,13 @@ public class FileLink implements ParamLayoutFormatter {
                 * https://sourceforge.net/tracker/index.php?func=detail&aid=1469903&group_id=92314&atid=600306
                 */
                if (f != null) {
-                       return f.getPath();//f.toURI().toString();
-               } else {
+            try {
+                return f.getCanonicalPath();//f.toURI().toString();
+            } catch (IOException e) {
+                e.printStackTrace();
+                return f.getPath();
+            }
+        } else {
                        return link;
                }
 
index c1d37aa..f906f10 100644 (file)
@@ -11,6 +11,7 @@ import java.util.ArrayList;
  * To use this formatter, a two-part argument must be given. The parts are
  * separated by a comma. To indicate the comma character, use an escape
  * sequence: \,
+ * For inserting newlines and tabs in arguments, use \n and \t, respectively.
  *
  * The first part is the regular expression to search for. The regular expression
  * is written normally, without extra escape sequences for backslashes. A description
diff --git a/src/java/net/sf/jabref/export/layout/format/WrapFileLinks.java b/src/java/net/sf/jabref/export/layout/format/WrapFileLinks.java
new file mode 100644 (file)
index 0000000..2872668
--- /dev/null
@@ -0,0 +1,283 @@
+package net.sf.jabref.export.layout.format;
+
+import net.sf.jabref.export.layout.AbstractParamLayoutFormatter;
+import net.sf.jabref.gui.FileListTableModel;
+import net.sf.jabref.gui.FileListEntry;
+import net.sf.jabref.Globals;
+import net.sf.jabref.GUIGlobals;
+import net.sf.jabref.Util;
+
+import java.util.*;
+import java.io.File;
+import java.io.IOException;
+
+/**
+ * This formatter iterates over all file links, or all file links of a specified
+ * type, outputting a format string given as the first argument. The format string
+ * can contain a number of escape sequences indicating file link information to
+ * be inserted into the string.
+ * <p/>
+ * This formatter can take an optional second argument specifying the name of a file
+ * type. If specified, the iteration will only include those files with a file type
+ * matching the given name (case-insensitively). If specified as an empty argument,
+ * all file links will be included.
+ * <p/>
+ * After the second argument, pairs of additional arguments can be added in order to
+ * specify regular expression replacements to be done upon the inserted link information
+ * before insertion into the output string. A non-paired argument will be ignored.
+ * In order to specify replacements without filtering on file types, use an empty second
+ * argument.
+ * <p/>
+ * <p/>
+ * <p/>
+ * The escape sequences for embedding information are as follows:
+ * <p/>
+ * \i   : This inserts the iteration index (starting from 1), and can be useful if
+ * the output list of files should be enumerated.
+ * \p   : This inserts the file path of the file link.
+ * \f   : This inserts the name of the file link's type.
+ * \x   : This inserts the file's extension, if any.
+ * \d   : This inserts the file link's description, if any.
+ * <p/>
+ * For instance, an entry could contain a file link to the file "/home/john/report.pdf"
+ * of the "PDF" type with description "John's final report".
+ * <p/>
+ * Using the WrapFileLinks formatter with the following argument:
+ * <p/>
+ * \format[WrapFileLinks(\i. \d (\p))]{\file}
+ * <p/>
+ * would give the following output:
+ * 1. John's final report (/home/john/report.pdf)
+ * <p/>
+ * If the entry contained a second file link to the file "/home/john/draft.txt" of the
+ * "Text file" type with description 'An early "draft"', the output would be as follows:
+ * 1. John's final report (/home/john/report.pdf)
+ * 2. An early "draft" (/home/john/draft.txt)
+ * <p/>
+ * If the formatter was called with a second argument, the list would be filtered.
+ * For instance:
+ * \format[WrapFileLinks(\i. \d (\p),,text file)]{\file}
+ * <p/>
+ * would show only the text file:
+ * 1. An early "draft" (/home/john/draft.txt)
+ * <p/>
+ * If we wanted this output to be part of an XML styled output, the quotes in the
+ * file description could cause problems. Adding two additional arguments to translate
+ * the quotes into XML characters solves this:
+ * \format[WrapFileLinks(\i. \d (\p),,text file,",&quot;)]{\file}
+ * <p/>
+ * would give the following output:
+ * 1. An early &quot;draft&quot; (/home/john/draft.txt)
+ *
+ * Additional pairs of replacements could be added.
+ */
+public class WrapFileLinks extends AbstractParamLayoutFormatter {
+
+
+    private String fileType = null;
+    private List<FormatEntry> format = null;
+    private Map<String, String> replacements = new HashMap<String, String>();
+
+    public void setArgument(String arg) {
+        String[] parts = parseArgument(arg);
+        format = parseFormatString(parts[0]);
+        if ((parts.length > 1) && (parts[1].trim().length() > 0))
+            fileType = parts[1];
+        if (parts.length > 2) {
+            for (int i = 2; i < parts.length-1; i+=2) {
+                replacements.put(parts[i], parts[i+1]);
+            }
+        }
+    }
+
+    public String format(String field) {
+        StringBuilder sb = new StringBuilder();
+
+        // Build the table model containing the links:
+        FileListTableModel tableModel = new FileListTableModel();
+        if (field == null)
+            return "";
+        tableModel.setContent(field);
+
+        int piv = 1; // counter for relevant iterations
+        for (int i = 0; i < tableModel.getRowCount(); i++) {
+            FileListEntry flEntry = tableModel.getEntry(i);
+            // Use this entry if we don't discriminate on types, or if the type fits:
+            if ((fileType == null) || flEntry.getType().getName().toLowerCase().equals(fileType)) {
+
+                for (FormatEntry entry : format) {
+                    switch (entry.getType()) {
+                        case STRING:
+                            sb.append(entry.getString());
+                            break;
+                        case ITERATION_COUNT:
+                            sb.append(String.valueOf(piv));
+                            break;
+                        case FILE_PATH:
+                            if (flEntry.getLink() == null)
+                                break;
+
+                            String dir;
+                            // We need to resolve the file directory from the database's metadata,
+                            // but that is not available from a formatter. Therefore, as an
+                            // ugly hack, the export routine has set a global variable before
+                            // starting the export, which contains the database's file directory:
+                            if (Globals.prefs.fileDirForDatabase != null)
+                                dir = Globals.prefs.fileDirForDatabase;
+                            else
+                                dir = Globals.prefs.get(GUIGlobals.FILE_FIELD + "Directory");
+
+                            File f = Util.expandFilename(flEntry.getLink(), new String[]{dir});
+
+                            /*
+                             * Stumbled over this while investigating
+                             *
+                             * https://sourceforge.net/tracker/index.php?func=detail&aid=1469903&group_id=92314&atid=600306
+                             */
+                            if (f != null) {
+                                try {
+                                    sb.append(replaceStrings(f.getCanonicalPath()));//f.toURI().toString();
+                                } catch (IOException ex) {
+                                    ex.printStackTrace();
+                                    sb.append(replaceStrings(f.getPath()));
+                                }
+                            } else {
+                                sb.append(replaceStrings(flEntry.getLink()));
+                            }
+
+                            break;
+                        case FILE_EXTENSION:
+                            if (flEntry.getLink() == null)
+                                break;
+                            int index = flEntry.getLink().lastIndexOf('.');
+                            if ((index >= 0) && (index < flEntry.getLink().length() - 1))
+                                sb.append(replaceStrings(flEntry.getLink().substring(index + 1)));
+                            break;
+                        case FILE_TYPE:
+                            sb.append(replaceStrings(flEntry.getType().getName()));
+                            break;
+                        case FILE_DESCRIPTION:
+                            sb.append(replaceStrings(flEntry.getDescription()));
+                            break;
+                    }
+                }
+
+                piv++; // update counter
+            }
+        }
+
+        return sb.toString();
+    }
+
+
+    protected String replaceStrings(String text) {
+        for (Iterator<String> i=replacements.keySet().iterator(); i.hasNext();) {
+            String from = i.next();
+            String to = replacements.get(from);
+            text = text.replaceAll(from, to);
+        }
+        return text;
+        
+    }
+
+
+    // Define codes for the various escape sequences that can be inserted:
+    public static final int STRING = 0, ITERATION_COUNT = 1, FILE_PATH = 2, FILE_TYPE = 3,
+            FILE_EXTENSION = 4, FILE_DESCRIPTION = 5;
+
+    // Define which escape sequences give what results:
+    final static Map<Character, Integer> ESCAPE_SEQ = new HashMap<Character, Integer>();
+
+    static {
+        ESCAPE_SEQ.put('i', ITERATION_COUNT);
+        ESCAPE_SEQ.put('p', FILE_PATH);
+        ESCAPE_SEQ.put('f', FILE_TYPE);
+        ESCAPE_SEQ.put('x', FILE_EXTENSION);
+        ESCAPE_SEQ.put('d', FILE_DESCRIPTION);
+    }
+
+    /**
+     * Parse a format string and return a list of FormatEntry objects. The format
+     * string is basically marked up with "\i" marking that the iteration number should
+     * be inserted, and with "\p" marking that the file path of the current iteration
+     * should be inserted, plus additional markers.
+     *
+     * @param format The marked-up string.
+     * @return the resulting format entries.
+     */
+    public List<FormatEntry> parseFormatString(String format) {
+        List<FormatEntry> l = new ArrayList<FormatEntry>();
+        StringBuilder sb = new StringBuilder();
+        boolean escaped = false;
+        for (int i = 0; i < format.length(); i++) {
+            char c = format.charAt(i);
+            if (!escaped) {
+                // Check if we are at the start of an escape sequence:
+                if (c == '\\')
+                    escaped = true;
+                else
+                    sb.append(c);
+            } else {
+                escaped = false; // we know we'll be out of escape mode after this
+                // Check if this escape sequence is meaningful:
+                if (c == '\\') {
+                    // Escaped backslash: means that we add a backslash:
+                    sb.append(c);
+                } else if (ESCAPE_SEQ.containsKey(c)) {
+                    // Ok, we have the code. Add the previous string (if any) and
+                    // the entry indicated by the escape sequence:
+                    if (sb.length() > 0) {
+                        l.add(new FormatEntry(sb.toString()));
+                        // Clear the buffer:
+                        sb = new StringBuilder();
+                    }
+                    l.add(new FormatEntry(ESCAPE_SEQ.get(c)));
+                } else {
+                    // Unknown escape sequence.
+                    sb.append('\\');
+                    sb.append(c);
+                    //System.out.println("Error: unknown escape sequence: \\"+String.valueOf(c));
+                }
+            }
+        }
+        // Finished scanning the string. If we collected text at the end, add an entry for it:
+        if (sb.length() > 0) {
+            l.add(new FormatEntry(sb.toString()));
+        }
+
+        return l;
+    }
+
+
+    /**
+     * This class defines the building blocks of a parsed format strings. Each FormatEntry
+     * represents either a literal string or a piece of information pertaining to the file
+     * link to be exported or to the iteration through a series of file links. For literal
+     * strings this class encapsulates the literal itself, while for other types of information,
+     * only a type code is provided, and the subclass needs to fill in the proper information
+     * based on the file link to be exported or the iteration status.
+     */
+    protected class FormatEntry {
+
+        private int type;
+        private String string = null;
+
+        public FormatEntry(int type) {
+            this.type = type;
+        }
+
+        public FormatEntry(String value) {
+            this.type = STRING;
+            this.string = value;
+        }
+
+        public int getType() {
+            return type;
+        }
+
+        public String getString() {
+            return string;
+        }
+    }
+
+}
index 328c3eb..753a7de 100644 (file)
@@ -198,7 +198,7 @@ public class AutoSetExternalFileForEntries extends AbstractWorker {
         }
     }
 
-    static class OptionsDialog extends JDialog {
+    class OptionsDialog extends JDialog {
         JRadioButton autoSetUnset, autoSetAll, autoSetNone;
         JCheckBox checkLinks;
         JButton ok = new JButton(Globals.lang("Ok")),
@@ -289,7 +289,8 @@ public class AutoSetExternalFileForEntries extends AbstractWorker {
             if (visible)
                 canceled = true;
 
-            String dir = Globals.prefs.get(fieldName + "Directory");
+            String dir = panel.metaData().getFileDirectory(fieldName);
+
             if ((dir == null) || (dir.trim().length() == 0)) {
 
                 autoSetNone.setSelected(true);
index a0d301f..4f0673f 100644 (file)
@@ -91,8 +91,12 @@ public class DownloadExternalFile {
         // Then, while the download is proceeding, let the user choose the details of the file:
         String suffix = getSuffix(res);
         String suggestedName = bibtexKey != null ? getSuggestedFileName(res, suffix) : "";
-        final String directory = getFileDirectory(res);
-        File file = new File(new File(directory), suggestedName);
+        String fDirectory = getFileDirectory(res);
+        if (fDirectory.trim().equals(""))
+            fDirectory = null;
+        final String directory = fDirectory;
+        final String suggestDir = directory != null ? directory : System.getProperty("user.home");
+        File file = new File(new File(suggestDir), suggestedName);
         FileListEntry entry = new FileListEntry("", bibtexKey != null ? file.getPath() : "",
                 Globals.prefs.getExternalFileTypeByExt(suffix));
         editor = new FileListEntryEditor(frame, entry, true, metaData);
@@ -100,7 +104,8 @@ public class DownloadExternalFile {
         editor.setOkEnabled(false);
         editor.setExternalConfirm(new ConfirmCloseFileListEntryEditor() {
             public boolean confirmClose(FileListEntry entry) {
-                File f = expandFilename(directory, entry.getLink());
+                File f = directory != null ? expandFilename(directory, entry.getLink())
+                        : new File(entry.getLink());
                 if (f.isDirectory()) {
                     JOptionPane.showMessageDialog(frame,
                             Globals.lang("Target file cannot be a directory."), Globals.lang("Download file"),
@@ -119,8 +124,17 @@ public class DownloadExternalFile {
         editor.setVisible(true);
         // Editor closed. Go on:
         if (editor.okPressed()) {
-            String dirPrefix = directory+System.getProperty("file.separator");
-            File toFile = expandFilename(directory, entry.getLink());
+            File toFile = directory != null ? expandFilename(directory, entry.getLink())
+                    : new File(entry.getLink());
+            String dirPrefix;
+            if (directory != null) {
+                if (!directory.endsWith(System.getProperty("file.separator")))
+                    dirPrefix = directory+System.getProperty("file.separator");
+                else
+                    dirPrefix = directory;
+            } else
+                dirPrefix = null;
+
             try {
                 boolean success = Util.copyFile(tmp, toFile, true);
                 if (!success) {
@@ -130,7 +144,7 @@ public class DownloadExternalFile {
 
                 // If the local file is in or below the main file directory, change the
                 // path to relative:
-                if (entry.getLink().startsWith(directory) &&
+                if ((directory != null) && entry.getLink().startsWith(directory) &&
                         (entry.getLink().length() > dirPrefix.length())) {
                     entry.setLink(entry.getLink().substring(dirPrefix.length()));
                 }
@@ -216,7 +230,6 @@ public class DownloadExternalFile {
     }
 
     public String getFileDirectory(String link) {
-        // TODO: getFileDirectory()
         return metaData.getFileDirectory(GUIGlobals.FILE_FIELD);
     }
 
index 84527c4..e470337 100644 (file)
@@ -14,15 +14,13 @@ import javax.swing.JRadioButton;
 import javax.swing.event.ChangeEvent;
 import javax.swing.event.ChangeListener;
 
-import net.sf.jabref.BasePanel;
-import net.sf.jabref.BibtexEntry;
-import net.sf.jabref.Globals;
-import net.sf.jabref.JabRefFrame;
-import net.sf.jabref.KeyCollisionException;
-import net.sf.jabref.Util;
+import net.sf.jabref.*;
 import net.sf.jabref.gui.MainTable;
+import net.sf.jabref.gui.FileListTableModel;
+import net.sf.jabref.gui.FileListEntry;
 import net.sf.jabref.undo.NamedCompound;
 import net.sf.jabref.undo.UndoableFieldChange;
+import net.sf.jabref.undo.UndoableInsertEntry;
 import net.sf.jabref.util.XMPUtil;
 
 import com.jgoodies.forms.builder.DefaultFormBuilder;
@@ -93,15 +91,32 @@ public class DroppedFileHandler {
     public void handleDroppedfile(String fileName, ExternalFileType fileType, boolean localFile,
         MainTable mainTable, int dropRow) {
 
+        BibtexEntry entry = mainTable.getEntryAt(dropRow);
+        handleDroppedfile(fileName, fileType, localFile, entry);
+    }
+
+    /**
+     *
+     * @param fileName
+     *        The name of the dragged file.
+     * @param fileType
+     *        The FileType associated with the file.
+     * @param localFile
+ *            Indicate whether this is a local file, or a remote file copied
+ *            to a local temporary file.
+     * @param entry
+     *        The target entry for the drop.
+     */
+    public void handleDroppedfile(String fileName, ExternalFileType fileType, boolean localFile,
+        BibtexEntry entry) {
         NamedCompound edits = new NamedCompound(Globals.lang("Drop %0", fileType.extension));
 
-        if (tryXmpImport(fileName, fileType, localFile, mainTable, edits)) {
+        if (tryXmpImport(fileName, fileType, localFile, edits)) {
+            edits.end();
             panel.undoManager.addEdit(edits);
             return;
         }
 
-        BibtexEntry entry = mainTable.getEntryAt(dropRow);
-
         // Show dialog
         boolean newEntry = false;
         boolean rename = entry.getCiteKey() != null && entry.getCiteKey().length() > 0;
@@ -122,7 +137,8 @@ public class DroppedFileHandler {
         if (linkInPlace.isSelected()) {
             destFilename = fileName;
         } else {
-            destFilename = (renameCheckBox.isSelected() ? entry.getCiteKey() + "." + fileType.extension : fileName);
+            destFilename = (renameCheckBox.isSelected() ? entry.getCiteKey() + "." + fileType.extension
+                    : new File(fileName).getName());
             if (copyRadioButton.isSelected()) {
                 success = doCopy(fileName, fileType, destFilename, edits);
             } else if (moveRadioButton.isSelected()) {
@@ -131,16 +147,16 @@ public class DroppedFileHandler {
         }
 
         if (success) {
-            doLink(entry, fileType, destFilename, edits);
+            doLink(entry, fileType, destFilename, false, edits);
             panel.markBaseChanged();
         }
-
+        edits.end();
         panel.undoManager.addEdit(edits);
 
     }
 
     private boolean tryXmpImport(String fileName, ExternalFileType fileType, boolean localFile,
-        MainTable mainTable, NamedCompound edits) {
+        NamedCompound edits) {
 
         if (!fileType.extension.equals("pdf")) {
             return false;
@@ -187,9 +203,9 @@ public class DroppedFileHandler {
         boolean isSingle = xmpEntriesInFile.size() == 1;
         BibtexEntry single = (isSingle ? (BibtexEntry) xmpEntriesInFile.get(0) : null);
 
-        reply = showLinkMoveCopyRenameDialog(Globals.lang("Link to PDF %0", fileName), fileType,
+        /*reply = showLinkMoveCopyRenameDialog(Globals.lang("Link to PDF %0", fileName), fileType,
             isSingle, (isSingle ? single.getCiteKey() : Globals.lang("Cannot rename for several entries.")),
-            false, !isSingle);
+            false, !isSingle);*/
 
         boolean success = true;
 
@@ -218,8 +234,9 @@ public class DroppedFileHandler {
                 try {
                     BibtexEntry entry = (BibtexEntry) it.next();
                     entry.setId(Util.createNeutralId());
+                    edits.addEdit(new UndoableInsertEntry(panel.getDatabase(), entry, panel));
                     panel.getDatabase().insertEntry(entry);
-                    doLink(entry, fileType, destFilename, edits);
+                    doLink(entry, fileType, destFilename, true, edits);
                 } catch (KeyCollisionException ex) {
 
                 }
@@ -234,14 +251,15 @@ public class DroppedFileHandler {
         final boolean allowRename, String citekeyOrReason, boolean newEntry,
         final boolean multipleEntries) {
         
-        String dir = panel.metaData().getFileDirectory(fileType.getFieldName());
+        //String dir = panel.metaData().getFileDirectory(fileType.getFieldName());
+        String dir = panel.metaData().getFileDirectory(GUIGlobals.FILE_FIELD);
         if ((dir == null) || !(new File(dir)).exists()) {
-            destDirLabel.setText(Globals.lang("%0 directory is not set or does not exist!", fileType.getName()));
+            destDirLabel.setText(Globals.lang("File directory is not set or does not exist!"));
             copyRadioButton.setEnabled(false);
             moveRadioButton.setEnabled(false);
             linkInPlace.setSelected(true);
         } else {
-            destDirLabel.setText(Globals.lang("%0 directory is '%1':", fileType.getName(), dir));
+            destDirLabel.setText(Globals.lang("File directory is '%0':", dir));
             copyRadioButton.setEnabled(true);
             moveRadioButton.setEnabled(true);
         }
@@ -256,18 +274,14 @@ public class DroppedFileHandler {
                if (multipleEntries) {
                        linkInPlace.setText(Globals
                                        .lang("Leave files in their current directory."));
-                       copyRadioButton.setText(Globals.lang("Copy files to %0.", fileType
-                                       .getName()));
+                       copyRadioButton.setText(Globals.lang("Copy files to file directory."));
 
-                       moveRadioButton.setText(Globals.lang("Move files to %0.", fileType
-                                       .getName()));
+                       moveRadioButton.setText(Globals.lang("Move files to file directory."));
                } else {
                        linkInPlace.setText(Globals
                                        .lang("Leave file in its current directory."));
-                       copyRadioButton.setText(Globals.lang("Copy file to %0.", fileType
-                                       .getName()));
-                       moveRadioButton.setText(Globals.lang("Move file to %0.", fileType
-                                       .getName()));
+                       copyRadioButton.setText(Globals.lang("Copy file to file directory."));
+                       moveRadioButton.setText(Globals.lang("Move file to file directory"));
                }
                
         renameCheckBox.setText(Globals.lang("Rename to match citekey") + ": " + citekeyOrReason);
@@ -296,11 +310,39 @@ public class DroppedFileHandler {
      *            is given, the edit is added to the panel's undoManager.
      */
     private void doLink(BibtexEntry entry, ExternalFileType fileType, String filename,
-        NamedCompound edits) {
+        boolean avoidDuplicate, NamedCompound edits) {
+
+
+        Object oldValue = entry.getField(GUIGlobals.FILE_FIELD);
+        FileListTableModel tm = new FileListTableModel();
+        if (oldValue != null)
+            tm.setContent((String)oldValue);
+
+        // If avoidDuplicate==true, we should check if this file is already linked:
+        if (avoidDuplicate) {
+            // For comparison, find the absolute filename:
+            String fileDir = panel.metaData().getFileDirectory(GUIGlobals.FILE_FIELD);
+            String absFilename = (!(new File(filename).isAbsolute()) && (fileDir != null)) ?
+                    new File(fileDir, filename).getAbsolutePath() : filename;
+            System.out.println("absFilename: "+absFilename);
+            
+            for (int i=0; i<tm.getRowCount(); i++) {
+                FileListEntry flEntry = tm.getEntry(i);
+                // Find the absolute filename for this existing link:
+                String absName = (!(new File(flEntry.getLink()).isAbsolute()) && (fileDir != null)) ?
+                        new File(fileDir, flEntry.getLink()).getAbsolutePath() : flEntry.getLink();
+                System.out.println("absName: "+absName);
+                // If the filenames are equal, we don't need to link, so we simply return:
+                if (absFilename.equals(absName))
+                    return;
+            }
+        }
 
-        UndoableFieldChange edit = new UndoableFieldChange(entry, fileType.getFieldName(), entry
-            .getField(fileType.getFieldName()), filename);
-        entry.setField(fileType.getFieldName(), filename);
+        tm.addEntry(tm.getRowCount(), new FileListEntry("", filename, fileType));
+        String newValue = tm.getStringRepresentation();
+        UndoableFieldChange edit = new UndoableFieldChange(entry, GUIGlobals.FILE_FIELD,
+                oldValue, newValue);
+        entry.setField(GUIGlobals.FILE_FIELD, newValue);
 
         if (edits == null) {
             panel.undoManager.addEdit(edit);
@@ -325,7 +367,7 @@ public class DroppedFileHandler {
      */
     private boolean doRename(String fileName, ExternalFileType fileType, String destFilename,
         NamedCompound edits) {
-        String dir = panel.metaData().getFileDirectory(fileType.getFieldName());
+        String dir = panel.metaData().getFileDirectory(GUIGlobals.FILE_FIELD);
         if ((dir == null) || !(new File(dir)).exists()) {
             // OOps, we don't know which directory to put it in, or the given
             // dir doesn't exist....
@@ -357,7 +399,7 @@ public class DroppedFileHandler {
     private boolean doCopy(String fileName, ExternalFileType fileType, String toFile,
         NamedCompound edits) {
 
-        String dir = panel.metaData().getFileDirectory(fileType.getFieldName());
+        String dir = panel.metaData().getFileDirectory(GUIGlobals.FILE_FIELD);
         if ((dir == null) || !(new File(dir)).exists()) {
             // OOps, we don't know which directory to put it in, or the given
             // dir doesn't exist....
index 2ba4c3c..8abfa27 100644 (file)
@@ -101,7 +101,15 @@ public class ExternalFileType implements Comparable {
      */
     public void setIconName(String name) {
         this.iconName = name;
-        this.icon = GUIGlobals.getImage(iconName);
+        try {
+            this.icon = GUIGlobals.getImage(iconName);
+        } catch (NullPointerException ex) {
+            // Loading the icon failed. This could be because the icons have not been
+            // initialized, which will be the case if we are operating from the command
+            // line and the graphical interface hasn't been initialized. In that case
+            // we will do without the icon:
+            this.icon = null;
+        }
         label.setIcon(this.icon);
     }
 
index ca82178..b92dc0d 100644 (file)
@@ -78,11 +78,12 @@ public class ExternalFileTypeEditor extends JDialog {
                 dispose();
             }
         });
-        cancel.addActionListener(new ActionListener() {
+        AbstractAction cancelAction = new AbstractAction() {
             public void actionPerformed(ActionEvent e) {
                 dispose();
             }
-        });
+        };
+        cancel.addActionListener(cancelAction);
         // The toDefaults resets the entire list to its default values.
         toDefaults.addActionListener(new ActionListener() {
             public void actionPerformed(ActionEvent e) {
@@ -102,6 +103,7 @@ public class ExternalFileTypeEditor extends JDialog {
             }
         });
 
+
         add.addActionListener(new AddListener());
         remove.addActionListener(new RemoveListener());
         edit.addActionListener(editListener);
@@ -146,6 +148,16 @@ public class ExternalFileTypeEditor extends JDialog {
         getContentPane().add(bb.getPanel(), BorderLayout.SOUTH);
         pack();
 
+        // Key bindings:
+        ActionMap am = upper.getActionMap();
+        InputMap im = upper.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW);
+        im.put(Globals.prefs.getKey("Close dialog"), "close");
+        am.put("close", cancelAction);
+        am = bb.getPanel().getActionMap();
+        im = bb.getPanel().getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW);
+        im.put(Globals.prefs.getKey("Close dialog"), "close");
+        am.put("close", cancelAction);
+
         if (frame != null)
             setLocationRelativeTo(frame);
         else
index 7fbddf1..d454a77 100644 (file)
@@ -56,7 +56,7 @@ public class PushToWinEdt implements PushToApplication {
         try {
             StringBuffer toSend = new StringBuffer("\"[InsText('\\")
                     .append(Globals.prefs.get("citeCommand")).append("{")
-                    .append(keyString)
+                    .append(keyString.replaceAll("'", "''"))
                     .append("}');]\"");
             Runtime.getRuntime().exec(winEdt + " " + toSend.toString());
 
index 9e18051..4a9b5b1 100644 (file)
@@ -44,13 +44,14 @@ public class SynchronizeFileField extends AbstractWorker {
     }
 
     public void init() {
+        goOn = true;
         Collection col = panel.database().getEntries();
         sel = new BibtexEntry[col.size()];
         sel = (BibtexEntry[]) col.toArray(sel);
 
         // Ask about rules for the operation:
         if (optDiag == null)
-            optDiag = new SynchronizeFileField.OptionsDialog(panel.frame(), fieldName);
+            optDiag = new SynchronizeFileField.OptionsDialog(panel.frame(), panel.metaData(), fieldName);
         Util.placeDialog(optDiag, panel.frame());
         optDiag.setVisible(true);
         if (optDiag.canceled()) {
@@ -60,7 +61,7 @@ public class SynchronizeFileField extends AbstractWorker {
         autoSet = !optDiag.autoSetNone.isSelected();
         overWriteAllowed = optDiag.autoSetAll.isSelected();
         checkExisting = optDiag.checkLinks.isSelected();
-
+        
         panel.output(Globals.lang("Synchronizing %0 links...", fieldName.toUpperCase()));
     }
 
@@ -95,9 +96,15 @@ public class SynchronizeFileField extends AbstractWorker {
             for (int i = 0; i < sel.length; i++) {
                 entries.add(sel[i]);
             }
-            // Start the autosetting process:
 
-            Thread t = FileListEditor.autoSetLinks(entries, ce, changedEntries);
+            // We need to specify which directories to search in:
+            ArrayList<File> dirs = new ArrayList<File>();
+            String dr = panel.metaData().getFileDirectory(GUIGlobals.FILE_FIELD);
+            if (dr != null)
+                dirs.add(new File(dr));
+
+            // Start the autosetting process:                
+            Thread t = FileListEditor.autoSetLinks(entries, ce, changedEntries, dirs);
             // Wait for the autosetting to finish:
             try {
                 t.join();
@@ -224,9 +231,11 @@ public class SynchronizeFileField extends AbstractWorker {
         JLabel description;
         private boolean canceled = true;
         private String fieldName;
+        private MetaData metaData;
 
-        public OptionsDialog(JFrame parent, String fieldName) {
+        public OptionsDialog(JFrame parent, MetaData metaData, String fieldName) {
             super(parent, Globals.lang("Synchronize %0 links", fieldName.toUpperCase()), true);
+            this.metaData = metaData;
             final String fn = Globals.lang("file");
             this.fieldName = fieldName;
             ok.addActionListener(new ActionListener() {
@@ -306,7 +315,7 @@ public class SynchronizeFileField extends AbstractWorker {
             if (visible)
                 canceled = true;
 
-            String dir = Globals.prefs.get(fieldName + "Directory");
+            String dir = metaData.getFileDirectory(GUIGlobals.FILE_FIELD);
             if ((dir == null) || (dir.trim().length() == 0)) {
 
                 autoSetNone.setSelected(true);
index 07ba4d0..f9e6097 100644 (file)
@@ -6,6 +6,8 @@ import java.awt.Dimension;
 import java.awt.event.ActionEvent;
 import java.awt.event.ActionListener;
 import java.io.File;
+import java.util.List;
+import java.util.ArrayList;
 
 import javax.swing.AbstractAction;
 import javax.swing.ActionMap;
@@ -20,13 +22,9 @@ import javax.swing.JPanel;
 import javax.swing.JScrollPane;
 import javax.swing.JTextArea;
 
-import net.sf.jabref.AbstractWorker;
-import net.sf.jabref.BasePanel;
-import net.sf.jabref.BibtexDatabase;
-import net.sf.jabref.BibtexEntry;
-import net.sf.jabref.FocusRequester;
-import net.sf.jabref.Globals;
-import net.sf.jabref.Util;
+import net.sf.jabref.*;
+import net.sf.jabref.gui.FileListTableModel;
+import net.sf.jabref.gui.FileListEntry;
 import net.sf.jabref.util.XMPUtil;
 
 import com.jgoodies.forms.builder.ButtonBarBuilder;
@@ -36,8 +34,8 @@ import com.jgoodies.forms.builder.ButtonBarBuilder;
  * This action goes through all selected entries in the BasePanel, and attempts
  * to write the XMP data to the external pdf.
  * 
- * @author $Author: coezbek $
- * @version $Revision: 2110 $ ($Date: 2007-06-13 03:39:51 +0200 (Wed, 13 Jun 2007) $)
+ * @author $Author: mortenalver $
+ * @version $Revision: 2352 $ ($Date: 2007-09-14 18:23:14 +0200 (Fri, 14 Sep 2007) $)
  * 
  */
 public class WriteXMPAction extends AbstractWorker {
@@ -109,39 +107,65 @@ public class WriteXMPAction extends AbstractWorker {
 
                        BibtexEntry entry = entries[i];
 
-                       String pdf = (String) entry.getField("pdf");
-
-                       String dir = panel.metaData().getFileDirectory("pdf");
-
-                       File file = Util.expandFilename(pdf, new String[]{dir,"."});
-
-                       optDiag.progressArea.append(entry.getCiteKey() + "\n");
-
-                       if (file == null) {
+            // Make a list of all PDFs linked from this entry:
+            List<File> files = new ArrayList<File>();
+
+            // First check the (legacy) "pdf" field:
+            String pdf = (String) entry.getField("pdf");
+            String dir = panel.metaData().getFileDirectory("pdf");
+            File f = Util.expandFilename(pdf, new String[]{dir,"."});
+            if (f != null)
+                files.add(f);
+
+            // Then check the "file" field:
+            dir = panel.metaData().getFileDirectory(GUIGlobals.FILE_FIELD);
+            String field = (String)entry.getField(GUIGlobals.FILE_FIELD);
+            if (field != null) {
+                FileListTableModel tm = new FileListTableModel();
+                tm.setContent(field);
+                for (int j=0; j<tm.getRowCount(); j++) {
+                    FileListEntry flEntry = tm.getEntry(j);
+                    if ((flEntry.getType()!=null) && (flEntry.getType().getName().toLowerCase().equals("pdf"))) {
+                        f = Util.expandFilename(flEntry.getLink(), new String[]{dir,"."});
+                        if (f != null)
+                            files.add(f);
+                    }
+                }
+            }
+
+            optDiag.progressArea.append(entry.getCiteKey() + "\n");
+
+                       if (files.size() == 0) {
                                skipped++;
                                optDiag.progressArea.append("  " + Globals.lang("Skipped - No PDF linked") + ".\n");
-                       } else if (!file.exists()) {
-                               skipped++;
-                               optDiag.progressArea.append("  " + Globals.lang("Skipped - PDF does not exist")
-                                       + ":\n");
-                               optDiag.progressArea.append("    " + file.getPath() + "\n");
-                       } else {
-                               try {
-                                       XMPUtil.writeXMP(file, entry, database);
-                                       optDiag.progressArea.append("  " + Globals.lang("Ok") + ".\n");
-                                       entriesChanged++;
-                               } catch (Exception e) {
-                                       optDiag.progressArea.append("  " + Globals.lang("Error while writing") + " '"
-                                               + file.getPath() + "':\n");
-                                       optDiag.progressArea.append("    " + e.getLocalizedMessage() + "\n");
-                                       errors++;
-                               }
-                       }
-                       if (optDiag.canceled){
-                               optDiag.progressArea.append("\n"
-                                       + Globals.lang("Operation canceled.\n"));
-                               break;          
                        }
+            else for (File file : files) {
+                if (!file.exists()) {
+                    skipped++;
+                                   optDiag.progressArea.append("  " + Globals.lang("Skipped - PDF does not exist")
+                                           + ":\n");
+                                   optDiag.progressArea.append("    " + file.getPath() + "\n");
+
+
+                } else {
+                    try {
+                        XMPUtil.writeXMP(file, entry, database);
+                        optDiag.progressArea.append("  " + Globals.lang("Ok") + ".\n");
+                        entriesChanged++;
+                    } catch (Exception e) {
+                        optDiag.progressArea.append("  " + Globals.lang("Error while writing") + " '"
+                            + file.getPath() + "':\n");
+                        optDiag.progressArea.append("    " + e.getLocalizedMessage() + "\n");
+                        errors++;
+                    }
+                }
+            }
+
+            if (optDiag.canceled){
+                optDiag.progressArea.append("\n"
+                    + Globals.lang("Operation canceled.\n"));
+                break;
+            }
                }
                optDiag.progressArea.append("\n"
                        + Globals.lang("Finished writing XMP for %0 file (%1 skipped, %2 errors).", String
diff --git a/src/java/net/sf/jabref/external/WriteXMPEntryEditorAction.java b/src/java/net/sf/jabref/external/WriteXMPEntryEditorAction.java
new file mode 100644 (file)
index 0000000..db932b8
--- /dev/null
@@ -0,0 +1,124 @@
+package net.sf.jabref.external;
+
+import net.sf.jabref.*;
+import net.sf.jabref.util.XMPUtil;
+import net.sf.jabref.gui.FileListTableModel;
+import net.sf.jabref.gui.FileListEntry;
+
+import javax.swing.*;
+import java.awt.event.ActionEvent;
+import java.io.File;
+import java.util.List;
+import java.util.ArrayList;
+
+/**
+ * Write XMP action for EntryEditor toolbar.
+ */
+public class WriteXMPEntryEditorAction extends AbstractAction {
+    private BasePanel panel;
+    private EntryEditor editor;
+    private String message = null;
+
+    public WriteXMPEntryEditorAction(BasePanel panel, EntryEditor editor) {
+        this.panel = panel;
+        this.editor = editor;
+        putValue(NAME, Globals.lang("Write XMP"));
+        putValue(SMALL_ICON, GUIGlobals.getImage("pdfSmall"));
+        putValue(SHORT_DESCRIPTION, Globals.lang("Write BibtexEntry as XMP-metadata to PDF."));
+    }
+
+    public void actionPerformed(ActionEvent actionEvent) {
+        setEnabled(false);
+        panel.output(Globals.lang("Writing XMP metadata..."));
+        panel.frame().setProgressBarIndeterminate(true);
+        panel.frame().setProgressBarVisible(true);
+        BibtexEntry entry = editor.getEntry();
+
+        // Make a list of all PDFs linked from this entry:
+        List<File> files = new ArrayList<File>();
+
+        // First check the (legacy) "pdf" field:
+        String pdf = (String) entry.getField("pdf");
+        String dir = panel.metaData().getFileDirectory("pdf");
+        File f = Util.expandFilename(pdf, new String[]{dir, "."});
+        if (f != null)
+            files.add(f);
+
+        // Then check the "file" field:
+        dir = panel.metaData().getFileDirectory(GUIGlobals.FILE_FIELD);
+        String field = (String) entry.getField(GUIGlobals.FILE_FIELD);
+        if (field != null) {
+            FileListTableModel tm = new FileListTableModel();
+            tm.setContent(field);
+            for (int j = 0; j < tm.getRowCount(); j++) {
+                FileListEntry flEntry = tm.getEntry(j);
+                if ((flEntry.getType() != null) && (flEntry.getType().getName().toLowerCase().equals("pdf"))) {
+                    f = Util.expandFilename(flEntry.getLink(), new String[]{dir, "."});
+                    if (f != null)
+                        files.add(f);
+                }
+            }
+        }
+
+        // We want to offload the actual work to a background thread, so we have a worker
+        // thread:
+        AbstractWorker worker = new WriteXMPWorker(files, entry);
+        // Using Spin, we get a thread that gets synchronously offloaded to a new thread,
+        // blocking the execution of this method:
+        worker.getWorker().run();
+        // After the worker thread finishes, we are unblocked and ready to print the
+        // status message:
+        panel.output(message);
+        panel.frame().setProgressBarVisible(false);
+        setEnabled(true);
+    }
+
+
+    class WriteXMPWorker extends AbstractWorker {
+
+        private List<File> files;
+        private BibtexEntry entry;
+
+        public WriteXMPWorker(List<File> files, BibtexEntry entry) {
+
+            this.files = files;
+            this.entry = entry;
+        }
+
+        public void run() {
+            if (files.size() == 0) {
+                message = Globals.lang("No PDF linked") + ".\n";
+            } else {
+                int written = 0, error = 0;
+                for (File file : files) {
+                    if (!file.exists()) {
+                        if (files.size() == 1)
+                            message = Globals.lang("PDF does not exist");
+                        error++;
+
+                    } else {
+                        try {
+                            XMPUtil.writeXMP(file, entry, panel.database());
+                            if (files.size() == 1)
+                                message = Globals.lang("Wrote XMP-metadata");
+                            written++;
+                        } catch (Exception e) {
+                            if (files.size() == 1)
+                                message = Globals.lang("Error while writing") + " '" + file.getPath() + "'";
+                            error++;
+
+                        }
+                    }
+                }
+                if (files.size() > 1) {
+                    StringBuilder sb = new StringBuilder();
+                    sb.append(Globals.lang("Finished writing XMP-metadata. Wrote to %0 file(s).",
+                            String.valueOf(written)));
+                    if (error > 0)
+                        sb.append(" " + Globals.lang("Error writing to %0 file(s).", String.valueOf(error)));
+                    message = sb.toString();
+                }
+            }
+        }
+    }
+}
\ No newline at end of file
index 55eb753..08b2315 100644 (file)
@@ -32,6 +32,8 @@ import java.io.File;
 import java.io.FileWriter;
 import java.io.IOException;
 import java.net.URL;
+import java.net.MalformedURLException;
+import java.net.URISyntaxException;
 import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
@@ -234,35 +236,66 @@ public class EntryTableTransferHandler extends TransferHandler {
                return true;
        }
 
-       /**
-        * Handle a String describing a set of files or URLs dragged into JabRef.
-        * 
+    /**
+        * Translate a String describing a set of files or URLs dragged into JabRef
+     * into a List of File objects, taking care of URL special characters.
+        *
         * @param s
         *            String describing a set of files or URLs dragged into JabRef
-     * @param dropRow The row in the table where the files were dragged.
-     * @return success status for the operation
+     * @return a List<File> containing the individual file objects.
      *
         */
-       private boolean handleDraggedFilenames(String s, final int dropRow) {
+    public static List<File> getFilesFromDraggedFilesString(String s) {
                // Split into lines:
                String[] lines = s.replaceAll("\r", "").split("\n");
-               List files = new ArrayList();
+               List<File> files = new ArrayList<File>();
                for (int i = 0; i < lines.length; i++) {
                        String line = lines[i];
-                       if (line.startsWith("file:"))
+
+            // Try to use url.toURI() to translate URL specific sequences like %20 into
+            // standard characters:
+            File fl = null;
+            try {
+                URL url = new URL(line);
+                fl = new File(url.toURI());
+            } catch(URISyntaxException e) {
+                e.printStackTrace();
+            } catch (MalformedURLException e) {
+                e.printStackTrace();
+            }
+
+            // Unless an exception was thrown, we should have the sanitized path:
+            if (fl != null)
+                line = fl.getPath();
+            else if (line.startsWith("file:"))
                                line = line.substring(5);
                        else
                                continue;
-                       // Under Gnome, the link is given as file:///...., so we
+            // Under Gnome, the link is given as file:///...., so we
                        // need to strip the extra slashes:
                        if (line.startsWith("//"))
                                line = line.substring(2);
-                       File f = new File(line);
-                       if (f.exists()) {
+
+            File f = new File(line);
+            if (f.exists()) {
                                files.add(f);
                        }
                }
-               return handleDraggedFiles(files, dropRow);
+        return files;
+    }
+
+    /**
+        * Handle a String describing a set of files or URLs dragged into JabRef.
+        * 
+        * @param s
+        *            String describing a set of files or URLs dragged into JabRef
+     * @param dropRow The row in the table where the files were dragged.
+     * @return success status for the operation
+     *
+        */
+       private boolean handleDraggedFilenames(String s, final int dropRow) {
+
+               return handleDraggedFiles(getFilesFromDraggedFilesString(s), dropRow);
 
        }
 
@@ -310,12 +343,11 @@ public class EntryTableTransferHandler extends TransferHandler {
                String encoding = Globals.prefs.get("defaultEncoding");
                for (int i = 0; i < fileNames.length; i++) {
                        // Find the file's extension, if any:
-                       String extension = "";
+            String extension = "";
                        ExternalFileType fileType = null;
                        int index = fileNames[i].lastIndexOf('.');
                        if ((index >= 0) && (index < fileNames[i].length())) {
                                extension = fileNames[i].substring(index + 1).toLowerCase();
-                               // System.out.println(extension);
                                fileType = Globals.prefs.getExternalFileTypeByExt(extension);
                        }
                        if (extension.equals("bib")) {
index 2a3dcd9..aead340 100644 (file)
@@ -1,19 +1,23 @@
 package net.sf.jabref.gui;
 
 import net.sf.jabref.*;
+import net.sf.jabref.groups.EntryTableTransferHandler;
 import net.sf.jabref.undo.NamedCompound;
 import net.sf.jabref.undo.UndoableFieldChange;
-import net.sf.jabref.external.ExternalFileType;
-import net.sf.jabref.external.DownloadExternalFile;
-import net.sf.jabref.external.UnknownExternalFileType;
+import net.sf.jabref.external.*;
 
 import javax.swing.*;
 import java.awt.*;
+import java.awt.dnd.DnDConstants;
+import java.awt.datatransfer.Transferable;
+import java.awt.datatransfer.DataFlavor;
+import java.awt.datatransfer.UnsupportedFlavorException;
 import java.awt.event.*;
 import java.util.*;
 import java.util.List;
 import java.io.File;
 import java.io.IOException;
+import java.net.URL;
 
 import com.jgoodies.forms.builder.DefaultFormBuilder;
 import com.jgoodies.forms.layout.FormLayout;
@@ -34,6 +38,10 @@ public class FileListEditor extends JTable implements FieldEditor,
     private FileListTableModel tableModel;
     private JScrollPane sPane;
     private JButton add, remove, up, down, auto, download;
+    private JPopupMenu menu = new JPopupMenu();
+    private JMenuItem item = new JMenuItem(Globals.lang("Open"));
+
+
 
     public FileListEditor(JabRefFrame frame, MetaData metaData, String fieldName, String content,
                           EntryEditor entryEditor) {
@@ -50,8 +58,11 @@ public class FileListEditor extends JTable implements FieldEditor,
         addMouseListener(new TableClickListener());
 
         add = new JButton(GUIGlobals.getImage("add"));
+        add.setToolTipText(Globals.lang("New file link (INSERT)"));
         remove = new JButton(GUIGlobals.getImage("remove"));
+        remove.setToolTipText(Globals.lang("Remove file link (DELETE)"));
         up = new JButton(GUIGlobals.getImage("up"));
+
         down = new JButton(GUIGlobals.getImage("down"));
         auto = new JButton(Globals.lang("Auto"));
         download = new JButton(Globals.lang("Download"));
@@ -102,6 +113,10 @@ public class FileListEditor extends JTable implements FieldEditor,
         panel.add(sPane, BorderLayout.CENTER);
         panel.add(builder.getPanel(), BorderLayout.EAST);
 
+       TransferHandler th = new FileListEditorTransferHandler();
+       setTransferHandler(th);
+        panel.setTransferHandler(th);
+
         // Add an input/action pair for deleting entries:
         getInputMap().put(KeyStroke.getKeyStroke("DELETE"), "delete");
         getActionMap().put("delete", new AbstractAction() {
@@ -122,8 +137,26 @@ public class FileListEditor extends JTable implements FieldEditor,
                 addEntry();
             }
         });
+
+        menu.add(item);
+        item.addActionListener(new ActionListener() {
+            public void actionPerformed(ActionEvent actionEvent) {
+                openSelectedFile();
+            }
+        });
     }
 
+    private void openSelectedFile() {
+        int row = getSelectedRow();
+        if (row >= 0) {
+            FileListEntry entry = tableModel.getEntry(row);
+            try {
+                Util.openExternalFileAnyFormat(metaData, entry.getLink(), entry.getType());
+            } catch (IOException e) {
+                e.printStackTrace();
+            }
+        }
+    }
 
 
     public String getFieldName() {
@@ -178,16 +211,35 @@ public class FileListEditor extends JTable implements FieldEditor,
         return null;
     }
 
-    private void addEntry() {
+    private void addEntry(String initialLink) {
         int row = getSelectedRow();
         if (row == -1)
             row = 0;
-        FileListEntry entry = new FileListEntry("", "", null);
+        FileListEntry entry = new FileListEntry("", initialLink, null);
         if (editListEntry(entry))
             tableModel.addEntry(row, entry);
         entryEditor.updateField(this);
     }
 
+    private void addEntry() {
+        addEntry("");
+    }
+
+    /**
+     * Add the listed files, prompting the user with the entry editor in each case.
+     * @param files A list of File objects.
+     */
+    private void addAll(List files) {
+        for (Iterator i = files.iterator(); i.hasNext();) {
+            File file = (File)i.next();
+            String fileName = file.getAbsolutePath();
+            FileListEntry entry = new FileListEntry("", fileName, null);
+            if (editListEntry(entry))
+                    tableModel.addEntry(tableModel.getRowCount(), entry);
+        }
+        entryEditor.updateField(this);
+    }
+
     private void removeEntries() {
         int[] rows = getSelectedRows();
         if (rows != null)
@@ -261,7 +313,8 @@ public class FileListEditor extends JTable implements FieldEditor,
      * @return the thread performing the autosetting
      */
     public static Thread autoSetLinks(final Collection<BibtexEntry> entries, final NamedCompound ce,
-                                      final Set<BibtexEntry> changedEntries) {
+                                      final Set<BibtexEntry> changedEntries,
+                                      final ArrayList<File> dirs) {
 
         final ExternalFileType[] types = Globals.prefs.getExternalFileTypeSelection();
         final JLabel label = new JLabel(Globals.lang("Searching for files"));
@@ -270,9 +323,6 @@ public class FileListEditor extends JTable implements FieldEditor,
             public void run() {
                 boolean foundAny = false;
                 ExternalFileType[] types = Globals.prefs.getExternalFileTypeSelection();
-                ArrayList<File> dirs = new ArrayList<File>();
-                if (Globals.prefs.hasKey(GUIGlobals.FILE_FIELD + "Directory"))
-                    dirs.add(new File(Globals.prefs.get(GUIGlobals.FILE_FIELD + "Directory")));
                 Collection<String> extensions = new ArrayList<String>();
                 for (int i = 0; i < types.length; i++) {
                     final ExternalFileType type = types[i];
@@ -500,8 +550,152 @@ public class FileListEditor extends JTable implements FieldEditor,
                     editListEntry(entry);
                 }
             }
+            else if (e.isPopupTrigger())
+                processPopupTrigger(e);
+        }
+
+
+        public void mousePressed(MouseEvent e) {
+            if (e.isPopupTrigger())
+                processPopupTrigger(e);
+        }
+        public void mouseReleased(MouseEvent e) {
+            if (e.isPopupTrigger())
+                processPopupTrigger(e);
+        }
+
+
+        private void processPopupTrigger(MouseEvent e) {
+            int row = rowAtPoint(e.getPoint());
+            if (row >= 0) {
+                setRowSelectionInterval(row, row);
+                menu.show(FileListEditor.this, e.getX(), e.getY());
+            }
         }
     }
 
 
+    class FileListEditorTransferHandler extends TransferHandler {
+
+        protected DataFlavor urlFlavor;
+        protected DataFlavor stringFlavor;
+
+        public FileListEditorTransferHandler() {
+            stringFlavor = DataFlavor.stringFlavor;
+            try {
+                urlFlavor = new DataFlavor("application/x-java-url; class=java.net.URL");
+            } catch (ClassNotFoundException e) {
+                Globals.logger("Unable to configure drag and drop for file link table");
+                e.printStackTrace();
+            }
+        }
+        /**
+         * Overriden to indicate which types of drags are supported (only LINK).
+         *
+         * @override
+         */
+        public int getSourceActions(JComponent c) {
+            return DnDConstants.ACTION_LINK;
+        }
+
+        /*public boolean importData(TransferSupport transferSupport) {
+
+            return importData(FileListEditor.this, transferSupport.getTransferable());
+        }*/
+
+        public boolean importData(JComponent comp, Transferable t) {
+            // If the drop target is the main table, we want to record which
+            // row the item was dropped on, to identify the entry if needed:
+            int dropRow = -1;
+            if (comp instanceof JTable) {
+                dropRow = ((JTable) comp).getSelectedRow();
+            }
+
+            try {
+               
+                List files = null;
+                // This flavor is used for dragged file links in Windows:
+                if (t.isDataFlavorSupported(DataFlavor.javaFileListFlavor)) {
+                    // JOptionPane.showMessageDialog(null, "Received
+                    // javaFileListFlavor");
+                    files = (List) t.getTransferData(DataFlavor.javaFileListFlavor);
+                }
+
+                if (t.isDataFlavorSupported(urlFlavor)) {
+                    URL dropLink = (URL) t.getTransferData(urlFlavor);
+                    System.out.println("URL: "+dropLink);
+                    //return handleDropTransfer(dropLink, dropRow);
+                }
+
+                // This is used when one or more files are pasted from the file manager
+                // under Gnome. The data consists of the file paths, one file per line:
+                if (t.isDataFlavorSupported(stringFlavor)) {
+                    String dropStr = (String)t.getTransferData(stringFlavor);
+                    files = EntryTableTransferHandler.getFilesFromDraggedFilesString(dropStr);
+                }
+
+                       if (files != null) {
+                           final List theFiles = files;
+                    SwingUtilities.invokeLater(new Runnable() {
+                        public void run() {
+                            //addAll(files);
+                            for (Iterator i=theFiles.iterator(); i.hasNext();) {
+                                           File f = (File)i.next();
+                                // Find the file's extension, if any:
+                                String name = f.getAbsolutePath();
+                                String extension = "";
+                                ExternalFileType fileType = null;
+                                int index = name.lastIndexOf('.');
+                                if ((index >= 0) && (index < name.length())) {
+                                    extension = name.substring(index + 1).toLowerCase();
+                                    fileType = Globals.prefs.getExternalFileTypeByExt(extension);
+                                }
+                                if (fileType != null) {
+                                    DroppedFileHandler dfh = new DroppedFileHandler(frame, frame.basePanel());
+                                    dfh.handleDroppedfile(name, fileType, true, entryEditor.getEntry());
+                                }
+                            }
+                        }
+                    });
+                    return true;
+                }
+
+            } catch (IOException ioe) {
+                System.err.println("failed to read dropped data: " + ioe.toString());
+            } catch (UnsupportedFlavorException ufe) {
+                System.err.println("drop type error: " + ufe.toString());
+            }
+
+            // all supported flavors failed
+            System.err.println("can't transfer input: ");
+            DataFlavor inflavs[] = t.getTransferDataFlavors();
+            for (int i = 0; i < inflavs.length; i++) {
+                System.out.println("  " + inflavs[i].toString());
+            }
+
+            return false;
+        }
+
+        /**
+         * This method is called to query whether the transfer can be imported.
+         *
+         * Will return true for urls, strings, javaFileLists
+         *
+         * @override
+         */
+        public boolean canImport(JComponent comp, DataFlavor[] transferFlavors) {
+
+            // accept this if any input flavor matches any of our supported flavors
+            for (int i = 0; i < transferFlavors.length; i++) {
+                DataFlavor inflav = transferFlavors[i];
+                if (inflav.match(urlFlavor) || inflav.match(stringFlavor)
+                    || inflav.match(DataFlavor.javaFileListFlavor))
+                    return true;
+            }
+
+            // nope, never heard of this type
+            return false;
+        }
+
+    }
 }
index 48b7ee6..bbd94dc 100644 (file)
@@ -11,11 +11,13 @@ import javax.swing.event.DocumentEvent;
 import net.sf.jabref.*;
 import net.sf.jabref.external.ExternalFileType;
 import net.sf.jabref.external.ConfirmCloseFileListEntryEditor;
+import net.sf.jabref.external.ExternalFileMenuItem;
 
 import java.awt.*;
 import java.awt.event.*;
 import java.io.File;
 import java.io.FileFilter;
+import java.io.IOException;
 import java.util.ArrayList;
 
 /**
@@ -32,32 +34,55 @@ public class FileListEntryEditor {
     JDialog diag;
     JTextField link = new JTextField(), description = new JTextField();
     JButton ok = new JButton(Globals.lang("Ok")),
-            cancel = new JButton(Globals.lang("Cancel"));
+            cancel = new JButton(Globals.lang("Cancel")),
+            open = new JButton(Globals.lang("Open"));
     JComboBox types;
     JProgressBar prog = new JProgressBar(JProgressBar.HORIZONTAL);
     JLabel downloadLabel = new JLabel(Globals.lang("Downloading..."));
     ConfirmCloseFileListEntryEditor externalConfirm = null;
 
+    private AbstractAction okAction;
+    private JabRefFrame frame;
     private FileListEntry entry;
     private MetaData metaData;
     private boolean okPressed = false;
 
-    public FileListEntryEditor(JFrame parent, FileListEntry entry, boolean showProgressBar,
+    public FileListEntryEditor(JabRefFrame frame, FileListEntry entry, boolean showProgressBar,
                                MetaData metaData) {
+        this.frame = frame;
         this.entry = entry;
         this.metaData = metaData;
 
-        types = new JComboBox(Globals.prefs.getExternalFileTypeSelection());
+        okAction = new AbstractAction() {
+                public void actionPerformed(ActionEvent e) {
+                    // If OK button is disabled, ignore this event:
+                    if (!ok.isEnabled())
+                        return;
+                    // If necessary, ask the external confirm object whether we are ready to close.
+                    if (externalConfirm != null) {
+                        // Construct an updated FileListEntry:
+                        FileListEntry testEntry = new FileListEntry("", "", null);
+                        storeSettings(testEntry);
+                        if (!externalConfirm.confirmClose(testEntry))
+                            return;
+                    }
+                    diag.dispose();
+                    storeSettings(FileListEntryEditor.this.entry);
+                    okPressed = true;
+                }
+            };
+        types = new JComboBox();
         types.addItemListener(new ItemListener() {
             public void itemStateChanged(ItemEvent itemEvent) {
                 ok.setEnabled(types.getSelectedItem() != null);
             }
         });
+        
         DefaultFormBuilder builder = new DefaultFormBuilder(new FormLayout
                 ("left:pref, 4dlu, fill:150dlu, 4dlu, fill:pref", ""));
         builder.append(Globals.lang("Link"));
         builder.append(link);
-        BrowseListener browse = new BrowseListener(parent, link);
+        BrowseListener browse = new BrowseListener(frame, link);
         JButton browseBut = new JButton(Globals.lang("Browse"));
         browseBut.addActionListener(browse);
         builder.append(browseBut);
@@ -76,30 +101,37 @@ public class FileListEntryEditor {
         
         ButtonBarBuilder bb = new ButtonBarBuilder();
         bb.addGlue();
+        bb.addGridded(open);
+        bb.addRelatedGap();
         bb.addGridded(ok);
         bb.addGridded(cancel);
         bb.addGlue();
 
-        ok.addActionListener(new ActionListener() {
-            public void actionPerformed(ActionEvent e) {
-                // If necessary, ask the external confirm object whether we are ready to close.
-                if (externalConfirm != null) {
-                    // Construct an updated FileListEntry:
-                    FileListEntry testEntry = new FileListEntry("", "", null);
-                    storeSettings(testEntry);
-                    if (!externalConfirm.confirmClose(testEntry))
-                        return;
-                }
-                diag.dispose();
-                storeSettings(FileListEntryEditor.this.entry);
-                okPressed = true;
-            }
-        });
-        cancel.addActionListener(new ActionListener() {
-            public void actionPerformed(ActionEvent e) {
-                diag.dispose();
+
+        ok.addActionListener(okAction);
+        // Add OK action to the two text fields to simplify entering:
+        link.addActionListener(okAction);
+        description.addActionListener(okAction);
+
+        open.addActionListener(new ActionListener() {
+            public void actionPerformed(ActionEvent actionEvent) {
+                openFile();
             }
         });
+
+        AbstractAction cancelAction = new AbstractAction() {
+                public void actionPerformed(ActionEvent e) {
+                    diag.dispose();
+                }
+            };
+        cancel.addActionListener(cancelAction);
+
+        // Key bindings:
+        ActionMap am = builder.getPanel().getActionMap();
+        InputMap im = builder.getPanel().getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW);
+        im.put(Globals.prefs.getKey("Close dialog"), "close");
+        am.put("close", cancelAction);
+
         link.getDocument().addDocumentListener(new DocumentListener() {
             public void insertUpdate(DocumentEvent documentEvent) {
                 checkExtension();
@@ -109,33 +141,45 @@ public class FileListEntryEditor {
             public void changedUpdate(DocumentEvent documentEvent) {
                 checkExtension();
             }
-            private void checkExtension() {
-                if ((types.getSelectedIndex() == -1) &&
-                        (link.getText().trim().length() > 0)) {
-                    // Try to guess the file type:
-                    String theLink = link.getText().trim();
-                    int index = theLink.lastIndexOf('.');
-                    if ((index >= 0) && (index < theLink.length()-1)) {
-
-                        ExternalFileType type = Globals.prefs.getExternalFileTypeByExt
-                                (theLink.substring(index+1));
-                        if (type != null)
-                            types.setSelectedItem(type);
-                    }
-                }
-            }
+
         });
 
 
-        diag = new JDialog(parent, Globals.lang("Edit file link"), true);
+        diag = new JDialog(frame, Globals.lang("Edit file link"), true);
         diag.getContentPane().add(builder.getPanel(), BorderLayout.CENTER);
         diag.getContentPane().add(bb.getPanel(), BorderLayout.SOUTH);
         diag.pack();
-        Util.placeDialog(diag, parent);
+        Util.placeDialog(diag, frame);
 
         setValues(entry);
     }
 
+    private void checkExtension() {
+        if ((types.getSelectedIndex() == -1) &&
+                (link.getText().trim().length() > 0)) {
+            // Try to guess the file type:
+            String theLink = link.getText().trim();
+            int index = theLink.lastIndexOf('.');
+            if ((index >= 0) && (index < theLink.length()-1)) {
+
+                ExternalFileType type = Globals.prefs.getExternalFileTypeByExt
+                        (theLink.substring(index+1));
+                if (type != null)
+                    types.setSelectedItem(type);
+            }
+        }
+    }
+
+    public void openFile() {
+        ExternalFileType type = (ExternalFileType)types.getSelectedItem();
+        if (type != null)
+            try {
+                Util.openExternalFileAnyFormat(metaData, link.getText(), entry.getType());
+            } catch (IOException e) {
+                e.printStackTrace();
+            }
+    }
+
     public void setExternalConfirm(ConfirmCloseFileListEntryEditor eC) {
         this.externalConfirm = eC;
     }
@@ -166,12 +210,44 @@ public class FileListEntryEditor {
     public void setValues(FileListEntry entry) {
         description.setText(entry.getDescription());
         link.setText(entry.getLink());
-        types.setSelectedItem(entry.getType());
+        if (link.getText().length() > 0)
+            checkExtension();
+        types.setModel(new DefaultComboBoxModel(Globals.prefs.getExternalFileTypeSelection()));
+        types.setSelectedIndex(-1);
+        // See what is a reasonable selection for the type combobox:
+        if (entry.getType() != null)
+            types.setSelectedItem(entry.getType());
+        // If the entry has a link but not a file type, try to deduce the file type:
+        else if ((entry.getLink() != null) && (entry.getLink().length() > 0)) {
+            checkExtension();    
+        }
+
     }
 
     public void storeSettings(FileListEntry entry) {
         entry.setDescription(description.getText().trim());
-        entry.setLink(link.getText().trim());
+       // See if we should trim the file link to be relative to the file directory:
+       try {
+        String fileDir = metaData.getFileDirectory(GUIGlobals.FILE_FIELD);
+        if ((fileDir == null) ||(fileDir.equals(""))) {
+            entry.setLink(link.getText().trim());
+        } else {
+            String canPath = (new File(fileDir)).getCanonicalPath();
+            File fl = new File(link.getText().trim());
+            String flPath = fl.getCanonicalPath();
+            if ((flPath.length() > canPath.length()) && (flPath.startsWith(canPath))) {
+                String relFileName = fl.getCanonicalPath().substring(canPath.length()+1);
+                entry.setLink(relFileName);
+            } else
+                entry.setLink(link.getText().trim());
+        }
+    } catch (java.io.IOException ex)
+       { 
+               ex.printStackTrace();
+               // Don't think this should happen, but set the file link directly as a fallback:
+               entry.setLink(link.getText().trim());
+       }
+       
         entry.setType((ExternalFileType)types.getSelectedItem());
     }
 
index 42c4756..8e58789 100644 (file)
@@ -97,6 +97,7 @@ public class FileListTableModel extends AbstractTableModel {
         ArrayList newList = new ArrayList();
         StringBuilder sb = new StringBuilder();
         ArrayList thisEntry = new ArrayList();
+        boolean inXmlChar = false;
         boolean escaped = false;
         for (int i=0; i<value.length(); i++) {
             char c = value.charAt(i);
@@ -104,11 +105,23 @@ public class FileListTableModel extends AbstractTableModel {
                 escaped = true;
                 continue;
             }
+            // Check if we are entering an XML special character construct such
+            // as "&#44;", because we need to know in order to ignore the semicolon.
+            else if (!escaped && (c == '&') && !inXmlChar) {
+                sb.append(c);
+                if ((value.length() > i+1) && (value.charAt(i+1) == '#'))
+                    inXmlChar = true;
+            }
+            // Check if we are exiting an XML special character construct:
+            else if (!escaped && inXmlChar && (c == ';')) {
+                sb.append(c);
+                inXmlChar = false;
+            }
             else if (!escaped && (c == ':')) {
                 thisEntry.add(sb.toString());
                 sb = new StringBuilder();
             }
-            else if (!escaped && (c == ';')) {
+            else if (!escaped && (c == ';') && !inXmlChar) {
                 thisEntry.add(sb.toString());
                 sb = new StringBuilder();
                 if (firstOnly)
index 0c6dc01..ed59247 100644 (file)
@@ -153,6 +153,11 @@ public class MainTable extends JTable {
         refreshSorting();
     }
 
+
+    public boolean isShowingFloatSearch() {
+        return showingFloatSearch;
+    }
+
     /**
      * Removes sorting by group, and graying out of non-hits.
      */
index 172f5b9..82b7b94 100644 (file)
@@ -261,8 +261,10 @@ public class MainTableSelectionListener implements ListEventListener, MouseListe
                                         panel.metaData(), flEntry.getType());
                                 item.actionPerformed(null);
                             }
-                        } else
+                        } else {
                             Util.openExternalViewer(panel.metaData(), (String)link, fieldName);
+                        }
+
                     }
                     catch (IOException ex) {
                         panel.output(Globals.lang("Error") + ": " + ex.getMessage());
index d1ab52e..14c91de 100644 (file)
@@ -15,6 +15,8 @@ import net.sf.jabref.BibtexFields;
 
 /**
  * Importer for the Refer/Endnote format.
+ * modified to use article number for pages if pages are missing (some
+ * journals, e.g., Physical Review Letters, don't use pages anymore)
  *
  * check here for details on the format
  * http://www.ecst.csuchico.edu/~jacobsd/bib/formats/endnote.html
@@ -81,12 +83,13 @@ public class EndnoteImporter extends ImportFormat {
 
     String[] entries = sb.toString().split(ENDOFRECORD);
     HashMap hm = new HashMap();
-    String author = "", Type = "", editor = "";
+    String author = "", Type = "", editor = "", artnum = "";
     for (int i = 0; i < entries.length; i++){
         hm.clear();
         author = "";
         Type = "";
         editor = "";
+        artnum = "";
         boolean IsEditedBook = false;
         String[] fields = entries[i].trim().substring(1).split("\n%");
         //String lastPrefix = "";
@@ -161,7 +164,16 @@ public class EndnoteImporter extends ImportFormat {
         else if (prefix.equals("V")) hm.put("volume", val);
         else if (prefix.equals("N")) hm.put("number", val);
         else if (prefix.equals("U")) hm.put("url", val);
-        else if (prefix.equals("O")) hm.put("note", val);
+        else if (prefix.equals("O")) {
+           // Notes may contain Article number
+           if (val.startsWith("Artn")) {
+               String[] tokens = val.split("\\s");
+               artnum = tokens[1];
+           }
+           else {
+               hm.put("note", val);
+           }
+       }
         else if (prefix.equals("K")) hm.put("keywords", val);
         else if (prefix.equals("X")) hm.put("abstract", val);
         else if (prefix.equals("9")){
@@ -182,6 +194,10 @@ public class EndnoteImporter extends ImportFormat {
         //fixauthorscomma
         if (!author.equals("")) hm.put("author", fixAuthor(author));
         if (!editor.equals("")) hm.put("editor", fixAuthor(editor));
+        //if pages missing and article number given, use the article number
+        if (hm.get("pages").equals("-") && !artnum.equals(""))
+            hm.put("pages", artnum);
+
         BibtexEntry b = new BibtexEntry(BibtexFields.DEFAULT_BIBTEXENTRY_ID, Globals
                         .getEntryType(Type)); // id assumes an existing database so don't
         // create one here
index a3b89b9..ce4bf67 100644 (file)
@@ -1,44 +1,39 @@
 package net.sf.jabref.imports;
 
-import net.sf.jabref.net.URLDownload;
+import java.awt.BorderLayout;
+import java.io.*;
+import java.net.*;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import javax.swing.JCheckBox;
+import javax.swing.JOptionPane;
+import javax.swing.JPanel;
+
 import net.sf.jabref.*;
 import net.sf.jabref.gui.ImportInspectionDialog;
+import net.sf.jabref.journals.JournalAbbreviations;
 
-import javax.swing.*;
-import java.net.URL;
-import java.net.URLConnection;
-import java.net.URLEncoder;
-import java.net.MalformedURLException;
-import java.net.ConnectException;
-import java.io.*;
-import java.util.regex.Pattern;
-import java.util.regex.Matcher;
-import java.util.List;
-import java.util.ArrayList;
-import java.awt.*;
-
-/**
- * Created by IntelliJ IDEA.
- * User: alver
- * Date: Mar 25, 2006
- * Time: 1:09:32 PM
- * To change this template use File | Settings | File Templates.
- */
 public class IEEEXploreFetcher implements Runnable, EntryFetcher {
 
     ImportInspectionDialog dialog = null;
     JabRefFrame frame = null;
     HTMLConverter htmlConverter = new HTMLConverter();
+    JournalAbbreviations journalAbbrev = new JournalAbbreviations("/resource/IEEEJournalList.txt");
     private String terms;
     String startUrl = "http://ieeexplore.ieee.org";
-    String searchUrlPart = "/search/freesearchresult.jsp?queryText=";
-    String endUrl = "+%3Cin%3E+metadata&ResultCount=25&ResultStart=";
+    String searchUrlPart = "/search/freesearchresult.jsp?queryText=%28";
+    String endUrl = "%29+%3Cin%3E+metadata&ResultCount=25&ResultStart=";
     String risUrl = "http://ieeexplore.ieee.org/xpls/citationAct";
     private int perPage = 25, hits = 0, unparseable = 0, parsed = 0;
     private boolean shouldContinue = false;
     private JCheckBox fetchAstracts = new JCheckBox(Globals.lang("Include abstracts"), false);
     private boolean fetchingAbstracts = false;
-    private static final int MAX_ABSTRACT_FETCH = 5;
+    private boolean fetchRis = true;
+    //private static final int MAX_ABSTRACT_FETCH = 5;
+    private static final int MAX_RIS_FETCH = 25;
 
     public IEEEXploreFetcher() {
     }
@@ -47,7 +42,23 @@ public class IEEEXploreFetcher implements Runnable, EntryFetcher {
     //Pattern hitsPattern = Pattern.compile("Your search matched <strong>(\\d+)</strong>");
     Pattern hitsPattern = Pattern.compile(".*Your search matched <strong>(\\d+)</strong>.*");
     Pattern maxHitsPattern = Pattern.compile(".*A maximum of <strong>(\\d+)</strong>.*");
-    Pattern entryPattern1 = Pattern.compile(".*<strong>(.+)</strong><br>\\s+(.+)<br>"
+    Pattern paperEntryPattern = Pattern.compile(".*<strong>(.+)</strong><br>"
+                + "\\s+(.+)<br>"
+                + "\\s+<A href=.+>(.+)</A><br>"
+                + "\\s+(.+)\\s+(.+)\\s+(.+)\\s+(.+).*");
+    Pattern stdEntryPattern = Pattern.compile(".*<strong>(.+)</strong><br>"
+                + "\\s+(.+)");
+    Pattern volumePattern = Pattern.compile(".*Volume (\\d+),&nbsp;(.+)");
+    Pattern numberPattern = Pattern.compile(".*Issue (\\d+)</a>,&nbsp;(.+)");
+    Pattern partPattern = Pattern.compile(".*Part (\\d+),&nbsp;(.+)");
+    Pattern datePattern = Pattern.compile("(.*)\\s?(\\d{4}).*");
+    Pattern publicationPattern = Pattern.compile("(.*), \\d*\\.*\\s?(.*)");
+    Pattern proceedingPattern = Pattern.compile("(.*?)\\.?\\s?Proceedings\\s?(.*)");
+    Pattern conferencePattern = Pattern.compile("(.*)\\.\\s?(.*)");
+
+    String abbrvPattern = ".*[^,] '?\\d+\\)?";
+    Pattern acceptedPatterns = Pattern.compile("(.*) : (Accepted.*)");
+    /*Pattern entryPattern1 = Pattern.compile(".*<strong>(.+)</strong><br>\\s+(.+)<br>"
                 +"\\s+<A href='(.+)'>(.+)</A><br>\\s+Volume (.+),&nbsp;\\s*"
                 +"(.+)? (\\d\\d\\d\\d)\\s+Page\\(s\\):.*");
 
@@ -64,7 +75,7 @@ public class IEEEXploreFetcher implements Runnable, EntryFetcher {
     Pattern entryPattern4 = Pattern.compile(".*<strong>(.+)</strong><br>\\s+(.+)<br>"
                     +"\\s+<A href='(.+)'>(.+)</A><br>\\s*" //[\\s-\\da-z]+"
                     +"(.+)? (\\d\\d\\d\\d)\\s+Page\\(s\\):.*");
-
+    */
     Pattern abstractLinkPattern = Pattern.compile(
             "<a href=\"(.+)\" class=\"bodyCopySpaced\">Abstract</a>");
 
@@ -102,7 +113,7 @@ public class IEEEXploreFetcher implements Runnable, EntryFetcher {
     }
 
     public String getKeyName() {
-        return "Search IEEXplore";
+        return "Search IEEEXplore";
     }
 
     // This method is called by the dialog when the user has cancelled the import.
@@ -143,10 +154,28 @@ public class IEEEXploreFetcher implements Runnable, EntryFetcher {
 
             //dialog.setVisible(true);
             String page = getResults(url);
-            hits = getNumberOfHits(page, "Your search matched", hitsPattern);
+            //hits = getNumberOfHits(page, "Your search matched", hitsPattern);
 
             frame.unblock();
-            if (hits == 0) {
+            if (page.indexOf("You have entered an invalid search") >= 0) {
+                dialog.dispose();
+                JOptionPane.showMessageDialog(frame, Globals.lang("You have entered an invalid search '%0'.",
+                        terms),
+                        Globals.lang("Search IEEEXplore"), JOptionPane.INFORMATION_MESSAGE);
+                return;
+            }
+            
+            
+            
+            if (page.indexOf("No results") >= 0) {
+                dialog.dispose();
+                JOptionPane.showMessageDialog(frame, Globals.lang("No entries found for the search string '%0'",
+                        terms),
+                        Globals.lang("Search IEEEXplore"), JOptionPane.INFORMATION_MESSAGE);
+                return;
+            }
+            hits = getNumberOfHits(page, "Your search matched", hitsPattern);
+            /*if (hits == 0) {
                 dialog.dispose();
                 JOptionPane.showMessageDialog(frame, Globals.lang("No entries found for the search string '%0'",
                         terms),
@@ -164,6 +193,7 @@ public class IEEEXploreFetcher implements Runnable, EntryFetcher {
                 }
                 dialog.setVisible(true);
             }
+            */
 
             int maxHits = getNumberOfHits(page, "A maximum of", maxHitsPattern);
             //String page = getResultsFromFile(new File("/home/alver/div/temp50.txt"));
@@ -173,7 +203,25 @@ public class IEEEXploreFetcher implements Runnable, EntryFetcher {
             //System.out.println("Maximum returned: "+maxHits);
             if (hits > maxHits)
                 hits = maxHits;
-            //parse(dialog, page, 0, 51);
+            
+            fetchingAbstracts = fetchAstracts.isSelected();
+            
+            if (hits > MAX_RIS_FETCH) {
+                if (fetchingAbstracts == true) {
+                    JOptionPane.showMessageDialog(frame,
+                        Globals.lang("%0 entries found. To reduce server load, "
+                        +"only %1 will be downloaded.",
+                                new String[] {String.valueOf(hits), String.valueOf(MAX_RIS_FETCH)}),
+                        Globals.lang("Search IEEEXplore"), JOptionPane.INFORMATION_MESSAGE);
+                    fetchRis = true;
+                    hits = MAX_RIS_FETCH;
+                } else {
+                    fetchRis = false;
+                }
+            }
+            dialog.setVisible(true);
+
+           //parse(dialog, page, 0, 51);
             //dialog.setProgress(perPage/2, hits);
             parse(dialog, page, 0, 1);
             int firstEntry = perPage;
@@ -218,7 +266,7 @@ public class IEEEXploreFetcher implements Runnable, EntryFetcher {
     private void parse(ImportInspectionDialog dialog, String text, int startIndex, int firstEntryNumber) {
         piv = startIndex;
         int entryNumber = firstEntryNumber;
-        List entries = new ArrayList();
+        List<BibtexEntry> entries = new ArrayList<BibtexEntry>();
         BibtexEntry entry;
         while (((entry = parseNextEntry(text, piv, entryNumber)) != null)
             && (shouldContinue)) {
@@ -236,7 +284,7 @@ public class IEEEXploreFetcher implements Runnable, EntryFetcher {
 
     }
 
-    private BibtexEntry parseEntryRis(String number)
+    private BibtexEntry parseEntryRis(String number, boolean abs, boolean isStandard)
         throws IOException
     {
         URL url;
@@ -254,22 +302,177 @@ public class IEEEXploreFetcher implements Runnable, EntryFetcher {
                 "application/x-www-form-urlencoded");
         PrintWriter out = new PrintWriter(
                 conn.getOutputStream());
+        String cite = "cite";
+        if (abs == true)
+            cite = "cite_abs";
         out.write(
-                "fileFormate=ris&arnumber="+
+                "fileFormate=ris&dlSelect="+cite+"&arnumber="+
                 URLEncoder.encode(
                     "<arnumber>"+number+"</arnumber>",
                     "UTF-8"));
         out.flush();
         out.close();
         InputStream inp = conn.getInputStream();
-        List items = new RisImporter().importEntries(inp);
+        List<BibtexEntry> items = new RisImporter().importEntries(inp);
         inp.close();
-        if (items.size() > 0)
-            return (BibtexEntry)items.get(0);
-        else
+        if (items.size() > 0) {
+            //return items.get(0);
+            BibtexEntry entry = items.get(0);
+            if (isStandard == true) {
+                entry.setType(BibtexEntryType.getType("standard"));
+                entry.setField("organization", "IEEE");
+                String stdNumber = (String)entry.getField("journal");
+                String[] parts = stdNumber.split("Std ");
+                if (parts.length == 2) {
+                    stdNumber = parts[1];
+                    parts = stdNumber.split(", ");
+                    if (parts.length == 2) {
+                        stdNumber = parts[0];
+                        String date = parts[1];
+                        parts = date.split(" ");
+                        if (parts.length == 2) {
+                            entry.setField("month", parts[0]);
+                        }
+                    }
+                    entry.setField("number", stdNumber);
+                }
+                entry.clearField("journal");
+                entry.clearField("booktitle");
+                
+                String title = (String)entry.getField("title");
+                entry.setField("title", title);
+            }
+            return entry;
+        } else
             return null;
     }
 
+    private BibtexEntry cleanup(BibtexEntry entry) {
+        if (entry == null)
+            return null;
+        if (entry.getType().getName() == "Standard")
+            return entry;
+        // clean up month
+        String month = (String)entry.getField("month");
+        // hash or map TODO
+        entry.setField("month", month);
+        // clean up publication field
+        
+        BibtexEntryType type = entry.getType();
+        String sourceField;
+        if (type.getName() == "Article") {
+            sourceField = "journal";
+            entry.clearField("booktitle");
+        } else {
+            sourceField = "booktitle";
+        }
+        String fullName = (String)entry.getField(sourceField);
+        if (fullName == null) {
+            System.err.println("Null publication");
+            return null;
+        }
+        
+        //System.out.println(fullName);
+        
+        if (type.getName() == "Article") {
+            String[] parts = fullName.split("[\\[\\]]"); //[see also...], [legacy...]
+            fullName = parts[0];
+            if (parts.length == 3) {
+                fullName += parts[2];
+            }
+        } else {
+            fullName = fullName.replace("Conference Proceedings", "Proceedings").replace("Proceedings of", "Proceedings").replace("  ", ". ").replace("Proceedings.", "Proceedings");
+        }
+        
+        //System.out.println(fullName);
+        
+        Matcher m1 = publicationPattern.matcher(fullName);
+        if (m1.find()) {
+            String prefix = m1.group(2).trim();
+            String postfix = m1.group(1).trim();
+            String abbrv = "";
+            String[] parts = prefix.split("\\. ", 2);
+            if (parts.length == 2) {
+                if (parts[0].matches(abbrvPattern)) {
+                    prefix = parts[1];
+                    abbrv = parts[0];
+                } else {
+                    prefix = parts[0];
+                    abbrv = parts[1];
+                }
+        //        System.out.println(prefix);
+            }
+            if (prefix.matches(abbrvPattern) == false) {
+                fullName = prefix + " " + postfix + " " + abbrv;
+                fullName = fullName.trim();
+            } else {
+                fullName = postfix + " " + prefix;
+            }
+//            if (m1.group(3).trim() == "")
+    //            fullName = m1.group(2).trim() + " " + m1.group(1).trim();
+        //    else {
+            //    System.out.println(m1.group(3));
+                //fullName = m1.group(3).trim() + " " + m1.group(1).trim() + " " + m1.group(2).trim();
+            //}
+        }
+        //System.out.println(fullName);
+        if (type.getName() == "Article") {
+            fullName = fullName.replace("- ", "-"); //IEE Proceedings-
+            Matcher m2 = acceptedPatterns.matcher(fullName);
+            if (m2.find()) {
+                fullName = m2.group(1);
+                entry.setField("note", m2.group(2));
+            }
+            fullName = fullName.trim();
+            String id = journalAbbrev.getAbbreviatedName(fullName, false);
+            if (id != null)
+                fullName = id;
+        } else {
+            
+            Matcher m2 = proceedingPattern.matcher(fullName);
+            if (m2.find()) {
+                String prefix = m2.group(2); 
+                String postfix = m2.group(1).replaceAll("\\.$", "");
+                if (prefix.matches(abbrvPattern) == false) {
+                    String abbrv = "";
+                
+                    String[] parts = postfix.split("\\. ", 2);
+                    if (parts.length == 2) {
+                        if (parts[0].matches(abbrvPattern)) {
+                            postfix = parts[1];
+                            abbrv = parts[0];
+                        } else {
+                            postfix = parts[0];
+                            abbrv = parts[1];
+                        }
+                        //System.out.println(postfix);
+                    }
+                    fullName = prefix.trim() + " " + postfix.trim() + " " + abbrv;
+                    
+                } else {
+                    fullName = postfix.trim() + " " + prefix.trim();
+                }
+                
+            }
+            
+            //System.out.println(fullName);
+            
+            fullName = fullName.trim();
+            
+            fullName = fullName.replaceAll("^[tT]he ", "").replaceAll("^\\d{4} ", "").replaceAll("[,.]$", "");
+            String year = (String)entry.getField("year");
+            fullName = fullName.replaceAll(", " + year + "\\.?", "");
+            //System.out.println(fullName);
+            
+            if (fullName.contains("Abstract") == false && fullName.contains("Summaries") == false && fullName.contains("Conference Record") == false)
+                fullName = "Proc. " + fullName;
+            
+        }
+        
+        entry.setField(sourceField, fullName);
+        return entry;
+    }
+
     private BibtexEntry parseNextEntry(String allText, int startIndex, int entryNumber)
     {
         BibtexEntry entry = null;
@@ -283,6 +486,7 @@ public class IEEEXploreFetcher implements Runnable, EntryFetcher {
         if (index >= 0) {
             piv = index+1;
             String text = allText.substring(index, endIndex);
+            /*
             // Fetching abstracts takes time, and causes a lot
             // of requests, so this should be optional or disabled:
             if (fetchingAbstracts) {
@@ -308,27 +512,121 @@ public class IEEEXploreFetcher implements Runnable, EntryFetcher {
                 }
                 return entry;
             }
-            BibtexEntryType type;
-            String sourceField;
-            if (text.indexOf("IEEE JNL") >= 0) {
+            */
+            BibtexEntryType type = null;
+            String sourceField = null;
+            if (text.indexOf("JNL") >= 0) {
                 type = BibtexEntryType.getType("article");
                 sourceField = "journal";
-            } else {
+            } else if (text.indexOf("CNF") >= 0){
                 type = BibtexEntryType.getType("inproceedings");
                 sourceField = "booktitle";
+            } else if (text.indexOf("STD") >= 0) {
+                type = BibtexEntryType.getType("Standard");
+            } else {
+                System.err.println("Type detection failed.");
+            }
+            if (fetchRis == true) {
+                Matcher number =
+                    ieeeArticleNumberPattern.matcher(text);
+                if (number.find()) {
+                    try {
+                        entry = parseEntryRis(number.group(1), fetchingAbstracts, type.getName() == "Standard");
+                    } catch (IOException e) {
+                        e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
+                    }
+                }
+                if (entry != null) { // fetch successful
+                    // we just need to add DOI, it is not included in RIS.
+                    int pgInd = text.indexOf("Digital Object Identifier ");
+                    if (pgInd >= 0) {
+                        int fieldEnd = text.indexOf("<br>", pgInd);
+                        if (fieldEnd >= 0) {
+                            entry.setField("doi",
+                                text.substring(pgInd+26, fieldEnd).trim());
+                        }
+                    }
+                    return cleanup(entry);
+                }
             }
 
             index = 0;
             entry = new BibtexEntry(Util.createNeutralId(), type);
             //System.out.println(text);
-            Matcher m1 = entryPattern1.matcher(text);
+            /*Matcher m1 = entryPattern1.matcher(text);
             Matcher m2 = entryPattern2.matcher(text);
             Matcher m3 = entryPattern3.matcher(text);
             Matcher m4 = entryPattern4.matcher(text);
-            Matcher m;
+            */
+            if (type.getName() == "Standard") {
+                Matcher mstd = stdEntryPattern.matcher(text);
+                if (mstd.find()) {
+                    entry.setField("title", convertHTMLChars(mstd.group(1)));
+                    entry.setField("year", convertHTMLChars(mstd.group(2)));
+                    entry.setField("organization", "IEEE");
+                    return entry;
+                }
+                System.err.println("Standard entry parsing failed.");
+            }
+            Matcher m = paperEntryPattern.matcher(text);
             String tmp;
             String rest = "";
-            if (m1.find()) {
+            if (m.find()) {
+                // Title:
+                entry.setField("title", convertHTMLChars(m.group(1)));
+                // Author:
+                tmp = convertHTMLChars(m.group(2));
+                if (tmp.charAt(tmp.length()-1) == ';')
+                    tmp= tmp.substring(0, tmp.length()-1);
+                entry.setField("author", tmp.replaceAll("; ", " and "));
+                // Publication:
+                tmp = m.group(3);
+                String fullName = convertHTMLChars(tmp);
+                entry.setField(sourceField, fullName);
+                // Volume, Issue, Part, Month, Year, Pages
+                String misc = m.group(4);
+                for (int i = 5; i < 8; i++) {
+                    tmp = m.group(i);
+                    if (tmp.startsWith("Page") == false)
+                        misc += tmp; 
+                    else
+                        break;
+                }
+                //System.out.println(misc);
+                Matcher ms1 = volumePattern.matcher(misc);
+                if (ms1.find()) {
+                    // Volume:
+                    entry.setField("volume", convertHTMLChars(ms1.group(1)));
+                    misc = ms1.group(2);
+                }
+                
+                Matcher ms2 = numberPattern.matcher(misc);
+                if (ms2.find()) {
+                    // Number:
+                    entry.setField("number", convertHTMLChars(ms2.group(1)));
+                    misc = ms2.group(2);
+                }
+                //System.out.println(misc);
+                Matcher ms3 = partPattern.matcher(misc);
+                if (ms3.find()) {
+                    entry.setField("part", ms3.group(1));
+                    misc = ms3.group(2);
+                }
+                //System.out.println(misc);
+                Matcher ms4 = datePattern.matcher(misc);
+                if (ms4.find()) {
+                    // Month:
+                    entry.setField("month", convertHTMLChars(ms4.group(1)).replaceAll("-", "--"));
+                    // Year
+                    entry.setField("year", ms4.group(2));
+                } else {
+                      Matcher ms5 = datePattern.matcher(fullName);
+                    if (ms5.find()) {
+                        entry.setField("year", ms5.group(2));
+                    }
+                }
+            }
+            /*if (m1.find()) {
                 m = m1;
                 // Title:
                 entry.setField("title", convertHTMLChars(m.group(1)));
@@ -409,10 +707,12 @@ public class IEEEXploreFetcher implements Runnable, EntryFetcher {
                 // Year
                 entry.setField("year", m.group(6));
 
-            } else {
+            }*/
+               else {
                 System.err.println("---no structure match---");
                 System.err.println(text);
                 unparseable++;
+                return null;
             }
             int pgInd = text.indexOf("Page(s):");
             if (pgInd >= 0) {
@@ -421,6 +721,12 @@ public class IEEEXploreFetcher implements Runnable, EntryFetcher {
                 pgInd = rest.indexOf("<br>");
                 if (pgInd >= 0) {
                     tmp = rest.substring(0, pgInd);
+                    pgInd = tmp.indexOf("vol");
+                    if (pgInd >= 0)
+                        tmp = tmp.substring(0,pgInd);
+                    pgInd = tmp.indexOf("Vol");
+                    if (pgInd >= 0)
+                        tmp = tmp.substring(0,pgInd);
                     entry.setField("pages", tmp.replaceAll("\\s+", "").replaceAll("-","--"));
                 }
                 // Try to set doi:
@@ -434,7 +740,7 @@ public class IEEEXploreFetcher implements Runnable, EntryFetcher {
             }
 
 
-            return entry;
+            return cleanup(entry);
         }
         return null;
     }
index 18a489b..d625383 100644 (file)
@@ -226,9 +226,9 @@ public class MedlineFetcher extends SidePaneComponent implements Runnable,
         bibItems = handler.getItems();
 
     }
-    catch(javax.xml.parsers.ParserConfigurationException e1){}
-    catch(org.xml.sax.SAXException e2){}
-    catch(java.io.IOException e3){}
+    catch(javax.xml.parsers.ParserConfigurationException e1){ e1.printStackTrace(); }
+    catch(org.xml.sax.SAXException e2){ e2.printStackTrace(); }
+    catch(java.io.IOException e3){ e3.printStackTrace(); }
     return bibItems;
 }
 
index cd8690e..122a36b 100644 (file)
@@ -85,44 +85,21 @@ public class OvidImporter extends ImportFormat {
             int linebreak = fields[j].indexOf('\n');
             String fieldName = fields[j].substring(0, linebreak).trim();
             String content = fields[j].substring(linebreak).trim();
-            // Remove unnecessary dots at the end of lines:
-            if (content.endsWith("."))
+
+            // Check if this is the author field (due to a minor special treatment for this field):
+            boolean isAuthor = fieldName.indexOf("Author") == 0
+                && fieldName.indexOf("Author Keywords") == -1
+                && fieldName.indexOf("Author e-mail") == -1;
+
+            // Remove unnecessary dots at the end of lines, unless this is the author field,
+            // in which case a dot at the end could be significant:
+            if (!isAuthor && content.endsWith("."))
                     content = content.substring(0, content.length()-1);
             //fields[j] = fields[j].trim();
-            if (fieldName.indexOf("Author") == 0
-                && fieldName.indexOf("Author Keywords") == -1
-                && fieldName.indexOf("Author e-mail") == -1){
+            if (isAuthor) {
 
                 h.put("author", content);
-                /*if (content.indexOf(";") > 0){ //LN FN; [LN FN;]*
-                    names = content.replaceAll("[^\\.A-Za-z,;\\- ]", "").replaceAll(";", " and");
-                }else{// LN FN. [LN FN.]*
-                    //author = content.replaceAll("\\.", " and").replaceAll(" and$", "");
-                    names = content;
-                }
-
-                StringBuffer buf = new StringBuffer();
-                for (int ii=0; ii<names.length; ii++) {
-                    names[ii] = names[ii].trim();
-                    int space = names[ii].indexOf(' ');
-                    if (space >= 0) {
-                        buf.append(names[ii].substring(0, space));
-                        buf.append(',');
-                        buf.append(names[ii].substring(space));
-                    } else {
-                        buf.append(names[ii]);
-                    }
-
-                    buf.append()
-                    if (ii < names.length-1)
-                        buf.append(" and ");
-                }
-                h.put("author", AuthorList.fixAuthor_lastNameFirst(names));  */
-
-                //    author = content.replaceAll("  ", " and ").replaceAll(" and $", "");
-
-
-            //h.put("author", ImportFormatReader.fixAuthor_lastNameFirst(author));
+
 
         }else if (fieldName.indexOf("Title") == 0) {
                 content = content.replaceAll("\\[.+\\]", "").trim();
@@ -179,7 +156,6 @@ public class OvidImporter extends ImportFormat {
             }
 
         } else if (fieldName.equals("Abstract")) {
-                //System.out.println("'"+content+"'");
                 h.put("abstract", content);
 
         } else if (fieldName.equals("Publication Type")) {
@@ -187,6 +163,8 @@ public class OvidImporter extends ImportFormat {
                 h.put("entrytype", "book");
              else if (content.indexOf("Journal") >= 0)
                 h.put("entrytype", "article");
+             else if (content.indexOf("Conference Paper") >= 0)
+                h.put("entrytype", "inproceedings");
         }
         }
 
@@ -229,10 +207,23 @@ public class OvidImporter extends ImportFormat {
     return bibitems;
     }
 
+    /**
+     * Convert a string of author names into a BibTeX-compatible format.
+     * @param content The name string.
+     * @return The formatted names.
+     */
     private String fixNames(String content) {
         String names;
         if (content.indexOf(";") > 0){ //LN FN; [LN FN;]*
             names = content.replaceAll("[^\\.A-Za-z,;\\- ]", "").replaceAll(";", " and");
+        } else if (content.indexOf("  ") > 0) {
+            String[] sNames = content.split("  ");
+            StringBuilder sb = new StringBuilder();
+            for (int i = 0; i < sNames.length; i++) {
+                if (i > 0) sb.append(" and ");
+                sb.append(sNames[i].replaceFirst(" ", ", "));
+            }
+            names = sb.toString();
         } else
             names = content;
         return AuthorList.fixAuthor_lastNameFirst(names);
index 51f1905..5c0cb9b 100644 (file)
@@ -179,11 +179,13 @@ public class ManageJournalsPanel extends JPanel{
             }
         });
         help.addActionListener(new HelpAction(Globals.helpDiag, GUIGlobals.journalAbbrHelp));
-        cancel.addActionListener(new ActionListener() {
-                    public void actionPerformed(ActionEvent e) {
-                        dialog.dispose();
-                    }
-                });
+
+        AbstractAction cancelAction = new AbstractAction() {
+            public void actionPerformed(ActionEvent e) {
+                dialog.dispose();
+            }
+        };
+        cancel.addActionListener(cancelAction);
 
         add.addActionListener(tableModel);
         remove.addActionListener(tableModel);
@@ -194,6 +196,12 @@ public class ManageJournalsPanel extends JPanel{
             }
         });
 
+        // Key bindings:
+        ActionMap am = getActionMap();
+        InputMap im = getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW);
+        im.put(Globals.prefs.getKey("Close dialog"), "close");
+        am.put("close", cancelAction);
+
         //dialog.pack();
         int xSize = getPreferredSize().width;
         dialog.setSize(xSize+10,700);
index 43d457a..d9176d4 100644 (file)
@@ -177,6 +177,10 @@ public class LabelPatternUtil {
                   else if (val.equals("authors")) {
                     _sbvalue.append(allAuthors(authString));
                   }
+                  // Last author's last name
+                  else if (val.equals("authorLast")) {
+                     _sbvalue.append(lastAuthor(authString));
+                  }
                   else if (val.equals("authorIni")) {
                     _sbvalue.append(oneAuthorPlusIni(authString));
                   }
@@ -251,6 +255,10 @@ public class LabelPatternUtil {
                       num = fa.length();
                     _sbvalue.append(fa.substring(0,num));
                   }
+                  // Last editor's last name
+                  else if (val.equals("editorLast")) {
+                      _sbvalue.append(lastAuthor((String)(_entry.getField("editor"))));
+                  }
                   else {
                     // This "ed" business was a dead end, so just use it literally:
                     _sbvalue.append(_entry.getField(val).toString());
@@ -259,6 +267,7 @@ public class LabelPatternUtil {
                 else if (val.equals("firstpage")) {
                   _sbvalue.append(firstPage(_entry.getField("pages").toString()));
                 }
+
                 else if (val.equals("lastpage")) {
                   _sbvalue.append(lastPage(_entry.getField("pages").toString()));
                 }
@@ -518,18 +527,31 @@ public class LabelPatternUtil {
    * @return the sur name of an author/editor
    */
   private static String firstAuthor(String authorField) {
-    String author = "";
-    // This code was part of 'ApplyRule' in 'ArticleLabelRule'
-    //String[] tokens = ImportFormatReader.fixAuthor_lastNameFirst(authorField).split("\\band\\b");
-      String[] tokens = AuthorList.fixAuthorForAlphabetization(authorField).split("\\band\\b");
+    String[] tokens = AuthorList.fixAuthorForAlphabetization(authorField).split("\\band\\b");
     if (tokens.length > 0) { // if author is empty
       String[] firstAuthor = tokens[0].replaceAll("\\s+", " ").split(" ");
-      author += firstAuthor[0];
+      return firstAuthor[0];
 
     }
-    return author;
+    else return "";
   }
 
+    /**
+       * Gets the last name of the last author/editor
+       * @param authorField a <code>String</code>
+       * @return the sur name of an author/editor
+       */
+      private static String lastAuthor(String authorField) {
+        String[] tokens = AuthorList.fixAuthorForAlphabetization(authorField).split("\\band\\b");
+        if (tokens.length > 0) { // if author is empty
+          String[] lastAuthor = tokens[tokens.length-1].replaceAll("\\s+", " ").trim().split(" ");
+          return lastAuthor[0];
+
+        }
+        else return "";
+      }
+
+
   /**
    * Gets the last name of all authors/editors
    * @param authorField a <code>String</code>
index bec7097..099e22f 100644 (file)
@@ -13,6 +13,7 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
 import java.net.URL;
+import java.net.URLConnection;
 
 import javax.swing.ProgressMonitorInputStream;
 
@@ -33,7 +34,9 @@ public class URLDownload {
     }
     
     public void download() throws IOException {
-        InputStream input = new BufferedInputStream(source.openStream());
+        URLConnection con = source.openConnection();
+        con.setRequestProperty("User-Agent", "Jabref");
+       InputStream input = new BufferedInputStream(con.getInputStream());
         OutputStream output =  new BufferedOutputStream(new FileOutputStream(dest));
      
         try
index 0ab1e77..4bfea21 100644 (file)
@@ -108,13 +108,19 @@ public class MassSetFieldAction extends MnemonicAwareAction {
             }
         });
 
-        cancel.addActionListener(new ActionListener() {
-           public void actionPerformed(ActionEvent e) {
-                cancelled = true;
-                diag.dispose();
-            }
-        });
-
+        AbstractAction cancelAction = new AbstractAction() {
+                public void actionPerformed(ActionEvent e) {
+                    cancelled = true;
+                    diag.dispose();
+                }
+            };
+        cancel.addActionListener(cancelAction);
+
+        // Key bindings:
+        ActionMap am = builder.getPanel().getActionMap();
+        InputMap im = builder.getPanel().getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW);
+        im.put(Globals.prefs.getKey("Close dialog"), "close");
+        am.put("close", cancelAction);
     }
 
     private void prepareDialog(boolean selection) {
index 8babf5a..8028c75 100644 (file)
@@ -261,7 +261,7 @@ public class XMPSchemaBibtex extends XMPSchema {
                
                JabRefPreferences prefs = JabRefPreferences.getInstance();
                if (prefs.getBoolean("useXmpPrivacyFilter")) {
-                       TreeSet<String> filters = new TreeSet<String>(Arrays.asList(prefs.getStringArray("xmpPrivacyFilter")));
+                       TreeSet<String> filters = new TreeSet<String>(Arrays.asList(prefs.getStringArray("xmpPrivacyFilters")));
                        results = new Object[fields.length];
                        resultsSize = 0;
                        for (int i = 0; i < fields.length; i++) {
diff --git a/src/resource/IEEEJournalList.txt b/src/resource/IEEEJournalList.txt
new file mode 100644 (file)
index 0000000..958ec93
--- /dev/null
@@ -0,0 +1,330 @@
+IEEE Journals
+
+
+
+aerospace and military
+IEEE Transactions on Aerospace and Electronic Systems=#IEEE_J_AES#
+IEEE Transactions on Aerospace and Navigational Electronics=#IEEE_J_ANE#
+IEEE Transactions on Aeronautical and Navigational Electronics=#IEEE_J_ANNE#
+IEEE Transactions on Aerospace=#IEEE_J_AS#
+IEEE Transactions on Airborne Electronics=#IEEE_J_AIRE#
+IEEE Transactions on Military Electronics=#IEEE_J_MIL#
+
+
+
+autos, transportation and vehicles (non-aerospace)
+IEEE Transactions on Intelligent Transportation Systems=#IEEE_J_ITS#
+IEEE Transactions on Vehicular Technology=#IEEE_J_VT#
+IEEE Transactions on Vehicular Communications=#IEEE_J_VC#
+
+
+
+circuits, signals, systems, audio and controls
+IEEE Signal Processing Letters=#IEEE_J_SPL#
+IEEE Transactions on Acoustics, Speech, and Signal Processing=#IEEE_J_ASSP#
+IEEE Transactions on Audio=#IEEE_J_AU#
+IEEE Transactions on Audio and Electroacoustics=#IEEE_J_AUEA#
+IEEE Transactions on Automatic Control=#IEEE_J_AC#
+IEEE Transactions on Circuits and Systems=#IEEE_J_CAS#
+IEEE Transactions on Circuits and Systems for Video Technology=#IEEE_J_CASVT#
+IEEE Transactions on Circuits and Systems I: Fundamental Theory and Applications=#IEEE_J_CASI#
+IEEE Transactions on Circuits and Systems II: Analog and Digital Signal Processing=#IEEE_J_CASII#
+in 2004 CASI and CASII renamed part title to CASI_RP and CASII_EB, respectively.
+IEEE Transactions on Circuits and Systems I: Regular Papers=#IEEE_J_CASI_RP#
+IEEE Transactions on Circuits and Systems II: Express Briefs=#IEEE_J_CASII_EB#
+IEEE Transactions on Circuit Theory=#IEEE_J_CT#
+IEEE Transactions on Control Systems Technology=#IEEE_J_CST#
+IEEE Transactions on Signal Processing=#IEEE_J_SP#
+IEEE Transactions on Sonics and Ultrasonics=#IEEE_J_SU#
+IEEE Transactions on Speech and Audio Processing=#IEEE_J_SAP#
+IEEE Transactions on Ultrasonics Engineering=#IEEE_J_UE#
+Aaron Chen: "," missing
+IEEE Transactions on Ultrasonics, Ferroelectrics and Frequency Control=#IEEE_J_UFFC#
+IEEE Transactions on Ultrasonics, Ferroelectrics, and Frequency Control=#IEEE_J_UFFC#
+
+
+
+communications
+IEEE Communications Letters=#IEEE_J_COML#
+IEEE Journal on Selected Areas in Communications=#IEEE_J_JSAC#
+IEEE Transactions on Communications=#IEEE_J_COM#
+IEEE Transactions on Communication Technology=#IEEE_J_COMT#
+IEEE Transactions on Wireless Communications=#IEEE_J_WCOM#
+
+
+
+components, packaging and manufacturing
+IEEE Transactions on Advanced Packaging=#IEEE_J_ADVP#
+IEEE Transactions on Components, Hybrids and Manufacturing Technology=#IEEE_J_CHMT#
+IEEE Transactions on Components, Packaging and Manufacturing Technology, Part A=#IEEE_J_CPMTA#
+IEEE Transactions on Components, Packaging and Manufacturing Technology, Part B: Advanced Packaging=#IEEE_J_CPMTB#
+IEEE Transactions on Components, Packaging and Manufacturing Technology, Part C: Manufacturing=#IEEE_J_CPMTC#
+IEEE Transactions on Components and Packaging Technology=#IEEE_J_CAPT#
+IEEE Transactions on Components and Packaging Technologies=#IEEE_J_CAPTS#
+IEEE Transactions on Component Parts=#IEEE_J_CPART#
+IEEE Transactions on Electronics Packaging Manufacturing=#IEEE_J_EPM#
+IEEE Transactions on Manufacturing Technology=#IEEE_J_MFT#
+IEEE Transactions on Parts, Hybrids and Packaging=#IEEE_J_PHP#
+IEEE Transactions on Parts, Materials and Packaging=#IEEE_J_PMP#
+
+
+
+CAD
+IEEE Journal on Technology in Computer Aided Design=#IEEE_J_TCAD#
+IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems=#IEEE_J_CAD#
+
+
+
+coding, data, information, knowledge
+IEEE Transactions on Information Theory=#IEEE_J_IT#
+IEEE Transactions on Knowledge and Data Engineering=#IEEE_J_KDE#
+
+
+
+computers, computation, networking and software
+Aaron Chen:
+Transactions on Computers=#IEEE_J_C#
+IEEE Transactions on Computers=#IEEE_J_C#
+IEEE Computer Architecture Letters=#IEEE_J_CAL#
+IEEE Transactions on Dependable and Secure Computing=#IEEE_J_DSC#
+IEEE Transactions on Electronic Computers=#IEEE_J_ECOMP#
+IEEE Transactions on Evolutionary Computation=#IEEE_J_EVC#
+IEEE Transactions on Fuzzy Systems=#IEEE_J_FUZZ#
+IEEE Transactions on Information Forensics and Security=#IEEE_J_IFS#
+IEEE Transactions on Mobile Computing=#IEEE_J_MC#
+IEEE/ACM Transactions on Networking=#IEEE_J_NET#
+IEEE Transactions on Neural Networks=#IEEE_J_NN#
+IEEE Transactions on Parallel and Distributed Systems=#IEEE_J_PDS#
+IEEE Transactions on Software Engineering=#IEEE_J_SE#
+
+
+
+computer graphics, imaging, and multimedia
+IEEE/OSA Journal of Display Technology=#IEEE_J_JDT#
+IEEE Transactions on Image Processing=#IEEE_J_IP#
+IEEE Transactions on Multimedia=#IEEE_J_MM#
+IEEE Transactions on Visualization and Computer Graphics=#IEEE_J_VCG#
+
+
+
+cybernetics, ergonomics, robots, man-machine, and automation
+IEEE Transactions on Automation Science and Engineering=#IEEE_J_ASE#
+IEEE Journal of Robotics and Automation=#IEEE_J_JRA#
+IEEE Transactions on Human Factors in Electronics=#IEEE_J_HFE#
+IEEE Transactions on Man-Machine Systems=#IEEE_J_MMS#
+IEEE Transactions on Pattern Analysis and Machine Intelligence=#IEEE_J_PAMI#
+in 1989 JRA became RA
+in August 2004, RA split into ASE and RO
+IEEE Transactions on Robotics and Automation=#IEEE_J_RA#
+IEEE Transactions on Robotics=#IEEE_J_RO#
+IEEE Transactions on Systems, Man, and Cybernetics=#IEEE_J_SMC#
+IEEE Transactions on Systems, Man, and Cybernetics, Part A: Systems and Humans=#IEEE_J_SMCA#
+IEEE Transactions on Systems, Man, and Cybernetics, Part B: Cybernetics=#IEEE_J_SMCB#
+IEEE Transactions on Systems, Man, and Cybernetics, Part C: Applications and Reviews=#IEEE_J_SMCC#
+IEEE Transactions on Systems Science and Cybernetics=#IEEE_J_SSC#
+
+
+
+earth, wind, fire and water
+IEEE Transactions on Geoscience Electronics=#IEEE_J_GE#
+IEEE Transactions on Geoscience and Remote Sensing=#IEEE_J_GRS#
+IEEE Geoscience and Remote Sensing Letters=#IEEE_J_GRSL#
+IEEE Journal of Oceanic Engineering=#IEEE_J_OE#
+
+
+
+education, engineering, history, IEEE, professional
+Canadian Journal of Electrical and Computer Engineering=#IEEE_J_CJECE#
+Proceedings of the IEEE=#IEEE_J_PROC#
+IEEE Transactions on Education=#IEEE_J_EDU#
+IEEE Transactions on Engineering Management=#IEEE_J_EM#
+IEEE Transactions on Engineering Writing and Speech=#IEEE_J_EWS#
+IEEE Transactions on Professional Communication=#IEEE_J_PC#
+
+
+
+electromagnetics, antennas, EMI, magnetics and microwave
+IEEE Antennas and Wireless Propagation Letters=#IEEE_J_AWPL#
+IEEE Microwave and Guided Wave Letters=#IEEE_J_MGWL#
+IEEE Microwave and Wireless Components Letters=#IEEE_J_MWCL#
+IEEE Transactions on Antennas and Propagation=#IEEE_J_AP#
+IEEE Transactions on Electromagnetic Compatibility=#IEEE_J_EMC#
+IEEE Transactions on Magnetics=#IEEE_J_MAG#
+IEEE Transactions on Microwave Theory and Techniques=#IEEE_J_MTT#
+IEEE Transactions on Radio Frequency Interference=#IEEE_J_RFI#
+IEEE Translation Journal on Magnetics in Japan=#IEEE_J_TJMJ#
+
+
+
+energy and power
+IEEE Transactions on Energy Conversion=#IEEE_J_EC#
+IEEE Power Electronics Letters=#IEEE_J_PEL#
+IEEE Transactions on Power Apparatus and Systems=#IEEE_J_PWRAS#
+IEEE Transactions on Power Delivery=#IEEE_J_PWRD#
+IEEE Transactions on Power Electronics=#IEEE_J_PWRE#
+IEEE Transactions on Power Systems=#IEEE_J_PWRS#
+
+
+
+industrial, commercial and consumer
+IEEE Transactions on Applications and Industry=#IEEE_J_APPIND#
+IEEE Transactions on Broadcasting=#IEEE_J_BC#
+IEEE Transactions on Broadcast and Television Receivers=#IEEE_J_BCTV#
+IEEE Transactions on Consumer Electronics=#IEEE_J_CE#
+IEEE Transactions on Industrial Electronics=#IEEE_J_IE#
+IEEE Transactions on Industrial Electronics and Control Instrumentation=#IEEE_J_IECI#
+IEEE Transactions on Industry Applications=#IEEE_J_IA#
+IEEE Transactions on Industry and General Applications=#IEEE_J_IGA#
+IEEE Transactions on Industrial Informatics=#IEEE_J_IINF#
+IEEE Journal of Product Safety Engineering=#IEEE_J_PSE#
+
+
+
+instrumentation and measurement
+IEEE Transactions on Instrumentation and Measurement=#IEEE_J_IM#
+
+
+
+insulation and materials
+IEEE/TMS Journal of Electronic Materials=#IEEE_J_JEM#
+IEEE Transactions on Dielectrics and Electrical Insulation=#IEEE_J_DEI#
+IEEE Transactions on Electrical Insulation=#IEEE_J_EI#
+
+
+
+mechanical
+IEEE/ASME Transactions on Mechatronics=#IEEE_J_MECH#
+IEEE/ASME Journal of Microelectromechanical Systems=#IEEE_J_MEMS#
+
+
+
+medical and biological
+IEEE Transactions on Biomedical Engineering=#IEEE_J_BME#
+Note: The B-ME journal later dropped the hyphen and became the BME.
+IEEE Transactions on Bio-Medical Engineering=#IEEE_J_B-ME#
+IEEE Transactions on Bio-Medical Electronics=#IEEE_J_BMELC#
+IEEE/ACM Transactions on Computational Biology and Bioinformatics=#IEEE_J_CBB#
+IEEE Transactions on Information Technology in Biomedicine=#IEEE_J_ITBM#
+IEEE Transactions on Medical Electronics=#IEEE_J_ME#
+IEEE Transactions on Medical Imaging=#IEEE_J_MI#
+IEEE Transactions on NanoBioscience=#IEEE_J_NB#
+IEEE Transactions on Neural Systems and Rehabilitation Engineering=#IEEE_J_NSRE#
+IEEE Transactions on Rehabilitation Engineering=#IEEE_J_RE#
+
+
+
+optics, lightwave and photonics
+IEEE Photonics Technology Letters=#IEEE_J_PTL#
+Aaron Chen: "IEEE/OSA" Missing
+Journal of Lightwave Technology=#IEEE_J_JLT#
+IEEE/OSA Journal of Lightwave Technology=#IEEE_J_JLT#
+
+
+
+physics, electrons, nanotechnology, nuclear and quantum electronics
+IEEE Electron Device Letters=#IEEE_J_EDL#
+IEEE Journal of Quantum Electronics=#IEEE_J_JQE#
+IEEE Journal of Selected Topics in Quantum Electronics=#IEEE_J_JSTQE#
+IEEE Transactions on Electron Devices=#IEEE_J_ED#
+IEEE Transactions on Nanotechnology=#IEEE_J_NANO#
+IEEE Transactions on Nuclear Science=#IEEE_J_NS#
+IEEE Transactions on Plasma Science=#IEEE_J_PS#
+
+
+
+reliability
+IEEE Transactions on Device and Materials Reliability=#IEEE_J_DMR#
+IEEE Transactions on Reliability=#IEEE_J_R#
+
+
+
+semiconductors, superconductors, electrochemical and solid state
+IEEE/ECS Electrochemical and Solid-State Letters=#IEEE_J_ESSL#
+IEEE Journal of Solid-State Circuits=#IEEE_J_JSSC#
+IEEE Transactions on Applied Superconductivity=#IEEE_J_ASC#
+IEEE Transactions on Semiconductor Manufacturing=#IEEE_J_SM#
+
+
+
+sensors
+IEEE Sensors Journal=#IEEE_J_SENSOR#
+
+
+
+VLSI
+IEEE Transactions on Very Large Scale Integration (VLSI) Systems=#IEEE_J_VLSI#
+
+
+
+
+
+
+IEEE Magazines
+
+
+
+IEEE Aerospace and Electronics Systems Magazine=#IEEE_M_AES#
+IEEE Annals of the History of Computing=#IEEE_M_HIST#
+IEEE Antennas and Propagation Magazine=#IEEE_M_AP#
+IEEE ASSP Magazine=#IEEE_M_ASSP#
+IEEE Circuits and Devices Magazine=#IEEE_M_CD#
+IEEE Circuits and Systems Magazine=#IEEE_M_CAS#
+IEEE Communications Magazine=#IEEE_M_COM#
+IEEE Communications Society Magazine=#IEEE_M_COMSOC#
+IEEE Computational Intelligence Magazine=#IEEE_M_CIM#
+CSEM changed to CSE in 1999
+IEEE Computing in Science and Engineering=#IEEE_M_CSE#
+IEEE Computational Science and Engineering Magazine=#IEEE_M_CSEM#
+IEEE Computer=#IEEE_M_C#
+IEEE Computer Applications in Power=#IEEE_M_CAP#
+IEEE Computer Graphics and Applications=#IEEE_M_CGA#
+IEEE Concurrency=#IEEE_M_CONC#
+IEEE Control Systems Magazine=#IEEE_M_CS#
+IEEE Design and Test of Computers=#IEEE_M_DTC#
+IEEE Electrical Insulation Magazine=#IEEE_M_EI#
+IEEE ElectroTechnology Review=#IEEE_M_ETR#
+IEEE Engineering in Medicine and Biology Magazine=#IEEE_M_EMB#
+IEEE Engineering Management Review=#IEEE_M_EMR#
+IEEE Expert=#IEEE_M_EXP#
+IEEE Industry Applications Magazine=#IEEE_M_IA#
+IEEE Instrumentation and Measurement Magazine=#IEEE_M_IM#
+IEEE Intelligent Systems=#IEEE_M_IS#
+IEEE Internet Computing=#IEEE_M_IC#
+IEEE IT Professional=#IEEE_M_ITP#
+IEEE Micro=#IEEE_M_MICRO#
+IEEE Microwave Magazine=#IEEE_M_MW#
+IEEE Multimedia=#IEEE_M_MM#
+IEEE Network=#IEEE_M_NET#
+IEEE Personal Communications Magazine=#IEEE_M_PCOM#
+IEEE Potentials=#IEEE_M_POT#
+CAP and PER merged to form PE in 2003
+IEEE Power and Energy Magazine=#IEEE_M_PE#
+IEEE Power Engineering Review=#IEEE_M_PER#
+IEEE Pervasive Computing=#IEEE_M_PVC#
+IEEE Robotics and Automation Magazine=#IEEE_M_RA#
+IEEE Security and Privacy=#IEEE_M_SAP#
+IEEE Signal Processing Magazine=#IEEE_M_SP#
+IEEE Software=#IEEE_M_S#
+IEEE Spectrum=#IEEE_M_SPECT#
+IEEE Technology and Society Magazine=#IEEE_M_TS#
+IEEE Vehicular Technology Magazine=#IEEE_M_VT#
+IEEE Wireless Communications=#IEEE_M_WC#
+Aaron Chen: "Magazine" missing
+IEEE Wireless Communications Magazine=#IEEE_M_WC#
+Today's Engineer=#IEEE_M_TODAY#
+
+
+
+
+
+
+IEEE Online Publications
+
+
+
+IEEE Communications Surveys and Tutorials=#IEEE_O_CSTO#
+IEEE Distributed Systems Online=#IEEE_O_DSO#
+
+
+
+
index 9c484a6..4b1706e 100644 (file)
@@ -1829,8 +1829,6 @@ Link_to_file_%0=Link_zur_Datei_%0
 The_PDF_contains_one_or_several_bibtex-records.\nDo_you_want_to_import_these_as_new_entries_into_the_current_database?=Die_PDF-Datei_enth\u00e4lt_mindestens_einen_BibTeX-Datensatz.\nWollen_Sie_diese(n)_als_neue_Eintr\u00e4ge_in_die_aktuelle_Datei_importieren?
 XMP_metadata_found_in_PDF:_%0=XMP-Metadaten_gefunden_im_PDF:_%0
 Link_to_PDF_%0=Link_zum_PDF_%0
-%0_directory_is_not_set_or_does_not_exist!=%0-Verzeichnis_ist_nicht_angegeben_oder_existiert_nicht!
-%0_directory_is_'%1':=%0-Verzeichnis_ist_'%1':
 Writing_XMP_to_'%0'...=Schreibe_XMP_in_'%0'...
 Wrote_XMP_to_'%0'.=XMP_in_'%0'_geschrieben.
 Error_writing_XMP_to_file:_%0=Fehler_beim_Schreiben_von_XMP_in_die_Datei_%0
@@ -1875,11 +1873,7 @@ Do_not_show_splash_window_at_startup=Er\u00f6ffnungsbildschirm_beim_Programmstar
 Resolve_strings_for_all_fields_except=Strings_aufl\u00f6sen_f\u00fcr_alle_Felder_au\u00dfer
 Resolve_strings_for_standard_BibTeX_fields_only=Strings_nur_f\u00fcr_Standard-BibTeX-Felder_aufl\u00f6sen
 Leave_files_in_their_current_directory.=Dateien_im_aktuellen_Verzeichnis_lassen.
-Copy_files_to_%0.=Kopiere_Dateien_nach_%0.
-Move_files_to_%0.=Verschiebe_Dateien_nach_%0.
 Leave_file_in_its_current_directory.=Datei_im_aktuellen_Verzeichnis_lassen.
-Copy_file_to_%0.=Kopiere_Datei_nach_%0.
-Move_file_to_%0.=Verschiebe_Datei_nach_%0.
 Extension=Erweiterung
 Application=Anwendung
 Icon=Icon
@@ -1973,4 +1967,22 @@ Field_names_are_not_allowed_to_contain_white_space_or_the_following_characters=F
 %0_entries_found._To_reduce_server_load,_abstracts_will_only_be_downloaded_for_searches_returning_%1_hits_or_less.=%0_Eintr\u00e4ge_gefunden._Um_die_Serverlast_zu_verringern,_werden_abstracts_nur_bei_Suchen_mit_%1_oder_weniger_Treffern_heruntergeladen.
 A_string_with_that_label_already_exists=Ein_String_mit_diesem_Label_ist_bereits_vorhanden
 
-Overwrite=
+Overwrite=\u00dcberschreiben
+
+File_directory_is_not_set_or_does_not_exist!=Dateiverzeichnis_ist_nicht_gesetzt_oder_existiert_nicht
+File_directory_is_'%0':=Dateiverzeichnis_ist_'%0':
+Copy_files_to_file_directory.=Dateien_in_das_Dateiverzeichnis_kopieren.
+Move_files_to_file_directory.=Dateien_in_das_Dateiverzeichnis_verschieben.
+Copy_file_to_file_directory.=Datei_in_das_Dateiverzeichnis_kopieren.
+Move_file_to_file_directory=Datei_in_das_Dateiverzeichnis_verschieben.
+New_file_link_(INSERT)=Neuer_Dateilink_(INSERT)
+Remove_file_link_(DELETE)=Dateilink_entfernen_(DELETE)
+
+No_PDF_linked=Kein_PDF_verlinkt
+PDF_does_not_exist=PDF_existiert_nicht
+Wrote_XMP-metadata=XMP-Metadaten_geschrieben
+
+Error_writing_to_%0_file(s).=Fehler_beim_Schreiben_in_%0_Datei(en).
+Finished_writing_XMP-metadata._Wrote_to_%0_file(s).=Schreiben_der_XMP-Metadaten_in_%0_Datei(en)_beendet.
+
+You_have_entered_an_invalid_search_'%0'.=Sie_haben_eine_ung\u00fcltige_Suche_'%0'_eingegeben.
index 1463325..94925d6 100644 (file)
@@ -1825,8 +1825,6 @@ Link_to_file_%0=
 The_PDF_contains_one_or_several_bibtex-records.\nDo_you_want_to_import_these_as_new_entries_into_the_current_database?=
 XMP_metadata_found_in_PDF:_%0=
 Link_to_PDF_%0=
-%0_directory_is_not_set_or_does_not_exist!=
-%0_directory_is_'%1':=
 Writing_XMP_to_'%0'...=
 Wrote_XMP_to_'%0'.=
 Error_writing_XMP_to_file:_%0=
@@ -1871,11 +1869,7 @@ Do_not_show_splash_window_at_startup=
 Resolve_strings_for_all_fields_except=
 Resolve_strings_for_standard_BibTeX_fields_only=
 Leave_files_in_their_current_directory.=
-Copy_files_to_%0.=
-Move_files_to_%0.=
 Leave_file_in_its_current_directory.=
-Copy_file_to_%0.=
-Move_file_to_%0.=
 Extension=
 Application=
 Icon=
@@ -1971,3 +1965,21 @@ Field_names_are_not_allowed_to_contain_white_space_or_the_following_characters=
 %0_entries_found._To_reduce_server_load,_abstracts_will_only_be_downloaded_for_searches_returning_%1_hits_or_less.=
 A_string_with_that_label_already_exists=
 Overwrite=
+
+File_directory_is_not_set_or_does_not_exist!=
+File_directory_is_'%0':=
+Copy_files_to_file_directory.=
+Move_files_to_file_directory.=
+Copy_file_to_file_directory.=
+Move_file_to_file_directory=
+New_file_link_(INSERT)=
+Remove_file_link_(DELETE)=
+
+No_PDF_linked=
+PDF_does_not_exist=
+Wrote_XMP-metadata=
+
+Error_writing_to_%0_file(s).=
+Finished_writing_XMP-metadata._Wrote_to_%0_file(s).=
+
+You_have_entered_an_invalid_search_'%0'.=
index a80df60..426fd46 100644 (file)
@@ -1806,8 +1806,6 @@ Link_to_file_%0=Link_to_file_%0
 The_PDF_contains_one_or_several_bibtex-records.\nDo_you_want_to_import_these_as_new_entries_into_the_current_database?=The_PDF_contains_one_or_several_bibtex-records.\nDo_you_want_to_import_these_as_new_entries_into_the_current_database?
 XMP_metadata_found_in_PDF:_%0=XMP_metadata_found_in_PDF:_%0
 Link_to_PDF_%0=Link_to_PDF_%0
-%0_directory_is_not_set_or_does_not_exist!=%0_directory_is_not_set_or_does_not_exist!
-%0_directory_is_'%1':=%0_directory_is_'%1':
 Writing_XMP_to_'%0'...=Writing_XMP_to_'%0'...
 Wrote_XMP_to_'%0'.=Wrote_XMP_to_'%0'.
 Error_writing_XMP_to_file:_%0=Error_writing_XMP_to_file:_%0
@@ -1852,11 +1850,7 @@ Do_not_show_splash_window_at_startup=Do_not_show_splash_window_at_startup
 Resolve_strings_for_all_fields_except=Resolve_strings_for_all_fields_except
 Resolve_strings_for_standard_BibTeX_fields_only=Resolve_strings_for_standard_BibTeX_fields_only
 Leave_files_in_their_current_directory.=Leave_files_in_their_current_directory.
-Copy_files_to_%0.=Copy_files_to_%0.
-Move_files_to_%0.=Move_files_to_%0.
 Leave_file_in_its_current_directory.=Leave_file_in_its_current_directory.
-Copy_file_to_%0.=Copy_file_to_%0.
-Move_file_to_%0.=Move_file_to_%0.
 Extension=Extension
 Application=Application
 Icon=Icon
@@ -1954,3 +1948,20 @@ A_string_with_that_label_already_exists=A_string_with_that_label_already_exists
 
 
 Overwrite=Overwrite
+
+File_directory_is_not_set_or_does_not_exist!=File_directory_is_not_set_or_does_not_exist!
+File_directory_is_'%0':=File_directory_is_'%0':
+Copy_files_to_file_directory.=Copy_files_to_file_directory.
+Move_files_to_file_directory.=Move_files_to_file_directory
+Copy_file_to_file_directory.=Copy_file_to_file_directory.
+Move_file_to_file_directory=Move_file_to_file_directory
+New_file_link_(INSERT)=New_file_link_(INSERT)
+Remove_file_link_(DELETE)=Remove_file_link_(DELETE)
+
+Wrote_XMP-metadata=Wrote_XMP-metadata
+PDF_does_not_exist=PDF_does_not_exist
+No_PDF_linked=No_PDF_linked
+Finished_writing_XMP-metadata._Wrote_to_%0_file(s).=Finished_writing_XMP-metadata._Wrote_to_%0_file(s).
+Error_writing_to_%0_file(s).=Error_writing_to_%0_file(s).
+
+You_have_entered_an_invalid_search_'%0'.=You_have_entered_an_invalid_search_'%0'.
index 43ec956..0451cf9 100644 (file)
@@ -948,8 +948,6 @@ Link_to_file_%0=Lien_vers_le_fichier_%0
 The_PDF_contains_one_or_several_bibtex-records.\nDo_you_want_to_import_these_as_new_entries_into_the_current_database?=Le_PDF_contient_un_ou_plusieurs_enregistrements_BibTeX.\nVoulez-vous_les_importer_comme_de_nouvelles_entr\u00e9es_dans_la_base_de_donn\u00e9es_actuelle_?
 XMP_metadata_found_in_PDF:_%0=M\u00e9tadonn\u00e9es_XMP_trouv\u00e9es_dans_le_PDF:_%0
 Link_to_PDF_%0=Lien_vers_PDF_%0
-%0_directory_is_not_set_or_does_not_exist!=Le_r\u00e9pertoire_%0_n'est_pas_param\u00e9tr\u00e9_ou_n'existe_pas_!
-%0_directory_is_'%1':=Le_r\u00e9pertoire_%0_est_'%1'_:
 Writing_XMP_to_'%0'...=Ecriture_des_XMP_dans_'%0'...
 Wrote_XMP_to_'%0'.=XMP_\u00e9crites_dans_'%0'.
 Error_writing_XMP_to_file:_%0=Erreur_lors_de_l'\u00e9criture_des_XMP_dans_le_fichier_%0
@@ -994,11 +992,7 @@ Do_not_show_splash_window_at_startup=Ne_pas_montrer_l'\u00e9cran_de_garde_lors_d
 Resolve_strings_for_all_fields_except=Traiter_les_cha\u00EEnes_pour_tous_les_champs_sauf
 Resolve_strings_for_standard_BibTeX_fields_only=Traiter_les_cha\u00EEnes_pour_les_champs_BibTeX_standard_uniquement
 Leave_files_in_their_current_directory.=Laisser_les_fichiers_dans_le_r\u00e9pertoire_courant
-Copy_files_to_%0.=Copier_les_fichiers_vers_%0.
-Move_files_to_%0.=D\u00e9placer_les_fichiers_vers_%0.
 Leave_file_in_its_current_directory.=Laisser_le_fichier_dans_son_r\u00e9pertoire_courant
-Copy_file_to_%0.=Copier_le_fichier_vers_%0.
-Move_file_to_%0.=D\u00e9placer_le_fichier_vers_%0.
 Extension=Extension
 Application=Application
 Icon=Ic\u00f4ne
@@ -1096,3 +1090,21 @@ Field_names_are_not_allowed_to_contain_white_space_or_the_following_characters=L
 A_string_with_that_label_already_exists=Une_cha\u00EEne_avec_ce_nom_existe_d\u00E9j\u00e0
 
 Overwrite=Ecraser
+
+File_directory_is_not_set_or_does_not_exist!=Le_r\u00E9pertoire_de_fichiers_n'est_pas_configur\u00E9_ou_n'existe_pas_!
+File_directory_is_'%0':=Le_r\u00E9pertoire_de_fichier_est_'%0'_:
+Copy_files_to_file_directory.=Copier_les_fichiers_vers_le_r\u00E9pertoire_de_fichiers.
+Move_files_to_file_directory.=D\u00E9placer_les_fichiers_vers_le_r\u00E9pertoire_de_fichiers.
+Copy_file_to_file_directory.=Copier_le_fichier_vers_le_r\u00E9pertoire_de_fichiers.
+Move_file_to_file_directory=D\u00E9placer_le_fichier_vers_le_r\u00E9pertoire_de_fichiers.
+New_file_link_(INSERT)=Nouveau_lien_de_fichier_(INSERT)
+Remove_file_link_(DELETE)=Supprimer_le_lien_de_fichier_(DELETE)
+
+No_PDF_linked=Pas_de_PDF_li\u00E9
+PDF_does_not_exist=Le_PDF_n'existe_pas
+Wrote_XMP-metadata=M\u00E9ta-donn\u00E9es_XMP_\u00E9crites
+
+Error_writing_to_%0_file(s).=Erreur_lors_de_l'\u00E9criture_de_%0_fichier(s).
+Finished_writing_XMP-metadata._Wrote_to_%0_file(s).=Ecriture_des_m\u00E9ta-donn\u00E9es_XMP_termin\u00E9e._Ecriture_de_%0_fichier(s).
+
+You_have_entered_an_invalid_search_'%0'.=Vous_avez_entr\u00E9_une_recherche_invalide_'%0'.
index 6ab89a4..6290bde 100644 (file)
@@ -993,8 +993,6 @@ Link_to_file_%0=Collegamento_al_file_%0
 The_PDF_contains_one_or_several_bibtex-records.\nDo_you_want_to_import_these_as_new_entries_into_the_current_database?=Il_file_PDF_contiene_uno_o_pi\u00f9_record_BibTeX.\nVuoi_importarli_come_nuove_voci_nel_database_corrente?
 XMP_metadata_found_in_PDF:_%0=Metadati_XMP_trovati_nel_file_PDF:_%0
 Link_to_PDF_%0=Collegamento_al_file_PDF_%0
-%0_directory_is_not_set_or_does_not_exist!=La_cartella_%0_non_\u00e8_definita_o_non_esite!
-%0_directory_is_'%1':=La_cartella_%0_\u00e8_'%1':
 Writing_XMP_to_'%0'...=Scrittura_dei_metadati_XMP_in_'%0'...
 Wrote_XMP_to_'%0'.=Scritti_i_metadati_XMP_in_'%0'.
 Error_writing_XMP_to_file:_%0=Errore_durante_la_scrittura_dei_metadati_XMP_nel_file:_%0_
@@ -1043,11 +1041,7 @@ Resolve_strings_for_standard_BibTeX_fields_only=Risolve_le_stringhe_solo_per_i_c
 # FDAR (French translation): no idea...
 # FDAR: I contacted the programmer. Now simplified...
 Leave_files_in_their_current_directory.=Lascia_i_file_nella_cartella_corrente
-Copy_files_to_%0.=Copia_i_file_in_%0.
-Move_files_to_%0.=Sposta_i_file_in_%0.
 Leave_file_in_its_current_directory.=Lascia_il_file_nella_cartella_corrente
-Copy_file_to_%0.=Copia_il_file_in_%0.
-Move_file_to_%0.=Sposta_il_file_in_%0.
 Extension=Estensione
 Application=Applicazione
 Icon=Icona
@@ -1145,3 +1139,21 @@ Field_names_are_not_allowed_to_contain_white_space_or_the_following_characters=
 %0_entries_found._To_reduce_server_load,_abstracts_will_only_be_downloaded_for_searches_returning_%1_hits_or_less.=
 A_string_with_that_label_already_exists=
 Overwrite=
+
+File_directory_is_not_set_or_does_not_exist!=
+File_directory_is_'%0':=
+Copy_files_to_file_directory.=
+Move_files_to_file_directory.=
+Copy_file_to_file_directory.=
+Move_file_to_file_directory=
+New_file_link_(INSERT)=
+Remove_file_link_(DELETE)=
+
+No_PDF_linked=
+PDF_does_not_exist=
+Wrote_XMP-metadata=
+
+Error_writing_to_%0_file(s).=
+Finished_writing_XMP-metadata._Wrote_to_%0_file(s).=
+
+You_have_entered_an_invalid_search_'%0'.=
index 0669853..383528d 100644 (file)
@@ -975,8 +975,6 @@ Link_to_file_%0=
 The_PDF_contains_one_or_several_bibtex-records.\nDo_you_want_to_import_these_as_new_entries_into_the_current_database?=
 XMP_metadata_found_in_PDF:_%0=
 Link_to_PDF_%0=
-%0_directory_is_not_set_or_does_not_exist!=
-%0_directory_is_'%1':=
 Writing_XMP_to_'%0'...=
 Wrote_XMP_to_'%0'.=
 Error_writing_XMP_to_file:_%0=
@@ -1021,11 +1019,7 @@ Do_not_show_splash_window_at_startup=
 Resolve_strings_for_all_fields_except=
 Resolve_strings_for_standard_BibTeX_fields_only=
 Leave_files_in_their_current_directory.=
-Copy_files_to_%0.=
-Move_files_to_%0.=
 Leave_file_in_its_current_directory.=
-Copy_file_to_%0.=
-Move_file_to_%0.=
 Extension=
 Application=
 Icon=
@@ -1121,3 +1115,21 @@ Field_names_are_not_allowed_to_contain_white_space_or_the_following_characters=
 %0_entries_found._To_reduce_server_load,_abstracts_will_only_be_downloaded_for_searches_returning_%1_hits_or_less.=
 A_string_with_that_label_already_exists=
 Overwrite=
+
+File_directory_is_not_set_or_does_not_exist!=
+File_directory_is_'%0':=
+Copy_files_to_file_directory.=
+Move_files_to_file_directory.=
+Copy_file_to_file_directory.=
+Move_file_to_file_directory=
+New_file_link_(INSERT)=
+Remove_file_link_(DELETE)=
+
+No_PDF_linked=
+PDF_does_not_exist=
+Wrote_XMP-metadata=
+
+Error_writing_to_%0_file(s).=
+Finished_writing_XMP-metadata._Wrote_to_%0_file(s).=
+
+You_have_entered_an_invalid_search_'%0'.=
diff --git a/src/resource/Menu_es.properties b/src/resource/Menu_es.properties
new file mode 100644 (file)
index 0000000..581a29e
--- /dev/null
@@ -0,0 +1,123 @@
+#!
+#! created/edited by Popeye version 0.54 (popeye.sourceforge.net)
+#! encoding:ISO-8859-1
+Abbreviate_journal_names_(ISO)=Abreviar_nombres_de_journals_(ISO)
+Abbreviate_journal_names_(MEDLINE)=Abreviar_nombres_de_journal_(MEDLINE)
+About_JabRef=&Acerca_de_JabRef
+Append_database=&A&ntilde;adir_base_de_datos
+Autogenerate_BibTeX_keys=&Autogenerar_claves_de_BibTeX
+BibTeX=&BibTeX
+Close_database=&Cerrar_base_de_datos
+Copy=C&opiar
+Copy_\\cite{BibTeX_key}=Copiar_\\c&ita_{clave_BibTeX}
+Copy_BibTeX_key=Copiar_clave_&BibTeX
+Custom_export=E&xportaci&oacute;n_Personalizada
+Custom_importers=Importadores_Personalizados
+Customize_entry_types=&Personalizar_tipos_de_entrada
+Cut=&Cortar
+Database_properties=&Propiedades_de_la_base_de_datos
+Delete=E&liminar
+Edit=&Editar
+# Bibtex
+Edit_entry=&Editar_registro
+Edit_preamble=Editar_&pre&aacute;mbulo
+Edit_strings=Editar_&cadenas
+Export=&Exportar
+Export_selected_entries_to_clipboard=&Exportar_registros_seleccionados_al_portapapeles
+Fetch_citations_from_CiteSeer=Importar_citas_desde_&CiteSeer
+Fetch_CiteSeer=importar_CiteSeer
+Fetch_Medline=Importar_&Medline
+
+# Menu names
+File=&Archivo
+Find_And_Fix=Buscar_y_reemplazar
+Find_and_remove_exact_duplicates=Buscar_y_eliminar_&duplicados_exactos
+Find_duplicates=&Buscar_duplicados
+Help=&Ayuda
+Help_contents=&Contenido_de_la_ayuda
+Highlight_groups_matching_all_selected_entries=Resaltar_los_grupos_donde_coincidan_todos_los_registros_seleccionados
+Highlight_groups_matching_any_selected_entry=Resaltar_los_grupos_donde_coincida_cualquier_registro_seleccionado
+Import_Fields_from_CiteSeer=Importar_campos_desde_&CiteSeer
+Incremental_search=&B&uacute;squeda_incremental