summaryrefslogtreecommitdiff
path: root/office/texstudio/texstudio-2.6.4-phonon-build-fix.patch
diff options
context:
space:
mode:
authorlarryhaja <larryhaja@gmail.com>2013-11-13 18:49:00 -0800
committerRobby Workman <rworkman@slackbuilds.org>2013-11-13 23:02:17 -0600
commit8baf943fc2a61014c8b1a19e40c00acaff0c2f0d (patch)
tree630d40258cea9b20c2ab894a927846599c1ddb5a /office/texstudio/texstudio-2.6.4-phonon-build-fix.patch
parent5073760b5605c857db861683084c25822239576b (diff)
downloadslackbuilds-8baf943fc2a61014c8b1a19e40c00acaff0c2f0d.tar.gz
office/texstudio: Upgraded to 2.6.4, added patch for Phonon
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
Diffstat (limited to 'office/texstudio/texstudio-2.6.4-phonon-build-fix.patch')
-rw-r--r--office/texstudio/texstudio-2.6.4-phonon-build-fix.patch51
1 files changed, 51 insertions, 0 deletions
diff --git a/office/texstudio/texstudio-2.6.4-phonon-build-fix.patch b/office/texstudio/texstudio-2.6.4-phonon-build-fix.patch
new file mode 100644
index 0000000000..2dea40f603
--- /dev/null
+++ b/office/texstudio/texstudio-2.6.4-phonon-build-fix.patch
@@ -0,0 +1,51 @@
+--- a/PDFDocument.cpp
++++ b/PDFDocument.cpp
+@@ -781,19 +781,17 @@
+ event->accept();
+ }
+
+-void PDFWidget::annotationClicked(Poppler::Annotation *annotation, const QPointF &scaledPos) {
++void PDFWidget::annotationClicked(Poppler::Annotation *annotation, int page) {
+ switch (annotation->subType()) {
+ case Poppler::Annotation::AMovie: {
+ #ifdef PHONON
+- if (page > -1 && clickedAnnotation->boundary().contains(scaledPos) ) {
+- if (movie) delete movie;
+- movie = new PDFMovie(this, dynamic_cast<Poppler::MovieAnnotation*>(clickedAnnotation), page);
+- movie->place();
+- movie->show();
+- movie->play();
+- }
++ if (movie) delete movie;
++ movie = new PDFMovie(this, dynamic_cast<Poppler::MovieAnnotation*>(annotation), page);
++ movie->place();
++ movie->show();
++ movie->play();
+ #else
+- Q_UNUSED(scaledPos)
++ Q_UNUSED(page)
+ txsWarning("You clicked on a video, but the video playing mode was disabled by you or the package creator.\nRecompile TeXstudio with the option PHONON=true");
+ #endif
+ break;
+@@ -826,7 +824,9 @@
+ int page;
+ QPointF scaledPos;
+ mapToScaledPosition(event->pos(), page, scaledPos);
+- annotationClicked(clickedAnnotation, scaledPos);
++ if (page > -1 && clickedAnnotation->boundary().contains(scaledPos)) {
++ annotationClicked(clickedAnnotation, page);
++ }
+ } else if (currentTool == kPresentation) {
+ if (event->button() == Qt::LeftButton) goNext();
+ else if (event->button() == Qt::RightButton) goPrev();
+--- a/PDFDocument.h
++++ b/PDFDocument.h
+@@ -237,7 +237,7 @@
+ void useMagnifier(const QMouseEvent *inEvent);
+ void goToDestination(const Poppler::LinkDestination& dest);
+ void doLink(const Poppler::Link *link);
+- void annotationClicked(Poppler::Annotation *annotation, const QPointF &scaledPos);
++ void annotationClicked(Poppler::Annotation *annotation, int page);
+ void doZoom(const QPoint& clickPos, int dir, qreal newScaleFactor=1.0);
+
+ PDFScrollArea* getScrollArea();