[svn-upgrade] Integrating new upstream version, jabref (2.4.2) upstream/2.4.2
authorgregor herrmann <gregoa@debian.org>
Thu, 26 Feb 2009 16:38:37 +0000 (16:38 -0000)
committergregor herrmann <gregoa@debian.org>
Thu, 26 Feb 2009 16:38:37 +0000 (16:38 -0000)
223 files changed:
build.number
build.xml
lib/looks-2.0.4.jar [deleted file]
lib/looks-2.2.0.jar [new file with mode: 0644]
src/Src.iml [new file with mode: 0644]
src/help/ACMPortalHelp.html [new file with mode: 0644]
src/help/About.html
src/help/Contents.html
src/help/CustomExports.html
src/help/EntryEditorHelp.html
src/help/OpenOfficeHelp.html
src/help/da/About.html [new file with mode: 0755]
src/help/de/About.html
src/help/fr/ACMPortalHelp.html [new file with mode: 0644]
src/help/fr/About.html
src/help/fr/Contents.html
src/help/fr/CustomExports.html
src/help/fr/DatabaseProperties.html
src/help/fr/EntryEditorHelp.html
src/help/fr/GroupsHelp.html
src/help/fr/OpenOfficeHelp.html
src/help/fr/Spires.html [new file with mode: 0644]
src/images/absIcon.png [deleted file]
src/images/add.png [deleted file]
src/images/autumn.png [deleted file]
src/images/completeItem.png [deleted file]
src/images/contents.png [deleted file]
src/images/crystal_16/Icons.properties
src/images/database_connect.png [deleted file]
src/images/database_save.png [deleted file]
src/images/document-save-as.png [deleted file]
src/images/document-save.png [deleted file]
src/images/doismall.png [deleted file]
src/images/duplicate.png [deleted file]
src/images/edit-copy.png [deleted file]
src/images/edit-cut.png [deleted file]
src/images/edit-delete.png [deleted file]
src/images/edit-find.png [deleted file]
src/images/edit-paste.png [deleted file]
src/images/edit-redo.png [deleted file]
src/images/edit-undo.png [deleted file]
src/images/editor.png [deleted file]
src/images/emacs.png [deleted file]
src/images/emblem-web-small.png [deleted file]
src/images/emblem-web.png [deleted file]
src/images/fileclose.png [deleted file]
src/images/fileclose2.png [deleted file]
src/images/filenew.png [deleted file]
src/images/fileopen.png [deleted file]
src/images/genIcon.png [deleted file]
src/images/go-down.png [deleted file]
src/images/go-next.png [deleted file]
src/images/go-previous.png [deleted file]
src/images/go-up.png [deleted file]
src/images/groupIncluding.png [deleted file]
src/images/groupRefining.png [deleted file]
src/images/grouping_morten.png [deleted file]
src/images/groupsHighlightAll.png [deleted file]
src/images/groupsHighlightAny.png [deleted file]
src/images/help-about.png [deleted file]
src/images/help-browser.png [deleted file]
src/images/integrity.png [deleted file]
src/images/lyx2.png [deleted file]
src/images/mark.png [deleted file]
src/images/messageFail.png [deleted file]
src/images/messageInfo.png [deleted file]
src/images/messageWarn.png [deleted file]
src/images/optIcon.png [deleted file]
src/images/pdf-new.png [deleted file]
src/images/pdf.png [deleted file]
src/images/postscript.png [deleted file]
src/images/preamble.png [deleted file]
src/images/preferences.png [deleted file]
src/images/remove.png [deleted file]
src/images/reqIcon.png [deleted file]
src/images/search.png [deleted file]
src/images/splash-2.1beta.png [deleted file]
src/images/splash-2.3.svg [deleted file]
src/images/splash-2.4.svg [new file with mode: 0644]
src/images/splash.png
src/images/strings.png [deleted file]
src/images/unmark.png [deleted file]
src/images/user-home.png [deleted file]
src/images/view-refresh.png [deleted file]
src/images/viewsource.gif [deleted file]
src/images/winedt.png [deleted file]
src/images/wizard.png [deleted file]
src/images/wrongItem.png [deleted file]
src/images/wwwciteseer.png [deleted file]
src/java/net/sf/jabref/AdvancedTab.java
src/java/net/sf/jabref/AuthorList.java
src/java/net/sf/jabref/BasePanel.java
src/java/net/sf/jabref/BibtexEntry.java
src/java/net/sf/jabref/BibtexEntryType.java
src/java/net/sf/jabref/BibtexFields.java
src/java/net/sf/jabref/EntryEditor.java
src/java/net/sf/jabref/EntryEditorTab.java
src/java/net/sf/jabref/ExternalTab.java
src/java/net/sf/jabref/FieldComparator.java
src/java/net/sf/jabref/FieldEditor.java
src/java/net/sf/jabref/FieldTextArea.java
src/java/net/sf/jabref/FieldTextField.java
src/java/net/sf/jabref/GUIGlobals.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/JabRefPreferences.java
src/java/net/sf/jabref/PreambleEditor.java
src/java/net/sf/jabref/PreviewPanel.java
src/java/net/sf/jabref/Util.java
src/java/net/sf/jabref/export/CustomExportList.java
src/java/net/sf/jabref/export/ExportCustomizationDialog.java
src/java/net/sf/jabref/export/ExportFormat.java
src/java/net/sf/jabref/export/ExportFormats.java
src/java/net/sf/jabref/export/FileActions.java
src/java/net/sf/jabref/export/PluginBasedExportFormat.java
src/java/net/sf/jabref/export/SaveDatabaseAction.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/CreateBibORDFAuthors.java [new file with mode: 0644]
src/java/net/sf/jabref/export/layout/format/DOICheck.java
src/java/net/sf/jabref/export/layout/format/DOIStrip.java [new file with mode: 0644]
src/java/net/sf/jabref/export/layout/format/FirstPage.java [new file with mode: 0644]
src/java/net/sf/jabref/export/layout/format/LastPage.java [new file with mode: 0644]
src/java/net/sf/jabref/export/layout/format/ToLowerCase.java
src/java/net/sf/jabref/export/layout/format/ToUpperCase.java [new file with mode: 0644]
src/java/net/sf/jabref/external/AccessLinksForEntries.java
src/java/net/sf/jabref/external/AutoSetExternalFileForEntries.java
src/java/net/sf/jabref/external/DownloadExternalFile.java
src/java/net/sf/jabref/external/ExternalFileMenuItem.java
src/java/net/sf/jabref/external/ExternalFileType.java
src/java/net/sf/jabref/external/ExternalFileTypeEditor.java
src/java/net/sf/jabref/external/ExternalFileTypeEntryEditor.java
src/java/net/sf/jabref/external/MoveFileAction.java
src/java/net/sf/jabref/external/PushToApplicationButton.java
src/java/net/sf/jabref/external/RegExpFileSearch.java [new file with mode: 0644]
src/java/net/sf/jabref/external/SynchronizeFileField.java
src/java/net/sf/jabref/external/UnknownExternalFileType.java
src/java/net/sf/jabref/groups/AbstractGroup.java
src/java/net/sf/jabref/groups/AllEntriesGroup.java
src/java/net/sf/jabref/groups/ExplicitGroup.java
src/java/net/sf/jabref/groups/GroupDialog.java
src/java/net/sf/jabref/groups/KeywordGroup.java
src/java/net/sf/jabref/groups/SearchGroup.java
src/java/net/sf/jabref/gui/AutoCompleteListener.java
src/java/net/sf/jabref/gui/AutoCompleter.java
src/java/net/sf/jabref/gui/DatabasePropertiesDialog.java
src/java/net/sf/jabref/gui/FileListEditor.java
src/java/net/sf/jabref/gui/FileListEntryEditor.java
src/java/net/sf/jabref/gui/ImportInspectionDialog.java
src/java/net/sf/jabref/gui/MainTable.java
src/java/net/sf/jabref/gui/MainTableFormat.java
src/java/net/sf/jabref/gui/MainTableSelectionListener.java
src/java/net/sf/jabref/gui/SearchResultsDialog.java
src/java/net/sf/jabref/imports/ACMPortalFetcher.java [new file with mode: 0644]
src/java/net/sf/jabref/imports/CiteSeerEntryFetcher.java
src/java/net/sf/jabref/imports/IEEEXploreFetcher.java
src/java/net/sf/jabref/imports/ImportFormatReader.java
src/java/net/sf/jabref/imports/ImportInspectionCommandLine.java
src/java/net/sf/jabref/imports/ImportInspector.java
src/java/net/sf/jabref/imports/ImportMenuItem.java
src/java/net/sf/jabref/imports/IsiImporter.java
src/java/net/sf/jabref/imports/MedlineFetcher.java
src/java/net/sf/jabref/imports/MedlineImporter.java
src/java/net/sf/jabref/imports/OvidImporter.java
src/java/net/sf/jabref/imports/RisImporter.java
src/java/net/sf/jabref/imports/SPIRESBibtexFilterReader.java
src/java/net/sf/jabref/imports/SPIRESFetcher.java
src/java/net/sf/jabref/imports/ScifinderImporter.java
src/java/net/sf/jabref/imports/SixpackImporter.java
src/java/net/sf/jabref/labelPattern/LabelPatternUtil.java
src/java/net/sf/jabref/net/URLDownload.java
src/java/net/sf/jabref/plugin/core/generated/_JabRefPlugin.java
src/java/net/sf/jabref/sql/DBConnectDialog.java
src/java/net/sf/jabref/sql/DbConnectAction.java [new file with mode: 0644]
src/java/net/sf/jabref/sql/DbImportAction.java [new file with mode: 0644]
src/java/net/sf/jabref/sql/SQLutil.java
src/java/net/sf/jabref/undo/CountingUndoManager.java
src/java/tests/net/sf/jabref/UtilTest.java
src/plugins/net.sf.jabref.core/plugin.xml
src/resource/IEEEJournalList.txt
src/resource/IntegrityMessage_da.properties [new file with mode: 0644]
src/resource/IntegrityMessage_tr.properties [new file with mode: 0644]
src/resource/JabRef_da.properties [new file with mode: 0644]
src/resource/JabRef_de.properties
src/resource/JabRef_de.properties.bak [deleted file]
src/resource/JabRef_du.properties
src/resource/JabRef_du.properties.bak [deleted file]
src/resource/JabRef_en.properties
src/resource/JabRef_en.properties.bak [deleted file]
src/resource/JabRef_fr.properties
src/resource/JabRef_fr.properties.bak [deleted file]
src/resource/JabRef_it.properties
src/resource/JabRef_it.properties.bak [deleted file]
src/resource/JabRef_no.properties
src/resource/JabRef_no.properties.bak [deleted file]
src/resource/JabRef_tr.properties [new file with mode: 0644]
src/resource/Menu_da.properties [new file with mode: 0644]
src/resource/Menu_de.properties
src/resource/Menu_du.properties
src/resource/Menu_en.properties
src/resource/Menu_es.properties
src/resource/Menu_fr.properties
src/resource/Menu_it.properties
src/resource/Menu_no.properties
src/resource/Menu_tr.properties [new file with mode: 0644]
src/resource/build.properties
src/resource/layout/bibordf.article.layout [new file with mode: 0644]
src/resource/layout/bibordf.begin.layout [new file with mode: 0644]
src/resource/layout/bibordf.end.layout [new file with mode: 0644]
src/resource/layout/bibordf.layout [new file with mode: 0644]
src/resource/layout/simplehtml.begin.layout
src/resource/layout/simplehtml.layout
src/resource/layout/tablerefs/tablerefs.begin.layout
src/resource/layout/tablerefs/tablerefs.end.layout
src/resource/layout/tablerefs/tablerefs.layout
src/resource/layout/tablerefsabsbib/tablerefsabsbib.begin.layout
src/resource/layout/tablerefsabsbib/tablerefsabsbib.end.layout
src/resource/layout/tablerefsabsbib/tablerefsabsbib.layout
src/txt/CHANGELOG
src/txt/README
src/txt/TODO
src/windows/nsis/setup.nsi

index 9e25b86..e848fb0 100644 (file)
@@ -1,3 +1,3 @@
 #Build Number for ANT. Do not edit!
-#Wed Mar 12 21:30:18 CET 2008
-build.number=16
+#Thu Oct 30 21:34:06 CET 2008
+build.number=92
index 3c0e4b1..fc3641d 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: 2600 $
-             $Date: 2008-03-04 22:06:51 +0100 (Tue, 04 Mar 2008) $
+   Version:  $Revision: 2784 $
+             $Date: 2008-10-07 20:06:21 +0200 (Tue, 07 Oct 2008) $
              $Author: mortenalver $
 
    modified:
@@ -47,7 +47,7 @@
      +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-->
 
        <!-- some version information -->
-       <property name="jabref.version" value="2.4b" />
+       <property name="jabref.version" value="2.4.2" />
        <property name="jabref.placeholder.version" value="@version@" />
        <!-- used by replace task -->
 
        <fileset id="jarsFileset" dir="${lib.dir}">
                <include name="antlr.jar" />
                <include name="antlr-3.0b5.jar" />
-               <include name="looks-2.0.4.jar" />
+               <include name="looks-2.2.0.jar" />
                <include name="forms-1.1.0.jar" />
                <include name="spin.jar" />
                <include name="glazedlists-1.7.0_java15.jar" />
                        <exclude name="**/JabRefMain.java" />
                        <classpath refid="classpath" />
                </javac>
-               <javac debug="on" deprecation="on" destdir="${build.classes}" source="1.4" target="1.4">
+               <javac debug="off" deprecation="on" destdir="${build.classes}" source="1.4" target="1.4">
                        <src path="${java.dir}" />
                        <include name="**/JabRefMain.java" />
                </javac>
        <target name="osx">
                <mkdir dir="${build.classes}" />
 
-               <javac srcdir="${osx.dir}" debug="on" destdir="${build.classes}" target="1.5">
+               <javac srcdir="${osx.dir}" debug="off" destdir="${build.classes}" target="1.5">
                </javac>
        </target>
 
diff --git a/lib/looks-2.0.4.jar b/lib/looks-2.0.4.jar
deleted file mode 100644 (file)
index e852c9d..0000000
Binary files a/lib/looks-2.0.4.jar and /dev/null differ
diff --git a/lib/looks-2.2.0.jar b/lib/looks-2.2.0.jar
new file mode 100644 (file)
index 0000000..af7f50f
Binary files /dev/null and b/lib/looks-2.2.0.jar differ
diff --git a/src/Src.iml b/src/Src.iml
new file mode 100644 (file)
index 0000000..fd32e14
--- /dev/null
@@ -0,0 +1,336 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module relativePaths="true" type="JAVA_MODULE" version="4">
+  <component name="NewModuleRootManager" inherit-compiler-output="true">
+    <exclude-output />
+    <content url="file://$MODULE_DIR$">
+      <sourceFolder url="file://$MODULE_DIR$/java" isTestSource="false" />
+    </content>
+    <orderEntry type="inheritedJdk" />
+    <orderEntry type="sourceFolder" forTests="false" />
+    <orderEntry type="module-library">
+      <library>
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../lib/plugin/velocity-dep-1.5.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library>
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../lib/plugin/JPFCodeGenerator-rt.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library>
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../lib/plugin/jpf.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library>
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../lib/plugin/commons-logging.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library>
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../lib/plugin/jpf-boot.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library>
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../lib/plugin/JPFCodeGenerator.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library>
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../lib/jaxen-core-1.0-fcs.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library>
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../lib/junit.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library>
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../lib/EndNote.zip!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library>
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../lib/PDFBox-0.7.3-dev-reduced.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library>
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../lib/JempBox-0.2.0.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library>
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../lib/forms-1.1.0.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library>
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../lib/antlr-3.0b5.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library>
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../lib/jaxp-1.2.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library>
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../lib/jarbundler-1.4.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library>
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../lib/vizant.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library>
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../lib/jalopy-1.0b10.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library>
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../lib/glazedlists-1.7.0_java15.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library>
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../lib/mysql-connector-java-5.0.7-bin.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library>
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../lib/microba.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library>
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../lib/javancss.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library>
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../lib/aelfred-1.2.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library>
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../lib/sax-2.0.1.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library>
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../lib/antlr.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library>
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../lib/saxpath-1.0-fcs.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library>
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../lib/pmd-2.0.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library>
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../lib/log4j-1.2.9.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library>
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../lib/log4j-1.2.6.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library>
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../lib/langproper.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library>
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../lib/jalopy-ant-0.6.1.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library>
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../lib/spin.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library>
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../lib/oro-2.0.6.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library>
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../lib/substance-4.1.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library>
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../lib/ccl.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library>
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../lib/jdom-1.0b8.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library>
+        <CLASSES>
+          <root url="jar://$MODULE_DIR$/../lib/looks-2.2.0.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+  </component>
+</module>
+
diff --git a/src/help/ACMPortalHelp.html b/src/help/ACMPortalHelp.html
new file mode 100644 (file)
index 0000000..296df30
--- /dev/null
@@ -0,0 +1,30 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+<body text="#275856">
+    <basefont size="4"
+          color="#2F4958"
+          face="arial" />
+
+    <h1>Search ACM Portal</h1>
+
+    <p>The ACM Portal includes two databases: the ACM Digital Library that is a full text collection of every article published by ACM, including over 50 years of archives, and the Guide to Computing Literature that is a bibliographic collection from major publishers in computing with over one million entries.</p>
+
+    <p>JabRef can download citations from the ACM Portal database.
+    To use this feature, choose <b>Web search -&gt; Search
+    ACMPortal</b>, and the search interface will appear in the
+    side pane.</p>
+
+    <p>To start a search, enter the words of your query, and press
+    <b>Enter</b> or the <b>Fetch</b> button.</p>
+
+       <p>This causes a significantly larger
+    amount of network queries, so to avoid excessive pressure on
+    the ACM Portal web site, JabRef will refuse to download
+    entries for more than a given number.
+       </p>
+
+    <p>You may choose which database to search and you may opt to download the abstracts along with the cite
+    information for each entry, by checking the <b>Include
+    abstracts</b> checkbox.</p>
+</body>
+</html>
index 85a8827..f556a5a 100755 (executable)
@@ -41,7 +41,8 @@
 
         <h2>Contributions from:</h2>
 
-        <p>Michael Beckmann,
+        <p>Thomas Arildsen,
+        Michael Beckmann,
         Oliver Beckmann,
         Fedor Bezrukov,            
         Aaron Chen,
index 1a268a4..ada8e98 100755 (executable)
     <em>Medline</em></a><br>
      <a href="JSTOR.html"><em>JStor</em> search</a><br>
      <a href="Spires.html"><em>Spires</em> search</a><br>
+     <a href="ACMPortalHelp.html">Search <em>ACM Portal</em></a><br>
      <a href="SQLExport.html">Export to an External SQL Database</a><br>
      <a href="XMPHelp.html">XMP metadata support in JabRef</a><br>
      <a href="CommandLine.html">Command line options</a><br>
      <a href="RemoteHelp.html">Remote operations</a><br>
-     
-     
+
 <h2>Miscellaneous</h2>
      <a href="About.html">About JabRef</a><br>
 
 </body>
-</html> 
\ No newline at end of file
+</html> 
index 2275bc6..895b91f 100644 (file)
     <ul>
         <li><code>HTMLChars</code> : replaces TeX-specific special
         characters (e.g. {\^a} or {\"{o}}) with their HTML
-        representations.</li>
+        representations, and translates LaTeX commands \emph, \textit,
+        \textbf into HTML equivalents.</li>
 
         <li><code>HTMLParagraphs</code> : interprets two
         consecutive newlines (e.g. \n \n) as the beginning of a new
         <li><code>AuthorFirstFirst</code> : formats author/editor
         fields with the first names first.</li>
 
-        <li><code>AuthorFirstFirstCommas</code> : formats
-        author/editor fields with the first names first, and
-        deliminated by commas.</li>
+        <li><code>AuthorFirstFirstCommas</code> or <code>AuthorFirstLastCommas</code>
+        : formats author/editor fields with the first names first, delimited by
+        commas, with "and" between the last two names.</li>
 
-        <li><code>AuthorFirstAbbrLastCommas</code> : to be
-        documented.</li>
+        <li><code>AuthorFirstLastOxfordCommas</code> : similar
+        to <code>AuthorFirstLastCommas</code>, except that the "and"
+        between the last two names is preceded by a comma.</li>
 
-        <li><code>AuthorFirstAbbrLastOxfordCommas</code> : to be
-        documented.</li>
+        <li><code>AuthorFirstAbbrLastCommas</code> : formats
+        author/editor fields with abbreviated first names first, delimited by
+        commas, with "and" between the last two names.</li>
 
-        <li><code>AuthorFirstLastOxfordCommas</code> : to be
-        documented.</li>
+        <li><code>AuthorFirstAbbrLastOxfordCommas</code> : similar
+        to <code>AuthorFirstAbbrLastCommas</code>, except that the "and"
+        between the last two names is preceded by a comma.</li>
 
         <li><code>AuthorLastFirst</code> : formats author/editor
         fields with the last names first.</li>
         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>
+        <li><code>AuthorLastFirstCommas</code> : formats
+        author/editor fields with the last names first, delimited by
+        commas, with "and" between the last two names.</li>
 
-        <li><code>AuthorLastFirstOxfordCommas</code> : to be
-        documented.</li>
+        <li><code>AuthorLastFirstOxfordCommas</code> : similar
+        to <code>AuthorLastFirstCommas</code>, except that the "and"
+        between the last two names is preceded by a comma.</li>
 
-        <li><code>AuthorLastFirstAbbrCommas</code> : to be
-        documented.</li>
+        <li><code>AuthorLastFirstAbbrCommas</code> : formats
+        author/editor fields with last names first and abbreviated first names
+        last, delimited by commas, with "and" between the last two names.</li>
 
-        <li><code>AuthorLastFirstAbbrOxfordCommas</code> : to be
-        documented.</li>
+        <li><code>AuthorLastFirstAbbrOxfordCommas</code> : similar
+        to <code>AuthorLastFirstAbbrCommas</code>, except that the "and"
+        between the last two names is preceded by a comma.</li>
 
         <li><code>AuthorAndsReplacer</code> : replaces "and"
         between names with ";", and "&amp;" between the last
         <li><code>RemoveBracketsAddComma</code> : to be
         documented.</li>
 
-        <li><code>RemoveWhitespace</code> : to be documented.</li>
+        <li><code>RemoveWhitespace</code> : removes all whitespace characters.</li>
 
         <li><code>RemoveLatexCommands</code> : removes LaTeX
         commands like <code>\em</code>, <code>\textbf</code>, etc.
         <li><code>ToLowerCase</code> : turns all characters into
         lower case.</li>
 
-        <li><code>CompositeFormat</code> : to be documented.</li>
-
-        <li><code>GetOpenOfficeType</code> : to be documented.</li>
+        <li><code>ToUpperCase</code> : turns all characters into
+        upper case.</li>
 
-        <li><code>RTFChars</code> : to be documented.</li>
+        <li><code>GetOpenOfficeType</code> : returns the number used by the OpenOffice.org
+            bibliography system (versions 1.x and 2.x) to denote the type of this entry.</li>
 
-        <li><code>ResolvePDF</code> : to be documented.</li>
+        <li><code>RTFChars</code> : replaces TeX-specific special
+        characters (e.g. {\^a} or {\"{o}}) with their RTF
+        representations, and translates LaTeX commands \emph, \textit,
+        \textbf into RTF equivalents.</li>
 
-    <li></li>
     </ul>
 
     <p>If none of the available formatters can do what you want to
index 19c3d63..4f31f04 100755 (executable)
     <p>For more information on how JabRef generates <em>bibtex</em>
     keys, see <a href="LabelPatterns.html">Customizing the BibTex
     key generator</a>.</p>
+
+    <h2>Word/name autocompletion</h2>
+
+    <p>JabRef offers autocompletion of words and names. Autocompletion can be
+    set up in <b>Options -> Preferences -> Entry editor</b>, and is by default
+    activated for several of the common fields.</p>
+
+    <p>When editing a field for which autocompletion is activated, JabRef will
+    try to suggest word completions as you write, based on which words are used
+    for that specific field elsewhere in your database. The suggestion appears
+    as a highlighted block of text completing the word. If there are several
+    possible completions, you can use the PAGE UP and PAGE DOWN keys to cycle
+    through the possible suggestions. To accept a suggestion, press ENTER once.
+    To ignore the suggestion, just keep typing.</p>
+
 </body>
 </html>
\ No newline at end of file
index 4814d16..2e16891 100644 (file)
     1.1 in the case of the <b>.sxc</b> export, and OOo 2.0 in the
     case of the <b>.ods</b> format).</p>
 
+    Depending on your version of OpenOffice.org, here are the method to use JabRef bibliographic databases:
+
+    <h2>Using the exported file as bibliography database in
+    OpenOffice.org 2.3 and 2.4</h2>
+
+    <p>Use the following steps to set up a spreadsheet exported from
+    JabRef as bibliography database in OpenOffice.org:</p>
+
+    <ul>
+    <li>From JabRef, export your database using the <b>.ods</b> format</li>
+    <li>Start OpenOffice.org Writer</li>
+
+    <li>Choose <b>Edit -&gt; Change database</b>. Click on <b>Select</b>, and select your database exported to the .ods format.</li>
+    <li>Unfold the <b>+</b> located in front of the name of the imported database, then click on the displayed filename, and, finally, on the button <b>Define</b>.</li>
+    <li>Choose <b>Tools -&gt; Options -&gt; OpenOffice.org Base -&gt; Database</b>. In this window, the database you just imported should be displayed. The default OOo bibliographic database should also be displayed (<i>Bibliography</i>).</li>
+    <li>Edit the Bibliography database, and alter its name, such as <i>Bibliography-old</i> (in fact, OpenOffice.org Writer does not allow selecting several bibliographic databases).
+    <li>Select your bibliographic database, edit it, and rename it <i>Bibliography</i> (pay a special attention to the capital letter at the beginning of the name).</li>
+    </ul>
+
+    After these steps, your bibliographic database should be ready for use with OpenOffice.org. To check about it, choose <b>Insert -&gt; Index -&gt; Bibliographic entry...</b>: the list of the BibTeX keys should be displayed.
+
+
     <h2>Using the exported file as bibliography database in
-    OpenOffice 2.0 or newer</h2>
+    OpenOffice.org 2.0, 2.1 and 2.2</h2>
 
     <p>Use the following steps to set up a spreadsheet exported from
     JabRef as bibliography database in OpenOffice.org:</p>
@@ -51,7 +73,7 @@
     displayed.
 
     <h2>Using the exported file as bibliography database in
-    OpenOffice 1.1.x</h2>
+    OpenOffice.org 1.1.x</h2>
 
     <ul>
         <li>Export your database using the <b>.sxc</b> format</li>
@@ -77,4 +99,4 @@
     Bibliography Database</b>. Your database should now be
     displayed.
 </body>
-</html>
\ No newline at end of file
+</html> 
\ No newline at end of file
diff --git a/src/help/da/About.html b/src/help/da/About.html
new file mode 100755 (executable)
index 0000000..8c73583
--- /dev/null
@@ -0,0 +1,132 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+<body text="#275856">
+    <basefont size="4"
+          color="#2F4958"
+          face="arial" />
+
+    <center>
+        <h1>JabRef version @version@</h1>
+
+        <p>(c) 2008</p>
+
+        <p><img src="/images/JabRef-icon-48.png" /></p>
+
+        <p>JabRef kan frit distribueres under betingelserne i
+        GNU <a href="License.html">General Public License</a>,
+        version 2.</p>
+
+        <h2>Udviklere:</h2>
+
+        <p>Morten O. Alver,
+        Nizar N. Batada,
+        Michel Baylac,
+        Kolja Brix,
+        Fr&eacute;d&eacute;ric Darboux,
+        Guillaume Gardey,
+        Cyrille d'Haese,
+        S M Mahbub Murshed,
+        Raik Nagel,
+        Christopher Oezbek,
+        Ellen Reitmayr,
+        Gert Renckens,
+        Andreas Rudert,
+        Michael Spiegel,
+        Ulrik Stervbo,
+        Dominik Wa&szlig;enhoven,
+        Joerg K. Wegner,
+        Michael Wrighton,
+        Egon Willighagen,
+        J&ouml;rg Zieren</p>
+
+        <h2>Bidrag fra:</h2>
+
+        <p>Thomas Arildsen,
+        Michael Beckmann,
+        Oliver Beckmann,
+        Fedor Bezrukov,            
+        Aaron Chen,
+        Fabrice Dessaint,
+        Nathan Dunn,
+        Brian Van Essen,
+        Alexis Gallagher,
+        David Gleich,
+        Sascha Hunold,
+        Bernd Kalbfuss,
+        Martin K&auml;hmer,
+        Ervin Kolenovic,
+        Krzysztof A. Ko&#347;ciuszkiewicz,
+        Christian Kopf,
+        Jeffrey Kuhn,
+        Alex Montgomery,
+        Ambrogio Oliva,
+        Stephan Rave,
+        John Relph,
+        Hannes Restel,
+        Moritz Ringler,
+        Andreas Rudert,
+        Mark Schenk,
+        Rudolf Seemann,
+        Toralf Senger,
+        Manuel Siebeneicher,
+        Mike Smoot,
+        Ulrich St&auml;rk,
+        Martin Stolle,
+        David Weitzman,
+        Seb Wills,
+        John Zedlewski</p>
+
+        <h2>Tak til:</h2>
+
+        <p>Samin Muhammad Ridwanul Karim,
+        Stefan Robert</p>
+
+        <h2>Tredjepartssoftware anvendt:</h2>
+
+        <p>JabRef bruger JGoodies Looks 2.0.4 og JGoodies Forms 1.0.5,
+        distribueret af JGoodies
+        (<code>http://www.jgoodies.com</code>) under betingelserne i
+        BSD License (se
+        <code>http://www.opensource.org/licenses/bsd-license.html</code>
+        for detaljer).</p>
+
+        <p>Inkluderer yderligere to klasser (SimpleInternalFrame og
+        UIFSplitPane) af Karsten Lentzsch, som distribueres
+        under <a href="jgoodies.html">disse betingelser</a>.</p>
+
+        <p>Kommandolinjeparametre fortolkes med RitOpt
+        (<code>http://ritopt.sourceforge.net</code>). RitOpt
+        distribueres under betingelserne i GNU
+        <a href="License.html">General Public License</a>, version
+        2.</p>
+
+        <p>JabRef bruger ANTLR parser-generatoren til fortolkning af
+        søgestrenge. ANTLR er public domain software - se
+        <code>http://www.antlr.org/license.html</code> for
+        licensbetingelser.</p>
+
+        <p>Til tabelpræsentation og -filtrering benytter JabRef Glazed
+        Lists biblioteket
+        (<code>http://publicobject.com/glazedlists</code>), som
+        distribueres under Lesser General Public License.</p>
+
+        <p>JabRef benytter også trådbiblioteket Spin 1.3.1, som
+        distribueres under betingelserne i Lesser General Public
+        License.</p>
+
+        <p>Der er brugt visse GUI-komponenter fra Microba-biblioteket,
+        som er licenseret under en BSD-lignende licens. See
+        <code>http://sourceforge.net/projects/microba/</code> for mere
+        information.</p>
+
+        <p>Størstedelen af ikonerne stammer fra Crystal Clear
+        ikonsættet af Everaldo (<code>http://www.everaldo.com</code>),
+        som distribueres under betingelserne i Lesser General Public
+        License.</p>
+
+        <p>JabRef benytter JempBox og PDFBox bibliotekerne til
+        PDF-håndtering; begge distribueres under en BSD-lignende
+        licens.</p>
+    </center>
+</body>
+</html>
index 1865d81..7e2517f 100644 (file)
@@ -41,7 +41,8 @@
 
         <h2>Beitr&auml;ge von:</h2>
 
-        <p>Michael Beckmann,
+        <p>Thomas Arildsen,
+        Michael Beckmann,
         Oliver B&ouml;ckmann,
         Fedor Bezrukov,            
         Aaron Chen,
diff --git a/src/help/fr/ACMPortalHelp.html b/src/help/fr/ACMPortalHelp.html
new file mode 100644 (file)
index 0000000..fed2b95
--- /dev/null
@@ -0,0 +1,32 @@
+<html xmlns="http://www.w3.org/1999/xhtml">
+
+<body text="#275856">
+    <basefont size="4"
+          color="#2F4958"
+          face="arial" />
+
+    <h1>R&eacute;cup&eacute;ration des entr&eacute;es depuis le portail <em>ACM</em></h1>
+
+    <p>Le portail ACM inclut deux bases de donn&eacute;es&nbsp;: le biblioth&egrave;que num&eacute;rique ACM ("ACM Digital Library")
+    qui est la collection compl&egrave;te de tous les articles publi&eacute;s par ACM, incluant plus de 50 ans d'archives, et
+    le Guide sur la Litt&eacute;rature Informatique ("Guide to Computing Literature") qui est une collection
+    bibliographique provenant de grands &eacute;diteurs en informatique et contenant plus d'un million d'entr&eacute;es.
+    </p>
+
+    <p>JabRef peut t&eacute;l&eacute;charger des citations &agrave; partir de la base de donn&eacute;es du portail ACM.
+    Pour mettre en oeuvre cette fonctionnalit&eacute;, choisissez <b>Recherche internet -&gt; 
+    Recherche dans la Biblioth&egrave;que Num&eacute;rique ACM</b>,
+    et l'interface de recherche s'ouvrira dans le panneau lat&eacute;ral.</p>
+
+    <p>Pour d&eacute;marrer la recherche, entrer les mots de votre requ&ecirc;te et appuyer sur 
+    <b>Entr&eacute;e</b> ou sur le bouton <b>Rechercher</b>.</p>
+
+         <p>Cela cause une quantit&eacute; relativement grande de requ&ecirc;tes r&eacute;seau. Pour &eacute;viter de mettre
+         une pression excessive sur le site internet du portail ACM, JabRef refusera de t&eacute;l&eacute;charger
+         plus qu'un certain nombre d'entr&eacute;es.</p>
+
+    <p>Vous pouvez choisir la base de donn&eacute;es sur laquelle portera la recherche. Vous pouvez d&eacute;cider
+    de t&eacute;l&eacute;charger les r&eacute;sum&eacute;s avec les autres informations de chaque entr&eacute;e en validant la case &agrave; cocher
+    <b>Inclure les r&eacute;sum&eacute;s</b>.</p>
+</body>
+</html>
index 0288e98..f1fa28a 100644 (file)
@@ -41,7 +41,8 @@
 
         <h2>Contributions de&nbsp;:</h2>
 
-        <p>Michael Beckmann,
+        <p>Thomas Arildsen,
+        Michael Beckmann,
         Oliver Beckmann,
         Fedor Bezrukov,
         Aaron Chen,
         la Lesser GNU Public License.</p>
 
        <p>Certains composants de l'interface graphique de la
-        biblioth&egrave&que Microba sont
-        utilis&eacute&. Elle est
+        biblioth&egrave;que Microba sont
+        utilis&eacute;s. Elle est
         distribu&eacute;e sous une license de type
         BSD. Voir
         <code>http://sourceforge.net/projects/microba/</code> pour
         Lesser General Public License.</p>
 
         <p>JabRef utilise les biblioth&egrave;ques JempBox et
-        PDFBox pour g&eacute;rer manipuler les PDF, les deux
-        &eacute;tant &eacute;es sous une licence de style BSD.</p>
+        PDFBox pour g&eacute;rer et manipuler les PDF, les deux
+        &eacute;tant distribu&eacute;es sous une licence de style BSD.</p>
     </center>
 </body>
-</html>
\ No newline at end of file
+</html> 
\ No newline at end of file
index c45292b..0fd0975 100644 (file)
      <a href="IEEEXploreHelp.html">R&eacute;cup&eacute;ration des entr&eacute;es depuis <em>IEEExplore</em></a><br>
      <a href="MedlineHelp.html">R&eacute;cup&eacute;ration des entr&eacute;es depuis <em>Medline</em></a><br>
      <a href="JSTOR.html">R&eacute;cup&eacute;ration des entr&eacute;es depuis <em>JStor</em></a><br>
+     <a href="Spires.html">R&eacute;cup&eacute;ration des entr&eacute;es depuis <em>Spires</em></a><br/>
+     <a href="ACMPortalHelp.html">R&eacute;cup&eacute;ration des entr&eacute;es depuis le portail <em>ACM</em></a><br/>
      <a href="SQLExport.html">Exporter vers une base de donn&eacute;es SQL externe</a><br>
      <a href="XMPHelp.html">Support des m&eacute;tadonn&eacute;es XMP dans JabRef</a><br>
      <a href="CommandLine.html">Options de la ligne de commande</a><br>
      <a href="RemoteHelp.html">Op&eacute;rations &agrave; distance</a><br>
 
 <h2>Divers</h2>
-     <a href="About.html">About JabRef</a><br>
+     <a href="About.html">A propos de JabRef</a><br>
 
 </body>
-</html> 
\ No newline at end of file
+</html> 
index 165fede..68de6ed 100644 (file)
         <li><code>HTMLChars</code>&nbsp;: remplace les
         caract&egrave;res sp&eacute;ciaux sp&eacute;cifiques
         &agrave; TeX (par exemple&nbsp;: {\^a} ou {\"{o}}) par leur
-        repr&eacute;sentation HTML.</li>
+        repr&eacute;sentation HTML, et traduit les commandes LaTeX
+        \emph, \textit, \textbf dans leurs &eacute;quivalents HTML.</li>
 
         <li><code>HTMLParagraphs</code>&nbsp;: interpr&egrave;te
         deux retours-chariot cons&eacute;cutifs (comme \n \n) comme
 
         <li><code>AuthorFirstFirstCommas</code>&nbsp;: formate le
         contenu des champs author/editor en mettant les
-        pr&eacute;noms en premier et des virgules comme
-        s&eacute;parateurs.</li>
+        pr&eacute;noms en premier, des virgules comme
+        s&eacute;parateurs et "and" entre les deux derniers noms.</li>
 
-        <li><code>AuthorFirstAbbrLastCommas</code>&nbsp;: &agrave;
-        documenter.</li>
+        <li><code>AuthorFirstLastOxfordCommas</code>&nbsp;:
+        similaire &agrave; <code>AuthorFirstLastCommas</code>,
+        except&eacute; que le "and" entre les deux derniers noms
+        est pr&eacute;c&eacute;d&eacute; d'une virgule.</li>
 
-        <li><code>AuthorFirstAbbrLastOxfordCommas</code>&nbsp;:
-        &agrave; documenter.</li>
+        <li><code>AuthorFirstAbbrLastCommas</code>&nbsp;: formate le
+        contenu des champs author/editor en mettant les
+        pr&eacute;noms abrégés en premier, des virgules comme
+        s&eacute;parateurs et "and" entre les deux derniers noms.</li>
 
-        <li><code>AuthorFirstLastOxfordCommas</code>&nbsp;:
-        &agrave; documenter.</li>
+        <li><code>AuthorFirstAbbrLastOxfordCommas</code>&nbsp;:
+        similaire &agrave; <code>AuthorFirstAbbrLastCommas</code>,
+        except&eacute; que le "and" entre les deux derniers noms
+        est pr&eacute;c&eacute;d&eacute; d'une virgule.</li>
 
         <li><code>AuthorLastFirst</code>&nbsp;: formate le contenu
-        des champs author/editor en mettant le nom de famille en
+        des champs author/editor en mettant les noms de famille en
         premier.</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>
+        le nom propre en premier. Faire suivre ce formateur d'<code>AuthorFirstFirst</code> pour
+        avoir les noms abr&eacute;g&eacute;s avec les initiales en premier.</li>
+        
+        <li><code>AuthorLastFirstCommas</code>&nbsp;: formate le contenu
+        des champs author/editor en mettant les noms de famille en
+        premier, des virgules comme s&eacute;parateurs et "and"
+        entre les deux derniers noms.</li> 
 
         <li><code>AuthorLastFirstOxfordCommas</code>&nbsp;:
-        &agrave; documenter.</li>
-
-        <li><code>AuthorLastFirstAbbrCommas</code>&nbsp;: &agrave;
-        documenter.</li>
-
-        <li><code>AuthorLastFirstAbbrOxfordCommas</code>&nbsp;:
-        &agrave; documenter.</li>
+        similaire &agrave; <code>AuthorLastFirstCommas</code>,
+        except&eacute; que le "and" entre les deux derniers noms
+        est pr&eacute;c&eacute;d&eacute; d'une virgule.</li>
+
+        <li><code>AuthorLastFirstAbbrCommas</code>&nbsp;: formate le
+        contenu des champs author/editor en mettant les noms en premier suivis
+        du pr&eacute;nom abrégé, en utilisant des virgules comme
+        s&eacute;parateurs et "and" entre les deux derniers noms.</li> 
+        <li><code>AuthorLastFirstAbbrCommas</code>&nbsp;: 
+        similaire &agrave; <code>AuthorLastFirstAbbrCommas</code>,
+        except&eacute; que le "and" entre les deux derniers noms
+        est pr&eacute;c&eacute;d&eacute; d'une virgule.</li>
 
         <li><code>AuthorAndsReplacer</code>&nbsp;: remplace "and"
         par ";" entre les premiers noms et par "&amp;" entre les
         <li><code>RemoveBracketsAddComma</code>&nbsp;: &agrave;
         documenter.</li>
 
-        <li><code>RemoveWhitespace</code>&nbsp;: &agrave;
-        documenter.</li>
+        <li><code>RemoveWhitespace</code>&nbsp;: supprime tous les caractères espace.</li>
 
         <li><code>RemoveLatexCommands</code>&nbsp;: supprime toutes
         les commandes LaTeX comme <code>\em</code>,
         <li><code>ToLowerCase</code>&nbsp;: bascule tous les
         caract&egrave;res en minuscules.</li>
 
-        <li><code>CompositeFormat</code>&nbsp;: &agrave;
-        documenter.</li>
-
-        <li><code>GetOpenOfficeType</code>&nbsp;: &agrave;
-        documenter.</li>
+        <li><code>ToUpperCase</code>&nbsp;: bascule tous les
+        caract&egrave;res en majuscules.</li>
 
-        <li><code>RTFChars</code>&nbsp;: &agrave; documenter.</li>
+        <li><code>GetOpenOfficeType</code>&nbsp;: renvoie le num&eacute;ro
+        utilis&eacute; par le syst&egrave;me bibliographique d'OpenOffice.org
+        (versions 1.x et 2.x) pour d&eacute;finir le type
+        de cette &eacute;e.</li>
 
-        <li><code>ResolvePDF</code>&nbsp;: &agrave;
-        documenter.</li>
+        <li><code>RTFChars</code>&nbsp;: remplace les
+        caract&egrave;res sp&eacute;ciaux sp&eacute;cifiques
+        &agrave; TeX (par exemple&nbsp;: {\^a} ou {\"{o}}) par leur
+        repr&eacute;sentation RTF, et traduit les commandes LaTeX
+        \emph, \textit, \textbf dans leurs &eacute;quivalents RTF.</li>
 
-    <li></li>
     </ul>
 
     <p>Si aucun des formateurs disponibles ne peut faire ce que
     collection des fichiers gabarit soumis ou de les ajouter
     &agrave; la s&eacute;rie des filtres d'exportation standard ou
     des formateurs.</p>
-    
+
     <p>A partir de JabRef 2.4b1 vous pouvez aussi empaqueter votre
     format d'exportation ("ExportFormat") ou formateur de gabarit
     ("LayoutFormatter") comme un greffon ("plug-in"). Si vous le
index 91b839a..7717a9a 100644 (file)
@@ -22,14 +22,14 @@ utiliser le bon encodage lors de la prochaine ouverture du fichier.</p>
 
 <p>Ces param&egrave;tres sont utilis&eacute;s pour sp&eacute;cifier dans quel r&eacute;pertoire chercher les fichiers li&eacute;s (sp&eacute;cifi&eacute;s dans le champ <em>File</em>) et pour les anciens liens PDF/PS (les champs <em>pdf</em>
 et <em>ps</em> &eacute;taient utilis&eacute;s dans les versions de JabRef inf&eacute;rieures &agrave; la version 2.3, mais devraient &ecirc;tre
-remplac&eacute;s par les fichiers liés du champ "File").</p>
+remplac&eacute;s par les fichiers li&eacute;s du champ "File").</p>
 
 <p>Des chemins de r&eacute;pertoires relatifs peuvent &ecirc;tre sp&eacute;cifi&eacute;s. Cela signifie que la localisation des fichiers sera
 interpr&eacute;t&eacute;e par rapport &agrave; la localisation du fichier bib. Param&eacute;trer le r&eacute;pertoire "." (sans les guillemets) signifie
 que les fichiers doivent se trouver dans le m&ecirc;me r&eacute;pertoire que le fichier bib.</p>
 
 <p>Ces param&egrave;tres supplantent les r&eacute;pertoires sp&eacute;cifi&eacute;s dans la fen&ecirc;tre de pr&eacute;f&eacute;rence (onglet "Programmes externes"). Si
-aucune valeur n'est sp&eacute;cifi&eacute;e, les r&eacute;pertoires par défaut seront utilis&eacute;s.</p>
+aucune valeur n'est sp&eacute;cifi&eacute;e, les r&eacute;pertoires par d&eacute;faut seront utilis&eacute;s.</p>
 
 <h2>Protection de la base de donn&eacute;es</h2>
 
index bc9b713..adb6b91 100644 (file)
     g&eacute;n&egrave;re les clefs <em>BibTeX</em>, voir
     <a href="LabelPatterns.html">Personnalisation du
     g&eacute;n&eacute;rateur de clefs BibTeX</a>.</p>
+    
+    <h2>Compl&egrave;tement automatique des mots/noms</h2>
+
+    <p>JabRef permet le compl&egrave;tement automatique des mots et des noms.
+    Le compl&egrave;tement automatique peut &ecirc;tre param&eacute;tr&eacute; dans
+    <b>Options -> Pr&eacute;f&eacute;rences -> Editeur d'entr&eacute;es</b> et est, par d&eacute;faut,
+    activ&eacute; pour plusieurs champs usuels.</p>
+
+    <p>Quand on &eacute;dite un champ pour lequel le compl&egrave;tement automatique est activ&eacute;,
+    Jabref essaye de sugg&eacute;rer des compl&egrave;tements de mots au cours de la frappe sur
+    la base des mots qui ont &eacute;t&eacute; utilis&eacute;s dans la base pour ce m&ecirc;me champ.
+    La suggestion appara&icirc;t comme un bloc de texte surlign&eacute; compl&eacute;tant le mot. S'il
+    y a plusieurs compl&egrave;tements possibles, vous pouvez utiliser les touches
+    PAGE SUIVANTE et PAGE PRECEDENTE pour faire d&eacute;filer les possibilit&eacute;s.
+    Pour accepter une suggestion, taper ENTREE une fois. Pour l'ignorer, continuer
+    simplement la frappe.</p>
+    
 </body>
-</html>
\ No newline at end of file
+</html> 
\ No newline at end of file
index 0341fd8..f9c542d 100644 (file)
     <h3>Cr&eacute;ation automatique de groupes dynamiques</h3>
 
     <p>En cliquant sur le bouton <b>Cr&eacute;er automatiquement des
-    groupes pour la base de donn&eacute;es</b> (les trois "+"
-    jaunes-orang&eacute;s), vous pouvez facilement cr&eacute;er une
+    groupes pour la base</b>, vous pouvez facilement cr&eacute;er une
     s&eacute;rie de groupes pertinents pour votre base de
     donn&eacute;es. Ce dispositif collectera tous les mots
     trouv&eacute;s dans le champ que vous aurez
     groupe raffinant --, les fr&egrave;res sont ignor&eacute;s
     quand le groupe raffinant est s&eacute;lectionn&eacute;.</p>
 </body>
-</html>
\ No newline at end of file
+</html> 
\ No newline at end of file
index 2d122c0..9381f0f 100644 (file)
@@ -11,7 +11,7 @@
     <p>JabRef peut exporter votre base de
     donn&eacute;es dans le format de tableur OpenOffice.org 1.1
     <b>.sxc</b> ainsi que dans le format OpenDocument <b>.ods</b>
-    utilis&eacute; par OpenOffice.org 2.0.</p>
+    utilis&eacute; par OpenOffice.org 2.</p>
 
     <p>Dans les deux cas, la table export&eacute;e contiendra une
     feuille de calcul, listant les entr&eacute;es selon les lignes
     noms des colonnes sont configur&eacute;s pour &ecirc;tre
     compatible avec les fonctions bibliographiques d'OpenOffice.org
     (OOo 1.1 dans le cas d'une exportation au format <b>.sxc</b>,
-    et OOo 2.0 pour une exportation au format <b>.ods</b>).</p>
+    et OOo 2 pour une exportation au format <b>.ods</b>).</p>
+
+
+    En fonction de la version d'OpenOffice.org, voici la façon d'utiliser les bibliographies JabRef&nbsp;:
+
+    <h2>Utiliser le fichier export&eacute; comme une base de
+    donn&eacute;es bibliographique dans OpenOffice.org 2.3 et 2.4</h2>
+    
+    <p>Suivez les &eacute;tapes suivantes pour
+    configurer une feuille de calcul export&eacute;e par JabRef
+    comme une base de donn&eacute;es bibliographique dans
+    OpenOffice.org&nbsp;:</p>
+     
+    <ul>
+    <li>Depuis JabRef, exporter votre base en utilisant le format <b>.ods</b></li>
+    <li>D&eacute;marrer OpenOffice.org Writer</li>
+    <li>Choisir <b>Edition -&gt; Changer de bases de donn&eacute;es</b>. Cliquer sur <b>Parcourir</b>, puis s&eacute;lectionner votre base export&eacute;e au format .ods.</li>
+    <li>D&eacute;rouler le <b>+</b> plac&eacute; devant le nom de la base import&eacute;e puis cliquer sur le nom du fichier qui appara&icirc;t, et enfin sur le bouton  <b>D&eacute;finir</b>.</li>
+    <li>Choisir <b>Outils -&gt; Options -&gt; OpenOffice.org Base -&gt; Base de donn&eacute;es</b>. Dans cette fen&ecirc;tre, la base de donn&eacute;es que vous avez import&eacute;e doit appara&icirc;tre, ainsi que la base de donn&eacute;es bibliographique par d&eacute;faut (<i>Bibliography</i>).</li>
+    <li>&Eacute;diter la base de donn&eacute;es Bibliography, et lui donner un autre nom, tel que <i>Bibliography-old</i> (en effet OpenOffice.org Writer ne permet pas de choisir entre plusieurs bibliographies).
+    <li>S&eacute;lectionner votre base de donn&eacute;es bibliographique, l'&eacute;diter et la renommer <i>Bibliography</i> en faisant attention &agrave; la graphie du mot (majuscule en d&eacute;but de nom).</li>
+    </ul>
+
+    Apr&egrave;s avoir effectu&eacute; ces &eacute;tapes, votre base de donn&eacute;es bibliographique devrait &ecirc;tre pr&ecirc;te à &ecirc;tre utilis&eacute;e avec OpenOffice.org. Pour le v&eacute;rifier, s&eacute;lectionner <b>Insertion -&gt; Index -&gt; Entr&eacute;e de bibliographie...</b>&nbsp;: la liste de cl&eacute;s BibTeX doit apparaître.
+
 
     <h2>Utiliser le fichier export&eacute; comme une base de
-    donn&eacute;es dans OpenOffice 2.0 et
-    sup&eacute;rieur</h2>
+    donn&eacute;es bibliographique dans OpenOffice.org 2.0, 2.1 et 2.2</h2>
 
     <p>Suivez les &eacute;tapes suivantes pour
     configurer une feuille de calcul export&eacute;e par JabRef
@@ -62,7 +85,7 @@
     maintenant s'afficher.
 
     <h2>Utiliser le fichier export&eacute; comme une base de
-    donn&eacute;es bibliographique dans OpenOffice 1.1.x</h2>
+    donn&eacute;es bibliographique dans OpenOffice.org 1.1.x</h2>
 
     <ul>
         <li>Exporter votre base de donn&eacute;es vers le format
     bibliographique</b>. Votre base de donn&eacute;es devrait
     maintenant s'afficher.
 </body>
-</html>
\ No newline at end of file
+</html> 
\ No newline at end of file
diff --git a/src/help/fr/Spires.html b/src/help/fr/Spires.html
new file mode 100644 (file)
index 0000000..0d7f339
--- /dev/null
@@ -0,0 +1,44 @@
+<html xmlns="http://www.w3.org/1999/xhtml">\r
+\r
+\r
+<body text="#275856">\r
+    <basefont size="4"\r
+          color="#2F4958"\r
+          face="arial">\r
+\r
+<h1>Recherche Spires</h1>\r
+\r
+<p>La fonction de recherche Spires ne fait en fait que lancer des requ&ecirc;tes de recherche sur le serveur web\r
+Spires&nbsp;; aussi, vous devez construire vos requ&ecirc;tes comme si vous alliez sur le serveur web, sauf que\r
+vous ne devez pas inclure les commandes <em>find</em> et <em>fin</em>.\r
+Cette page d'aide vous donne uniquement une br&egrave;ve introduction aux requ&ecirc;tes de recherche.\r
+Une aide plus longue sur les recherches dans Spires est disponible sur la page\r
+http://www.slac.stanford.edu/spires/hep/help/index.shtml (en anglais).</p>\r
+\r
+<p>Votre requ&ecirc;te peut se composer de plusieurs parties combin&eacute;es en utilisant <em>and</em> et <em>or</em>\r
+comme op&eacute;rateurs logiques. Chaque partie est compos&eacute;e d'une lettre ou d'un mot sp&eacute;cifiant le champ de recherche,\r
+suivi par un espace et le texte &agrave; rechercher.</p>\r
+\r
+<p>La liste suivante montre quelques-uns des champs de recherche qui peuvent &ecirc;tre sp&eacute;cifi&eacute;s&nbsp;:\r
+    <ul>\r
+    <li><em>a</em> ou <em>author</em>&nbsp;: recherche sur les noms d'auteurs</li>\r
+    <li><em>t</em> or <em>title</em>&nbsp;: recherche dans le titre</li>\r
+    <li><em>j</em>&nbsp;: journal. Ici, soit l'abr&eacute;viation usuelle, soit l'abr&eacute;viation CODEN de 5 lettres du nom\r
+    du journal peut &ecirc;tre utilis&eacute;. Num&eacute;ro de volume et page peuvent &ecirc;tre aussi inclus, s&eacute;par&eacute;s par des virgules.\r
+    Par exemple, <em>j Phys. Rev.,D54,1</em> recherche dans le journal Phys. Rev., volume D54, page 1.</li>\r
+    <li><em>k</em>: recherche dans les mots-clefs</li>\r
+</ul>\r
+</p>\r
+\r
+<p>Exemples de requ&ecirc;te&nbsp;:\r
+<ul>\r
+        <li><em>a smith and a jones</em>: recherche les r&eacute;f&eacute;rences ayant pour auteurs "smith" et "jones"</li>\r
+        <li><em>a smith or a jones</em>: recherche les r&eacute;f&eacute;rences ayant pour auteurs "smith" ou "jones"</li>\r
+        <li><em>a smith and not t processor</em>: recherche les r&eacute;f&eacute;rence ayant pour auteur "smith" et n'ayant\r
+        pas le mot "processor" dans le titre</li>\r
+</ul>\r
+</p>\r
+\r
+\r
+</body>\r
+</html> 
\ No newline at end of file
diff --git a/src/images/absIcon.png b/src/images/absIcon.png
deleted file mode 100644 (file)
index f249fda..0000000
Binary files a/src/images/absIcon.png and /dev/null differ
diff --git a/src/images/add.png b/src/images/add.png
deleted file mode 100644 (file)
index 6b636fe..0000000
Binary files a/src/images/add.png and /dev/null differ
diff --git a/src/images/autumn.png b/src/images/autumn.png
deleted file mode 100644 (file)
index 77b7590..0000000
Binary files a/src/images/autumn.png and /dev/null differ
diff --git a/src/images/completeItem.png b/src/images/completeItem.png
deleted file mode 100644 (file)
index 5eeadc7..0000000
Binary files a/src/images/completeItem.png and /dev/null differ
diff --git a/src/images/contents.png b/src/images/contents.png
deleted file mode 100644 (file)
index 6e44fa7..0000000
Binary files a/src/images/contents.png and /dev/null differ
index 515d166..1133f96 100644 (file)
@@ -74,4 +74,5 @@ groupIncluding=groupIncluding.png
 groupRefining=groupRefining.png
 unknown=help.png
 dbConnect=database_connect.png
-dbExport=database_save.png
\ No newline at end of file
+dbExport=database_save.png
+dbImport=database_save.png
\ No newline at end of file
diff --git a/src/images/database_connect.png b/src/images/database_connect.png
deleted file mode 100644 (file)
index 3a11197..0000000
Binary files a/src/images/database_connect.png and /dev/null differ
diff --git a/src/images/database_save.png b/src/images/database_save.png
deleted file mode 100644 (file)
index 44c06dd..0000000
Binary files a/src/images/database_save.png and /dev/null differ
diff --git a/src/images/document-save-as.png b/src/images/document-save-as.png
deleted file mode 100644 (file)
index 7a1591f..0000000
Binary files a/src/images/document-save-as.png and /dev/null differ
diff --git a/src/images/document-save.png b/src/images/document-save.png
deleted file mode 100644 (file)
index 0311e47..0000000
Binary files a/src/images/document-save.png and /dev/null differ
diff --git a/src/images/doismall.png b/src/images/doismall.png
deleted file mode 100644 (file)
index 3c9595b..0000000
Binary files a/src/images/doismall.png and /dev/null differ
diff --git a/src/images/duplicate.png b/src/images/duplicate.png
deleted file mode 100644 (file)
index 5599a18..0000000
Binary files a/src/images/duplicate.png and /dev/null differ
diff --git a/src/images/edit-copy.png b/src/images/edit-copy.png
deleted file mode 100644 (file)
index efec317..0000000
Binary files a/src/images/edit-copy.png and /dev/null differ
diff --git a/src/images/edit-cut.png b/src/images/edit-cut.png
deleted file mode 100644 (file)
index 7e750c9..0000000
Binary files a/src/images/edit-cut.png and /dev/null differ
diff --git a/src/images/edit-delete.png b/src/images/edit-delete.png
deleted file mode 100644 (file)
index 0ac3589..0000000
Binary files a/src/images/edit-delete.png and /dev/null differ
diff --git a/src/images/edit-find.png b/src/images/edit-find.png
deleted file mode 100644 (file)
index b98e348..0000000
Binary files a/src/images/edit-find.png and /dev/null differ
diff --git a/src/images/edit-paste.png b/src/images/edit-paste.png
deleted file mode 100644 (file)
index 577e9c2..0000000
Binary files a/src/images/edit-paste.png and /dev/null differ
diff --git a/src/images/edit-redo.png b/src/images/edit-redo.png
deleted file mode 100644 (file)
index 712a8ee..0000000
Binary files a/src/images/edit-redo.png and /dev/null differ
diff --git a/src/images/edit-undo.png b/src/images/edit-undo.png
deleted file mode 100644 (file)
index 4652df0..0000000
Binary files a/src/images/edit-undo.png and /dev/null differ
diff --git a/src/images/editor.png b/src/images/editor.png
deleted file mode 100644 (file)
index a653bfe..0000000
Binary files a/src/images/editor.png and /dev/null differ
diff --git a/src/images/emacs.png b/src/images/emacs.png
deleted file mode 100644 (file)
index 6b76f52..0000000
Binary files a/src/images/emacs.png and /dev/null differ
diff --git a/src/images/emblem-web-small.png b/src/images/emblem-web-small.png
deleted file mode 100644 (file)
index 3d81a37..0000000
Binary files a/src/images/emblem-web-small.png and /dev/null differ
diff --git a/src/images/emblem-web.png b/src/images/emblem-web.png
deleted file mode 100644 (file)
index 49f7290..0000000
Binary files a/src/images/emblem-web.png and /dev/null differ
diff --git a/src/images/fileclose.png b/src/images/fileclose.png
deleted file mode 100644 (file)
index 033326f..0000000
Binary files a/src/images/fileclose.png and /dev/null differ
diff --git a/src/images/fileclose2.png b/src/images/fileclose2.png
deleted file mode 100644 (file)
index c1e5f4d..0000000
Binary files a/src/images/fileclose2.png and /dev/null differ
diff --git a/src/images/filenew.png b/src/images/filenew.png
deleted file mode 100644 (file)
index 7274a21..0000000
Binary files a/src/images/filenew.png and /dev/null differ
diff --git a/src/images/fileopen.png b/src/images/fileopen.png
deleted file mode 100644 (file)
index 7c9f7a6..0000000
Binary files a/src/images/fileopen.png and /dev/null differ
diff --git a/src/images/genIcon.png b/src/images/genIcon.png
deleted file mode 100644 (file)
index 5bedaa2..0000000
Binary files a/src/images/genIcon.png and /dev/null differ
diff --git a/src/images/go-down.png b/src/images/go-down.png
deleted file mode 100644 (file)
index 970d43a..0000000
Binary files a/src/images/go-down.png and /dev/null differ
diff --git a/src/images/go-next.png b/src/images/go-next.png
deleted file mode 100644 (file)
index cfee8f4..0000000
Binary files a/src/images/go-next.png and /dev/null differ
diff --git a/src/images/go-previous.png b/src/images/go-previous.png
deleted file mode 100644 (file)
index 3311c05..0000000
Binary files a/src/images/go-previous.png and /dev/null differ
diff --git a/src/images/go-up.png b/src/images/go-up.png
deleted file mode 100644 (file)
index 4ee50ef..0000000
Binary files a/src/images/go-up.png and /dev/null differ
diff --git a/src/images/groupIncluding.png b/src/images/groupIncluding.png
deleted file mode 100644 (file)
index 6f2bd08..0000000
Binary files a/src/images/groupIncluding.png and /dev/null differ
diff --git a/src/images/groupRefining.png b/src/images/groupRefining.png
deleted file mode 100644 (file)
index 2ba0a26..0000000
Binary files a/src/images/groupRefining.png and /dev/null differ
diff --git a/src/images/grouping_morten.png b/src/images/grouping_morten.png
deleted file mode 100644 (file)
index 9b29f68..0000000
Binary files a/src/images/grouping_morten.png and /dev/null differ
diff --git a/src/images/groupsHighlightAll.png b/src/images/groupsHighlightAll.png
deleted file mode 100644 (file)
index c6e1a97..0000000
Binary files a/src/images/groupsHighlightAll.png and /dev/null differ
diff --git a/src/images/groupsHighlightAny.png b/src/images/groupsHighlightAny.png
deleted file mode 100644 (file)
index 1bc2e28..0000000
Binary files a/src/images/groupsHighlightAny.png and /dev/null differ
diff --git a/src/images/help-about.png b/src/images/help-about.png
deleted file mode 100644 (file)
index 90ce540..0000000
Binary files a/src/images/help-about.png and /dev/null differ
diff --git a/src/images/help-browser.png b/src/images/help-browser.png
deleted file mode 100644 (file)
index 6de563b..0000000
Binary files a/src/images/help-browser.png and /dev/null differ
diff --git a/src/images/integrity.png b/src/images/integrity.png
deleted file mode 100644 (file)
index 4343947..0000000
Binary files a/src/images/integrity.png and /dev/null differ
diff --git a/src/images/lyx2.png b/src/images/lyx2.png
deleted file mode 100644 (file)
index 84a742f..0000000
Binary files a/src/images/lyx2.png and /dev/null differ
diff --git a/src/images/mark.png b/src/images/mark.png
deleted file mode 100644 (file)
index 6f8ab3a..0000000
Binary files a/src/images/mark.png and /dev/null differ
diff --git a/src/images/messageFail.png b/src/images/messageFail.png
deleted file mode 100644 (file)
index 474f63f..0000000
Binary files a/src/images/messageFail.png and /dev/null differ
diff --git a/src/images/messageInfo.png b/src/images/messageInfo.png
deleted file mode 100644 (file)
index ecdc991..0000000
Binary files a/src/images/messageInfo.png and /dev/null differ
diff --git a/src/images/messageWarn.png b/src/images/messageWarn.png
deleted file mode 100755 (executable)
index 55a6f01..0000000
Binary files a/src/images/messageWarn.png and /dev/null differ
diff --git a/src/images/optIcon.png b/src/images/optIcon.png
deleted file mode 100644 (file)
index 64562b3..0000000
Binary files a/src/images/optIcon.png and /dev/null differ
diff --git a/src/images/pdf-new.png b/src/images/pdf-new.png
deleted file mode 100644 (file)
index cda12b9..0000000
Binary files a/src/images/pdf-new.png and /dev/null differ
diff --git a/src/images/pdf.png b/src/images/pdf.png
deleted file mode 100644 (file)
index d5eab07..0000000
Binary files a/src/images/pdf.png and /dev/null differ
diff --git a/src/images/postscript.png b/src/images/postscript.png
deleted file mode 100644 (file)
index 5065c98..0000000
Binary files a/src/images/postscript.png and /dev/null differ
diff --git a/src/images/preamble.png b/src/images/preamble.png
deleted file mode 100644 (file)
index cf9d89d..0000000
Binary files a/src/images/preamble.png and /dev/null differ
diff --git a/src/images/preferences.png b/src/images/preferences.png
deleted file mode 100644 (file)
index 426460b..0000000
Binary files a/src/images/preferences.png and /dev/null differ
diff --git a/src/images/remove.png b/src/images/remove.png
deleted file mode 100644 (file)
index 0815d3f..0000000
Binary files a/src/images/remove.png and /dev/null differ
diff --git a/src/images/reqIcon.png b/src/images/reqIcon.png
deleted file mode 100644 (file)
index 5d2439c..0000000
Binary files a/src/images/reqIcon.png and /dev/null differ
diff --git a/src/images/search.png b/src/images/search.png
deleted file mode 100644 (file)
index a555de8..0000000
Binary files a/src/images/search.png and /dev/null differ
diff --git a/src/images/splash-2.1beta.png b/src/images/splash-2.1beta.png
deleted file mode 100644 (file)
index 4304131..0000000
Binary files a/src/images/splash-2.1beta.png and /dev/null differ
diff --git a/src/images/splash-2.3.svg b/src/images/splash-2.3.svg
deleted file mode 100644 (file)
index d519da8..0000000
+++ /dev/null
@@ -1,276 +0,0 @@
-<?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.1"
-   sodipodi:version="0.32"
-   id="svg2138"
-   height="1052.3622047"
-   width="744.09448819"
-   inkscape:output_extension="org.inkscape.output.svg.inkscape">
-  <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>
-  </g>
-</svg>
diff --git a/src/images/splash-2.4.svg b/src/images/splash-2.4.svg
new file mode 100644 (file)
index 0000000..5fec23f
--- /dev/null
@@ -0,0 +1,284 @@
+<?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://creativecommons.org/ns#"
+   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.4.svg"
+   sodipodi:docbase="/home/alver/jabref_trunk/src/images"
+   inkscape:version="0.46"
+   sodipodi:version="0.32"
+   id="svg2138"
+   height="1052.3622047"
+   width="744.09448819"
+   inkscape:output_extension="org.inkscape.output.svg.inkscape">
+  <defs
+     id="defs2140">
+    <inkscape:perspective
+       sodipodi:type="inkscape:persp3d"
+       inkscape:vp_x="0 : 526.18109 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_z="744.09448 : 526.18109 : 1"
+       inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
+       id="perspective2595" />
+    <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="1279"
+     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"
+     showgrid="false" />
+  <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_trunk/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_trunk/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_trunk/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_trunk/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_trunk/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_trunk/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_trunk/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.4</tspan></text>
+  </g>
+</svg>
index cbd8027..5e56a38 100644 (file)
Binary files a/src/images/splash.png and b/src/images/splash.png differ
diff --git a/src/images/strings.png b/src/images/strings.png
deleted file mode 100644 (file)
index 649899f..0000000
Binary files a/src/images/strings.png and /dev/null differ
diff --git a/src/images/unmark.png b/src/images/unmark.png
deleted file mode 100644 (file)
index 92ac338..0000000
Binary files a/src/images/unmark.png and /dev/null differ
diff --git a/src/images/user-home.png b/src/images/user-home.png
deleted file mode 100644 (file)
index a3c4765..0000000
Binary files a/src/images/user-home.png and /dev/null differ
diff --git a/src/images/view-refresh.png b/src/images/view-refresh.png
deleted file mode 100644 (file)
index 952b5f7..0000000
Binary files a/src/images/view-refresh.png and /dev/null differ
diff --git a/src/images/viewsource.gif b/src/images/viewsource.gif
deleted file mode 100644 (file)
index 3ef9a2e..0000000
Binary files a/src/images/viewsource.gif and /dev/null differ
diff --git a/src/images/winedt.png b/src/images/winedt.png
deleted file mode 100644 (file)
index cded1a7..0000000
Binary files a/src/images/winedt.png and /dev/null differ
diff --git a/src/images/wizard.png b/src/images/wizard.png
deleted file mode 100644 (file)
index b5d81d3..0000000
Binary files a/src/images/wizard.png and /dev/null differ
diff --git a/src/images/wrongItem.png b/src/images/wrongItem.png
deleted file mode 100644 (file)
index 8b2f1eb..0000000
Binary files a/src/images/wrongItem.png and /dev/null differ
diff --git a/src/images/wwwciteseer.png b/src/images/wwwciteseer.png
deleted file mode 100644 (file)
index 1885445..0000000
Binary files a/src/images/wwwciteseer.png and /dev/null differ
index b04d542..6cfb2c1 100644 (file)
@@ -6,6 +6,7 @@ import javax.swing.*;
 import javax.swing.event.ChangeEvent;
 import javax.swing.event.ChangeListener;
 
+import net.sf.jabref.journals.JournalAbbreviations;
 import net.sf.jabref.remote.RemoteListener;
 
 import com.jgoodies.forms.builder.DefaultFormBuilder;
@@ -20,7 +21,7 @@ public class AdvancedTab extends JPanel implements PrefsTab {
     JPanel pan = new JPanel(),
         lnf = new JPanel();
     JLabel lab;
-    JCheckBox useDefault, useRemoteServer, useNativeFileDialogOnMac;
+    JCheckBox useDefault, useRemoteServer, useNativeFileDialogOnMac, useIEEEAbrv;
     JTextField className, remoteServerPort;
     JButton def1 = new JButton(Globals.lang("Default")),
         def2 = new JButton(Globals.lang("Default"));
@@ -39,6 +40,7 @@ public class AdvancedTab extends JPanel implements PrefsTab {
     useDefault = new JCheckBox(Globals.lang("Use other look and feel"));
     useRemoteServer = new JCheckBox(Globals.lang("Listen for remote operation on port")+":");
     useNativeFileDialogOnMac = new JCheckBox(Globals.lang("Use native file dialog"));
+    useIEEEAbrv = new JCheckBox(Globals.lang("Use IEEE LaTeX abbreviations"));
     remoteServerPort = new JTextField();
     className = new JTextField(50);
     final JTextField clName = className;
@@ -84,7 +86,14 @@ public class AdvancedTab extends JPanel implements PrefsTab {
     }
     builder.appendSeparator(Globals.lang("Remote operation"));
     builder.nextLine();
+    builder.append(new JPanel());    
+    builder.append(new JLabel("<html>"+Globals.lang("This feature lets new files be opened or imported into an "
+        +"already running instance of JabRef<BR>instead of opening a new instance. For instance, this "
+        +"is useful when you open a file in JabRef<br>from your web browser."
+        +"<BR>Note that this will prevent you from running more than one instance of JabRef at a time.")+"</html>"));
+    builder.nextLine();
     builder.append(new JPanel());
+
     JPanel p = new JPanel();
     p.add(useRemoteServer);
     p.add(remoteServerPort);
@@ -98,6 +107,12 @@ public class AdvancedTab extends JPanel implements PrefsTab {
     builder.append(new JPanel());
     builder.append(useNativeFileDialogOnMac);
     //}
+       // IEEE
+    builder.nextLine();
+    builder.appendSeparator(Globals.lang("Search IEEEXplore"));
+    builder.nextLine();
+    builder.append(new JPanel());
+    builder.append(useIEEEAbrv);
 
     pan = builder.getPanel();
     pan.setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
@@ -115,13 +130,17 @@ public class AdvancedTab extends JPanel implements PrefsTab {
     useRemoteServer.setSelected(_prefs.getBoolean("useRemoteServer"));
     oldPort = _prefs.getInt("remoteServerPort");
     remoteServerPort.setText(String.valueOf(oldPort));
-        useNativeFileDialogOnMac.setSelected(Globals.prefs.getBoolean("useNativeFileDialogOnMac"));
+    useNativeFileDialogOnMac.setSelected(Globals.prefs.getBoolean("useNativeFileDialogOnMac"));
+    useIEEEAbrv.setSelected(Globals.prefs.getBoolean("useIEEEAbrv"));
     }
 
     public void storeSettings() {
         _prefs.putBoolean("useDefaultLookAndFeel", !useDefault.isSelected());
         _prefs.put("lookAndFeel", className.getText());
         _prefs.putBoolean("useNativeFileDialogOnMac", useNativeFileDialogOnMac.isSelected());
+        _prefs.putBoolean("useIEEEAbrv", useIEEEAbrv.isSelected());
+        if (useIEEEAbrv.isSelected())
+               Globals.journalAbbrev = new JournalAbbreviations("/resource/IEEEJournalList.txt");
         try {
             int port = Integer.parseInt(remoteServerPort.getText());
             if (port != oldPort) {
index 9bb2a05..4217630 100644 (file)
@@ -385,9 +385,16 @@ public class AuthorList {
                        if (von_start < 0) { // no 'von part'
                                last_part_end = tokens.size();
                                last_part_start = tokens.size() - TOKEN_GROUP_LENGTH;
+                               int index = tokens.size() - 2 * TOKEN_GROUP_LENGTH + OFFSET_TOKEN_TERM;
+                               if (index > 0) {
+                                       Character ch = (Character)tokens.elementAt(index);
+                                       if (ch.charValue() == '-')
+                                               last_part_start -= TOKEN_GROUP_LENGTH;
+                               }
                                first_part_end = last_part_start;
-                               if (first_part_end > 0)
+                               if (first_part_end > 0) {
                                        first_part_start = 0;
+                               }
                        } else { // 'von part' is present
                                if (last_start >= 0) {
                                        last_part_end = tokens.size();
@@ -552,12 +559,13 @@ public class AuthorList {
                        if (c == '\\')
                                current_backslash = token_end;
                        if (braces_level == 0)
-                               if (c == ',' || c == '~' || /* c=='-' || */Character.isWhitespace(c))
+                               if (c == ',' || c == '~' || c=='-' || Character.isWhitespace(c))
                                        break;
                        // Morten Alver 18 Apr 2006: Removed check for hyphen '-' above to
                        // prevent
                        // problems with names like Bailey-Jones getting broken up and
                        // sorted wrong.
+                       // Aaron Chen 14 Sep 2008: Enable hyphen check for first names like Chang-Chin
                        token_end++;
                }
                if (token_abbr < 0)
@@ -643,7 +651,6 @@ public class AuthorList {
         * @return formatted list of authors.
         */
        public String getAuthorsLastOnly(boolean oxfordComma) {
-
                int abbrInt = (oxfordComma ? 0 : 1);
 
                // Check if we've computed this before:
@@ -744,7 +751,6 @@ public class AuthorList {
         * @return formatted list of authors.
         */
        public String getAuthorsLastFirstAnds(boolean abbreviate) {
-
                int abbrInt = (abbreviate ? 0 : 1);
                // Check if we've computed this before:
                if (authorLastFirstAnds[abbrInt] != null)
index ed82c8c..895b0eb 100644 (file)
@@ -51,13 +51,13 @@ import net.sf.jabref.journals.UnabbreviateAction;
 import net.sf.jabref.labelPattern.LabelPatternUtil;
 import net.sf.jabref.search.NoSearchMatcher;
 import net.sf.jabref.search.SearchMatcher;
-import net.sf.jabref.sql.DBConnectDialog;
-import net.sf.jabref.sql.DBStrings;
-import net.sf.jabref.sql.SQLutil;
+import net.sf.jabref.sql.*;
 import net.sf.jabref.undo.*;
 import net.sf.jabref.wizard.text.gui.TextInputDialog;
 
 import javax.swing.*;
+import javax.swing.event.UndoableEditListener;
+import javax.swing.event.UndoableEditEvent;
 import javax.swing.tree.TreePath;
 import javax.swing.undo.CannotRedoException;
 import javax.swing.undo.CannotUndoException;
@@ -69,7 +69,6 @@ import java.awt.event.KeyEvent;
 import java.io.File;
 import java.io.IOException;
 import java.nio.charset.UnsupportedCharsetException;
-import java.sql.Connection;
 import java.util.*;
 import java.util.List;
 
@@ -111,7 +110,7 @@ public class BasePanel extends JPanel implements ClipboardOwner, FileUpdateListe
     public CountingUndoManager undoManager = new CountingUndoManager(this);
     UndoAction undoAction = new UndoAction();
     RedoAction redoAction = new RedoAction();
-
+    
     //ExampleFileFilter fileFilter;
     // File filter for .bib files.
 
@@ -121,6 +120,7 @@ public class BasePanel extends JPanel implements ClipboardOwner, FileUpdateListe
     //EntryTableModel tableModel = null;
     //public EntryTable entryTable = null;
     public MainTable mainTable = null;
+    public MainTableFormat tableFormat = null;
     public FilterList<BibtexEntry> searchFilterList = null, groupFilterList = null;
 
     public RightClickMenu rcm;
@@ -189,31 +189,43 @@ public class BasePanel extends JPanel implements ClipboardOwner, FileUpdateListe
 
     public BasePanel(JabRefFrame frame, BibtexDatabase db, File file,
                      HashMap<String, String> meta, String encoding) {
+        this.database = db;
+        if (meta != null)
+            parseMetaData(meta);
+        else {
+            metaData = new MetaData();
+            metaData.initializeNewDatabase();
+        }
+        init(frame, db, file, metaData, encoding);
+    }
+
+    public BasePanel(JabRefFrame frame, BibtexDatabase db, File file,
+                     MetaData metaData, String encoding) {
+        init(frame, db, file, metaData, encoding);
+    }
 
+    private void init(JabRefFrame frame, BibtexDatabase db, File file,
+                      MetaData metaData, String encoding) {
         this.encoding = encoding;
-       // System.out.println(encoding);
-     //super(JSplitPane.HORIZONTAL_SPLIT, true);
-      this.sidePaneManager = Globals.sidePaneManager;
-      this.frame = frame;
-      database = db;
-      if (meta != null)
-        parseMetaData(meta);
-      else {
-        metaData = new MetaData();
-        metaData.initializeNewDatabase();   
-      }
-      setupActions();
-      setupMainPanel();
+        this.metaData = metaData;
+        // System.out.println(encoding);
+        //super(JSplitPane.HORIZONTAL_SPLIT, true);
+        this.sidePaneManager = Globals.sidePaneManager;
+        this.frame = frame;
+        database = db;
 
-      metaData.setFile(file);
+        setupActions();
+        setupMainPanel();
 
-      // Register so we get notifications about outside changes to the file.
-      if (file != null)
-        try {
-          fileMonitorHandle = Globals.fileUpdateMonitor.addUpdateListener(this,
-              file);
-        } catch (IOException ex) {
-        }
+        metaData.setFile(file);
+
+        // Register so we get notifications about outside changes to the file.
+        if (file != null)
+            try {
+                fileMonitorHandle = Globals.fileUpdateMonitor.addUpdateListener(this,
+                        file);
+            } catch (IOException ex) {
+            }
     }
 
     public boolean isBaseChanged(){
@@ -260,10 +272,20 @@ public class BasePanel extends JPanel implements ClipboardOwner, FileUpdateListe
         actions.put("undo", undoAction);
         actions.put("redo", redoAction);
 
+        actions.put("focusTable", new BaseAction() {
+            public void action() throws Throwable {
+                new FocusRequester(mainTable);
+            }
+        });
+        
         // The action for opening an entry editor.
         actions.put("edit", new BaseAction() {
             public void action() {
-                selectionListener.editSignalled();
+                /*System.out.println(Globals.focusListener.getFocused().getClass().getName());
+                if (Globals.focusListener.getFocused() instanceof FieldEditor)
+                    new FocusRequester(mainTable);
+                else*/
+                    selectionListener.editSignalled();
             }
                 /*
                   if (isShowingEditor()) {
@@ -295,7 +317,8 @@ public class BasePanel extends JPanel implements ClipboardOwner, FileUpdateListe
             });
 
 
-        actions.put("test", new BaseAction () {
+        actions.put("test", new AccessLinksForEntries.SaveWithLinkedFiles(this));
+                /*new BaseAction () {
                 public void action() throws Throwable {
 
                     SearchResultsDialog diag = new SearchResultsDialog(frame, "Test");
@@ -311,7 +334,7 @@ public class BasePanel extends JPanel implements ClipboardOwner, FileUpdateListe
 
                     // Z3950Connection conn = new Z3950Connection();
                     // conn.doSearch();
-                    /*
+
                     ArrayList<BibtexEntry> entries = new ArrayList<BibtexEntry>();
                     BibtexEntry[] sel = getSelectedEntries();
                     for (int i = 0; i < sel.length; i++) {
@@ -351,9 +374,9 @@ public class BasePanel extends JPanel implements ClipboardOwner, FileUpdateListe
                     //ExternalFileTypeEditor efte = new ExternalFileTypeEditor(frame);
                     //efte.setVisible(true);
 
-                    */
+
                 }
-            });
+            });*/
 
 
         // The action for saving a database.
@@ -637,65 +660,12 @@ public class BasePanel extends JPanel implements ClipboardOwner, FileUpdateListe
 
 
         // action for collecting database strings from user
-        actions.put("dbConnect", new BaseAction() {
-
-            public void action () {
-
-                DBStrings dbs = metaData.getDBStrings();
-
-                // init DB strings if necessary
-                if (! dbs.isInitialized()) {
-                    dbs.initialize();
-                }
-
-                // show connection dialog
-                DBConnectDialog dbd = new DBConnectDialog(frame(), dbs);
-                Util.placeDialog(dbd, BasePanel.this );
-                dbd.setVisible(true);
-
-                // connnect to database to test DBStrings
-                if (dbd.getConnectToDB()) {
-
-                    dbs = dbd.getDBStrings();
-
-                    try {
-
-                        frame.output(Globals.lang("Establishing SQL connection..."));
-                        Connection conn = SQLutil.connectToDB(dbs);
-                        conn.close();
-                        dbs.isConfigValid(true);
-                        frame.output(Globals.lang("SQL connection established."));
-
-                    } catch (Exception ex) {
-
-                        String errorMessage = SQLutil.getExceptionMessage(ex,SQLutil.DBTYPE.MYSQL);
-                        dbs.isConfigValid(false);
-
-                        String preamble = "Could not connect to SQL database for the following reason:";
-                        frame.output(Globals.lang(preamble)
-                                + "  " +  errorMessage);
-
-                        JOptionPane.showMessageDialog(frame, Globals.lang(preamble)
-                            + "\n" + errorMessage, Globals.lang("Connect to SQL database"),
-                            JOptionPane.ERROR_MESSAGE);
-                       
-                    } finally {
-
-                        metaData.setDBStrings(dbs);
-                        dbd.dispose();
-
-                    }
-
-                }
-
-            }
-
-        });
+        actions.put("dbConnect", new DbConnectAction(this));
 
 
         // action for exporting database to external SQL database
         actions.put("dbExport", new AbstractWorker () {
-           
+
             String errorMessage = null;
             boolean connectToDB = false;
 
@@ -782,7 +752,7 @@ public class BasePanel extends JPanel implements ClipboardOwner, FileUpdateListe
                     JOptionPane.showMessageDialog(frame, Globals.lang(preamble)
                         + "\n" + errorMessage, Globals.lang("Export to SQL database"),
                         JOptionPane.ERROR_MESSAGE);
-                   
+
                     errorMessage = null;
 
                 }
@@ -790,6 +760,7 @@ public class BasePanel extends JPanel implements ClipboardOwner, FileUpdateListe
 
         });
 
+
         // The action for auto-generating keys.
         actions.put("makeKey", new AbstractWorker() {
         //int[] rows;
@@ -1001,7 +972,30 @@ public class BasePanel extends JPanel implements ClipboardOwner, FileUpdateListe
                     public void run() {
                         BibtexEntry[] bes = mainTable.getSelectedEntries();
                         String field = "ps";
+
                         if ((bes != null) && (bes.length == 1)) {
+                            FileListEntry entry = null;
+                            FileListTableModel tm = new FileListTableModel();
+                            tm.setContent(bes[0].getField("file"));
+                            for (int i=0; i< tm.getRowCount(); i++) {
+                                FileListEntry flEntry = tm.getEntry(i);
+                                if (flEntry.getType().getName().toLowerCase().equals("pdf")
+                                    || flEntry.getType().getName().toLowerCase().equals("ps")) {
+                                    entry = flEntry;
+                                    break;
+                                }
+                            }
+                            if (entry != null) {
+                                try {
+                                    Util.openExternalFileAnyFormat(metaData, entry.getLink(), entry.getType());
+                                    output(Globals.lang("External viewer called") + ".");
+                                } catch (IOException e) {
+                                    output(Globals.lang("Could not open link"));
+                                    e.printStackTrace();
+                                }
+                                return;
+                            }
+                            // If we didn't find anything in the "file" field, check "ps" and "pdf" fields:
                             Object link = bes[0].getField("ps");
                             if (bes[0].getField("pdf") != null) {
                                 link = bes[0].getField("pdf");
@@ -1011,28 +1005,75 @@ public class BasePanel extends JPanel implements ClipboardOwner, FileUpdateListe
                             if (link != null) {
                                 filepath = link.toString();
                             } else {
+                                if (Globals.prefs.getBoolean("runAutomaticFileSearch")) {
+
+                                     /*  The search can lead to an unexpected 100% CPU usage which is perceived
+                                         as a bug, if the search incidentally starts at a directory with lots
+                                         of stuff below. It is now disabled by default. */
+
+                                    // see if we can fall back to a filename based on the bibtex key
+                                    final Collection<BibtexEntry> entries = new ArrayList<BibtexEntry>();
+                                    entries.add(bes[0]);
+                                    ExternalFileType[] types = Globals.prefs.getExternalFileTypeSelection();
+                                    ArrayList<File> dirs = new ArrayList<File>();
+                                    if (metaData.getFileDirectory(GUIGlobals.FILE_FIELD) != null)
+                                        dirs.add(new File(metaData.getFileDirectory(GUIGlobals.FILE_FIELD)));
+                                    Collection<String> extensions = new ArrayList<String>();
+                                    for (int i = 0; i < types.length; i++) {
+                                        final ExternalFileType type = types[i];
+                                        extensions.add(type.getExtension());
+                                    }
+                                    // Run the search operation:
+                                    Map<BibtexEntry, java.util.List<File>> result;
+                                    if (Globals.prefs.getBoolean(JabRefPreferences.USE_REG_EXP_SEARCH_KEY)) {
+                                        String regExp = Globals.prefs.get(JabRefPreferences.REG_EXP_SEARCH_EXPRESSION_KEY);
+                                        result = RegExpFileSearch.findFilesForSet(entries, extensions, dirs, regExp);
+                                    }
+                                    else
+                                        result = Util.findAssociatedFiles(entries, extensions, dirs);
+                                    if (result.get(bes[0]) != null) {
+                                        List<File> res = result.get(bes[0]);
+                                        if (res.size() > 0) {
+                                            filepath = res.get(0).getPath();
+                                            int index = filepath.lastIndexOf('.');
+                                            if ((index >= 0) && (index < filepath.length()-1)) {
+                                                String extension = filepath.substring(index+1);
+                                                ExternalFileType type = Globals.prefs.getExternalFileTypeByExt(extension);
+                                                if (type != null) {
+                                                    try {
+                                                        Util.openExternalFileAnyFormat(metaData, filepath, type);
+                                                        output(Globals.lang("External viewer called") + ".");
+                                                        return;
+                                                    } catch (IOException ex) {
+                                                        output(Globals.lang("Error") + ": " + ex.getMessage());
+                                                    }
+                                                }
+                                            }
 
-                                // see if we can fall back to a filename based on the bibtex key
-                                String basefile;
-                                Object key = bes[0].getField(BibtexFields.KEY_FIELD);
-                                if (key != null) {
-                                    basefile = key.toString();
-                                    final ExternalFileType[] types = Globals.prefs.getExternalFileTypeSelection();
-                                    final String sep = System.getProperty("file.separator");
-                                    String dir = metaData.getFileDirectory(GUIGlobals.FILE_FIELD);
-                                    if ((dir != null) && (dir.length() > 0)) {
-                                        if (dir.endsWith(sep)) {
-                                            dir = dir.substring(0, dir.length() - sep.length());
+                                            // TODO: add code for opening the file
                                         }
-                                        for (int i = 0; i < types.length; i++) {
-                                            String found = Util.findPdf(basefile, types[i].getExtension(),
-                                                    dir, new OpenFileFilter("." + types[i].getExtension()));
-                                            if (found != null) {
-                                                filepath = dir + sep + found;
-                                                break;
+                                    }
+                                    /*String basefile;
+                                    Object key = bes[0].getField(BibtexFields.KEY_FIELD);
+                                    if (key != null) {
+                                        basefile = key.toString();
+                                        final ExternalFileType[] types = Globals.prefs.getExternalFileTypeSelection();
+                                        final String sep = System.getProperty("file.separator");
+                                        String dir = metaData.getFileDirectory(GUIGlobals.FILE_FIELD);
+                                        if ((dir != null) && (dir.length() > 0)) {
+                                            if (dir.endsWith(sep)) {
+                                                dir = dir.substring(0, dir.length() - sep.length());
+                                            }
+                                            for (int i = 0; i < types.length; i++) {
+                                                String found = Util.findPdf(basefile, types[i].getExtension(),
+                                                        dir, new OpenFileFilter("." + types[i].getExtension()));
+                                                if (found != null) {
+                                                    filepath = dir + sep + found;
+                                                    break;
+                                                }
                                             }
                                         }
-                                    }
+                                    }*/
                                 }
                             }
 
@@ -1080,7 +1121,7 @@ public class BasePanel extends JPanel implements ClipboardOwner, FileUpdateListe
                                 (frame(), bes[0], "",
                                 flEntry.getLink(), flEntry.getType().getIcon(),
                                 metaData(), flEntry.getType());
-                            item.actionPerformed(null);
+                            item.openLink();
                         } else
                             output(Globals.lang("No entries or multiple entries selected."));
                     }
@@ -1603,7 +1644,7 @@ public class BasePanel extends JPanel implements ClipboardOwner, FileUpdateListe
         groupFilterList = new FilterList<BibtexEntry>(eventList.getTheList(), NoSearchMatcher.INSTANCE);
         searchFilterList = new FilterList<BibtexEntry>(groupFilterList, NoSearchMatcher.INSTANCE);
         //final SortedList sortedList = new SortedList(searchFilterList, null);
-        MainTableFormat tableFormat = new MainTableFormat(this);
+        tableFormat = new MainTableFormat(this);
         tableFormat.updateTableFormat();
         //EventTableModel tableModel = new EventTableModel(sortedList, tableFormat);
         mainTable = new MainTable(tableFormat, searchFilterList, frame, this);
@@ -2373,6 +2414,16 @@ public class BasePanel extends JPanel implements ClipboardOwner, FileUpdateListe
     class UndoAction extends BaseAction {
         public void action() {
             try {
+                JComponent focused = Globals.focusListener.getFocused();
+                if ((focused != null) && (focused instanceof FieldEditor) && (focused.hasFocus())) {
+                    // User is currently editing a field:
+                    // Check if it is the preamble:
+                    if ((preambleEditor != null) && (focused == preambleEditor.getFieldEditor())) {
+                        preambleEditor.storeCurrentEdit();
+                    }
+                    else
+                        storeCurrentEdit();
+                }
                 String name = undoManager.getUndoPresentationName();
                 undoManager.undo();
                 markBaseChanged();
@@ -2389,8 +2440,16 @@ public class BasePanel extends JPanel implements ClipboardOwner, FileUpdateListe
     }
 
     class RedoAction extends BaseAction {
+
         public void action() {
             try {
+
+                JComponent focused = Globals.focusListener.getFocused();
+                if ((focused != null) && (focused instanceof FieldEditor) && (focused.hasFocus())) {
+                    // User is currently editing a field:
+                    storeCurrentEdit();
+                }
+
                 String name = undoManager.getRedoPresentationName();
                 undoManager.redo();
                 markBaseChanged();
@@ -2571,4 +2630,5 @@ public class BasePanel extends JPanel implements ClipboardOwner, FileUpdateListe
         this.saving = saving;
     }
 
+    
 }
index 806ab50..f2e5193 100644 (file)
@@ -36,10 +36,7 @@ import java.beans.VetoableChangeListener;
 import java.beans.VetoableChangeSupport;
 import java.io.IOException;
 import java.io.Writer;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Set;
-import java.util.TreeSet;
+import java.util.*;
 
 import net.sf.jabref.export.FieldFormatter;
 
@@ -339,7 +336,7 @@ public class BibtexEntry
      */
     public void write(Writer out, FieldFormatter ff, boolean write) throws IOException {
         // Write header with type and bibtex-key.
-        out.write("@"+_type.getName().toUpperCase()+"{");
+        out.write("@"+_type.getName().toUpperCase(Locale.US)+"{");
 
         String str = Util.shaveString(getField(BibtexFields.KEY_FIELD));
         out.write(((str == null) ? "" : str)+","+Globals.NEWLINE);
index 5d29b70..9c5c000 100644 (file)
@@ -31,6 +31,7 @@ package net.sf.jabref;
 
 import java.util.Iterator;
 import java.util.TreeMap;
+import java.util.Locale;
 
 public abstract class BibtexEntryType implements Comparable<BibtexEntryType>
 {
@@ -583,6 +584,161 @@ public abstract class BibtexEntryType implements Comparable<BibtexEntryType>
             }
         };
 
+     public static final BibtexEntryType PERIODICAL =
+        new BibtexEntryType()
+        {
+            public String getName()
+            {
+                return "Periodical";
+            }
+
+            public String[] getOptionalFields()
+            {
+                return new String[]
+                {
+                    "editor", "language", "series", "volume", "number", "organization", "month", "note", "url"
+                };
+            }
+
+            public String[] getRequiredFields()
+            {
+                return new String[]
+                {
+                    "title", "year"
+                };
+            }
+
+            public String describeRequiredFields()
+            {
+                return "TITLE and YEAR";
+            }
+
+            public boolean hasAllRequiredFields(BibtexEntry entry, BibtexDatabase database)
+            {
+                return entry.allFieldsPresent(new String[]
+                    {
+                        "title", "year", "bibtexkey"
+                    }, database);
+            }
+        };
+
+     public static final BibtexEntryType PATENT =
+        new BibtexEntryType()
+        {
+            public String getName()
+            {
+                return "Patent";
+            }
+
+            public String[] getOptionalFields()
+            {
+                return new String[]
+                {
+                    "author", "title", "language", "assignee", "address", "type", "number", "day", "dayfiled", "month", "monthfiled", "note", "url"
+                };
+            }
+
+            public String[] getRequiredFields()
+            {
+                return new String[]
+                {
+                    "nationality", "number", "year", "yearfiled"
+                };
+            }
+
+            public String describeRequiredFields()
+            {
+                return "NATIONALITY, NUMBER, YEAR or YEARFILED";
+            }
+
+            public boolean hasAllRequiredFields(BibtexEntry entry, BibtexDatabase database)
+            {
+                return entry.allFieldsPresent(new String[]
+                    {
+                        "number", "bibtexkey"
+                    }, database) &&
+                ((entry.getField("year") != null) ||
+                (entry.getField("yearfiled") != null));
+            }
+        };
+
+   public static final BibtexEntryType STANDARD =
+        new BibtexEntryType()
+        {
+            public String getName()
+            {
+                return "Standard";
+            }
+
+            public String[] getOptionalFields()
+            {
+                return new String[]
+                {
+                    "author", "language", "howpublished", "type", "number", "revision", "address", "month", "year", "note", "url"
+                };
+            }
+
+            public String[] getRequiredFields()
+            {
+                return new String[]
+                {
+                    "title", "organization", "institution"
+                };
+            }
+
+            public String describeRequiredFields()
+            {
+                return "TITLE, ORGANIZATION or INSTITUTION";
+            }
+
+            public boolean hasAllRequiredFields(BibtexEntry entry, BibtexDatabase database)
+            {
+                return entry.allFieldsPresent(new String[]
+                    {
+                        "title", "bibtexkey"
+                    }, database) &&
+                ((entry.getField("organization") != null) ||
+                (entry.getField("institution") != null));
+            }
+        };
+
+    public static final BibtexEntryType ELECTRONIC =
+        new BibtexEntryType()
+        {
+            public String getName()
+            {
+                return "Electronic";
+            }
+
+            public String[] getOptionalFields()
+            {
+                return new String[]
+                {
+                    "author", "month", "year", "title", "language", "howpublished", "organization", "address", "note", "url"
+                };
+            }
+
+            public String[] getRequiredFields()
+            {
+                return null;
+            }
+
+            public String describeRequiredFields()
+            {
+                return "None";
+            }
+
+            public boolean hasAllRequiredFields(BibtexEntry entry, BibtexDatabase database)
+            {
+                return entry.allFieldsPresent(new String[]
+                    {
+                        "bibtexkey"
+                    }, database) &&
+                ((entry.getField("howpublished") != null) ||
+                (entry.getField("note") != null) ||
+                (entry.getField("url") != null));
+            }
+        };
 
     public static final BibtexEntryType MISC =
         new BibtexEntryType()
@@ -665,8 +821,9 @@ public abstract class BibtexEntryType implements Comparable<BibtexEntryType>
 
     public String[] getGeneralFields() {
         return new String[]
-           {"crossref", "keywords", "doi", "url",
-            "citeseerurl", "pdf", "abstract", "comment"};
+           {"crossref", "keywords", "doi", "url", "file",
+            "citeseerurl", "pdf", "abstract", "comment",
+         "owner", "timestamp", "review", };
     }
 
     public abstract String describeRequiredFields();
@@ -704,7 +861,7 @@ public abstract class BibtexEntryType implements Comparable<BibtexEntryType>
        ALL_TYPES.put("book", BOOK);
        ALL_TYPES.put("booklet", BOOKLET);
        ALL_TYPES.put("incollection", INCOLLECTION);
-        ALL_TYPES.put("conference", CONFERENCE);
+    ALL_TYPES.put("conference", CONFERENCE);
        ALL_TYPES.put("inproceedings", INPROCEEDINGS);
        ALL_TYPES.put("proceedings", PROCEEDINGS);
        ALL_TYPES.put("manual", MANUAL);
@@ -712,8 +869,12 @@ public abstract class BibtexEntryType implements Comparable<BibtexEntryType>
        ALL_TYPES.put("phdthesis", PHDTHESIS);
        ALL_TYPES.put("techreport", TECHREPORT);
        ALL_TYPES.put("unpublished", UNPUBLISHED);
-        ALL_TYPES.put("misc", MISC);
-        ALL_TYPES.put("other", OTHER);
+       ALL_TYPES.put("patent", PATENT);
+       ALL_TYPES.put("standard", STANDARD);
+       ALL_TYPES.put("electronic", ELECTRONIC);
+       ALL_TYPES.put("periodical", PERIODICAL);
+    ALL_TYPES.put("misc", MISC);
+    ALL_TYPES.put("other", OTHER);
 
        // We need a record of the standard types, in case the user wants
        // to remove a customized version. Therefore we clone the map.
@@ -726,7 +887,7 @@ public abstract class BibtexEntryType implements Comparable<BibtexEntryType>
      */
     public static BibtexEntryType getType(String name) {
        //Util.pr("'"+name+"'");
-       Object o = ALL_TYPES.get(name.toLowerCase());
+       Object o = ALL_TYPES.get(name.toLowerCase(Locale.US));
        if (o == null)
            return null;
        else return (BibtexEntryType)o;
index 3787174..cda75ac 100644 (file)
@@ -119,6 +119,7 @@ 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( "language", true, GUIGlobals.SMALL_W  ) ) ;
     add( new BibtexSingleField( "volume", true, GUIGlobals.SMALL_W, 60  ).setNumeric(true) ) ;
     add( new BibtexSingleField( "year", true, GUIGlobals.SMALL_W, 60 ).setNumeric(true) ) ;
 
index 05000a5..cacda3a 100644 (file)
@@ -1055,6 +1055,8 @@ public class EntryEditor extends JPanel implements VetoableChangeListener {
                     // fe.setLabelColor(GUIGlobals.nullFieldColor);
                     fe.setBackground(GUIGlobals.validFieldBackground);
 
+                if (fe.getTextComponent().hasFocus())
+                    fe.setBackground(GUIGlobals.activeEditor);
                 updateSource();
                 panel.markBaseChanged();
             }
@@ -1111,7 +1113,7 @@ public class EntryEditor extends JPanel implements VetoableChangeListener {
                         // See if we need to update an AutoCompleter instance:
                         AutoCompleter aComp = panel.getAutoCompleter(fe.getFieldName());
                         if (aComp != null)
-                            aComp.addAll(toSet);
+                            aComp.addAll(toSet, entry);
 
                         // Add an UndoableFieldChange to the baseframe's
                         // undoManager.
@@ -1120,14 +1122,6 @@ public class EntryEditor extends JPanel implements VetoableChangeListener {
                         updateSource();
                         panel.markBaseChanged();
 
-                        // TODO: is this a safe solution to keep selection on
-                        // entry?
-                        SwingUtilities.invokeLater(new Runnable() {
-                            public void run() {
-                                panel.highlightEntry(entry);
-                            }
-                        });
-
                     } catch (IllegalArgumentException ex) {
                         JOptionPane.showMessageDialog(frame, Globals.lang("Error") + ": " + ex.getMessage(), Globals
                             .lang("Error setting field"), JOptionPane.ERROR_MESSAGE);
@@ -1138,6 +1132,8 @@ public class EntryEditor extends JPanel implements VetoableChangeListener {
                     // We set the field and label color.
                     fe.setBackground(GUIGlobals.validFieldBackground);
                 }
+                if (fe.getTextComponent().hasFocus())
+                    fe.setBackground(GUIGlobals.activeEditor);
             } else if ((source.isEditable())
                 && (!source.getText().equals(lastSourceStringAccepted))) {
                 boolean accepted = storeSource(true);
index 54bfd94..c60ef20 100644 (file)
@@ -47,8 +47,8 @@ import com.jgoodies.forms.layout.FormLayout;
 /**
  * A single tab displayed in the EntryEditor holding several FieldEditors.
  * 
- * @author $Author: coezbek $
- * @version $Revision: 2488 $ ($Date: 2007-11-14 01:25:31 +0100 (Wed, 14 Nov 2007) $)
+ * @author $Author: mortenalver $
+ * @version $Revision: 2814 $ ($Date: 2008-10-29 20:42:20 +0100 (Wed, 29 Oct 2008) $)
  * 
  */
 public class EntryEditorTab {
@@ -135,7 +135,8 @@ public class EntryEditorTab {
                 ta = new FileListEditor(frame, bPanel.metaData(), fields[i], null, parent);
             else
                 ta = new FieldTextArea(fields[i], null);
-
+            //ta.addUndoableEditListener(bPanel.undoListener);
+            
             JComponent ex = parent.getExtra(fields[i], ta);
             setupJTextComponent(ta.getTextComponent());
 
@@ -169,6 +170,7 @@ public class EntryEditorTab {
                if (addKeyField) {
                        final FieldTextField tf = new FieldTextField(BibtexFields.KEY_FIELD, parent
                                .getEntry().getField(BibtexFields.KEY_FIELD), true);
+            //tf.addUndoableEditListener(bPanel.undoListener);
                        setupJTextComponent(tf);
 
                        editors.put("bibtexkey", tf);
@@ -259,7 +261,9 @@ public class EntryEditorTab {
                        while (i.hasNext()) {
                                FieldEditor editor = i.next();
                                Object content = entry.getField(editor.getFieldName());
-                               editor.setText((content == null) ? "" : content.toString());
+                String toSet = (content == null) ? "" : content.toString();
+                if (!toSet.equals(editor.getText()))
+                                   editor.setText(toSet);
                        }
                        this.entry = entry;
                } finally {
index a544ad5..82ca1e3 100644 (file)
@@ -19,11 +19,11 @@ public class ExternalTab extends JPanel implements PrefsTab {
 
        JTextField pdfDir, regExpTextField, fileDir, psDir, pdf, ps, html, lyx, winEdt, led,
         citeCommand, vim, vimServer;
-
+    JCheckBox runAutoFileSearch;
     JButton editFileTypes;
     ItemListener regExpListener;
 
-       JCheckBox useRegExpComboBox;
+       JRadioButton useRegExpComboBox;
     JRadioButton matchExactKeyOnly = new JRadioButton(Globals.lang("Autolink only files that match the BibTeX key")),
         matchStartsWithKey = new JRadioButton(Globals.lang("Autolink files with names starting with the BibTeX key"));
 
@@ -46,21 +46,12 @@ public class ExternalTab extends JPanel implements PrefsTab {
         citeCommand = new JTextField(30);
         led = new JTextField(30);
         editFileTypes = new JButton(Globals.lang("Manage external file types"));
-
+        runAutoFileSearch = new JCheckBox("When opening file link, search for matching file if no link is defined");
         regExpTextField = new JTextField(30);
-        useRegExpComboBox = new JCheckBox(Globals.lang("Use Regular Expression Search"));
+        useRegExpComboBox = new JRadioButton(Globals.lang("Use Regular Expression Search"));
                regExpListener = new ItemListener() {
                        public void itemStateChanged(ItemEvent e) {
                                regExpTextField.setEditable(useRegExpComboBox.isSelected());
-                               if (useRegExpComboBox.isSelected()) {
-                                       regExpTextField.setText(Globals.prefs
-                                               .get(JabRefPreferences.REG_EXP_SEARCH_EXPRESSION_KEY));
-                               } else {
-                                       Globals.prefs.put(JabRefPreferences.REG_EXP_SEARCH_EXPRESSION_KEY,
-                                               regExpTextField.getText());
-                                       regExpTextField.setText(Globals.prefs
-                                               .get(JabRefPreferences.DEFAULT_REG_EXP_SEARCH_EXPRESSION_KEY));
-                               }
                        }
                };
                useRegExpComboBox.addItemListener(regExpListener);
@@ -70,6 +61,7 @@ public class ExternalTab extends JPanel implements PrefsTab {
         ButtonGroup bg = new ButtonGroup();
         bg.add(matchExactKeyOnly);
         bg.add(matchStartsWithKey);
+        bg.add(useRegExpComboBox);
 
         BrowseAction browse;
 
@@ -95,7 +87,31 @@ public class ExternalTab extends JPanel implements PrefsTab {
                builder.append(new JButton(browse));
                builder.nextLine();
 
-        pan = new JPanel();
+
+               builder.append(new JPanel());
+        builder.append(matchStartsWithKey, 3);
+        builder.nextLine();
+        builder.append(new JPanel());
+        builder.append(matchExactKeyOnly, 3);
+        builder.nextLine();
+        builder.append(new JPanel());
+        builder.append(useRegExpComboBox);
+               builder.append(regExpTextField);
+               HelpAction helpAction = new HelpAction(helpDialog, GUIGlobals.regularExpressionSearchHelp,
+                       Globals.lang("Help on Regular Expression Search"), GUIGlobals.getIconUrl("helpSmall"));
+               builder.append(helpAction.getIconButton());
+               builder.nextLine();
+        builder.append(new JPanel());
+        builder.append(runAutoFileSearch);
+        builder.nextLine();
+               builder.appendSeparator(Globals.lang("Legacy file fields"));
+               pan = new JPanel();
+               builder.append(pan);            
+               builder.append(new JLabel("<html>"+Globals.lang("Note that these settings are used for the legacy "
+                       +"<b>pdf</b> and <b>ps</b> fields only.<br>For most users, setting the <b>Main file directory</b> "
+                       +"above should be sufficient.")+"</html>"), 5);
+               builder.nextLine();
+               pan = new JPanel();
                builder.append(pan);
                lab = new JLabel(Globals.lang("Main PDF directory") + ":");
                builder.append(lab);
@@ -112,40 +128,8 @@ public class ExternalTab extends JPanel implements PrefsTab {
                browse = new BrowseAction(_frame, psDir, true);
                builder.append(new JButton(browse));
                builder.nextLine();
-
-               builder.append(new JPanel());
-        builder.append(matchStartsWithKey, 3);
-        builder.nextLine();
-        builder.append(new JPanel());
-        builder.append(matchExactKeyOnly, 3);
-        //builder.append(useRegExpComboBox);
-               //builder.append(regExpTextField);
-               /*HelpAction helpAction = new HelpAction(helpDialog, GUIGlobals.regularExpressionSearchHelp,
-                       Globals.lang("Help on Regular Expression Search"), GUIGlobals.getIconUrl("helpSmall"));
-               builder.append(helpAction.getIconButton());*/
-               builder.nextLine();
-
                builder.appendSeparator(Globals.lang("External programs"));
 
-               /*builder.nextLine();
-               lab = new JLabel(Globals.lang("Path to PDF viewer") + ":");
-               builder.append(pan);
-               builder.append(lab);
-               builder.append(pdf);
-               browse = new BrowseAction(_frame, pdf, false);
-               if (Globals.ON_WIN)
-                       browse.setEnabled(false);
-               builder.append(new JButton(browse));
-               builder.nextLine();
-               lab = new JLabel(Globals.lang("Path to PS viewer") + ":");
-               builder.append(pan);
-               builder.append(lab);
-               builder.append(ps);
-               browse = new BrowseAction(_frame, ps, false);
-               if (Globals.ON_WIN)
-                       browse.setEnabled(false);
-               builder.append(new JButton(browse));
-               */
                builder.nextLine();
                lab = new JLabel(Globals.lang("Path to HTML viewer") + ":");
                builder.append(pan);
@@ -230,12 +214,12 @@ public class ExternalTab extends JPanel implements PrefsTab {
                vimServer.setText(_prefs.get("vimServer"));
         led.setText(_prefs.get("latexEditorPath"));
         citeCommand.setText(_prefs.get("citeCommand"));
-
+        runAutoFileSearch.setSelected(_prefs.getBoolean("runAutomaticFileSearch"));
                regExpTextField.setText(_prefs.get(JabRefPreferences.REG_EXP_SEARCH_EXPRESSION_KEY));
-               useRegExpComboBox.setSelected(_prefs.getBoolean(JabRefPreferences.USE_REG_EXP_SEARCH_KEY));
-               regExpListener.itemStateChanged(null);
 
-        if (_prefs.getBoolean("autolinkExactKeyOnly"))
+        if (_prefs.getBoolean(JabRefPreferences.USE_REG_EXP_SEARCH_KEY))
+            useRegExpComboBox.setSelected(true);
+        else if (_prefs.getBoolean("autolinkExactKeyOnly"))
             matchExactKeyOnly.setSelected(true);
         else
             matchStartsWithKey.setSelected(true);
@@ -262,6 +246,7 @@ public class ExternalTab extends JPanel implements PrefsTab {
         _prefs.put("latexEditorPath", led.getText());
         _prefs.put("citeCommand", citeCommand.getText());
         _prefs.putBoolean("autolinkExactKeyOnly", matchExactKeyOnly.isSelected());
+        _prefs.putBoolean("runAutomaticFileSearch", runAutoFileSearch.isSelected());
     }
 
        public boolean readyToClose() {
index c976b9c..ebbd283 100644 (file)
@@ -1,5 +1,7 @@
 package net.sf.jabref;
 
+import net.sf.jabref.gui.MainTableFormat;
+
 import java.util.Comparator;
 
 /**
@@ -13,17 +15,18 @@ import java.util.Comparator;
  * 
  * Current Version:
  * 
- * @author $Author: coezbek $
- * @version $Revision: 2488 $ ($Date: 2007-11-14 01:25:31 +0100 (Wed, 14 Nov 2007) $)
+ * @author $Author: mortenalver $
+ * @version $Revision: 2669 $ ($Date: 2008-05-21 21:26:18 +0200 (Wed, 21 May 2008) $)
  * 
  * TODO: Testcases
  * 
  */
 public class FieldComparator implements Comparator<BibtexEntry> {
 
-       String field;
+       private String[] field;
+    private String fieldName;
 
-       boolean isNameField, isTypeHeader, isYearField, isMonthField, isNumeric;
+    boolean isNameField, isTypeHeader, isYearField, isMonthField, isNumeric;
 
        int multiplier;
 
@@ -32,14 +35,15 @@ public class FieldComparator implements Comparator<BibtexEntry> {
        }
 
        public FieldComparator(String field, boolean reversed) {
-               this.field = field;
+        this.fieldName = field;
+        this.field = field.split(MainTableFormat.COL_DEFINITION_FIELD_SEPARATOR);
                multiplier = reversed ? -1 : 1;
-               isTypeHeader = field.equals(GUIGlobals.TYPE_HEADER);
-
-               isNameField = (field.equals("author") || field.equals("editor"));
-               isYearField = field.equals("year");
-               isMonthField = field.equals("month");
-        isNumeric = BibtexFields.isNumeric(field);
+               isTypeHeader = this.field[0].equals(GUIGlobals.TYPE_HEADER);
+        isNameField = (this.field[0].equals("author")
+                || this.field[0].equals("editor"));
+               isYearField = this.field[0].equals("year");
+               isMonthField = this.field[0].equals("month");
+        isNumeric = BibtexFields.isNumeric(this.field[0]);
     }
 
        public int compare(BibtexEntry e1, BibtexEntry e2) {
@@ -53,8 +57,8 @@ public class FieldComparator implements Comparator<BibtexEntry> {
 
                        // If the field is author or editor, we rearrange names so they are
                        // sorted according to last name.
-                       f1 = e1.getField(field);
-                       f2 = e2.getField(field);
+                       f1 = getField(e1);
+                       f2 = getField(e2);
                }
 
                /*
@@ -144,12 +148,21 @@ public class FieldComparator implements Comparator<BibtexEntry> {
                return result * localMultiplier;
        }
 
-       /**
+    private Object getField(BibtexEntry entry) {
+        for (int i = 0; i < field.length; i++) {
+            Object o = entry.getField(field[i]);
+            if (o != null)
+                return o;
+        }
+        return null;
+    }
+
+    /**
         * Returns the field this Comparator compares by.
         * 
         * @return The field name.
         */
        public String getFieldName() {
-               return field;
+               return fieldName;
        }
 }
index 771d848..2e4a2cb 100644 (file)
@@ -32,13 +32,14 @@ import java.awt.Container;
 
 import javax.swing.JComponent;
 import javax.swing.JLabel;
+import javax.swing.event.UndoableEditListener;
 
 
 /**
  * FieldEditors is a common interface between the FieldTextField and FieldTextArea.
  * 
  * @author $Author: mortenalver $
- * @version $Revision: 1938 $ ($Date: 2007-02-16 23:03:17 +0100 (Fri, 16 Feb 2007) $)
+ * @version $Revision: 2814 $ ($Date: 2008-10-29 20:42:20 +0100 (Wed, 29 Oct 2008) $)
  *
  */
 public interface FieldEditor {
@@ -93,4 +94,15 @@ public interface FieldEditor {
         * @return
         */
        public String getSelectedText();
+
+
+    public boolean hasUndoInformation();
+
+    public void undo();
+
+    public boolean hasRedoInformation();
+
+    public void redo();
+
+    public void addUndoableEditListener(UndoableEditListener listener);
 }
index dfae138..7357b5e 100644 (file)
@@ -33,13 +33,17 @@ import javax.swing.JComponent;
 import javax.swing.JLabel;
 import javax.swing.JScrollPane;
 import javax.swing.JTextArea;
+import javax.swing.event.UndoableEditListener;
+import javax.swing.event.UndoableEditEvent;
+import javax.swing.undo.UndoManager;
+import javax.swing.undo.CannotUndoException;
 
 /**
  * An implementation of the FieldEditor backed by a JTextArea. Used for
  * multi-line input.
  * 
  * @author $Author: mortenalver $
- * @version $Revision: 2291 $ ($Date: 2007-08-23 23:18:12 +0200 (Thu, 23 Aug 2007) $)
+ * @version $Revision: 2814 $ ($Date: 2008-10-29 20:42:20 +0100 (Wed, 29 Oct 2008) $)
  * 
  */
 public class FieldTextArea extends JTextArea implements FieldEditor {
@@ -56,13 +60,20 @@ public class FieldTextArea extends JTextArea implements FieldEditor {
 
        final static Pattern indent = Pattern.compile("\\s+.*");
 
-       final boolean antialias = Globals.prefs.getBoolean("antialias");
+    //protected UndoManager undo = new UndoManager();
 
        public FieldTextArea(String fieldName_, String content) {
                super(content);
 
+        // Listen for undo and redo events
+        /*getDocument().addUndoableEditListener(new UndoableEditListener() {
+            public void undoableEditHappened(UndoableEditEvent evt) {
+                undo.addEdit(evt.getEdit());
+            }
+        });*/
+
         updateFont();
-                
+
                // Add the global focus listener, so a menu item can see if this field
                // was focused when an action was called.
                addFocusListener(Globals.focusListener);
@@ -133,65 +144,36 @@ public class FieldTextArea extends JTextArea implements FieldEditor {
                }
        }
 
-       // public void keyPressed(KeyEvent event) {
-       // int keyCode = event.getKeyCode();
-       // if (keyCode == KeyEvent.VK_ENTER) {
-       // // Consume; we will handle this ourselves:
-       // event.consume();
-       // autoWrap();
-       //
-       // }
-       //
-       // }
-       //
-       // private void autoWrap() {
-       // int pos = getCaretPosition();
-       // int posAfter = pos + 1;
-       // StringBuffer sb = new StringBuffer(getText());
-       // // First insert the line break:
-       // sb.insert(pos, '\n');
-       //
-       // // We want to investigate the beginning of the last line:
-       // // int end = sb.length();
-       //
-       // // System.out.println("."+sb.substring(0, pos)+".");
-       //
-       // // Find 0 or the last line break before our current position:
-       // int idx = sb.substring(0, pos).lastIndexOf("\n") + 1;
-       // String prevLine = sb.substring(idx, pos);
-       // if (bull.matcher(prevLine).matches()) {
-       // int id = findFirstNonWhitespace(prevLine);
-       // if (id >= 0) {
-       // sb.insert(posAfter, prevLine.substring(0, id));
-       // posAfter += id;
-       // }
-       // } else if (indent.matcher(prevLine).matches()) {
-       // int id = findFirstNonWhitespace(prevLine);
-       // if (id >= 0) {
-       // sb.insert(posAfter, prevLine.substring(0, id));
-       // posAfter += id;
-       // }
-       // }
-       // /*
-       // * if (prevLine.startsWith(" ")) { sb.insert(posAfter, " "); posAfter++; }
-       // */
-       //
-       // setText(sb.toString());
-       // setCaretPosition(posAfter);
-       // }
-       //
-       // private int findFirstNonWhitespace(String s) {
-       // for (int i = 0; i < s.length(); i++) {
-       // if (!Character.isWhitespace(s.charAt(i)))
-       // return i;
-       // }
-       // return -1;
-       // }
-       //
-       // public void keyReleased(KeyEvent event) {
-       //
-       // }
-       //
-       // public void keyTyped(KeyEvent event) {
-       // }
+
+    public boolean hasUndoInformation() {
+        return false;//undo.canUndo();
+    }
+
+    public void undo() {
+        /*try {
+            if (undo.canUndo()) {
+                undo.undo();
+            }
+        } catch (CannotUndoException e) {
+        } */
+
+    }
+
+    public boolean hasRedoInformation() {
+        return false;//undo.canRedo();
+    }
+
+    public void redo() {
+        /*try {
+            if (undo.canRedo()) {
+                undo.redo();
+            }
+        } catch (CannotUndoException e) {
+        }*/
+
+    }
+
+    public void addUndoableEditListener(UndoableEditListener listener) {
+        getDocument().addUndoableEditListener(listener);
+    }
 }
index 93d1fa7..2f77b64 100644 (file)
@@ -31,16 +31,29 @@ import java.awt.Color;
 import javax.swing.JComponent;
 import javax.swing.JLabel;
 import javax.swing.JTextField;
+import javax.swing.event.UndoableEditListener;
+import javax.swing.event.UndoableEditEvent;
+import javax.swing.undo.UndoManager;
+import javax.swing.undo.CannotUndoException;
 
 public class FieldTextField extends JTextField implements FieldEditor {
 
        protected String fieldName;
-
        protected JLabel label;
 
+    //protected UndoManager undo = new UndoManager();
+
+
        public FieldTextField(String fieldName_, String content, boolean changeColorOnFocus) {
                super(content);
 
+        // Listen for undo and redo events
+        /*getDocument().addUndoableEditListener(new UndoableEditListener() {
+            public void undoableEditHappened(UndoableEditEvent evt) {
+                undo.addEdit(evt.getEdit());
+            }
+        });*/
+
         updateFont();
 
         // Add the global focus listener, so a menu item can see if this field
@@ -65,7 +78,7 @@ public class FieldTextField extends JTextField implements FieldEditor {
                label.addMouseListener(popMenu);
        }
 
-       public void append(String text) {
+    public void append(String text) {
                setText(getText() + text);
        }
 
@@ -111,4 +124,35 @@ public class FieldTextField extends JTextField implements FieldEditor {
                replaceSelection(textToInsert);
        }
 
+
+    public boolean hasUndoInformation() {
+        return false;//undo.canUndo();
+    }
+
+    public void undo() {
+        /*try {
+            if (undo.canUndo()) {
+                undo.undo();
+            }
+        } catch (CannotUndoException e) {
+        }*/
+    }
+
+    public boolean hasRedoInformation() {
+        return false;//undo.canRedo();
+    }
+
+    public void redo() {
+        /*try {
+            if (undo.canRedo()) {
+                undo.redo();
+            }
+        } catch (CannotUndoException e) {
+        }*/
+
+    }
+
+    public void addUndoableEditListener(UndoableEditListener listener) {
+        getDocument().addUndoableEditListener(listener);
+    }
 }
index ccbbac9..e2d4282 100644 (file)
@@ -68,6 +68,7 @@ public class GUIGlobals {
     //linuxDefaultLookAndFeel = "org.jvnet.substance.skin.SubstanceNebulaLookAndFeel",
     //linuxDefaultLookAndFeel = "org.jvnet.substance.skin.SubstanceBusinessLookAndFeel",
     windowsDefaultLookAndFeel = "com.jgoodies.looks.windows.WindowsLookAndFeel";
+    //windowsDefaultLookAndFeel = "com.sun.java.swing.plaf.windows.WindowsLookAndFeel";
 
        public static Font CURRENTFONT,
        typeNameFont,
@@ -235,13 +236,15 @@ public class GUIGlobals {
                LANGUAGES = new HashMap<String, String>();
                // LANGUAGES contains mappings for supported languages.
                LANGUAGES.put("English", "en");
+               LANGUAGES.put("Dansk", "da");
                LANGUAGES.put("Deutsch", "de");
                LANGUAGES.put("Fran\u00E7ais", "fr");
                LANGUAGES.put("Italiano", "it");
         LANGUAGES.put("Nederlands", "du");
         LANGUAGES.put("Norsk", "no");
-        LANGUAGES.put("Español", "es");
+        //LANGUAGES.put("Español", "es"); // Not complete
         LANGUAGES.put("Polski", "pl");
+       LANGUAGES.put("Turkish", "tr");
        }
 
        /**
index 541731a..7246953 100644 (file)
@@ -47,6 +47,7 @@ import java.util.logging.Logger;
 import javax.swing.JComponent;
 import javax.swing.JFileChooser;
 import javax.swing.JFrame;
+import javax.swing.event.UndoableEditListener;
 
 import net.sf.jabref.collab.FileUpdateMonitor;
 import net.sf.jabref.imports.ImportFormatReader;
@@ -177,7 +178,7 @@ public class Globals {
     }
 
        public static GlobalFocusListener focusListener = new GlobalFocusListener();
-
+    
        public static JabRefPreferences prefs = null;
 
        public static HelpDialog helpDiag = null;
@@ -196,7 +197,7 @@ public class Globals {
     // Instantiate logger:
     // TODO: Doesn't work in Java 5:
     // private static Logger logger = Logger.getLogger(Logger.GLOBAL_LOGGER_NAME);
-    private static Logger logger = Logger.global;
+    private static Logger logger = Logger.getLogger("global");
 
     /**
         * true if we have unix newlines
@@ -1053,7 +1054,24 @@ public class Globals {
                UNICODE_CHARS.put("\u012B", "i");
                UNICODE_CHARS.put("\u012C", "I");
                UNICODE_CHARS.put("\u012D", "i");
-               // UNICODE_CHARS.put("\u0100", "");
+        UNICODE_CHARS.put("\u0147", "N");
+        UNICODE_CHARS.put("\u0148", "n");
+        UNICODE_CHARS.put("\u0160", "S");
+        UNICODE_CHARS.put("\u0161", "s");
+        UNICODE_CHARS.put("\u017D", "Z");
+        UNICODE_CHARS.put("\u017E", "z");
+        UNICODE_CHARS.put("\u0158", "R");
+        UNICODE_CHARS.put("\u0159", "r");
+        UNICODE_CHARS.put("\u0164", "T");
+        UNICODE_CHARS.put("\u008C", "AE"); // doesn't work?
+        UNICODE_CHARS.put("\u016E", "U");
+        UNICODE_CHARS.put("\u016F", "u");
+
+        UNICODE_CHARS.put("\u0178", "Y");
+        UNICODE_CHARS.put("\u0153", "ae");
+        UNICODE_CHARS.put("\u00FE", ""); // thorn character
+        
+        // UNICODE_CHARS.put("\u0100", "");
 
                RTFCHARS.put("`a", "\\'e0");
                RTFCHARS.put("`e", "\\'e8");
@@ -1334,7 +1352,10 @@ public class Globals {
        }
 
        public static void initializeJournalNames() {
-               journalAbbrev = new JournalAbbreviations("/resource/IEEEJournalList.txt");
+               if (prefs.getBoolean("useIEEEAbrv"))
+                       journalAbbrev = new JournalAbbreviations("/resource/IEEEJournalList.txt");
+        else
+            journalAbbrev = new JournalAbbreviations();
 
                // Read external lists, if any (in reverse order, so the upper lists
                // override the lower):
index de40261..37695c0 100644 (file)
  */
 package net.sf.jabref;
 
+import com.jgoodies.looks.FontPolicies;
+import com.jgoodies.looks.FontPolicy;
+import com.jgoodies.looks.FontSet;
+import com.jgoodies.looks.FontSets;
+import com.jgoodies.looks.plastic.Plastic3DLookAndFeel;
+import com.jgoodies.looks.windows.WindowsLookAndFeel;
 import gnu.dtools.ritopt.BooleanOption;
 import gnu.dtools.ritopt.Options;
 import gnu.dtools.ritopt.StringOption;
-
-import java.awt.Dimension;
-import java.awt.Font;
-import java.awt.Frame;
-import java.awt.event.KeyEvent;
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.util.Collection;
-import java.util.List;
-import java.util.Vector;
-
-import javax.swing.InputMap;
-import javax.swing.JOptionPane;
-import javax.swing.KeyStroke;
-import javax.swing.LookAndFeel;
-import javax.swing.UIDefaults;
-import javax.swing.UIManager;
-import javax.swing.plaf.metal.MetalLookAndFeel;
-
-import net.sf.jabref.export.ExportFormats;
-import net.sf.jabref.export.FileActions;
-import net.sf.jabref.export.IExportFormat;
-import net.sf.jabref.export.SaveException;
-import net.sf.jabref.export.SaveSession;
+import net.sf.jabref.export.*;
 import net.sf.jabref.imports.EntryFetcher;
 import net.sf.jabref.imports.ImportInspectionCommandLine;
 import net.sf.jabref.imports.OpenDatabaseAction;
@@ -65,12 +47,16 @@ import net.sf.jabref.remote.RemoteListener;
 import net.sf.jabref.util.Pair;
 import net.sf.jabref.wizard.auximport.AuxCommandLine;
 
-import com.jgoodies.looks.FontPolicies;
-import com.jgoodies.looks.FontPolicy;
-import com.jgoodies.looks.FontSet;
-import com.jgoodies.looks.FontSets;
-import com.jgoodies.looks.plastic.Plastic3DLookAndFeel;
-import com.jgoodies.looks.windows.WindowsLookAndFeel;
+import javax.swing.*;
+import javax.swing.plaf.metal.MetalLookAndFeel;
+import java.awt.*;
+import java.awt.event.KeyEvent;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.util.Collection;
+import java.util.List;
+import java.util.Vector;
 
 /**
  * JabRef Main Class - The application gets started here.
@@ -734,6 +720,14 @@ lastEdLoop:
 
             //Util.pr(": Showing frame");
             jrf.setVisible(true);
+            // If we are set to remember the window location, we also remember the maximised
+            // state. This needs to be set after the window has been made visible, so we
+            // do it here:
+             if (Globals.prefs.getBoolean("rememberWindowLocation") &&
+                     Globals.prefs.getBoolean("windowMaximised")) {
+                 jrf.setExtendedState(JFrame.MAXIMIZED_BOTH);
+             }
+
 
             // TEST TEST TEST TEST TEST TEST
             startSidePanePlugins(jrf);
index db68724..f65a1e5 100644 (file)
 
 package net.sf.jabref;
 
-import com.jgoodies.looks.HeaderStyle;
-import com.jgoodies.looks.Options;
-import com.jgoodies.uif_lite.component.UIFSplitPane;
-import net.sf.jabref.export.*;
+import java.awt.Component;
+import java.awt.Cursor;
+import java.awt.Dimension;
+import java.awt.GraphicsEnvironment;
+import java.awt.GridBagConstraints;
+import java.awt.GridBagLayout;
+import java.awt.Insets;
+import java.awt.Toolkit;
+import java.awt.event.ActionEvent;
+import java.awt.event.KeyAdapter;
+import java.awt.event.KeyEvent;
+import java.awt.event.MouseAdapter;
+import java.awt.event.WindowAdapter;
+import java.awt.event.WindowEvent;
+import java.io.File;
+import java.io.IOException;
+import java.lang.reflect.Method;
+import java.net.URL;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.SortedSet;
+import java.util.Vector;
+
+import javax.swing.AbstractAction;
+import javax.swing.Action;
+import javax.swing.Box;
+import javax.swing.ImageIcon;
+import javax.swing.JButton;
+import javax.swing.JComponent;
+import javax.swing.JDialog;
+import javax.swing.JEditorPane;
+import javax.swing.JFrame;
+import javax.swing.JLabel;
+import javax.swing.JMenu;
+import javax.swing.JMenuBar;
+import javax.swing.JMenuItem;
+import javax.swing.JOptionPane;
+import javax.swing.JPanel;
+import javax.swing.JProgressBar;
+import javax.swing.JScrollPane;
+import javax.swing.JTabbedPane;
+import javax.swing.JToggleButton;
+import javax.swing.JToolBar;
+import javax.swing.KeyStroke;
+import javax.swing.SwingConstants;
+import javax.swing.SwingUtilities;
+import javax.swing.TransferHandler;
+import javax.swing.WindowConstants;
+import javax.swing.event.ChangeEvent;
+import javax.swing.event.ChangeListener;
+
+import net.sf.jabref.export.ExpandEndnoteFilters;
+import net.sf.jabref.export.ExportCustomizationDialog;
+import net.sf.jabref.export.ExportFormats;
+import net.sf.jabref.export.SaveAllAction;
+import net.sf.jabref.export.SaveDatabaseAction;
 import net.sf.jabref.external.ExternalFileTypeEditor;
 import net.sf.jabref.external.PushToApplicationButton;
 import net.sf.jabref.groups.EntryTableTransferHandler;
 import net.sf.jabref.groups.GroupSelector;
-import net.sf.jabref.gui.*;
-import net.sf.jabref.imports.*;
+import net.sf.jabref.gui.DatabasePropertiesDialog;
+import net.sf.jabref.gui.EntryCustomizationDialog2;
+import net.sf.jabref.gui.GenFieldsCustomizer;
+import net.sf.jabref.gui.ImportInspectionDialog;
+import net.sf.jabref.gui.SortTabsAction;
+import net.sf.jabref.imports.CiteSeerFetcher;
+import net.sf.jabref.imports.EntryFetcher;
+import net.sf.jabref.imports.GeneralFetcher;
+import net.sf.jabref.imports.ImportCustomizationDialog;
+import net.sf.jabref.imports.ImportFormat;
+import net.sf.jabref.imports.ImportFormats;
+import net.sf.jabref.imports.ImportMenuItem;
+import net.sf.jabref.imports.OpenDatabaseAction;
 import net.sf.jabref.journals.ManageJournalsAction;
-import net.sf.jabref.label.*;
+import net.sf.jabref.label.ArticleLabelRule;
+import net.sf.jabref.label.BookLabelRule;
+import net.sf.jabref.label.IncollectionLabelRule;
+import net.sf.jabref.label.InproceedingsLabelRule;
+import net.sf.jabref.label.LabelMaker;
 import net.sf.jabref.plugin.PluginCore;
 import net.sf.jabref.plugin.core.JabRefPlugin;
 import net.sf.jabref.plugin.core.generated._JabRefPlugin.EntryFetcherExtension;
+import net.sf.jabref.sql.DbImportAction;
 import net.sf.jabref.undo.NamedCompound;
 import net.sf.jabref.undo.UndoableInsertEntry;
 import net.sf.jabref.undo.UndoableRemoveEntry;
@@ -49,17 +121,9 @@ import net.sf.jabref.util.MassSetFieldAction;
 import net.sf.jabref.wizard.auximport.gui.FromAuxDialog;
 import net.sf.jabref.wizard.integrity.gui.IntegrityWizard;
 
-import javax.swing.*;
-import javax.swing.event.ChangeEvent;
-import javax.swing.event.ChangeListener;
-import java.awt.*;
-import java.awt.event.*;
-import java.io.File;
-import java.io.IOException;
-import java.lang.reflect.Method;
-import java.net.URL;
-import java.util.*;
-import java.util.List;
+import com.jgoodies.looks.HeaderStyle;
+import com.jgoodies.looks.Options;
+import com.jgoodies.uif_lite.component.UIFSplitPane;
 
 /**
  * The main window of the application.
@@ -142,6 +206,9 @@ public class JabRefFrame extends JFrame implements OutputPrinter {
       editEntry = new GeneralAction("edit", "Edit entry",
                                Globals.lang("Edit entry"),
                                prefs.getKey("Edit entry")),
+      focusTable = new GeneralAction("focusTable", "Focus entry table",
+                Globals.lang("Move the keyboard focus to the entry table"),
+                prefs.getKey("Focus entry table")),
       save = new GeneralAction("save", "Save database",
                                Globals.lang("Save database"),
                                prefs.getKey("Save database")),
@@ -295,8 +362,9 @@ public class JabRefFrame extends JFrame implements OutputPrinter {
 
     dbExport = new GeneralAction("dbExport", "Export to external SQL database",
          Globals.lang("Export to external SQL database"), 
-          GUIGlobals.getIconUrl("dbExport") );
-
+          GUIGlobals.getIconUrl("dbExport") ),
+    dbImport = new DbImportAction(this).getAction();
+            
     PushToApplicationButton pushExternalButton;
 
     CiteSeerFetcher citeSeerFetcher;
@@ -376,16 +444,16 @@ public class JabRefFrame extends JFrame implements OutputPrinter {
             int posX = prefs.getInt("posX");
             int posY = prefs.getInt("posY");
             
-            // 
+            //
             // Fix for [ 1738920 ] Windows Position in Multi-Monitor environment
-            // 
+            //
             // Do not put a window outside the screen if the preference values are wrong.
             //
             // Useful reference: http://www.exampledepot.com/egs/java.awt/screen_ScreenSize.html?l=rel
             // googled on forums.java.sun.com graphicsenvironment second screen java
             //
             if (GraphicsEnvironment.getLocalGraphicsEnvironment().getScreenDevices().length == 1){
-            
+
                 Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
 
                 int height = (int) dim.getHeight();
@@ -584,11 +652,12 @@ public JabRefPreferences prefs() {
               //basePanel().runCommand("save");
                 SaveDatabaseAction saveAction = new SaveDatabaseAction(basePanel());
                 saveAction.runCommand();
-                if (saveAction.isCancelled() || !saveAction.isSuccess())
+                if (saveAction.isCancelled() || !saveAction.isSuccess()) {
                     // The action was either cancelled or unsuccessful.
                     // Break!
                     output(Globals.lang("Unable to save database"));
                     close = false;
+                }
             }
             catch (Throwable ex) {
               // Something prevented the file
@@ -610,6 +679,7 @@ public JabRefPreferences prefs() {
       prefs.putInt("posY", JabRefFrame.this.getLocation().y);
       prefs.putInt("sizeX", JabRefFrame.this.getSize().width);
       prefs.putInt("sizeY", JabRefFrame.this.getSize().height);
+      prefs.putBoolean("windowMaximised", (getExtendedState()&MAXIMIZED_BOTH)>0);
       prefs.putBoolean("searchPanelVisible", sidePaneManager.isComponentVisible("search"));
       // Store divider location for side pane:
       int width = contentPane.getDividerLocation();
@@ -1080,6 +1150,7 @@ public JabRefPreferences prefs() {
       file.add(exportAll);
       file.add(exportSelected);
       file.add(dbConnect);
+      file.add(dbImport);
       file.add(dbExport);
 
       file.addSeparator();
@@ -1116,6 +1187,7 @@ public JabRefPreferences prefs() {
       edit.addSeparator();
       edit.add(selectAll);
       mb.add(edit);
+      view.add(focusTable);
       view.add(nextTab);
       view.add(prevTab);
       view.add(sortTabs);
@@ -1392,7 +1464,7 @@ public JabRefPreferences prefs() {
             closeDatabaseAction, switchPreview, integrityCheckAction, autoSetPdf, autoSetPs,
             toggleHighlightAny, toggleHighlightAll, databaseProperties, abbreviateIso,
             abbreviateMedline, unabbreviate, exportAll, exportSelected,
-            importCurrent, saveAll, dbConnect, dbExport}));
+            importCurrent, saveAll, dbConnect, dbExport, focusTable}));
         
         openDatabaseOnlyActions.addAll(fetcherActions);
 
@@ -1472,6 +1544,13 @@ public JabRefPreferences prefs() {
       return bp;
   }
 
+    public BasePanel addTab(BibtexDatabase db, File file, MetaData meta, String encoding, boolean raisePanel) {
+        BasePanel bp = new BasePanel(JabRefFrame.this, db, file, meta, encoding);
+        addTab(bp, file, raisePanel);
+        return bp;
+    }
+
+
     public void addTab(BasePanel bp, File file, boolean raisePanel) {
         tabbedPane.add((file != null ? file.getName(): Globals.lang(GUIGlobals.untitledTitle)),
                        bp);
@@ -1563,6 +1642,7 @@ public JabRefPreferences prefs() {
                             // The action either not cancelled or unsuccessful.
                             // Break! 
                             close = false;
+                        
                     } catch (Throwable ex) {
                         // Something prevented the file
                         // from being saved. Break!!!
@@ -1599,7 +1679,7 @@ public JabRefPreferences prefs() {
     public void actionPerformed(ActionEvent e) {
         // Create a new, empty, database.
         BibtexDatabase database = new BibtexDatabase();
-        addTab(database, null, null, Globals.prefs.get("defaultEncoding"), true);
+        addTab(database, null, (HashMap<String,String>)null, Globals.prefs.get("defaultEncoding"), true);
         output(Globals.lang("New database created."));
     }
   }
@@ -1778,7 +1858,7 @@ class FetchCiteSeerAction
           BasePanel bp = new BasePanel( JabRefFrame.this,
                                         dialog.getGenerateDB(),   // database
                                         null,                     // file
-                                        null, Globals.prefs.get("defaultEncoding"));                     // meta data
+                                        (HashMap<String,String>)null, Globals.prefs.get("defaultEncoding"));                     // meta data
           tabbedPane.add( Globals.lang( GUIGlobals.untitledTitle ), bp ) ;
           tabbedPane.setSelectedComponent( bp ) ;
           output( Globals.lang( "New database created." ) ) ;
@@ -1845,8 +1925,6 @@ class FetchCiteSeerAction
      *            Name of the file where the import came from.
      * @param openInNew
      *            Should the entries be imported into a new database?
-     * @param callBack
-     *            The callback for the ImportInspectionDialog to use.
      */
     public void addImportedEntries(final BasePanel panel, final List<BibtexEntry> entries,
         String filename, final boolean openInNew) {
index 39f3944..2b99e31 100644 (file)
@@ -133,7 +133,7 @@ public class JabRefPreferences {
                        defaults.put("pdfviewer", "cmd.exe /c start /b");
                        defaults.put("psviewer", "cmd.exe /c start /b");
                        defaults.put("htmlviewer", "cmd.exe /c start /b");
-                       defaults.put("lookAndFeel", "com.jgoodies.plaf.windows.ExtWindowsLookAndFeel");
+                       defaults.put("lookAndFeel", "com.jgoodies.looks.windows.WindowsLookAndFeel");
             defaults.put("winEdtPath", "C:\\Program Files\\WinEdt Team\\WinEdt\\WinEdt.exe");
             defaults.put("latexEditorPath", "C:\\Program Files\\LEd\\LEd.exe");
         } else {
@@ -150,8 +150,9 @@ public class JabRefPreferences {
         defaults.put("posY", new Integer(0));
         defaults.put("sizeX", new Integer(840));
         defaults.put("sizeY", new Integer(680));
+        defaults.put("windowMaximised", Boolean.FALSE);
         defaults.put("rememberWindowLocation", Boolean.TRUE);
-        defaults.put("autoResizeMode", new Integer(JTable.AUTO_RESIZE_OFF));
+        defaults.put("autoResizeMode", new Integer(JTable.AUTO_RESIZE_ALL_COLUMNS));
         defaults.put("tableColorCodesOn", Boolean.TRUE);
         defaults.put("namesAsIs", Boolean.FALSE);
         defaults.put("namesFf", Boolean.FALSE);
@@ -204,7 +205,7 @@ public class JabRefPreferences {
         defaults.put("searchPanePosX", new Integer(0));
         defaults.put("searchPanePosY", new Integer(0));
         defaults.put("autoComplete", Boolean.TRUE);
-        defaults.put("autoCompleteFields", "author;editor;title;journal;publisher;keywords");
+        defaults.put("autoCompleteFields", "author;editor;title;journal;publisher;keywords;crossref");
         defaults.put("groupSelectorVisible", Boolean.TRUE);
         defaults.put("groupFloatSelections", Boolean.TRUE);
         defaults.put("groupIntersectSelections", Boolean.TRUE);
@@ -369,6 +370,8 @@ public class JabRefPreferences {
         defaults.put("showFileLinksUpgradeWarning", Boolean.TRUE);
 
         defaults.put("autolinkExactKeyOnly", Boolean.TRUE);
+        
+        defaults.put("runAutomaticFileSearch", Boolean.FALSE);
         //defaults.put("lastAutodetectedImport", "");
 
         //defaults.put("autoRemoveExactDuplicates", Boolean.FALSE);
@@ -392,6 +395,7 @@ public class JabRefPreferences {
         defaults.put(DEFAULT_REG_EXP_SEARCH_EXPRESSION_KEY, defaultExpression);
         defaults.put(REG_EXP_SEARCH_EXPRESSION_KEY, defaultExpression);
         defaults.put(USE_REG_EXP_SEARCH_KEY, Boolean.FALSE);
+        defaults.put("useIEEEAbrv", Boolean.TRUE);
     }
     
     public static final String DEFAULT_REG_EXP_SEARCH_EXPRESSION_KEY = "defaultRegExpSearchExpression";
@@ -770,7 +774,6 @@ public class JabRefPreferences {
         defKeyBinds.put("Push to application","ctrl L");
       defKeyBinds.put("Push to LyX","ctrl L");
       defKeyBinds.put("Push to WinEdt","ctrl shift W");
-      defKeyBinds.put("Push to Emacs","ctrl shift E");
         defKeyBinds.put("Quit JabRef", "ctrl Q");
         defKeyBinds.put("Open database", "ctrl O");
         defKeyBinds.put("Save database", "ctrl S");
@@ -841,10 +844,12 @@ public class JabRefPreferences {
         defKeyBinds.put("Synchronize files", "ctrl F4");
         defKeyBinds.put("Synchronize PDF", "shift F4");
         defKeyBinds.put("Synchronize PS", "ctrl shift F4");
+        defKeyBinds.put("Focus entry table", "ctrl shift E");
 
         defKeyBinds.put("Abbreviate", "ctrl alt A");
         defKeyBinds.put("Unabbreviate", "ctrl alt shift A");
         defKeyBinds.put("Search IEEEXplore", "F8");
+        defKeyBinds.put("Search ACM Portal", "ctrl shift F8");
         defKeyBinds.put("Fetch ArXiv.org", "shift F8");
         defKeyBinds.put("Search JSTOR", "shift F9");
         defKeyBinds.put("Fetch SPIRES", "ctrl F8");
@@ -933,34 +938,33 @@ public class JabRefPreferences {
 
     public List<ExternalFileType> getDefaultExternalFileTypes() {
         List<ExternalFileType> list = new ArrayList<ExternalFileType>();
-        list.add(new ExternalFileType("PDF", "pdf", "evince", "pdfSmall"));
-        list.add(new ExternalFileType("PostScript", "ps", "evince", "psSmall"));
-        list.add(new ExternalFileType("Word", "doc", "oowriter", "openoffice"));
-        list.add(new ExternalFileType("OpenDocument text", "odt", "oowriter", "openoffice"));
-        list.add(new ExternalFileType("Excel", "xls", "oocalc", "openoffice"));
-        list.add(new ExternalFileType("OpenDocument spreadsheet", "ods", "oocalc", "openoffice"));
-        list.add(new ExternalFileType("PowerPoint", "ppt", "ooimpress", "openoffice"));
-        list.add(new ExternalFileType("OpenDocument presentation", "odp", "ooimpress", "openoffice"));
-        list.add(new ExternalFileType("Rich Text Format", "rtf", "oowriter", "openoffice"));
-        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("Djvu", "djvu", "evince", "psSmall"));
-        list.add(new ExternalFileType("Text", "txt", "emacs", "emacs"));
-        list.add(new ExternalFileType("LaTeX", "tex", "emacs", "emacs"));
-        list.add(new ExternalFileType("CHM", "chm", "gnochm", "www"));
-        list.add(new ExternalFileType("TIFF image", "tiff", "gimp", "picture"));
-        ExternalFileType tp = new ExternalFileType("URL", "html", "firefox", "www");
+        list.add(new ExternalFileType("PDF", "pdf", "application/pdf", "evince", "pdfSmall"));
+        list.add(new ExternalFileType("PostScript", "ps", "application/postscript", "evince", "psSmall"));
+        list.add(new ExternalFileType("Word", "doc", "application/msword", "oowriter", "openoffice"));
+        list.add(new ExternalFileType("OpenDocument text", "odt", "application/vnd.oasis.opendocument.text", "oowriter", "openoffice"));
+        list.add(new ExternalFileType("Excel", "xls", "application/excel", "oocalc", "openoffice"));
+        list.add(new ExternalFileType("OpenDocument spreadsheet", "ods", "application/vnd.oasis.opendocument.spreadsheet", "oocalc", "openoffice"));
+        list.add(new ExternalFileType("PowerPoint", "ppt", "", "ooimpress", "openoffice"));
+        list.add(new ExternalFileType("OpenDocument presentation", "odp", "application/vnd.oasis.opendocument.presentation", "ooimpress", "openoffice"));
+        list.add(new ExternalFileType("Rich Text Format", "rtf", "application/rtf", "oowriter", "openoffice"));
+        list.add(new ExternalFileType("PNG image", "png", "image/png", "gimp", "picture"));
+        list.add(new ExternalFileType("GIF image", "gif", "image/gif", "gimp", "picture"));
+        list.add(new ExternalFileType("JPG image", "jpg", "image/jpeg", "gimp", "picture"));
+        list.add(new ExternalFileType("Djvu", "djvu", "", "evince", "psSmall"));
+        list.add(new ExternalFileType("Text", "txt", "text/plain", "emacs", "emacs"));
+        list.add(new ExternalFileType("LaTeX", "tex", "", "emacs", "emacs"));
+        list.add(new ExternalFileType("CHM", "chm", "", "gnochm", "www"));
+        list.add(new ExternalFileType("TIFF image", "tiff", "image/tiff", "gimp", "picture"));
+        ExternalFileType tp = new ExternalFileType("URL", "html", "text/html", "firefox", "www");
         list.add(tp);
 
-        // Under Windows we initialize all file types with an empty viewer app, to
-        // rely on the default app instead:
-        if (Globals.ON_WIN) {
-            for (Iterator<ExternalFileType> iterator = list.iterator(); iterator.hasNext();) {
-                ExternalFileType type = iterator.next();
-                type.setOpenWith("");
-            }
+        // On all OSes there is a generic application available to handle file opening,
+        // so we don't need the default application settings anymore:
+        for (Iterator<ExternalFileType> iterator = list.iterator(); iterator.hasNext();) {
+            ExternalFileType type = iterator.next();
+            type.setOpenWith("");
         }
+        
 
         return list;
     }
@@ -993,12 +997,25 @@ public class JabRefPreferences {
     public ExternalFileType getExternalFileTypeByExt(String extension) {
         for (Iterator<ExternalFileType> iterator = externalFileTypes.iterator(); iterator.hasNext();) {
             ExternalFileType type = iterator.next();
-            if (type.getExtension().equals(extension))
+            if ((type.getExtension() != null) && type.getExtension().equalsIgnoreCase(extension))
                 return type;
         }
         return null;
     }
 
+    /**
+     * Look up the external file type registered for this MIME type, if any.
+     * @param mimeType The MIME type.
+     * @return The ExternalFileType registered, or null if none.
+     */
+    public ExternalFileType getExternalFileTypeByMimeType(String mimeType) {
+        for (Iterator<ExternalFileType> iterator = externalFileTypes.iterator(); iterator.hasNext();) {
+            ExternalFileType type = iterator.next();
+            if ((type.getMimeType() != null) && type.getMimeType().equals(mimeType))
+                return type;
+        }
+        return null;
+    }
 
     /**
      * Reset the List of external file types after user customization.
index ac2e899..559db8e 100644 (file)
@@ -30,6 +30,7 @@ package net.sf.jabref;
 import java.awt.event.*;
 import java.awt.*;
 import javax.swing.*;
+
 import net.sf.jabref.undo.UndoablePreambleChange;
 
 public class PreambleEditor extends JDialog {
@@ -51,171 +52,193 @@ public class PreambleEditor extends JDialog {
 
 
     public PreambleEditor(JabRefFrame baseFrame,
-                         BasePanel panel, BibtexDatabase base,
-                         JabRefPreferences prefs) {
-       super(baseFrame);
-       this.baseFrame = baseFrame;
-       this.panel = panel;
-       this.base = base;
-       this.prefs = prefs;
-
-       addWindowListener(new WindowAdapter() {
-               public void windowClosing(WindowEvent e) {
-                   closeAction.actionPerformed(null);
-               }
-               public void windowOpened(WindowEvent e) {
-                   ed.requestFocus();
-               }
-           });
-       setFocusTraversalPolicy(new LayoutFocusTraversalPolicy() {
-               protected boolean accept(Component c) {
-                   return (super.accept(c) && (c instanceof FieldEditor));
-               }
-           });
-
-       int prefHeight = (int)(GUIGlobals.PE_HEIGHT*GUIGlobals.FORM_HEIGHT[prefs.getInt("entryTypeFormHeightFactor")]);
-       setSize(GUIGlobals.FORM_WIDTH[prefs.getInt("entryTypeFormWidth")], prefHeight);
-
-       pan.setLayout(gbl);
-       con.fill = GridBagConstraints.BOTH;
-       con.weighty = 1;
-       con.insets = new Insets(10,5,10,5);
-
-       String content = base.getPreamble();
-
-       ed = new FieldTextArea(Globals.lang("Preamble"), ((content != null) ? content : ""));
-       setupJTextComponent((FieldTextArea)ed);
-
-       gbl.setConstraints(ed.getLabel(), con);
-       pan.add(ed.getLabel());
-
-       con.weightx = 1;
-
-       gbl.setConstraints(ed.getPane(), con);
-       pan.add(ed.getPane());
-
-       //tlb.add(closeAction);
-       //conPane.add(tlb, BorderLayout.NORTH);
-       conPane.add(pan, BorderLayout.CENTER);
-       setTitle(Globals.lang("Edit preamble"));
+                          BasePanel panel, BibtexDatabase base,
+                          JabRefPreferences prefs) {
+        super(baseFrame);
+        this.baseFrame = baseFrame;
+        this.panel = panel;
+        this.base = base;
+        this.prefs = prefs;
+
+        addWindowListener(new WindowAdapter() {
+            public void windowClosing(WindowEvent e) {
+                closeAction.actionPerformed(null);
+            }
+
+            public void windowOpened(WindowEvent e) {
+                ed.requestFocus();
+            }
+        });
+        setFocusTraversalPolicy(new LayoutFocusTraversalPolicy() {
+            protected boolean accept(Component c) {
+                return (super.accept(c) && (c instanceof FieldEditor));
+            }
+        });
+
+        int prefHeight = (int) (GUIGlobals.PE_HEIGHT * GUIGlobals.FORM_HEIGHT[prefs.getInt("entryTypeFormHeightFactor")]);
+        setSize(GUIGlobals.FORM_WIDTH[prefs.getInt("entryTypeFormWidth")], prefHeight);
+
+        pan.setLayout(gbl);
+        con.fill = GridBagConstraints.BOTH;
+        con.weighty = 1;
+        con.insets = new Insets(10, 5, 10, 5);
+
+        String content = base.getPreamble();
+
+        ed = new FieldTextArea(Globals.lang("Preamble"), ((content != null) ? content : ""));
+        //ed.addUndoableEditListener(panel.undoListener);
+        setupJTextComponent((FieldTextArea) ed);
+
+        gbl.setConstraints(ed.getLabel(), con);
+        pan.add(ed.getLabel());
+
+        con.weightx = 1;
+
+        gbl.setConstraints(ed.getPane(), con);
+        pan.add(ed.getPane());
+
+        //tlb.add(closeAction);
+        //conPane.add(tlb, BorderLayout.NORTH);
+        conPane.add(pan, BorderLayout.CENTER);
+        setTitle(Globals.lang("Edit preamble"));
     }
 
     private void setupJTextComponent(javax.swing.text.JTextComponent ta) {
-       // Set up key bindings and focus listener for the FieldEditor.
-       ta.getInputMap().put(prefs.getKey("Close preamble editor"), "close");
-       ta.getActionMap().put("close", closeAction);
-       ta.getInputMap().put(prefs.getKey("Preamble editor, store changes"), "store");
-       ta.getActionMap().put("store", storeFieldAction);
-       ta.getInputMap().put(prefs.getKey("Close preamble editor"), "close");
-       ta.getActionMap().put("close", closeAction);
+        // Set up key bindings and focus listener for the FieldEditor.
+        ta.getInputMap().put(prefs.getKey("Close preamble editor"), "close");
+        ta.getActionMap().put("close", closeAction);
+        ta.getInputMap().put(prefs.getKey("Preamble editor, store changes"), "store");
+        ta.getActionMap().put("store", storeFieldAction);
+        ta.getInputMap().put(prefs.getKey("Close preamble editor"), "close");
+        ta.getActionMap().put("close", closeAction);
 
-       ta.getInputMap().put(prefs.getKey("Undo"), "undo");
-       ta.getActionMap().put("undo", undoAction);
-       ta.getInputMap().put(prefs.getKey("Redo"), "redo");
-       ta.getActionMap().put("redo", redoAction);
+        ta.getInputMap().put(prefs.getKey("Undo"), "undo");
+        ta.getActionMap().put("undo", undoAction);
+        ta.getInputMap().put(prefs.getKey("Redo"), "redo");
+        ta.getActionMap().put("redo", redoAction);
 
 
-       ta.addFocusListener(new FieldListener());
+        ta.addFocusListener(new FieldListener());
     }
 
     public void updatePreamble() {
-       ed.setText(base.getPreamble());
+        ed.setText(base.getPreamble());
     }
 
-   class FieldListener extends FocusAdapter {
-       /*
-        * Focus listener that fires the storeFieldAction when a FieldTextArea
-        * loses focus.
-        */
-       public void focusLost(FocusEvent e) {
-          if (!e.isTemporary())
-              storeFieldAction.actionPerformed(new ActionEvent(e.getSource(), 0, ""));
-       }
+    class FieldListener extends FocusAdapter {
+        /*
+       * Focus listener that fires the storeFieldAction when a FieldTextArea
+       * loses focus.
+       */
+        public void focusLost(FocusEvent e) {
+            if (!e.isTemporary())
+                storeFieldAction.actionPerformed(new ActionEvent(e.getSource(), 0, ""));
+        }
 
-   }
+    }
 
     StoreFieldAction storeFieldAction = new StoreFieldAction();
+
     class StoreFieldAction extends AbstractAction {
-       public StoreFieldAction() {
-           super("Store field value");
-           putValue(SHORT_DESCRIPTION, "Store field value");
-       }
-       public void actionPerformed(ActionEvent e) {
-           String toSet = null;
-           boolean set;
-           if (ed.getText().length() > 0)
-               toSet = ed.getText();
-           // We check if the field has changed, since we don't want to mark the
-           // base as changed unless we have a real change.
-           if (toSet == null) {
-               if (base.getPreamble() == null)
-                   set = false;
-               else
-                   set = true;
-           } else {
-               if ((base.getPreamble() != null)
-                   && toSet.equals(base.getPreamble()))
-                   set = false;
-                   else
-                   set = true;
-           }
-
-           if (set) {
-               panel.undoManager.addEdit(new UndoablePreambleChange
-                                 (base, panel, base.getPreamble(), toSet));
-               base.setPreamble(toSet);
-               if ((toSet != null) && (toSet.length() > 0)) {
-                   ed.setLabelColor(GUIGlobals.validFieldColor);
-                   ed.setBackground(GUIGlobals.validFieldBackground);
-               } else {
-                   ed.setLabelColor(GUIGlobals.nullFieldColor);
-                   ed.setBackground(GUIGlobals.validFieldBackground);
-               }
-               panel.markBaseChanged();
-           }
-
-       }
+        public StoreFieldAction() {
+            super("Store field value");
+            putValue(SHORT_DESCRIPTION, "Store field value");
+        }
+
+        public void actionPerformed(ActionEvent e) {
+            String toSet = null;
+            boolean set;
+            if (ed.getText().length() > 0)
+                toSet = ed.getText();
+            // We check if the field has changed, since we don't want to mark the
+            // base as changed unless we have a real change.
+            if (toSet == null) {
+                if (base.getPreamble() == null)
+                    set = false;
+                else
+                    set = true;
+            } else {
+                if ((base.getPreamble() != null)
+                        && toSet.equals(base.getPreamble()))
+                    set = false;
+                else
+                    set = true;
+            }
+
+            if (set) {
+                panel.undoManager.addEdit(new UndoablePreambleChange
+                        (base, panel, base.getPreamble(), toSet));
+                base.setPreamble(toSet);
+                if ((toSet != null) && (toSet.length() > 0)) {
+                    ed.setLabelColor(GUIGlobals.validFieldColor);
+                    ed.setBackground(GUIGlobals.validFieldBackground);
+                } else {
+                    ed.setLabelColor(GUIGlobals.nullFieldColor);
+                    ed.setBackground(GUIGlobals.validFieldBackground);
+                }
+                if (ed.getTextComponent().hasFocus())
+                    ed.setBackground(GUIGlobals.activeEditor);
+                panel.markBaseChanged();
+            }
+
+        }
     }
 
     UndoAction undoAction = new UndoAction();
+
     class UndoAction extends AbstractAction {
-       public UndoAction() {
-           super("Undo", GUIGlobals.getImage("undo"));
-           putValue(SHORT_DESCRIPTION, "Undo");
-       }
-       public void actionPerformed(ActionEvent e) {
-           try {
-               panel.runCommand("undo");
-           } catch (Throwable ex) {}
-       }
+        public UndoAction() {
+            super("Undo", GUIGlobals.getImage("undo"));
+            putValue(SHORT_DESCRIPTION, "Undo");
+        }
+
+        public void actionPerformed(ActionEvent e) {
+            try {
+                panel.runCommand("undo");
+            } catch (Throwable ex) {
+            }
+        }
     }
 
     RedoAction redoAction = new RedoAction();
+
     class RedoAction extends AbstractAction {
-       public RedoAction() {
-           super("Undo", GUIGlobals.getImage("redo"));
-           putValue(SHORT_DESCRIPTION, "Redo");
-       }
-       public void actionPerformed(ActionEvent e) {
-           try {
-               panel.runCommand("redo");
-           } catch (Throwable ex) {}
-       }
+        public RedoAction() {
+            super("Undo", GUIGlobals.getImage("redo"));
+            putValue(SHORT_DESCRIPTION, "Redo");
+        }
+
+        public void actionPerformed(ActionEvent e) {
+            try {
+                panel.runCommand("redo");
+            } catch (Throwable ex) {
+            }
+        }
     }
 
     // The action concerned with closing the window.
     CloseAction closeAction = new CloseAction();
+
     class CloseAction extends AbstractAction {
-       public CloseAction() {
-           super(Globals.lang("Close window"));
-           //, new ImageIcon(GUIGlobals.closeIconFile));
-           //putValue(SHORT_DESCRIPTION, "Close window (Ctrl-Q)");
-       }
-       public void actionPerformed(ActionEvent e) {
-           storeFieldAction.actionPerformed(null);
-           panel.preambleEditorClosing();
-           dispose();
-       }
+        public CloseAction() {
+            super(Globals.lang("Close window"));
+            //, new ImageIcon(GUIGlobals.closeIconFile));
+            //putValue(SHORT_DESCRIPTION, "Close window (Ctrl-Q)");
+        }
+
+        public void actionPerformed(ActionEvent e) {
+            storeFieldAction.actionPerformed(null);
+            panel.preambleEditorClosing();
+            dispose();
+        }
+    }
+
+    public FieldEditor getFieldEditor() {
+        return ed;
+    }
+
+    public void storeCurrentEdit() {
+        storeFieldAction.actionPerformed(null);
     }
 
 }
index 49501fb..184c884 100644 (file)
@@ -21,7 +21,7 @@ import net.sf.jabref.util.DocumentPrinter;
  * Displays an BibtexEntry using the given layout format.
  * 
  * @author $Author: mortenalver $
- * @version $Revision: 2597 $ ($Date: 2007-08-01 20:23:38 +0200 (Mi, 01 Aug
+ * @version $Revision: 2669 $ ($Date: 2007-08-01 20:23:38 +0200 (Mi, 01 Aug
  *          2007) $)
  * 
  */
@@ -217,17 +217,6 @@ public class PreviewPanel extends JPanel implements VetoableChangeListener {
                                return getPreferredSize();
                        }
 
-                       public void paintComponent(Graphics g) {
-                               Graphics2D g2 = (Graphics2D) g;
-                               Object hint = g2
-                                       .getRenderingHint(RenderingHints.KEY_ANTIALIASING);
-                               g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
-                                       RenderingHints.VALUE_ANTIALIAS_ON);
-                               g2.setRenderingHint(RenderingHints.KEY_RENDERING,
-                                       RenderingHints.VALUE_RENDER_QUALITY);
-                               super.paintComponent(g2);
-                               g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING, hint);
-                       }
                };
                previewPane.setMargin(new Insets(3, 3, 3, 3));
 
index 3f1ce11..c6ce9a4 100644 (file)
@@ -39,7 +39,6 @@ import java.awt.Color;
 import java.awt.Component;
 import java.awt.Dimension;
 import java.awt.Font;
-import java.awt.Point;
 import java.awt.event.ActionEvent;
 import java.awt.event.ActionListener;
 import java.io.BufferedInputStream;
@@ -103,6 +102,7 @@ import net.sf.jabref.gui.FileListTableModel;
 import net.sf.jabref.imports.CiteSeerFetcher;
 import net.sf.jabref.undo.NamedCompound;
 import net.sf.jabref.undo.UndoableFieldChange;
+import net.sf.jabref.labelPattern.LabelPatternUtil;
 
 import com.jgoodies.forms.builder.DefaultFormBuilder;
 import com.jgoodies.forms.layout.FormLayout;
@@ -192,11 +192,7 @@ public class Util {
         * top.
         */
        public static void placeDialog(java.awt.Dialog diag, java.awt.Container win) {
-               Dimension ds = diag.getSize(), df = win.getSize();
-               Point pf = win.getLocation();
-               diag.setLocation(new Point(Math.max(0, pf.x + (df.width - ds.width) / 2), Math.max(0, pf.y
-                       + (df.height - ds.height) / 2)));
-
+        diag.setLocationRelativeTo(win);
        }
 
        /**
@@ -496,7 +492,7 @@ public class Util {
        public static void openExternalViewer(MetaData metaData, String link, String fieldName)
                throws IOException {
 
-               if (fieldName.equals("ps") || fieldName.equals("pdf")) {
+        if (fieldName.equals("ps") || fieldName.equals("pdf")) {
 
             // Find the default directory for this field type:
                        String dir = metaData.getFileDirectory(fieldName);
@@ -684,7 +680,6 @@ public class Util {
        public static boolean openExternalFileAnyFormat(MetaData metaData, String link,
                                                  ExternalFileType fileType) throws IOException {
 
-
         boolean httpLink = link.toLowerCase().startsWith("http");
 
         // For other platforms we'll try to find the file type:
@@ -695,13 +690,10 @@ public class Util {
                int pos = name.lastIndexOf('.');
                String extension = ((pos >= 0) && (pos < name.length() - 1)) ? name.substring(pos + 1)
                        .trim().toLowerCase() : null;
-
                // Find the default directory for this field type, if any:
                String dir = metaData.getFileDirectory(extension);
-
                // Include the standard "file" directory:
         String fileDir = metaData.getFileDirectory(GUIGlobals.FILE_FIELD);
-
         // Include the directory of the bib file:
         String[] dirs;
         if (metaData.getFile() != null) {
@@ -719,7 +711,7 @@ public class Util {
 
         // Check if we have arrived at a file type, and either an http link or an existing file:
                if ((httpLink || file.exists()) && (fileType != null)) {
-                       // Open the file:
+            // Open the file:
                        try {
                 String filePath = httpLink ? link : file.getPath();
                 if (Globals.ON_MAC) {
@@ -735,7 +727,13 @@ public class Util {
                     } else
                         openFileOnWindows(filePath, true);
                                } else {
-                    String[] openWith = fileType.getOpenWith().split(" ");
+                    // Use the given app if specified, and the universal "xdg-open" otherwise:
+                    String[] openWith;
+                    if ((fileType.getOpenWith() != null) && (fileType.getOpenWith().length() > 0))
+                        openWith = fileType.getOpenWith().split(" ");
+                    else
+                        openWith = new String[] {"xdg-open"};
+                    
                     String[] cmdArray = new String[openWith.length+1];
                     System.arraycopy(openWith, 0, cmdArray, 0, openWith.length);
                     cmdArray[cmdArray.length-1] = filePath;
@@ -796,7 +794,7 @@ public static boolean openExternalFileUnknown(JabRefFrame frame, BibtexEntry ent
     }
     else if (answer == JOptionPane.YES_OPTION) {
         // User wants to define the new file type. Show the dialog:
-        ExternalFileType newType = new ExternalFileType(fileType.getName(), "", "", "new");
+        ExternalFileType newType = new ExternalFileType(fileType.getName(), "", "", "", "new");
         ExternalFileTypeEntryEditor editor = new ExternalFileTypeEntryEditor(frame, newType);
         editor.setVisible(true);
         if (editor.okPressed()) {
@@ -928,7 +926,7 @@ public static boolean openExternalFileUnknown(JabRefFrame frame, BibtexEntry ent
                 */
                if (!directory.endsWith(System.getProperty("file.separator")))
                        directory += System.getProperty("file.separator");
-               String found = findInDir(key, directory, off);
+               String found = findInDir(key, directory, off, 0);
                if (found != null)
                        return found.substring(directory.length());
                else
@@ -1222,9 +1220,9 @@ public static boolean openExternalFileUnknown(JabRefFrame frame, BibtexEntry ent
        }
 
        /**
-        * Accepts a string like [author:toLowerCase("escapedstring"),toUpperCase],
-        * whereas the first string signifies the bibtex-field to get while the
-        * others are the names of layouters that will be applied.
+        * Accepts a string like [author:lower] or [title:abbr] or [auth],
+        * whereas the first part signifies the bibtex-field to get, or the key generator
+     * field marker to use, while the others are the modifiers that will be applied.
         *
         * @param fieldAndFormat
         * @param entry
@@ -1254,21 +1252,19 @@ public static boolean openExternalFileUnknown(JabRefFrame frame, BibtexEntry ent
 
                String fieldValue = BibtexDatabase.getResolvedField(beforeColon, entry, database);
 
+        // If no field value was found, try to interpret it as a key generator field marker:
+        if (fieldValue == null)
+            fieldValue =  LabelPatternUtil.makeLabel(entry, beforeColon);
+
                if (fieldValue == null)
                        return null;
 
                if (afterColon == null || afterColon.length() == 0)
                        return fieldValue;
 
-               try {
-                       LayoutFormatter[] formatters = LayoutEntry.getOptionalLayout(afterColon, "");
-                       for (int i = 0; i < formatters.length; i++) {
-                               fieldValue = formatters[i].format(fieldValue);
-                       }
-               } catch (Exception e) {
-                       throw new RuntimeException(e);
-               }
-
+        String[] parts = afterColon.split(":");
+        fieldValue = LabelPatternUtil.applyModifiers(fieldValue, parts, 0);
+        
                return fieldValue;
        }
 
@@ -1586,8 +1582,10 @@ public static boolean openExternalFileUnknown(JabRefFrame frame, BibtexEntry ent
         return file;
     }
 
-       private static String findInDir(String key, String dir, OpenFileFilter off) {
-               File f = new File(dir);
+       private static String findInDir(String key, String dir, OpenFileFilter off, int count) {
+        if (count > 20)
+            return null; // Make sure an infinite loop doesn't occur.
+        File f = new File(dir);
                File[] all = f.listFiles();
                if (all == null)
                        return null; // An error occured. We may not have
@@ -1604,7 +1602,7 @@ public static boolean openExternalFileUnknown(JabRefFrame frame, BibtexEntry ent
                                        return curFile.getPath();
 
                        } else if (curFile.isDirectory()) {
-                               String found = findInDir(key, curFile.getPath(), off);
+                               String found = findInDir(key, curFile.getPath(), off, count+1);
                                if (found != null)
                                        return found;
                        }
@@ -1622,8 +1620,7 @@ public static boolean openExternalFileUnknown(JabRefFrame frame, BibtexEntry ent
        for (Map.Entry<String, AutoCompleter> entry : autoCompleters.entrySet()){
                String field = entry.getKey();
             AutoCompleter comp = entry.getValue();
-
-            comp.addAll(be.getField(field));
+            comp.addAll(be.getField(field), be);
         }
     }
 
@@ -2604,6 +2601,8 @@ public static boolean openExternalFileUnknown(JabRefFrame frame, BibtexEntry ent
     }
 
     private static String encodeString(String s) {
+        if (s == null)
+            return null;
         StringBuilder sb = new StringBuilder();
         for (int i=0; i<s.length(); i++) {
             char c = s.charAt(i);
@@ -2649,7 +2648,32 @@ public static boolean openExternalFileUnknown(JabRefFrame frame, BibtexEntry ent
                
                return Character.toUpperCase(string.charAt(0)) + string.substring(1);
        }
-       
-       
+
+
+    /**
+     * Run an AbstractWorker's methods using Spin features to put each method
+     * on the correct thread.
+     * @param worker The worker to run.
+     * @throws Throwable 
+     */
+    public static void runAbstractWorker(AbstractWorker worker) throws Throwable {
+        // This part uses Spin's features:
+        Worker wrk = worker.getWorker();
+        // The Worker returned by getWorker() has been wrapped
+        // by Spin.off(), which makes its methods be run in
+        // a different thread from the EDT.
+        CallBack clb = worker.getCallBack();
+
+        worker.init(); // This method runs in this same thread, the EDT.
+        // Useful for initial GUI actions, like printing a message.
+
+        // The CallBack returned by getCallBack() has been wrapped
+        // by Spin.over(), which makes its methods be run on
+        // the EDT.
+        wrk.run(); // Runs the potentially time-consuming action
+        // without freezing the GUI. The magic is that THIS line
+        // of execution will not continue until run() is finished.
+        clb.update(); // Runs the update() method on the EDT.
+    }
        
 }
\ No newline at end of file
index e5b2c32..e5dfa73 100644 (file)
@@ -19,31 +19,34 @@ public class CustomExportList extends TreeSet<String[]> {
 
        private TreeMap<String, ExportFormat> formats = new TreeMap<String, ExportFormat>();
        private Object[] array;
-       JabRefPreferences prefs;
+
 
        public CustomExportList(JabRefPreferences prefs_, Comparator<String[]> comp) {
                super(comp);
-               prefs = prefs_;
-               readPrefs();
-               sort();
+               //readPrefs();
+               //sort();
        }
 
        public TreeMap<String, ExportFormat> getCustomExportFormats() {
-               return formats;
+        formats.clear();
+        readPrefs();
+        sort();
+        return formats;
        }
 
        private void readPrefs() {
-               int i = 0;
-               String[] s = null;
-               while ((s = prefs.getStringArray("customExportFormat" + i)) != null) {
-                       ExportFormat format = createFormat(s);
+        formats.clear();
+        int i = 0;
+               String[] s;
+               while ((s = Globals.prefs.getStringArray("customExportFormat" + i)) != null) {
+            ExportFormat format = createFormat(s);
                        formats.put(format.getConsoleName(), format);
                        super.add(s);
                        i++;
                }
        }
 
-       private ExportFormat createFormat(String[] s) {
+    private ExportFormat createFormat(String[] s) {
                String lfFileName;
                if (s[1].endsWith(".layout"))
                        lfFileName = s[1].substring(0, s[1].length() - 7);
index 91f7a31..616f5ac 100644 (file)
@@ -66,6 +66,7 @@ public class ExportCustomizationDialog extends JDialog {
          old[0] = ecd.name();
          old[1] = ecd.layoutFile();
          old[2] = ecd.extension();
+         Globals.prefs.customExports.store();
          table.revalidate();
          table.repaint();
          ExportFormats.initAllExports();
index 313b434..f98ee82 100644 (file)
@@ -27,6 +27,9 @@ public class ExportFormat implements IExportFormat {
        String lfFileName;
        String directory;
        String extension;
+    String encoding = null; // If this value is set, it will be used to override
+      // the default encoding for the basePanel.
+
        FileFilter fileFilter;
        boolean customExport = false;
 
@@ -85,7 +88,16 @@ public class ExportFormat implements IExportFormat {
                return displayName;
        }
 
-       /**
+    /**
+     * Set an encoding which will be used in preference to the default value
+     * obtained from the basepanel.
+     * @param encoding The name of the encoding to use.
+     */
+    protected void setEncoding(String encoding) {
+        this.encoding = encoding;
+    }
+
+    /**
         * This method should return a reader from which the given layout file can
         * be read.
         * 
@@ -142,8 +154,21 @@ public class ExportFormat implements IExportFormat {
             final MetaData metaData, final String file,
                final String encoding, Set<String> entryIds) throws Exception {
 
-               File outFile = new File(file);
-               SaveSession ss = getSaveSession(encoding, outFile);
+        File outFile = new File(file);
+        SaveSession ss = null;
+        if (this.encoding != null) {
+            try {
+                ss = getSaveSession(this.encoding, outFile);
+            } catch (IOException ex) {
+                // Perhaps the overriding encoding doesn't work?
+                // We will fall back on the default encoding.
+                ex.printStackTrace();
+
+            }
+        }
+               if (ss == null)
+                   ss = getSaveSession(encoding, outFile);
+        
                VerifyingWriter ps = ss.getWriter();
 
                // Print header
index 52f09b0..67b0a5e 100644 (file)
@@ -37,6 +37,7 @@ public class ExportFormats {
                 Globals.lang("Simple HTML"), "simplehtml", "simplehtml", null, ".html"));
         putFormat(new ExportFormat(Globals.lang("Docbook"), "docbook", "docbook", null, ".xml"));
         putFormat(new ExportFormat(Globals.lang("BibTeXML"), "bibtexml", "bibtexml", null, ".xml"));
+        putFormat(new ExportFormat(Globals.lang("BibO RDF"), "bibordf", "bibordf", null, ".rdf"));
         putFormat(new ModsExportFormat());
         putFormat(new ExportFormat(Globals.lang("HTML table"),
                 "tablerefs", "tablerefs", "tablerefs", ".html"));
@@ -103,7 +104,8 @@ public class ExportFormats {
                }
                
         // Now add custom export formats
-        for (IExportFormat format : Globals.prefs.customExports.getCustomExportFormats().values()){
+        TreeMap<String, ExportFormat> customFormats = Globals.prefs.customExports.getCustomExportFormats();
+        for (IExportFormat format : customFormats.values()){
             putFormat(format);
         }
     }
@@ -303,4 +305,4 @@ public class ExportFormats {
                exportFormats.put(format.getConsoleName(), format);
        }
 
-}
\ No newline at end of file
+}
index b0d85c4..a8610e8 100644 (file)
@@ -235,9 +235,12 @@ public class FileActions
                        if (types.size() > 0) {
                                for (Iterator<String> i = types.keySet().iterator(); i
                                        .hasNext();) {
-                                       CustomEntryType tp = (CustomEntryType) types.get(i.next());
-                                       tp.save(fw);
-                                       fw.write(Globals.NEWLINE);
+                    BibtexEntryType type = types.get(i.next());
+                    if (type instanceof CustomEntryType) {
+                        CustomEntryType tp = (CustomEntryType)type;
+                        tp.save(fw);
+                        fw.write(Globals.NEWLINE);
+                    }
                                }
 
                        }
index 10c49cb..938362d 100644 (file)
@@ -30,7 +30,7 @@ public class PluginBasedExportFormat extends ExportFormat {
                String displayName = extension.getDisplayName();
                String layoutFilename = extension.getLayoutFilename();
                String fileExtension = extension.getExtension();
-
+        String encoding = extension.getEncoding();
                if ("".equals(fileExtension) || "".equals(displayName)
                        || "".equals(consoleName) || "".equals(layoutFilename)) {
                        Globals.logger("Could not load extension " + extension.getId());
@@ -38,13 +38,16 @@ public class PluginBasedExportFormat extends ExportFormat {
                }
 
                return new PluginBasedExportFormat(displayName, consoleName,
-                       layoutFilename, fileExtension, extension);
+                       layoutFilename, fileExtension, encoding, extension);
        }
 
        public PluginBasedExportFormat(String displayName, String consoleName,
-               String layoutFileName, String fileExtension,
+               String layoutFileName, String fileExtension, String encoding,
                ExportFormatTemplateExtension extension) {
                super(displayName, consoleName, layoutFileName, null, fileExtension);
+        // Set the overriding encoding, if the plugin supplied one:
+        if (encoding != null)
+            setEncoding(encoding);
                this.extension = extension;
        }
 
index 7cec978..e694e75 100644 (file)
@@ -127,6 +127,10 @@ public class SaveDatabaseAction extends AbstractWorker {
         }
 
         try {
+
+            // Make sure the current edit is stored:
+            panel.storeCurrentEdit();
+
             // If the option is set, autogenerate keys for all entries that are
             // lacking keys, before saving:
             panel.autoGenerateKeysBeforeSaving();
index effb241..5aaf985 100755 (executable)
@@ -42,7 +42,7 @@ import wsi.ra.types.StringInt;
  * DOCUMENT ME!
  * 
  * @author $author$
- * @version $Revision: 2488 $
+ * @version $Revision: 2792 $
  */
 public class LayoutEntry {
        // ~ Instance fields
@@ -311,7 +311,15 @@ public class LayoutEntry {
                                }
                        }
                }
-               return pluginLayoutFormatter.get(formatterName);
+        // We need to make a new instance of this LayoutFormatter, in case it is a
+        // parameter-accepting layout formatter:
+        Class<? extends LayoutFormatter> c = pluginLayoutFormatter.get(formatterName).getClass();
+        try {
+            return c.getConstructor().newInstance();
+        } catch (Throwable e) {
+            e.printStackTrace();
+        }
+        return pluginLayoutFormatter.get(formatterName);
        }
        
        public static LayoutFormatter getLayoutFormatterByClassName(String className, String classPrefix)
@@ -383,6 +391,13 @@ public class LayoutEntry {
                        // Last load from plug-ins
                        LayoutFormatter f = getLayoutFormatterFromPlugins(className);
                        if (f != null) {
+                // If this formatter accepts an argument, check if we have one, and
+                // set it if so:
+                if (f instanceof ParamLayoutFormatter) {
+                    if (strings.length >= 2) {
+                        ((ParamLayoutFormatter)f).setArgument(strings[1]);
+                    }
+                }
                                results.add(f);
                                continue;
                        }
index b409bd5..a8ea1ea 100644 (file)
@@ -42,7 +42,6 @@ public class AuthorAbbreviator implements LayoutFormatter {
         * @see net.sf.jabref.export.layout.LayoutFormatter#format(java.lang.String)
         */
        public String format(String fieldText) {
-
         AuthorList list = AuthorList.getAuthorList(fieldText);
         return list.getAuthorsLastFirstAnds(true);
         
diff --git a/src/java/net/sf/jabref/export/layout/format/CreateBibORDFAuthors.java b/src/java/net/sf/jabref/export/layout/format/CreateBibORDFAuthors.java
new file mode 100644 (file)
index 0000000..0edf756
--- /dev/null
@@ -0,0 +1,88 @@
+///////////////////////////////////////////////////////////////////////////////
+//  Filename: $RCSfile$
+//  Purpose:  Atom representation.
+//  Language: Java
+//  Compiler: JDK 1.4
+//  Authors:  Joerg K. Wegner
+//  Version:  $Revision: 2268 $
+//            $Date: 2007-08-20 01:37:05 +0200 (Mon, 20 Aug 2007) $
+//            $Author: coezbek $
+//
+//  Copyright (c) Dept. Computer Architecture, University of Tuebingen, Germany
+//
+//  This program is free software; you can redistribute it and/or modify
+//  it under the terms of the GNU General Public License as published by
+//  the Free Software Foundation version 2 of the License.
+//
+//  This program is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+//  GNU General Public License for more details.
+///////////////////////////////////////////////////////////////////////////////
+package net.sf.jabref.export.layout.format;
+
+import net.sf.jabref.export.layout.LayoutFormatter;
+
+
+/**
+ * Create DocBook authors formatter.
+ *
+ * @author $author$
+ * @version $Revision: 2268 $
+ */
+public class CreateBibORDFAuthors implements LayoutFormatter
+{
+    //~ Methods ////////////////////////////////////////////////////////////////
+
+    public String format(String fieldText) {
+       // Yeah, the format is quite verbose... sorry about that :)
+       
+//      <bibo:contribution>
+//        <bibo:Contribution>
+//          <bibo:role rdf:resource="http://purl.org/ontology/bibo/roles/author" />
+//          <bibo:contributor><foaf:Person foaf:name="Ola Spjuth"/></bibo:contributor>
+//          <bibo:position>1</bibo:position>
+//        </bibo:Contribution>
+//      </bibo:contribution>
+
+        StringBuffer sb = new StringBuffer(100);
+
+        if (fieldText.indexOf(" and ") == -1)
+        {
+          singleAuthor(sb, fieldText, 1);
+        }
+        else
+        {
+            String[] names = fieldText.split(" and ");
+            for (int i=0; i<names.length; i++)
+            {
+              singleAuthor(sb, names[i], (i+1));
+              if (i < names.length -1)
+                sb.append("\n");
+            }
+        }
+
+
+
+        fieldText = sb.toString();
+
+        return fieldText;
+    }
+
+    /**
+     * @param sb
+     * @param fieldText
+     */
+    protected void singleAuthor(StringBuffer sb, String author, int position) {
+        sb.append("<bibo:contribution>\n");
+        sb.append("  <bibo:Contribution>\n");
+        sb.append("    <bibo:role rdf:resource=\"http://purl.org/ontology/bibo/roles/author\" />\n");
+        sb.append("    <bibo:contributor><foaf:Person foaf:name=\"" + author + "\"/></bibo:contributor>\n");
+        sb.append("    <bibo:position>" + position + "</bibo:position>\n");
+        sb.append("  </bibo:Contribution>\n");
+        sb.append("</bibo:contribution>\n");
+    }
+}
+///////////////////////////////////////////////////////////////////////////////
+//  END OF FILE.
+///////////////////////////////////////////////////////////////////////////////
index 42a3f54..9a77ddc 100644 (file)
@@ -1,14 +1,15 @@
 package net.sf.jabref.export.layout.format;
 
 import net.sf.jabref.export.layout.LayoutFormatter;
+import net.sf.jabref.Globals;
 
 /**
  * Used to fix [ 1588028 ] export HTML table doi url.
  * 
  * Will prepend "http://dx.doi.org/" if only doi number and not a URL is given.
  * 
- * @author $Author: coezbek $
- * @version $Revision: 1807 $ ($Date: 2006-11-12 03:42:42 +0100 (Sun, 12 Nov 2006) $)
+ * @author $Author: mark-schenk $
+ * @version $Revision: 2632 $ ($Date: 2008-03-26 23:17:09 +0100 (Wed, 26 Mar 2008) $)
  *
  */
 public class DOICheck implements LayoutFormatter {
@@ -24,11 +25,24 @@ public class DOICheck implements LayoutFormatter {
                if (fieldText.length() == 0){
                        return fieldText;
                }
+
+               /*
+               * Author: mark-schenk
+               * If DOI is only number, or doi:number, add the required http://dx.doi.org/ prefix
+               */
                
-               if (fieldText.startsWith("10")){
-                       return "http://dx.doi.org/" + fieldText;
+               // Remove possible 'doi:'
+               if (fieldText.matches("^doi:/*.*")){
+                       fieldText = fieldText.replaceFirst("^doi:/*", "");
+                       fieldText = Globals.DOI_LOOKUP_PREFIX + fieldText;
+                       return fieldText;
                }
-               
+               // If starts with '10.'
+               if (fieldText.startsWith("10.")) {
+                       fieldText = Globals.DOI_LOOKUP_PREFIX + fieldText;
+                       return fieldText;
+               }
+
                return fieldText;
        }
 }
diff --git a/src/java/net/sf/jabref/export/layout/format/DOIStrip.java b/src/java/net/sf/jabref/export/layout/format/DOIStrip.java
new file mode 100644 (file)
index 0000000..2072d46
--- /dev/null
@@ -0,0 +1,44 @@
+package net.sf.jabref.export.layout.format;
+
+import net.sf.jabref.export.layout.LayoutFormatter;
+import net.sf.jabref.Globals;
+
+/**
+ * Will strip any prefixes from the DOI field, in order to output only the DOI number
+ * 
+ * @author mark-schenk
+ *
+ */
+public class DOIStrip implements LayoutFormatter {
+
+       public String format(String fieldText) {
+               
+               if (fieldText == null){
+                       return null;
+               }
+               
+               fieldText = fieldText.trim();
+               if (fieldText.length() == 0){
+                       return fieldText;
+               }
+
+               // If starts with '10.' it's fine
+               if (fieldText.startsWith("10.")) {
+                       return fieldText;
+               }
+               
+               // Remove possible 'doi:'
+               if (fieldText.matches("^doi:/*.*")){
+                       fieldText = fieldText.replaceFirst("^doi:/*", "");
+                       return fieldText;
+               }
+
+               // Remove possible 'http://dx.doi.org/' prefix
+               if (fieldText.startsWith(Globals.DOI_LOOKUP_PREFIX)){
+                       fieldText = fieldText.replaceFirst(Globals.DOI_LOOKUP_PREFIX, "");
+                       return fieldText;
+               }
+               
+               return fieldText;
+       }
+}
diff --git a/src/java/net/sf/jabref/export/layout/format/FirstPage.java b/src/java/net/sf/jabref/export/layout/format/FirstPage.java
new file mode 100644 (file)
index 0000000..f59f6e1
--- /dev/null
@@ -0,0 +1,22 @@
+package net.sf.jabref.export.layout.format;
+
+import net.sf.jabref.export.layout.LayoutFormatter;
+
+/**
+ * Formatter that returns the first page from the "pages" field, if set.
+ *
+ * For instance, if the pages field is set to "345-360" or "345--360",
+ * this formatter will return "345".
+ */
+public class FirstPage implements LayoutFormatter {
+
+    public String format(String s) {
+        if (s == null)
+                       return "";
+               String[] pageParts = s.split("[\\-]+");
+               if (pageParts.length == 2)
+            return pageParts[0];
+        else return "";
+
+    }
+}
diff --git a/src/java/net/sf/jabref/export/layout/format/LastPage.java b/src/java/net/sf/jabref/export/layout/format/LastPage.java
new file mode 100644 (file)
index 0000000..86db9b5
--- /dev/null
@@ -0,0 +1,22 @@
+package net.sf.jabref.export.layout.format;
+
+import net.sf.jabref.export.layout.LayoutFormatter;
+
+/**
+ * Formatter that returns the last page from the "pages" field, if set.
+ *
+ * For instance, if the pages field is set to "345-360" or "345--360",
+ * this formatter will return "360".
+ */
+public class LastPage implements LayoutFormatter {
+
+    public String format(String s) {
+        if (s == null)
+                       return "";
+               String[] pageParts = s.split("[\\-]+");
+               if (pageParts.length == 2)
+            return pageParts[1];
+        else return "";
+
+    }
+}
\ No newline at end of file
index c4be267..829ddc8 100755 (executable)
@@ -4,9 +4,9 @@
 //  Language: Java
 //  Compiler: JDK 1.4
 //  Authors:  Egon Willighagen
-//  Version:  $Revision: 1799 $
-//            $Date: 2006-11-11 18:11:39 +0100 (Sat, 11 Nov 2006) $
-//            $Author: coezbek $
+//  Version:  $Revision: 2628 $
+//            $Date: 2008-03-25 17:26:10 +0100 (Tue, 25 Mar 2008) $
+//            $Author: mortenalver $
 //
 //  Copyright (c) Egon Willighagen
 //
@@ -25,10 +25,10 @@ package net.sf.jabref.export.layout.format;
 import net.sf.jabref.export.layout.LayoutFormatter;
 
 /**
- * Remove brackets formatter.
+ * Convert the contents to lower case.
  * 
  * @author $author$
- * @version $Revision: 1799 $
+ * @version $Revision: 2628 $
  */
 public class ToLowerCase implements LayoutFormatter {
 
diff --git a/src/java/net/sf/jabref/export/layout/format/ToUpperCase.java b/src/java/net/sf/jabref/export/layout/format/ToUpperCase.java
new file mode 100644 (file)
index 0000000..62e5386
--- /dev/null
@@ -0,0 +1,14 @@
+package net.sf.jabref.export.layout.format;
+
+import net.sf.jabref.export.layout.LayoutFormatter;
+
+/**
+ * Convert the contents to upper case.
+ */
+public class ToUpperCase implements LayoutFormatter {
+
+    public String format(String fieldText) {
+               return fieldText.toUpperCase();
+       }
+
+}
index b31b221..f58b0ec 100644 (file)
@@ -158,10 +158,10 @@ public class AccessLinksForEntries {
     }
 
 
-    public static class CopyLinkedFiles extends BaseAction {
+    public static class SaveWithLinkedFiles extends BaseAction {
         private BasePanel panel;
 
-        public CopyLinkedFiles(BasePanel panel) {
+        public SaveWithLinkedFiles(BasePanel panel) {
 
             this.panel = panel;
         }
@@ -202,6 +202,7 @@ public class AccessLinksForEntries {
             });
             t.start();
 
+            
         }
     }
 
index 90edf01..d40eeff 100644 (file)
@@ -253,7 +253,7 @@ public class AutoSetExternalFileForEntries extends AbstractWorker {
             builder.appendSeparator(Globals.lang("Check links"));
 
             description = new JLabel("<HTML>" +
-                    Globals.lang("This makes JabRef look up each %0 extension and check if the file exists. If not, you will "
+                    Globals.lang("This makes JabRef look up each %0 link and check if the file exists. If not, you will "
                             + "be given options<BR>to resolve the problem.", fn)
                     + "</HTML>");
             builder.append(description);
index ec5f163..f4ceb5d 100644 (file)
@@ -31,6 +31,7 @@ public class DownloadExternalFile {
     private String bibtexKey;
     private FileListEntryEditor editor;
     private boolean downloadFinished = false;
+    private boolean dontShowDialog = false;
 
     public DownloadExternalFile(JabRefFrame frame, MetaData metaData, String bibtexKey) {
 
@@ -47,6 +48,7 @@ public class DownloadExternalFile {
      */
     public void download(final DownloadCallback callback) throws IOException {
 
+        dontShowDialog = false;
         final String res = JOptionPane.showInputDialog(frame,
                 Globals.lang("Enter URL to download"));
 
@@ -56,49 +58,80 @@ public class DownloadExternalFile {
         // First of all, start the download itself in the background to a temporary file:
         final File tmp = File.createTempFile("jabref_download", "tmp");
         tmp.deleteOnExit();
+        //long time = System.currentTimeMillis();
+        URL url = null;
+        URLDownload udl = null;
+        try {
+            url = new URL(res);
+            udl = new URLDownload(frame, url, tmp);
+            // TODO: what if this takes long time?
+            // TODO: stop editor dialog if this results in an error:
+            udl.openConnectionOnly(); // Read MIME type
+        } catch (MalformedURLException ex1) {
+            JOptionPane.showMessageDialog(frame, Globals.lang("Invalid URL"), Globals
+                .lang("Download file"), JOptionPane.ERROR_MESSAGE);
+            return;
+        } catch (IOException ex) {
+            JOptionPane.showMessageDialog(frame, Globals.lang("Invalid URL")+": "
+                    + ex.getMessage(), Globals.lang("Download file"),
+                    JOptionPane.ERROR_MESSAGE);
+            Globals.logger("Error while downloading " + "'" + res + "'");
+            return;
+        }
+        final URL urlF = url;
+        final URLDownload udlF = udl;
+        //System.out.println("Time: "+(System.currentTimeMillis()-time));
         (new Thread() {
             public void run() {
 
                 try {
+                    udlF.download();
+                } catch (IOException e2) {
+                    dontShowDialog = true;
+                    if ((editor != null) && (editor.isVisible()))
+                        editor.setVisible(false);
+                    JOptionPane.showMessageDialog(frame, Globals.lang("Invalid URL")+": "
+                            + e2.getMessage(), Globals.lang("Download file"),
+                            JOptionPane.ERROR_MESSAGE);
+                    Globals.logger("Error while downloading " + "'" + urlF.toString()+ "'");
+                    return;
+                }
 
-                    URL url = new URL(res);
-                    URLDownload udl = new URLDownload(frame, url, tmp);
-                    try {
-                        udl.download();
-                    } catch (IOException e2) {
-                        JOptionPane.showMessageDialog(frame, Globals.lang("Invalid URL")+": "
-                                + e2.getMessage(), Globals.lang("Download file"),
-                                JOptionPane.ERROR_MESSAGE);
-                        Globals.logger("Error while downloading " + url.toString());
-                        return;
+                // Download finished: call the method that stops the progress bar etc.:
+                SwingUtilities.invokeLater(new Runnable() {
+                    public void run() {
+                        downloadFinished();
                     }
-
-                    // Download finished: call the method that stops the progress bar etc.:
-                    SwingUtilities.invokeLater(new Runnable() {
-                        public void run() {
-                            downloadFinished();
-                        }
-                    });
-
-
-                } catch (MalformedURLException e1) {
-                    JOptionPane.showMessageDialog(frame, Globals.lang("Invalid URL"), Globals
-                            .lang("Download file"), JOptionPane.ERROR_MESSAGE);
-                }
+                });
             }
         }).start();
 
+        ExternalFileType suggestedType = null;
+        if (udl.getMimeType() != null) {
+            suggestedType = Globals.prefs.getExternalFileTypeByMimeType(udl.getMimeType());
+            /*if (suggestedType != null)
+                System.out.println("Found type '"+suggestedType.getName()+"' by MIME type '"+udl.getMimeType()+"'");*/
+        }
         // 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) : "";
+        String suffix;
+        if (suggestedType != null) {
+            suffix = suggestedType.getExtension();   
+        }
+        else {
+            // If we didn't find a file type from the MIME type, try based on extension:
+            suffix = getSuffix(res);
+            suggestedType = Globals.prefs.getExternalFileTypeByExt(suffix);
+        }
+
+        String suggestedName = bibtexKey != null ? getSuggestedFileName(suffix) : "";
         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));
+        FileListEntry entry = new FileListEntry("", bibtexKey != null ? file.getCanonicalPath() : "",
+                suggestedType);
         editor = new FileListEntryEditor(frame, entry, true, false, metaData);
         editor.getProgressBar().setIndeterminate(true);
         editor.setOkEnabled(false);
@@ -121,7 +154,10 @@ public class DownloadExternalFile {
                     return true;
             }
         });
-        editor.setVisible(true);
+        if (!dontShowDialog) // If an error occured with the URL, this flag may have been set
+            editor.setVisible(true);
+        else
+            return;
         // Editor closed. Go on:
         if (editor.okPressed()) {
             File toFile = directory != null ? expandFilename(directory, entry.getLink())
@@ -192,7 +228,7 @@ public class DownloadExternalFile {
         editor.getProgressBar().setValue(editor.getProgressBar().getMaximum());
     }
 
-    public String getSuggestedFileName(String res, String suffix) {
+    public String getSuggestedFileName(String suffix) {
         
         String plannedName = bibtexKey;
         if (suffix.length() > 0)
@@ -219,7 +255,7 @@ public class DownloadExternalFile {
      * This gives the extension for most reasonably named links.
      *
      * @param link The link
-     * @return The suffix, excluding the dot (e.g. ".pdf")
+     * @return The suffix, excluding the dot (e.g. "pdf")
      */
     public String getSuffix(final String link) {
         String strippedLink = link;
index dc2efc2..9588bd5 100644 (file)
@@ -21,6 +21,7 @@ public class ExternalFileMenuItem extends JMenuItem implements ActionListener {
     final MetaData metaData;
     ExternalFileType fileType;
     final JabRefFrame frame;
+    private String fieldName = null;
 
     public ExternalFileMenuItem(JabRefFrame frame, BibtexEntry entry, String name,
                                 String link, Icon icon,
@@ -36,29 +37,39 @@ public class ExternalFileMenuItem extends JMenuItem implements ActionListener {
     }
 
     public ExternalFileMenuItem(JabRefFrame frame, BibtexEntry entry, String name,
-                                String link, Icon icon, MetaData metaData) {
-        this(frame, entry, name, link, icon, metaData, null);
+                                String link, Icon icon, MetaData metaData, String fieldName) {
+        this(frame, entry, name, link, icon, metaData, (ExternalFileType)null);
+        this.fieldName = fieldName;
     }
 
     public void actionPerformed(ActionEvent e) {
-        openLink();
+        boolean success = openLink();
+        if (!success) {
+            frame.output(Globals.lang("Unable to open link."));
+        }
     }
 
     public boolean openLink() {
-        
+        frame.output(Globals.lang("External viewer called") + ".");
         try {
             ExternalFileType type = fileType;
             if (this.fileType == null) {
-                // We don't already know the file type, so we try to deduce it from the extension:
-                File file = new File(link);
-                // We try to check the extension for the file:
-                String name = file.getName();
-                int pos = name.indexOf('.');
-                String extension = ((pos >= 0) && (pos < name.length() - 1)) ? name.substring(pos + 1)
-                    .trim().toLowerCase() : null;
-                // Now we know the extension, check if it is one we know about:
-                type = Globals.prefs.getExternalFileTypeByExt(extension);
-                fileType = type;
+                if (this.fieldName != null) {
+                    Util.openExternalViewer(frame.basePanel().metaData(), link, fieldName);
+                    return true;
+                }
+                else {
+                    // We don't already know the file type, so we try to deduce it from the extension:
+                    File file = new File(link);
+                    // We try to check the extension for the file:
+                    String name = file.getName();
+                    int pos = name.indexOf('.');
+                    String extension = ((pos >= 0) && (pos < name.length() - 1)) ? name.substring(pos + 1)
+                        .trim().toLowerCase() : null;
+                    // Now we know the extension, check if it is one we know about:
+                    type = Globals.prefs.getExternalFileTypeByExt(extension);
+                    fileType = type;
+                }
             }
 
             if (type instanceof UnknownExternalFileType)
index cfa596a..a724609 100644 (file)
@@ -11,16 +11,17 @@ import net.sf.jabref.GUIGlobals;
  */
 public class ExternalFileType implements Comparable<ExternalFileType> {
 
-    protected String name, extension, openWith, iconName;
+    protected String name, extension, openWith, iconName, mimeType;
     protected ImageIcon icon;
     protected JLabel label = new JLabel();
 
-    public ExternalFileType(String name, String extension, String openWith,
-                            String iconName) {
+    public ExternalFileType(String name, String extension, String mimeType,
+                            String openWith, String iconName) {
         label.setText(null);
         this.name = name;
         label.setToolTipText(this.name);
         this.extension = extension;
+        this.mimeType = mimeType;
         this.openWith = openWith;
         setIconName(iconName);
     }
@@ -44,9 +45,18 @@ public class ExternalFileType implements Comparable<ExternalFileType> {
         this.name = val[0];
         label.setToolTipText(this.name);
         this.extension = val[1];
-        this.openWith = val[2];
         label.setText(null);
-        setIconName(val[3]);
+        // Up to version 2.4b the mime type is not included:
+        if (val.length == 4) {
+            this.openWith = val[2];
+            setIconName(val[3]);
+        }
+        // When mime type is included, the array length should be 5:
+        else if (val.length == 5) {
+            this.mimeType = val[2];
+            this.openWith = val[3];
+            setIconName(val[4]);
+        }
     }
 
     /**
@@ -57,7 +67,7 @@ public class ExternalFileType implements Comparable<ExternalFileType> {
      * @return A String[] containing all information about this file type.
      */
     public String[] getStringArrayRepresentation() {
-        return new String[] {name, extension, openWith, iconName};
+        return new String[] {name, extension, mimeType, openWith, iconName};
     }
 
     public String getName() {
@@ -77,6 +87,14 @@ public class ExternalFileType implements Comparable<ExternalFileType> {
         this.extension = extension;
     }
 
+    public String getMimeType() {
+        return mimeType;
+    }
+
+    public void setMimeType(String mimeType) {
+        this.mimeType = mimeType;
+    }
+
     /**
      * Get the bibtex field name used to extension to this file type.
      * Currently we assume that field name equals filename extension.
@@ -148,7 +166,7 @@ public class ExternalFileType implements Comparable<ExternalFileType> {
     }
 
     public ExternalFileType copy() {
-        return new ExternalFileType(name, extension, openWith, iconName);
+        return new ExternalFileType(name, extension, mimeType, openWith, iconName);
     }
 
 
@@ -169,6 +187,7 @@ public class ExternalFileType implements Comparable<ExternalFileType> {
             return false;
         return (name == null ? other.name == null : name.equals(other.name))
                 && (extension == null ? other.extension == null : extension.equals(other.extension))
+                && (mimeType == null ? other.mimeType == null : mimeType.equals(other.mimeType))
                 && (openWith== null ? other.openWith == null : openWith.equals(other.openWith))
                 && (iconName== null ? other.iconName == null : iconName.equals(other.iconName));
     }
index a16fdfd..57043f2 100644 (file)
@@ -195,7 +195,7 @@ public class ExternalFileTypeEditor extends JDialog {
     class AddListener implements ActionListener {
         public void actionPerformed(ActionEvent e) {
             // Generate a new file type:
-            ExternalFileType type = new ExternalFileType("", "", "", "new");
+            ExternalFileType type = new ExternalFileType("", "", "", "", "new");
             // Show the file type editor:
             getEditor(type).setVisible(true);
             if (entryEditor.okPressed()) {
@@ -248,7 +248,7 @@ public class ExternalFileTypeEditor extends JDialog {
     class FileTypeTableModel extends AbstractTableModel {
 
         public int getColumnCount() {
-            return 4;
+            return 5;
         }
 
         public int getRowCount() {
@@ -264,6 +264,8 @@ public class ExternalFileTypeEditor extends JDialog {
                 case 2:
                     return Globals.lang("Extension");
                 case 3:
+                    return Globals.lang("MIME type");
+                case 4:
                     return Globals.lang("Application");
                 default:
                     return null;
@@ -286,6 +288,8 @@ public class ExternalFileTypeEditor extends JDialog {
                 case 2:
                     return type.getExtension();
                 case 3:
+                    return type.getMimeType();
+                case 4:
                     return type.getOpenWith();
                 default:
                     return null;
index bbe6dfe..aeb48d6 100644 (file)
@@ -27,6 +27,7 @@ public class ExternalFileTypeEntryEditor {
     JDialog diag;
     JTextField extension = new JTextField(),
         name = new JTextField(),
+        mimeType = new JTextField(),
         application = new JTextField();
     String selectedIcon = null;
     JButton icon = new JButton(GUIGlobals.getImage("picture"));
@@ -68,6 +69,9 @@ public class ExternalFileTypeEntryEditor {
         builder.nextLine();
         builder.append(Globals.lang("Extension"));
         builder.append(extension);
+        builder.nextLine();
+        builder.append(Globals.lang("MIME type"));
+        builder.append(mimeType);
         builder.getPanel().setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
         builder.nextLine();
         builder.append(Globals.lang("Application"));
@@ -182,6 +186,7 @@ public class ExternalFileTypeEntryEditor {
     public void setValues(ExternalFileType entry) {
         name.setText(entry.getName());
         extension.setText(entry.getExtension());
+        mimeType.setText(entry.getMimeType());
         application.setText(entry.getOpenWith());
         icon.setIcon(entry.getIcon());
         if (true && (application.getText().length() == 0))
@@ -194,6 +199,7 @@ public class ExternalFileTypeEntryEditor {
     public void storeSettings(ExternalFileType entry) {
         entry.setName(name.getText().trim());
         entry.setExtension(extension.getText().trim());
+        entry.setMimeType(mimeType.getText().trim());
         if (selectedIcon != null)
             entry.setIconName(selectedIcon);
         if (!Globals.ON_WIN) {
index ce815b7..09b9548 100644 (file)
@@ -108,6 +108,8 @@ public class MoveFileAction extends AbstractAction {
                         success = Util.copyFile(file, newFile, true);
                     }
                     if (success) {
+                        // Remove the original file:
+                        file.delete();
                         // Relativise path, if possible.
                         if (newFile.getPath().startsWith(dir)) {
                             if ((newFile.getPath().length() > dir.length()) &&
index 3b92c8d..9a590c4 100644 (file)
@@ -118,6 +118,8 @@ public class PushToApplicationButton implements ActionListener {
 
             }
         });
+
+        buildPopupMenu();
     }
 
     /**
@@ -129,6 +131,7 @@ public class PushToApplicationButton implements ActionListener {
         for (PushToApplication application : pushActions){
             JMenuItem item = new JMenuItem(application.getApplicationName(),
                     application.getIcon());
+            item.setToolTipText(application.getTooltip());
             item.addActionListener(new PopupItemActionListener(j));
             popup.add(item);
             j++;
@@ -145,6 +148,7 @@ public class PushToApplicationButton implements ActionListener {
         pushButton.setIcon(toApp.getIcon());
         pushButton.setToolTipText(toApp.getTooltip());
         pushButton.setPreferredSize(buttonDim);
+
         Globals.prefs.put("pushToApplication", toApp.getName());
         mAction.setTitle(toApp.getApplicationName());
     }
@@ -154,7 +158,7 @@ public class PushToApplicationButton implements ActionListener {
      * @return The component.
      */
     public Component getComponent() {
-        return comp;
+       return comp;
     }
 
     public Action getMenuAction() {
diff --git a/src/java/net/sf/jabref/external/RegExpFileSearch.java b/src/java/net/sf/jabref/external/RegExpFileSearch.java
new file mode 100644 (file)
index 0000000..aa4dd41
--- /dev/null
@@ -0,0 +1,283 @@
+package net.sf.jabref.external;
+
+import net.sf.jabref.*;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.FilenameFilter;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+import java.util.*;
+
+/**
+ * Created by IntelliJ IDEA.
+ * User: alver
+ * Date: Apr 12, 2008
+ * Time: 1:46:44 PM
+ * To change this template use File | Settings | File Templates.
+ */
+public class RegExpFileSearch {
+
+    final static String EXT_MARKER = "__EXTENSION__";
+
+    public static void main(String[] args) {
+        BibtexEntry entry = new BibtexEntry(Util.createNeutralId());
+        entry.setField(BibtexFields.KEY_FIELD, "raffel01");
+        entry.setField("year", "2001");
+        ArrayList<String> extensions = new ArrayList<String>();
+        extensions.add("pdf");
+        extensions.add("ps");
+        extensions.add("txt");
+        List<File> dirs = new ArrayList<File>();
+        dirs.add(new File("/home/alver/Desktop/Tromso_2008"));
+        System.out.println(findFiles(entry, extensions, dirs,
+                "**/[bibtexkey].*\\\\.[extension]"));
+    }
+
+    /**
+     * Search for file links for a set of entries using regexp. Lists of extensions and directories
+     * are given.
+     * @param entries The entries to search for.
+     * @param extensions The extensions that are acceptable.
+     * @param directories The root directories to search.
+     * @param regExp The expression deciding which names are acceptable.
+     * @return A map linking each given entry to a list of files matching the given criteria.
+     */
+    public static Map<BibtexEntry, java.util.List<File>> findFilesForSet(Collection<BibtexEntry> entries,
+                 Collection<String> extensions, List<File> directories, String regExp) {
+
+        Map<BibtexEntry, java.util.List<File>> res = new HashMap<BibtexEntry, List<File>>();
+        for (BibtexEntry entry : entries) {
+            res.put(entry, findFiles(entry, extensions, directories, regExp));
+        }
+        return res;
+    }
+
+    /**
+     * Method for searching for files using regexp. A list of extensions and directories can be
+     * given.
+     * @param entry The entry to search for.
+     * @param extensions The extensions that are acceptable.
+     * @param directories The root directories to search.
+     * @param regularExpression The expression deciding which names are acceptable.
+     * @return A list of files paths matching the given criteria.
+     */
+    public static List<File> findFiles(BibtexEntry entry, Collection<String> extensions,
+                                       Collection<File> directories, String regularExpression) {
+
+        StringBuilder sb = new StringBuilder();
+        for (Iterator<String> i = extensions.iterator(); i.hasNext();) {
+            sb.append(i.next());
+            if (i.hasNext())
+                    sb.append("|");
+        }
+        String extensionRegExp = "("+sb.toString()+")";
+
+        return findFile(entry, null, directories, regularExpression, extensionRegExp, true);
+    }
+
+        /**
+        * Searches the given directory and file name pattern for a file for the
+        * bibtexentry.
+        *
+        * Used to fix:
+        *
+        * http://sourceforge.net/tracker/index.php?func=detail&aid=1503410&group_id=92314&atid=600309
+        *
+        * Requirements:
+        *  - Be able to find the associated PDF in a set of given directories.
+        *  - Be able to return a relative path or absolute path.
+        *  - Be fast.
+        *  - Allow for flexible naming schemes in the PDFs.
+        *
+        * Syntax scheme for file:
+        * <ul>
+        * <li>* Any subDir</li>
+        * <li>** Any subDir (recursiv)</li>
+        * <li>[key] Key from bibtex file and database</li>
+        * <li>.* Anything else is taken to be a Regular expression.</li>
+        * </ul>
+        *
+        * @param entry
+        *            non-null
+        * @param database
+        *            non-null
+        * @param dirs
+        *            A set of root directories to start the search from. Paths are
+        *            returned relative to these directories if relative is set to
+        *            true. These directories will not be expanded or anything. Use
+        *            the file attribute for this.
+        * @param file
+        *            non-null
+        *
+        * @param relative
+        *            whether to return relative file paths or absolute ones
+        *
+        * @return Will return the first file found to match the given criteria or
+        *         null if none was found.
+        */
+       public static List<File> findFile(BibtexEntry entry, BibtexDatabase database, Collection<File> dirs,
+               String file, String extensionRegExp, boolean relative) {
+        ArrayList<File> res = new ArrayList<File>();
+               for (File directory : dirs) {
+            List<File> tmp = findFile(entry, database, directory.getPath(), file, extensionRegExp, relative);
+            if (tmp != null)
+                res.addAll(tmp);
+               }
+               return res;
+       }
+
+    /**
+     * Internal Version of findFile, which also accepts a current directory to
+     * base the search on.
+     *
+     */
+    public static List<File> findFile(BibtexEntry entry, BibtexDatabase database, String directory,
+        String file, String extensionRegExp, boolean relative) {
+
+        List<File> res;
+        File root;
+        if (directory == null) {
+            root = new File(".");
+        } else {
+            root = new File(directory);
+        }
+        if (!root.exists()) {
+            return null;
+        }
+        res = findFile(entry, database, root, file, extensionRegExp);
+
+
+        if (res.size() > 0) {
+            for (int i=0; i<res.size(); i++)
+                try {
+                    /**
+                     * [ 1601651 ] PDF subdirectory - missing first character
+                     *
+                     * http://sourceforge.net/tracker/index.php?func=detail&aid=1601651&group_id=92314&atid=600306
+                     */
+                    // Changed by M. Alver 2007.01.04:
+                    // Remove first character if it is a directory separator character:
+                    String tmp = res.get(i).getCanonicalPath().substring(root.getCanonicalPath().length());
+                    if ((tmp.length() > 1) && (tmp.charAt(0) == File.separatorChar))
+                        tmp = tmp.substring(1);
+                    res.set(i, new File(tmp));
+                    
+                } catch (IOException e) {
+                    e.printStackTrace();
+                }
+        }
+        return res;
+    }
+
+    /**
+     * The actual work-horse. Will find absolute filepaths starting from the
+     * given directory using the given regular expression string for search.
+     */
+    protected static List<File> findFile(BibtexEntry entry, BibtexDatabase database, File directory,
+        String file, String extensionRegExp) {
+
+        ArrayList<File> res = new ArrayList<File>();
+
+        if (file.startsWith("/")) {
+            directory = new File(".");
+            file = file.substring(1);
+        }
+
+        // Escape handling...
+        Matcher m = Pattern.compile("([^\\\\])\\\\([^\\\\])").matcher(file);
+        StringBuffer s = new StringBuffer();
+        while (m.find()) {
+            m.appendReplacement(s, m.group(1) + "/" + m.group(2));
+        }
+        m.appendTail(s);
+        file = s.toString();
+        String[] fileParts = file.split("/");
+
+        if (fileParts.length == 0)
+            return res;
+
+        if (fileParts.length > 1) {
+
+            for (int i = 0; i < fileParts.length - 1; i++) {
+
+                String dirToProcess = fileParts[i];
+                dirToProcess = Util.expandBrackets(dirToProcess, entry, database);
+
+                if (dirToProcess.matches("^.:$")) { // Windows Drive Letter
+                    directory = new File(dirToProcess + "/");
+                    continue;
+                }
+                if (dirToProcess.equals(".")) { // Stay in current directory
+                    continue;
+                }
+                if (dirToProcess.equals("..")) {
+                    directory = new File(directory.getParent());
+                    continue;
+                }
+                if (dirToProcess.equals("*")) { // Do for all direct subdirs
+
+                    File[] subDirs = directory.listFiles();
+                    if (subDirs != null) {
+                        String restOfFileString = Util.join(fileParts, "/", i + 1, fileParts.length);
+                        for (int sub = 0; sub < subDirs.length; sub++) {
+                            if (subDirs[sub].isDirectory()) {
+                                res.addAll(findFile(entry, database, subDirs[sub],
+                                    restOfFileString, extensionRegExp));
+                            }
+                        }
+                    }
+                }
+                // Do for all direct and indirect subdirs
+                if (dirToProcess.equals("**")) {
+                    List<File> toDo = new LinkedList<File>();
+                    toDo.add(directory);
+
+                    String restOfFileString = Util.join(fileParts, "/", i + 1, fileParts.length);
+
+                    while (!toDo.isEmpty()) {
+
+                        // Get all subdirs of each of the elements found in toDo
+                        File[] subDirs = toDo.remove(0).listFiles();
+                        if (subDirs == null) // No permission?
+                            continue;
+
+                        toDo.addAll(Arrays.asList(subDirs));
+
+                        for (int sub = 0; sub < subDirs.length; sub++) {
+                            if (!subDirs[sub].isDirectory())
+                                continue;
+                            res.addAll(findFile(entry, database, subDirs[sub], restOfFileString,
+                                    extensionRegExp));
+                        }
+                    }
+
+                }
+
+            } // End process directory information
+        }
+
+        // Last step: check if the given file can be found in this directory
+        String filePart = fileParts[fileParts.length-1].replaceAll("\\[extension\\]", EXT_MARKER);
+        String filenameToLookFor = Util.expandBrackets(filePart, entry, database)
+                .replaceAll(EXT_MARKER, extensionRegExp);
+        final Pattern toMatch = Pattern.compile("^"
+            + filenameToLookFor.replaceAll("\\\\\\\\", "\\\\") + "$", Pattern.CASE_INSENSITIVE);
+
+        File[] matches = directory.listFiles(new FilenameFilter() {
+            public boolean accept(File arg0, String arg1) {
+                return toMatch.matcher(arg1).matches();
+            }