summaryrefslogtreecommitdiff
path: root/office/coolreader/coolreader.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'office/coolreader/coolreader.SlackBuild')
-rw-r--r--office/coolreader/coolreader.SlackBuild31
1 files changed, 30 insertions, 1 deletions
diff --git a/office/coolreader/coolreader.SlackBuild b/office/coolreader/coolreader.SlackBuild
index 8bd2795b74..c1a6a928e0 100644
--- a/office/coolreader/coolreader.SlackBuild
+++ b/office/coolreader/coolreader.SlackBuild
@@ -23,6 +23,12 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# 20201102 bkw:
+# - update for v3.2.50.
+# - embiggen the default window size.
+# - make standard (since the 1980s!) keyboard accelerators work
+# (alt-f for file menu, alt-v for view, etc), in the qt4/5 UIs.
+
# 20201019 bkw:
# - update for v3.2.49, new homepage.
# - allow for building qt4, qt5, wx UIs.
@@ -37,7 +43,7 @@
# - save/load settings (.ini file) to ~/.cr3, not /usr/share/cr3.
PRGNAM=coolreader
-VERSION=${VERSION:-3.2.49}
+VERSION=${VERSION:-3.2.50}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -79,6 +85,13 @@ cd $PRGNAM-cr$VERSION
find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} \+ -o \
\! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} \+
+# FFS, it's 2020, we don't need GUI apps hardcoded to start at
+# 640x400 window size. Honestly we don't need them hardcoded at
+# all, but since that's what coolreader does, pick a size that's
+# bigger than a 3x5" index card on a modern screen...
+sed -i 's,\(<height>\)400,\11024,' cr3qt/src/mainwindow.ui
+sed -i 's,\(<width>\)600,\11280,' cr3qt/src/mainwindow.ui
+
# Use bundled libunibreak, ours is too old (3.0).
# Use bundled fribidi, Pat's is too old (0.19.7).
sed -i -e '/find_package(libunibreak)/d' \
@@ -104,6 +117,22 @@ case "$GUI" in
exit 1 ;;
esac
+# 20201103 bkw: Alt+F for the File menu, Alt+V for View, etc. This
+# has been a UI standard since before Windows 1.0 (MS-DOS apps had it),
+# and I'm not sure why upstream didn't include it. Only affects the
+# Qt4/5 UIs.
+sed -i 's,>\(File\|View\|Navigation\|Help\)<,>\&amp;\1<,' \
+ cr3qt/src/mainwindow.ui
+
+# This is undocumented and exists purely for my own use. It gets rid
+# of the "Escape = minimize" keystroke, because I keep expecting Escape
+# to exit (like 3 or 4 other document readers I use regularly).
+# Only affects the Qt4/5 UIs.
+if [ "${NO_ESCAPE:-no}" = "yes" ]; then
+ echo "=== Activating super-secret Urchlay mode"
+ echo -e 'g/>Esc<\n-1,+1d\nw\nq' | ed cr3qt/src/mainwindow.ui
+fi
+
echo "=== Building $UI GUI"
mkdir -p build