[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[texworks] 17/73: Imported Debian patch 0.4.0-2



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

preining pushed a commit to branch master
in repository texworks.

commit 381b14970782e9b432e1133ac26c65389d3195fc
Author: Atsuhito KOHDA <kohda@debian.org>
Date:   Mon Apr 4 13:42:12 2011 +0900

    Imported Debian patch 0.4.0-2
---
 debian/changelog              |  10 ++
 debian/control                |  11 +-
 debian/dirs                   |   1 +
 debian/document-print.png.enc |  26 ---
 debian/patch-plugin           |   2 +-
 debian/patch-print            | 370 ------------------------------------------
 debian/rules                  |   2 +
 debian/texworks-help-en.dirs  |   1 +
 8 files changed, 24 insertions(+), 399 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 8075511..da9baa5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,13 @@
+texworks (0.4.0-2) unstable; urgency=low
+
+  * Added english manual.
+  * Updated Build-Depends; removed sharutils and replaced python2.6-dev with
+    python-dev
+  * Removed obsolete debian/patch-print and debian/document-print.png.enc
+  * Added texworks-help-en package which included manual for texworks.
+
+ -- Atsuhito KOHDA <kohda@debian.org>  Mon, 04 Apr 2011 13:42:12 +0900
+
 texworks (0.4.0-1) unstable; urgency=low
 
   * New Upstream Release, now 0.4.0. (Rev. 759).
diff --git a/debian/control b/debian/control
index cdc43cc..ecddeba 100644
--- a/debian/control
+++ b/debian/control
@@ -2,14 +2,14 @@ Source: texworks
 Section: editors
 Priority: extra
 Maintainer: Atsuhito KOHDA <kohda@debian.org>
-Build-Depends: debhelper (>= 7), libhunspell-dev, qt4-dev-tools, libpoppler-qt4-dev, libdbus-1-dev, sharutils, liblua5.1-0-dev, python2.6-dev
+Build-Depends: debhelper (>= 7), libhunspell-dev, qt4-dev-tools, libpoppler-qt4-dev, libdbus-1-dev, liblua5.1-0-dev, python-dev
 Standards-Version: 3.8.3
 Homepage: http://www.tug.org/texworks/
 
 Package: texworks
 Architecture: any
 Depends: ${shlibs:Depends}, ${misc:Depends}
-Recommends: texlive-latex-base
+Recommends: texlive-latex-base, texworks-help-en
 Suggests: texlive-xetex, texworks-scripting-lua, texworks-scripting-python
 Description: An environment for authoring TeX (LaTeX, ConTeXt, etc) documents
  An environment for authoring TeX (LaTeX, ConTeXt, etc) documents, with
@@ -35,3 +35,10 @@ Depends: ${shlibs:Depends}, ${misc:Depends}, texworks
 Description: Plugin to bring Python scripting to TeXworks
  .
  For further information, see http://tug.org/texworks/
+
+Package: texworks-help-en
+Architecture: all
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Recommends: texworks
+Description: English help files for TeXworks
+ For furter information, see http://tug.org/texworks/
diff --git a/debian/dirs b/debian/dirs
index a1542cf..d5204d9 100644
--- a/debian/dirs
+++ b/debian/dirs
@@ -1,3 +1,4 @@
 usr/bin
 usr/share/pixmaps
 usr/share/applications
+usr/share/texworks-help
diff --git a/debian/document-print.png.enc b/debian/document-print.png.enc
deleted file mode 100644
index cced382..0000000
--- a/debian/document-print.png.enc
+++ /dev/null
@@ -1,26 +0,0 @@
-begin 644 document-print.png
-MB5!.1PT*&@H````-24A$4@```"`````@"`8```!S>GKT````!'-"250("`@(
-M?`ADB````ZQ)1$%46(7EE[M/(U<4QG]C9CR#L8-E+(1@@8BU*%9;@$'Y!R)E
-M6R1JR@"[,8(R04I"D19"*!(I%&DI4H=-2>^&`@DIBA"/%3@XV!Z#PSQO"L:C
-M&9N'%Y.DR"<=^=YSSYSSZ3OWWAG#_QW270OKZ^L_&(8Q"T3:K.&JJOKCTM+2
-MZ]L6Y;N>,DUS=G%QL=WB`)&-C8U9X/T(""$B`&=G9VU5[^OK\W.]%X$@CH^/
-M;_7;MDVI5"*=3B-)X6X.#@ZV1/!!`HJB,#(R<FOQW=U=#,/`MFU&1T=;*O@H
-M`D='1P`((7S_Z>DI5U=7`!0*!0`2B82_/C0T]#0$9%EN4F!_?]\O7L?Y^3F9
-M3(9X/.[[@H0?34!1%`X/#_UYJ53BY.2D*<YU7?+Y/,^?/R<2B3`\//Q@\98)
-M9#(9`(K%(GM[>W?&&H:!KNM,3DZV5+QE`@<'!_X\F\T"D,_GFV*GIJ90%"7D
-MLVV[/0*ZKI-.I_UYXW$+XOKZ&MNV0S&R?'^)>U=-T_0OHF!229)\)8+^8K'8
-M1+2WM[=U`O/S\Q]U='3\8MMV#\#%Q<6M28-H]#7.ZPK,S<T)198+AFE^O+FY
-MZ6\D/WIA84&59?GWY>7E@60RR=K:&F-C8U2KU:;$MQVONXAT=761S^?)Y7*4
-MRV565U=_2Z52+U965NR0`I(D?3$S,].;3"8!2*52_@73#BXO+TDD$M1J->+Q
-M.-/3TQ]N;6U]#GP3"LSE<B7'<83KNBV9XSB/,MNVQ9LWKR_K=7T%+,M*"B$X
-M/7V'HBB<G+Q#TS12J11""&Y4%R`$KA"`0+@@N&F'N)G<K(E&OT#7JUBVQ?CX
-M!([C=C41`'`<ATJEPN"S(1S'H?N#!+'.6""BGIRP#PAOB\8XP5GA#Z[_JF$:
-M1NCIT'O:<1S>OOT5V[9X-C"`IFE$HTK`HD35*&K(5%151=."IJ%U:G1Z!K"S
-MLP.`:9DA`DT*]/?W\^577V-95BBPOL<??KTT0U$47KY\<4/`O(>`ZSI,3&3)
-M9L<10N"ZKM?_P-AU<3V?\'QN*V/OUVH@T-2"?QIF@[+_/H'_6H'&%M3W@!J)
-M1,QJ58_&8K%`W[WS'AR[P7O`VPNMC(6+$*#K%21)<H`44)8]%;IKM=KWJZO?
-M+K7R&=4.)$FB4JG\Y!$0DJ="#Y!^]>J3SWIZTI\*(5KZ7'\$G'*Y_//V]O9W
-MP)]`H7Z\-8]1-Q#S2#W%OZ(@+"^G!5P"YT"E\06O`%%`?>+B`(YG%F#RN#OM
-7Z?$WY*!45:$5$<L`````245.1*Y"8((`
-`
-end
diff --git a/debian/patch-plugin b/debian/patch-plugin
index 9b05581..f5ce3be 100644
--- a/debian/patch-plugin
+++ b/debian/patch-plugin
@@ -15,7 +15,7 @@
  	# gets expanded to " in the c++ code)
 -	QMAKE_CXXFLAGS += -DTW_HELPPATH=\\\"/usr/local/share/texworks-help\\\"
 -	QMAKE_CXXFLAGS += -DTW_PLUGINPATH=\\\"/usr/local/lib/texworks\\\"
-+	QMAKE_CXXFLAGS += -DTW_HELPPATH=\\\"/usr/share/doc/texworks-help\\\"
++	QMAKE_CXXFLAGS += -DTW_HELPPATH=\\\"/usr/share/texworks-help\\\"
 +	QMAKE_CXXFLAGS += -DTW_PLUGINPATH=\\\"/usr/lib/texworks\\\"
  	QMAKE_CXXFLAGS += -DTW_DICPATH=\\\"/usr/share/myspell/dicts\\\"
  }
diff --git a/debian/patch-print b/debian/patch-print
deleted file mode 100644
index 15f2baa..0000000
--- a/debian/patch-print
+++ /dev/null
@@ -1,370 +0,0 @@
---- texworks-0.0.1~svn337.orig/src/TeXDocument.h
-+++ texworks-0.0.1~svn337/src/TeXDocument.h
-@@ -135,6 +135,7 @@
- public slots:
- 	void typeset();
- 	void interrupt();
-+	void print();
- 	void newFile();
- 	void newFromTemplate();
- 	void open();
---- texworks-0.0.1~svn337.orig/src/PDFDocument.cpp
-+++ texworks-0.0.1~svn337/src/PDFDocument.cpp
-@@ -49,6 +49,11 @@
- #include <QFileSystemWatcher>
- #include <QDebug>
- #include <QToolTip>
-+#include <QPrinter>
-+#include <QPrintDialog>
-+#include <QPrintEngine>
-+#include <QBuffer>
-+#include <QProgressDialog>
- 
- #include <math.h>
- 
-@@ -1136,6 +1141,7 @@
- 	connect(actionNew, SIGNAL(triggered()), qApp, SLOT(newFile()));
- 	connect(actionNew_from_Template, SIGNAL(triggered()), qApp, SLOT(newFromTemplate()));
- 	connect(actionOpen, SIGNAL(triggered()), qApp, SLOT(open()));
-+	connect(actionPrintPDF, SIGNAL(triggered()), this, SLOT(print()));
- 
- 	connect(actionQuit_TeXworks, SIGNAL(triggered()), TWApp::instance(), SLOT(maybeQuit()));
- 
-@@ -1716,3 +1722,203 @@
- 	}
- }
- 
-+void PDFDocument::print()
-+{
-+	QPrinter printer(QPrinter::HighResolution);
-+	QPrintDialog printDlg(&printer, this);
-+	QPainter painter;
-+	QProgressDialog progressDlg(this);
-+	Poppler::Page * page;
-+	QImage pageImage;
-+	QRect viewport;
-+	int dpiX, dpiY;
-+	double dpiXScale = 1.0, dpiYScale = 1.0;
-+	double scale;
-+	unsigned int firstPage, lastPage, i;
-+	bool success = false;
-+	
-+	// check if there's a pdf document to print
-+	if(!document) return;
-+
-+	// check if we have permission to print the document
-+	if(!document->okToPrint()) {
-+		QMessageBox::critical(this, tr("Printing denied"), tr("You are not permitted to print this document"));
-+		return;
-+	}
-+	
-+	// Set up some basic information about the document
-+	printer.setCreator(TEXWORKS_NAME);
-+	printer.setDocName(document->info("Title"));
-+	if(printer.docName().isEmpty()) printer.setDocName(QFileInfo(curFile).baseName());
-+	
-+	// do some setup for the print dialog
-+	printDlg.setMinMax(1, document->numPages());
-+	printDlg.setOption(QAbstractPrintDialog::PrintToFile, true);
-+	printDlg.setOption(QAbstractPrintDialog::PrintSelection, false);
-+	printDlg.setOption(QAbstractPrintDialog::PrintPageRange, true);
-+	printDlg.setOption(QAbstractPrintDialog::PrintCollateCopies, true);
-+	printDlg.setWindowTitle(tr("Print %1").arg(QFileInfo(curFile).fileName()));
-+	
-+	// show the print dialog to the user
-+	if(printDlg.exec() != QDialog::Accepted) return;
-+
-+	// determine the print range
-+	switch(printDlg.printRange()) {
-+		case QAbstractPrintDialog::PageRange:
-+			firstPage = printDlg.fromPage();
-+			lastPage = printDlg.toPage();
-+			break;
-+		default:
-+			firstPage = 1;
-+			lastPage = document->numPages();
-+	}
-+
-+	// On *nix-like platforms, try using lp for printing
-+	#if defined(Q_WS_X11) || defined(Q_WS_MAC)
-+	// Catch empty printer names (e.g. used by CUPS for "printing to pdf")
-+	if(!printer.printerName().isEmpty()) {
-+		QStringList arguments;
-+		
-+		arguments << "lp";
-+		
-+		arguments << QString("-d %1").arg(printer.printerName());
-+		arguments << QString("-n %1").arg(printer.numCopies());
-+		arguments << QString("-t \"%1\"").arg(printer.docName());
-+		arguments << QString("-P %1-%2").arg(firstPage).arg(lastPage);
-+
-+		switch(printer.duplex()) {
-+			case QPrinter::DuplexNone:
-+				arguments << "-o sides=one-sided";
-+				break;
-+			case QPrinter::DuplexShortSide:
-+				arguments << "-o sides=two-sided-short-edge";
-+				break;
-+			case QPrinter::DuplexLongSide:
-+				arguments << "-o sides=two-sided-long-edge";
-+				break;
-+			default:
-+				break;
-+		}
-+		arguments << "--";
-+
-+		arguments << QString("\"%1\"").arg(curFile);
-+		
-+		// passing arguments as QStringList didn't work for me - probably
-+		// because of improper quoting of spaces
-+		if(QProcess::execute(arguments.join(" ")) == 0) return;
-+	}
-+	#endif // On *nix, try using lpr for printing
-+	
-+	// On Windows, try using OS native operation
-+	#if defined(Q_WS_WIN)
-+	{
-+		// First try: directly passing postscript to the printer (if supported)
-+		// I'm not sure if this is supported anywhere
-+		// Note: QPrinter::getDC and QPrinter::releaseDC are undocumented
-+		HDC dc;
-+		Poppler::PSConverter * psConv;
-+		
-+		dc = printer.getDC();
-+		
-+		if(dc) {
-+			int nEscapeCode = POSTSCRIPT_PASSTHROUGH;
-+			if(ExtEscape(dc, QUERYESCSUPPORT, sizeof(int), (LPCSTR)&nEscapeCode, 0, NULL ) > 0 && (psConv = document->psConverter())) {
-+				// Convert the pdf to postscript instructions
-+				QBuffer buffer;
-+				
-+				buffer.open(QBuffer::ReadWrite);
-+				psConv->setOutputDevice(&buffer);
-+				psConv->convert();
-+				
-+				// and send them to the printer
-+				success = (ExtEscape(dc, POSTSCRIPT_PASSTHROUGH, buffer.data().size(), buffer.data().data(), 0, NULL) > 0);
-+				
-+				buffer.close();
-+			}
-+			printer.releaseDC(dc);
-+			if(success) return;
-+		}
-+		// Second try: print by calling the system's standard printing program for pdf
-+		// Seems to only print to the default printer, hence disabled for now
-+/*
-+		wchar_t * filename;
-+		HRESULT coInit;
-+		filename = new wchar_t[curFile.size()];
-+
-+		curFile.toWCharArray(filename);
-+		coInit = CoInitializeEx(NULL, COINIT_APARTMENTTHREADED | COINIT_DISABLE_OLE1DDE);
-+		if(coInit == S_OK || coInit == S_FALSE) {
-+			success = ((int)ShellExecute(NULL, L"print", filename, NULL, NULL, SW_NORMAL) > 32);
-+			CoUninitialize();
-+		}
-+		delete[] filename;
-+		if(success) return;
-+*/
-+	}
-+	#endif // On Windows, try using OS native operation
-+	
-+	// Fallback: use Qt for printing
-+	//
-+	// This means rendering the pages as images via poppler and printing those
-+	// To keep the rendering time and file size reasonable, resolution is
-+	// clamped to a maximum of 300dpi. If you need more, use another program ;).
-+
-+	{
-+		// ignore printer margins while painting - the margins are included in the
-+		// pdf file
-+		printer.setFullPage(true);
-+	
-+		painter.begin(&printer);
-+		viewport = painter.viewport();
-+	
-+		dpiX = printer.printEngine()->metric(QPaintDevice::PdmDpiX);
-+		dpiY = printer.printEngine()->metric(QPaintDevice::PdmDpiY);
-+	
-+		// clamp the resolution to 300 dpi (postscript devices return 1200 dpi to
-+		// Qt by default) to reduce file size and render time
-+		dpiXScale = qMax(1, dpiX / 300);
-+		dpiYScale = qMax(1, dpiY / 300);
-+		dpiX = qMin(300, dpiX);
-+		dpiY = qMin(300, dpiY);
-+
-+		progressDlg.setAutoClose(true);
-+		progressDlg.setRange(firstPage, lastPage + 1);
-+		progressDlg.setWindowModality(Qt::WindowModal);
-+		for(i = firstPage; i <= lastPage && !progressDlg.wasCanceled(); ++i) {
-+			progressDlg.setValue(i - firstPage);
-+			progressDlg.setLabelText(tr("Printing page %1 of %2").arg(i - firstPage + 1).arg(lastPage - firstPage + 1));
-+
-+			page = document->page(i - 1);
-+			if(page) {
-+				pageImage = page->renderToImage(dpiX, dpiY);
-+				painter.save();
-+			
-+				// calculate the scale factor necessary to resize the page image to
-+				// the real page while retaining the aspect ratio
-+				scale = qMin((double)viewport.width() / (dpiXScale * pageImage.width()), (double)viewport.height() / (dpiYScale * pageImage.height()));
-+			
-+				// if we need to shrink the page, so be it
-+				if(scale < 1) {
-+					painter.scale(scale, scale);
-+				}
-+				// otherwise center the page image on the page
-+				// TODO: handle landscape etc.
-+				else {
-+					painter.translate( (viewport.width() - dpiXScale * pageImage.width()) / 2, (viewport.height() - dpiYScale * pageImage.height()) / 2);
-+				}
-+				painter.scale(dpiXScale, dpiYScale);
-+			
-+				painter.drawImage(0, 0, pageImage);
-+			
-+				painter.restore();
-+			}
-+		
-+			if(i != lastPage) printer.newPage();
-+		}
-+		
-+		if(progressDlg.wasCanceled()) printer.abort();
-+		else painter.end();
-+		
-+		progressDlg.reset();
-+	}
-+}
---- texworks-0.0.1~svn337.orig/src/TeXDocument.ui
-+++ texworks-0.0.1~svn337/src/TeXDocument.ui
-@@ -163,7 +163,7 @@
-      <x>0</x>
-      <y>0</y>
-      <width>780</width>
--     <height>22</height>
-+     <height>25</height>
-     </rect>
-    </property>
-    <widget class="QMenu" name="menuFile">
-@@ -180,6 +180,7 @@
-     <addaction name="actionSave_As"/>
-     <addaction name="actionSave_All"/>
-     <addaction name="actionRevert_to_Saved"/>
-+    <addaction name="actionPrintSource"/>
-     <addaction name="separator"/>
-     <addaction name="actionRemove_Aux_Files"/>
-     <addaction name="separator"/>
-@@ -1096,6 +1097,18 @@
-     <enum>QAction::NoRole</enum>
-    </property>
-   </action>
-+  <action name="actionPrintSource">
-+   <property name="icon">
-+    <iconset resource="../res/resources.qrc">
-+     <normaloff>:/images/tango/document-print.png</normaloff>:/images/tango/document-print.png</iconset>
-+   </property>
-+   <property name="text">
-+    <string>Print</string>
-+   </property>
-+   <property name="shortcut">
-+    <string>Ctrl+P</string>
-+   </property>
-+  </action>
-  </widget>
-  <customwidgets>
-   <customwidget>
---- texworks-0.0.1~svn337.orig/src/TeXDocument.cpp
-+++ texworks-0.0.1~svn337/src/TeXDocument.cpp
-@@ -56,6 +56,8 @@
- #include <QFileSystemWatcher>
- #include <QTextBrowser>
- #include <QDebug>
-+#include <QPrinter>
-+#include <QPrintDialog>
- 
- #ifdef Q_WS_WIN
- #include <windows.h>
-@@ -171,6 +173,7 @@
- 	connect(actionSave_All, SIGNAL(triggered()), this, SLOT(saveAll()));
- 	connect(actionRevert_to_Saved, SIGNAL(triggered()), this, SLOT(revert()));
- 	connect(actionClose, SIGNAL(triggered()), this, SLOT(close()));
-+	connect(actionPrintSource, SIGNAL(triggered()), this, SLOT(print()));
- 
- 	connect(actionRemove_Aux_Files, SIGNAL(triggered()), this, SLOT(removeAuxFiles()));
- 
-@@ -2907,3 +2910,26 @@
- 		pdfDoc = NULL;
- 	}
- }
-+
-+void TeXDocument::print()
-+{
-+	QPrinter printer(QPrinter::HighResolution);
-+	QPrintDialog printDlg(&printer, this);
-+
-+	// Set up some basic information about the document
-+	printer.setCreator(TEXWORKS_NAME);
-+	printer.setDocName(QFileInfo(curFile).baseName());
-+
-+	// do some setup for the print dialog
-+	// Note: no page range since we don't know how many pages this will be.
-+	printDlg.setOption(QAbstractPrintDialog::PrintToFile, true);
-+	printDlg.setOption(QAbstractPrintDialog::PrintSelection, true);
-+	printDlg.setOption(QAbstractPrintDialog::PrintPageRange, false);
-+	printDlg.setOption(QAbstractPrintDialog::PrintCollateCopies, true);
-+	printDlg.setWindowTitle(tr("Print %1").arg(QFileInfo(curFile).fileName()));
-+
-+	// show the print dialog to the user
-+	if(printDlg.exec() != QDialog::Accepted) return;
-+	
-+	textEdit->print(&printer);
-+}
---- texworks-0.0.1~svn337.orig/src/PDFDocument.ui
-+++ texworks-0.0.1~svn337/src/PDFDocument.ui
-@@ -23,7 +23,7 @@
-      <x>0</x>
-      <y>0</y>
-      <width>800</width>
--     <height>22</height>
-+     <height>25</height>
-     </rect>
-    </property>
-    <widget class="QMenu" name="menuHelp">
-@@ -736,6 +736,18 @@
-    </property>
-    <property name="shortcut">
-     <string>Ctrl+P</string>
-+   </property>
-+  </action>
-+  <action name="actionPrintPDF">
-+   <property name="icon">
-+    <iconset resource="../res/resources.qrc">
-+     <normaloff>:/images/tango/document-print.png</normaloff>:/images/tango/document-print.png</iconset>
-+   </property>
-+   <property name="text">
-+    <string>Print...</string>
-+   </property>
-+   <property name="shortcut">
-+    <string>Ctrl+P</string>
-    </property>
-   </action>
-  </widget>
---- texworks-0.0.1~svn337.orig/src/PDFDocument.h
-+++ texworks-0.0.1~svn337/src/PDFDocument.h
-@@ -252,6 +252,7 @@
- public slots:
- 	void texClosed(QObject *obj);
- 	void reload();
-+	void print();
- 	void retypeset();
- 	void interrupt();
- 	void sideBySide();
---- texworks-0.0.1~svn337.orig/res/resources.qrc
-+++ texworks-0.0.1~svn337/res/resources.qrc
-@@ -19,6 +19,7 @@
-         <file>tango/document-open.png</file>
-         <file>images/fileprint.png</file>
-         <file>tango/document-save.png</file>
-+        <file>tango/document-print.png</file>
-         <file>tango/go-first.png</file>
-         <file>images/fitwidth.png</file>
-         <file>images/fitwindow.png</file>
diff --git a/debian/rules b/debian/rules
index 9599e9a..970ed2a 100755
--- a/debian/rules
+++ b/debian/rules
@@ -89,6 +89,8 @@ install: build
 	$(CURDIR)/debian/texworks-scripting-lua/usr/lib/texworks
 	install -m 755 -p "$(PLIPYT)/libTWPythonPlugin.so" \
 	$(CURDIR)/debian/texworks-scripting-python/usr/lib/texworks
+	# Install the manual
+	cp -r manual $(CURDIR)/debian/texworks-help-en/usr/share/texworks-help/TeXworks-manual
 
 # Build architecture-independent files here.
 binary-indep: install
diff --git a/debian/texworks-help-en.dirs b/debian/texworks-help-en.dirs
new file mode 100644
index 0000000..cb0bb78
--- /dev/null
+++ b/debian/texworks-help-en.dirs
@@ -0,0 +1 @@
+usr/share/texworks-help

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-tex/texworks.git


Reply to: