diff --git a/kite/KPDFviewer (last file) b/kite/KPDFviewer (last file) index 5d9acab14..de0c410d9 100755 --- a/kite/KPDFviewer (last file) +++ b/kite/KPDFviewer (last file) @@ -1,3 +1,3 @@ #!/bin/sh -/mnt/us/launchpad/kpdf.sh +/mnt/us/kindlepdfviewer/kpdf.sh diff --git a/kite/KPDFviewer File Manager b/kite/KPDFviewer File Manager index 3374ef3ae..f5f935234 100755 --- a/kite/KPDFviewer File Manager +++ b/kite/KPDFviewer File Manager @@ -1,3 +1,3 @@ #!/bin/sh -/mnt/us/launchpad/kpdf.sh /mnt/us/documents +/mnt/us/kindlepdfviewer/kpdf.sh /mnt/us/documents diff --git a/kpdf.sh b/kpdf.sh new file mode 100644 index 000000000..c1f81c700 --- /dev/null +++ b/kpdf.sh @@ -0,0 +1,37 @@ +#!/bin/sh +export LC_ALL="en_US.UTF-8" + +echo unlock > /proc/keypad +echo unlock > /proc/fiveway + +# we're always starting from our working directory +cd /mnt/us/kindlepdfviewer/ + +# bind-mount system fonts +if ! grep /mnt/us/kindlepdfviewer/fonts/host /proc/mounts; then + mount -o bind /usr/java/lib/fonts /mnt/us/kindlepdfviewer/fonts/host +fi + +# check if we are supposed to shut down the Amazon framework +if test "$1" == "--framework_stop"; then + shift 1 + /etc/init.d/framework stop +fi + +# stop cvm +killall -stop cvm + +# finally call reader +./reader.lua "$1" 2> /mnt/us/kindlepdfviewer/crash.log || cat /mnt/us/kindlepdfviewer/crash.log + +# unmount system fonts +if grep /mnt/us/kindlepdfviewer/fonts/host /proc/mounts; then + umount /mnt/us/kindlepdfviewer/fonts/host +fi + +# always try to continue cvm +killall -cont cvm || /etc/init.d/framework start + +# cleanup hanging process +killall lipc-wait-event + diff --git a/launchpad/kpdf.ini b/launchpad/kpdf.ini index ab2a1b0d9..53be1fc3f 100755 --- a/launchpad/kpdf.ini +++ b/launchpad/kpdf.ini @@ -1,11 +1,11 @@ [Actions] # start kindlepdfviewer with filebrowser in /mnt/us/documents -P D = !/mnt/us/launchpad/kpdf.sh /mnt/us/documents +P D = !/mnt/us/kindlepdfviewer/kpdf.sh /mnt/us/documents # start kindlepdfviewer with last document -P P = !/mnt/us/launchpad/kpdf.sh +P P = !/mnt/us/kindlepdfviewer/kpdf.sh # start kindlepdfviewer without framework in /mnt/us/documents -P K = !/mnt/us/launchpad/kpdf.sh --framework_stop /mnt/us/documents +P K = !/mnt/us/kindlepdfviewer/kpdf.sh --framework_stop /mnt/us/documents # start kindlepdfviewer without framework on last read document -P L = !/mnt/us/launchpad/kpdf.sh --framework_stop +P L = !/mnt/us/kindlepdfviewer/kpdf.sh --framework_stop # restart amazon framework - when it got irritated P R = !/etc/init.d/framework restart diff --git a/reader.lua b/reader.lua index 8e9e627b2..18f131c13 100755 --- a/reader.lua +++ b/reader.lua @@ -139,6 +139,26 @@ end +-- @TODO dirty workaround, find a way to force native system poll +-- screen orientation and upside down mode 09.03 2012 +Screen:setRotationMode(Screen.native_rotation_mode) + if file then + running = openFile(file) + else + running = false + end + showReader(ARGV[optind], optarg["p"]) + end + UIManager:run() +elseif last_file and lfs.attributes(last_file, "mode") == "file" then + showReader(last_file, optarg["p"]) + UIManager:run() +else + return showusage() +end + + + -- @TODO dirty workaround, find a way to force native system poll -- screen orientation and upside down mode 09.03 2012 Screen:setRotationMode(Screen.native_rotation_mode) diff --git a/resources/info-aux.png b/resources/info-aux.png new file mode 100644 index 000000000..afee09ee5 Binary files /dev/null and b/resources/info-aux.png differ diff --git a/resources/info-bug.png b/resources/info-bug.png new file mode 100644 index 000000000..990e0466f Binary files /dev/null and b/resources/info-bug.png differ diff --git a/resources/info-confirm.png b/resources/info-confirm.png new file mode 100644 index 000000000..85a6585ed Binary files /dev/null and b/resources/info-confirm.png differ diff --git a/resources/info-error.png b/resources/info-error.png new file mode 100644 index 000000000..97ecdfc37 Binary files /dev/null and b/resources/info-error.png differ diff --git a/resources/info-warn.png b/resources/info-warn.png new file mode 100644 index 000000000..f653634db Binary files /dev/null and b/resources/info-warn.png differ