From a47db976ac76da009f291293873f6da97f536558e71fd51ddf3db3e3921e97bc Mon Sep 17 00:00:00 2001 From: Atri Bhattacharya Date: Sat, 23 Feb 2019 13:23:22 +0000 Subject: [PATCH] Accepting request 677352 from home:badshah400:branches:X11:Utilities - Update to version 1.0.8 - Add xournalpp-fix-horizontal-space.patch: fix adding horizontal space to document view from preferences; patch taken from upstream commit (gh#xournalpp/xournalpp#906). - New upstream build dependencies: pkgconfig(portaudiocpp), pkgconfig(sndfile). OBS-URL: https://build.opensuse.org/request/show/677352 OBS-URL: https://build.opensuse.org/package/show/X11:Utilities/xournalpp?expand=0&rev=7 --- 1.0.7.tar.gz | 3 - 1.0.8.tar.gz | 3 + xournalpp-fix-horizontal-space.patch | 117 +++++++++++++++++++++++++++ xournalpp.changes | 14 ++++ xournalpp.spec | 18 +++-- 5 files changed, 147 insertions(+), 8 deletions(-) delete mode 100644 1.0.7.tar.gz create mode 100644 1.0.8.tar.gz create mode 100644 xournalpp-fix-horizontal-space.patch diff --git a/1.0.7.tar.gz b/1.0.7.tar.gz deleted file mode 100644 index 0a2f1b6..0000000 --- a/1.0.7.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:949292cea88a2c8847b53c2bd0a690a83db1e2c7efa0f849c5d39ae85f83a0c4 -size 8460139 diff --git a/1.0.8.tar.gz b/1.0.8.tar.gz new file mode 100644 index 0000000..287d315 --- /dev/null +++ b/1.0.8.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:95069296532119dd193a12cb560a510972614420679ee41d4cad9b0ce5a692ae +size 8485637 diff --git a/xournalpp-fix-horizontal-space.patch b/xournalpp-fix-horizontal-space.patch new file mode 100644 index 0000000..28848bc --- /dev/null +++ b/xournalpp-fix-horizontal-space.patch @@ -0,0 +1,117 @@ +From cdcf02d1a4703d7c146b5479a751ae18180abac6 Mon Sep 17 00:00:00 2001 +From: Andreas Butti +Date: Mon, 18 Feb 2019 18:25:25 +0100 +Subject: [PATCH] fixes #906 + +--- + src/gui/Layout.cpp | 59 ++++++++++++++++++++++++++++++---------- + src/gui/LayoutMapper.cpp | 5 ---- + 2 files changed, 44 insertions(+), 20 deletions(-) + +diff --git a/src/gui/Layout.cpp b/src/gui/Layout.cpp +index d8b15535..c6a6d84a 100644 +--- a/src/gui/Layout.cpp ++++ b/src/gui/Layout.cpp +@@ -9,6 +9,27 @@ + #include "gui/LayoutMapper.h" + + ++/** ++ * Padding outside the pages, including shadow ++ */ ++const int XOURNAL_PADDING = 10; ++ ++/** ++ * Padding outside the pages, if additional padding is set ++ */ ++const int XOURNAL_PADDING_FREE_SPACE = 150; ++ ++/** ++ * Allowance for shadow between page pairs in paired page mode ++ */ ++const int XOURNAL_ROOM_FOR_SHADOW = 3; ++ ++/** ++ * Padding between the pages ++ */ ++const int XOURNAL_PADDING_BETWEEN = 15; ++ ++ + Layout::Layout(XournalView* view, ScrollHandling* scrollHandling) + : view(view), + scrollHandling(scrollHandling), +@@ -174,21 +195,6 @@ double Layout::getLayoutWidth() + return layoutWidth; + } + +-/** +- * Padding outside the pages, including shadow +- */ +-const int XOURNAL_PADDING = 10; +- +-/** +- * Allowance for shadow between page pairs in paired page mode +- */ +-const int XOURNAL_ROOM_FOR_SHADOW = 3; +- +-/** +- * Padding between the pages +- */ +-const int XOURNAL_PADDING_BETWEEN = 15; +- + void Layout::layoutPages() + { + XOJ_CHECK_TYPE(Layout); +@@ -238,6 +244,19 @@ void Layout::layoutPages() + int x = XOURNAL_PADDING; + int y = XOURNAL_PADDING; + ++ bool verticalSpace = settings->getAddVerticalSpace(); ++ bool horizontalSpace = settings->getAddHorizontalSpace(); ++ ++ if (verticalSpace) ++ { ++ x += XOURNAL_PADDING_FREE_SPACE; ++ } ++ ++ if (horizontalSpace) ++ { ++ y += XOURNAL_PADDING_FREE_SPACE; ++ } ++ + // Iterate over ALL possible rows and columns and let the mapper tell us what page, if any, is found there. + for (int r = 0; r < rows; r++) + { +@@ -308,6 +327,16 @@ void Layout::layoutPages() + totalHeight += sizeRow[r]; + } + ++ if (verticalSpace) ++ { ++ totalWidth += XOURNAL_PADDING_FREE_SPACE * 2; ++ } ++ ++ if (horizontalSpace) ++ { ++ totalHeight += XOURNAL_PADDING_FREE_SPACE * 2; ++ } ++ + this->setLayoutSize(totalWidth, totalHeight); + this->view->pagePosition->update(this->view->viewPages, len, totalHeight); + } +diff --git a/src/gui/LayoutMapper.cpp b/src/gui/LayoutMapper.cpp +index 8d97147d..4cf079a0 100644 +--- a/src/gui/LayoutMapper.cpp ++++ b/src/gui/LayoutMapper.cpp +@@ -41,11 +41,6 @@ LayoutMapper::LayoutMapper(int numPages, Settings* settings) + int pages = numPages; + + // get from user settings: +- +- // TODO: Use these again? +- bool verticalSpace = settings->getAddVerticalSpace(); +- // TODO: Use these again? +- bool horizontalSpace = settings->getAddHorizontalSpace(); + bool isPairedPages = settings->isShowPairedPages(); + int numCols = settings->getViewColumns(); + int numRows = settings->getViewRows(); diff --git a/xournalpp.changes b/xournalpp.changes index 73eeb14..5810e98 100644 --- a/xournalpp.changes +++ b/xournalpp.changes @@ -1,3 +1,17 @@ +------------------------------------------------------------------- +Tue Feb 19 11:34:38 UTC 2019 - badshah400@gmail.com + +- Update to version 1.0.8: + * Audio recording directly integrated, no VLC etc. needed. + * LaTex use now vector graphics. + * Multiple page layout. + * Minor bug fixes. +- Add xournalpp-fix-horizontal-space.patch: fix adding horizontal + space to document view from preferences; patch taken from + upstream commit (gh#xournalpp/xournalpp#906). +- New upstream build dependencies: pkgconfig(portaudiocpp), + pkgconfig(sndfile). + ------------------------------------------------------------------- Mon Jan 28 13:48:02 UTC 2019 - Atri Bhattacharya diff --git a/xournalpp.spec b/xournalpp.spec index 3e8ac73..560098a 100644 --- a/xournalpp.spec +++ b/xournalpp.spec @@ -1,7 +1,7 @@ # # spec file for package xournalpp # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -12,18 +12,20 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# Please submit bugfixes or comments via http://bugs.opensuse.org/ # Name: xournalpp -Version: 1.0.7 +Version: 1.0.8 Release: 0 Summary: Notetaking software designed around a tablet License: GPL-2.0-or-later Group: Productivity/Office/Other URL: https://github.com/xournalpp/xournalpp Source0: https://github.com/xournalpp/xournalpp/archive/%{version}.tar.gz +# PATCH-FIX-UPSTREAM xournalpp-fix-horizontal-space.patch gh#xournalpp/xournalpp#906 badshah400@gmail.com -- Fix adding horizontal space to document view from preferences; patch taken from upstream commit +Patch0: xournalpp-fix-horizontal-space.patch BuildRequires: cmake BuildRequires: fdupes BuildRequires: gcc-c++ @@ -33,8 +35,10 @@ BuildRequires: texlive-latex-bin BuildRequires: pkgconfig(glib-2.0) BuildRequires: pkgconfig(gthread-2.0) BuildRequires: pkgconfig(gtk+-3.0) -BuildRequires: pkgconfig(poppler-glib) BuildRequires: pkgconfig(libxml-2.0) +BuildRequires: pkgconfig(poppler-glib) +BuildRequires: pkgconfig(portaudiocpp) +BuildRequires: pkgconfig(sndfile) BuildRequires: pkgconfig(zlib) Requires: texlive-latex-bin @@ -46,14 +50,18 @@ It supports pen input, e.g. Wacom tablets. %prep %setup -q +%patch0 -p1 %build -%cmake -DENABLE_MATHTEX=ON +%cmake %make_jobs %install %cmake_install +# REMOVE UNNECESSARY SCRIPTS update-icon-cache IS TAKEN CARE OF BY RPM FILE TRIGGERS +rm %{buildroot}%{_datadir}/%{name}/ui/*/hicolor/update-icon-cache.sh + %find_lang xournalpp %{no_lang_C} %fdupes %{buildroot}%{_datadir}