[jabref] 237/459: patch so DocumentPrinter.java can be removed

gregor herrmann gregoa at debian.org
Thu Sep 15 20:40:32 UTC 2016


This is an automated email from the git hooks/post-receive script.

gregoa pushed a commit to branch master
in repository jabref.

commit 65891f9bcd25593d6ffea814057d1a21c568921b
Author: tony mancill <tmancill at debian.org>
Date:   Wed Jan 13 07:11:08 2010 +0000

    patch so DocumentPrinter.java can be removed
---
 debian/changelog                     |  5 +++-
 debian/patches/07_PreviewPanel.patch | 46 ++++++++++++++++++++++++++++++++++++
 debian/patches/series                |  1 +
 3 files changed, 51 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index 63eac0c..e9901ec 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -18,7 +18,10 @@ jabref (2.6~beta2+ds-1) UNRELEASED; urgency=low
   * debian/copyright: update formatting and list of third-party copyright
     holders. 
 
- -- gregor herrmann <gregoa at debian.org>  Wed, 30 Dec 2009 20:56:57 +0100
+  [ tony mancill ]
+  * Add PreviewPanel patch to remove dependency on DocumentPrinter class.
+
+ -- tony mancill <tmancill at debian.org>  Tue, 12 Jan 2010 23:06:19 -0800
 
 jabref (2.6~beta2-1) unstable; urgency=low
 
diff --git a/debian/patches/07_PreviewPanel.patch b/debian/patches/07_PreviewPanel.patch
new file mode 100644
index 0000000..4c7255d
--- /dev/null
+++ b/debian/patches/07_PreviewPanel.patch
@@ -0,0 +1,46 @@
+Author: tony mancill <tmancill at debian.org>
+Description: remove dependency on DocumentPrinter.java (requires Java 1.5 or later)
+--- a/src/java/net/sf/jabref/PreviewPanel.java
++++ b/src/java/net/sf/jabref/PreviewPanel.java
+@@ -9,6 +9,9 @@
+ import java.io.IOException;
+ import java.io.StringReader;
+ 
++import javax.print.attribute.HashPrintRequestAttributeSet;
++import javax.print.attribute.PrintRequestAttributeSet;
++import javax.print.attribute.standard.JobName;
+ import javax.swing.*;
+ import javax.swing.event.HyperlinkEvent;
+ import javax.swing.event.HyperlinkListener;
+@@ -16,7 +19,6 @@
+ import net.sf.jabref.export.layout.Layout;
+ import net.sf.jabref.export.layout.LayoutHelper;
+ import net.sf.jabref.export.ExportFormats;
+-import net.sf.jabref.util.DocumentPrinter;
+ 
+ /**
+  * Displays an BibtexEntry using the given layout format.
+@@ -116,17 +118,18 @@
+ 			putValue(SHORT_DESCRIPTION, Globals.lang("Print Preview"));
+ 		}
+ 
+-		DocumentPrinter printerService;
++		//DocumentPrinter printerService;
+ 
+ 		public void actionPerformed(ActionEvent arg0) {
+-			if (printerService == null)
+-				printerService = new DocumentPrinter();
+-
++
+ 			// Background this, as it takes a while.
+ 			new Thread() {
+ 				public void run() {
+ 					try {
+-						printerService.print(entry.getCiteKey(), previewPane);
++						PrintRequestAttributeSet pras = new HashPrintRequestAttributeSet();
++						pras.add(new JobName(entry.getCiteKey(), null));
++						previewPane.print(null, null, true, null, pras, false);
++
+ 					} catch (PrinterException e) {
+ 
+ 						// Inform the user... we don't know what to do.
diff --git a/debian/patches/series b/debian/patches/series
index 69a2066..31aa14a 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -3,3 +3,4 @@
 03_external_apps.patch
 05_antlr.patch
 06_BibtexEntry.patch
+07_PreviewPanel.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/jabref.git



More information about the pkg-java-commits mailing list