add patch for upstream bug #1240
[debian/jabref.git] / debian / patches / mrDlib_jayatana.patch
index 5584895f375e73e372e93e380d072471363a90c6..39a7e83bed50f4d93281da43d8d10d373e83b65c 100644 (file)
@@ -1,11 +1,12 @@
-Description: This is the diff between the debian branch and the v_2.9b2 tag
+Description: This is the diff between the debian branch and the v_2.10 tag
  in upstream git; the debian branch was created for us with the purpose to
  disable the mrDlib functionality which needs libraries not packaged in
  Debian yet.
 Origin: upstream git
+Forwarded: not-needed
 Author: Oliver Kopp <oliver.kopp@gmail.com>
 Reviewed-by: gregor herrmann <gregoa@debian.org>
-Last-Update: 2012-11-19
+Last-Update: 2014-03-12
 
 --- a/.classpath
 +++ b/.classpath
@@ -135,7 +136,7 @@ Last-Update: 2012-11-19
  import net.sf.jabref.export.*;
  import net.sf.jabref.external.ExternalFileTypeEditor;
  import net.sf.jabref.external.PushToApplicationButton;
-@@ -550,13 +548,6 @@
+@@ -562,13 +560,6 @@
                  }
              }
          });
@@ -561,7 +562,7 @@ Last-Update: 2012-11-19
 -}\r
 --- a/src/java/spl/PdfImporter.java
 +++ b/src/java/spl/PdfImporter.java
-@@ -21,15 +21,9 @@
+@@ -19,12 +19,8 @@
  import net.sf.jabref.undo.UndoableInsertEntry;\r
  import net.sf.jabref.util.XMPUtil;\r
  \r
@@ -570,30 +571,28 @@ Last-Update: 2012-11-19
  import spl.filter.PdfFileFilter;\r
  import spl.gui.ImportDialog;\r
 -import spl.gui.MetaDataListDialog;\r
+-\r
  \r
--import java.util.ArrayList;\r
--import java.util.Arrays;\r
--import java.util.List;\r
- import java.util.Set;\r
\r
\r
-@@ -113,7 +107,6 @@
+ /**\r
+  * Created by IntelliJ IDEA.\r
+@@ -129,7 +125,6 @@
                BibtexEntryType type;\r
                  InputStream in = null;\r
-                 List<BibtexEntry> res = null;\r
+                 List<BibtexEntry> localRes = null;\r
 -              MetaDataListDialog metaDataListDialog;\r
                  switch (choice) {\r
                        case ImportDialog.XMP:\r
                      //SplDatabaseChangeListener dataListener = new SplDatabaseChangeListener(frame, panel, entryTable, fileName);\r
-@@ -200,84 +193,9 @@
-                         panel.adjustSplitter();\r
+@@ -222,88 +217,10 @@
                      }\r
+                     res.add(entry);\r
                      break;\r
 -                      case ImportDialog.MRDLIB:\r
 -                    metaDataListDialog = new MetaDataListDialog(fileName, true);\r
 -                    Tools.centerRelativeToWindow(metaDataListDialog, frame);\r
 -                    metaDataListDialog.showDialog();\r
 -                    Document document = metaDataListDialog.getXmlDocuments();\r
+-                    entry = null; // to satisfy the Java compiler\r
 -                    if(document != null /*&& documents.getDocuments() != null && documents.getDocuments().size() > 0*/ && metaDataListDialog.getResult() == JOptionPane.OK_OPTION){\r
 -                        int selected = metaDataListDialog.getTableMetadata().getSelectedRow();\r
 -                        if(selected > -1 /*&& selected < documents.getDocuments().size()*/){\r
@@ -622,21 +621,24 @@ Last-Update: 2012-11-19
 -                            LabelPatternUtil.makeLabel(panel.metaData(), panel.database(), entry);\r
 -                        }\r
 -                        else{\r
--                            createNewBlankEntry(fileName);\r
+-                            entry = createNewBlankEntry(fileName);\r
 -                        }\r
 -                    }\r
 -                    else if(metaDataListDialog.getResult() == JOptionPane.CANCEL_OPTION ){\r
 -                        continue;\r
 -                    }\r
 -                    else if(metaDataListDialog.getResult() == JOptionPane.NO_OPTION ){\r
--                        createNewBlankEntry(fileName);\r
+-                        entry = createNewBlankEntry(fileName);\r
 -                    }\r
 -                    else if(document == null /*|| document.getDocuments() == null || document.getDocuments().size() <= 0*/ && metaDataListDialog.getResult() == JOptionPane.OK_OPTION){\r
--                        createNewBlankEntry(fileName);\r
+-                        entry = createNewBlankEntry(fileName);\r
 -                    }\r
+-                    assert(entry != null);\r
+-                    res.add(entry);\r
 -                    break;\r
                        case ImportDialog.NOMETA:\r
-                     createNewBlankEntry(fileName);\r
+                     entry = createNewBlankEntry(fileName);\r
+                     res.add(entry);\r
                      break;\r
 -                      case ImportDialog.UPDATEEMPTYFIELDS:\r
 -                    metaDataListDialog = new MetaDataListDialog(fileName, false);                   \r
@@ -670,8 +672,8 @@ Last-Update: 2012-11-19
                  }\r
              }\r
  \r
-@@ -295,58 +213,6 @@
-         }\r
+@@ -322,58 +239,6 @@
+         return newEntry;\r
      }\r
  \r
 -    private void insertFields(String[] fields, BibtexEntry entry, Document xmlDocument) {\r
@@ -953,9 +955,9 @@ Last-Update: 2012-11-19
 -    private JLabel labelMrDlib1;\r
 -    private JLabel labelMrDlib2;\r
      private int result;\r
-     private int dropRow;\r
      private String fileName;\r
-@@ -71,15 +65,7 @@
+     // indicates whether the drop target is a row in the table or whether other kinds of imports are used\r
+@@ -72,15 +66,7 @@
          radioButtonNoMeta = new JRadioButton(Globals.lang("Create_blank_entry_linking_the_PDF"));\r
          radioButtonXmp = new JRadioButton(Globals.lang("Create_entry_based_on_XMP_data"));\r
          radioButtonPDFcontent = new JRadioButton(Globals.lang("Create_entry_based_on_content"));\r
@@ -971,7 +973,7 @@ Last-Update: 2012-11-19
          buttonOK = new JButton(Globals.lang("Ok"));\r
          buttonCancel = new JButton(Globals.lang("Cancel"));\r
          checkBoxDoNotShowAgain = new JCheckBox(Globals.lang("Do not show this box again for this import"));\r
-@@ -89,12 +75,8 @@
+@@ -90,12 +76,8 @@
          b.append(radioButtonNoMeta, 3);\r
          b.append(radioButtonXmp, 3);\r
          b.append(radioButtonPDFcontent, 3);\r
@@ -984,16 +986,16 @@ Last-Update: 2012-11-19
          b.nextLine();\r
          b.append(checkBoxDoNotShowAgain);\r
          b.append(useDefaultPDFImportStyle);\r
-@@ -114,8 +96,6 @@
-         //this.setText();\r
-         if (this.dropRow < 0) {\r
+@@ -113,8 +95,6 @@
\r
+         if (!this.targetIsARow) {\r
              this.radioButtononlyAttachPDF.setEnabled(false);\r
 -            this.radioButtonUpdateEmptyFields.setEnabled(false);\r
 -            this.labelMrDlib2.setEnabled(false);\r
          }\r
          this.fileName = fileName;\r
          String name = new File(this.fileName).getName();\r
-@@ -124,8 +104,6 @@
+@@ -123,8 +103,6 @@
          } else {\r
              this.labelFileName.setText(new File(this.fileName).getName().substring(0, 33) + "...");\r
          }\r
@@ -1002,7 +1004,7 @@ Last-Update: 2012-11-19
          this.setTitle(LocalizationSupport.message("Import_Metadata_From_PDF"));\r
  \r
          setModal(true);\r
-@@ -136,9 +114,7 @@
+@@ -135,9 +113,7 @@
          bg.add(radioButtonNoMeta);\r
          bg.add(radioButtonXmp);\r
          bg.add(radioButtonPDFcontent);\r
@@ -1012,7 +1014,7 @@ Last-Update: 2012-11-19
  \r
          buttonOK.addActionListener(new ActionListener() {\r
              public void actionPerformed(ActionEvent e) {\r
-@@ -175,15 +151,9 @@
+@@ -174,15 +150,9 @@
                case CONTENT:\r
                        radioButtonPDFcontent.setSelected(true);\r
                        break;\r
@@ -1028,7 +1030,7 @@ Last-Update: 2012-11-19
                default:\r
                        // fallback\r
                        radioButtonPDFcontent.setSelected(true);\r
-@@ -218,14 +188,10 @@
+@@ -217,14 +187,10 @@
                return XMP;\r
        else if (radioButtonPDFcontent.isSelected())\r
                return CONTENT;\r