2
0
mirror of https://github.com/koreader/koreader synced 2024-10-31 21:20:20 +00:00
Commit Graph

1483 Commits

Author SHA1 Message Date
chrox
f2d03daac4 cleanup: dst_justify is assigned according to both justification and
full_just
2012-10-27 11:16:31 +08:00
chrox
ce631f4827 merge justification and full justification to one option 2012-10-27 11:06:53 +08:00
Dobrica Pavlinušić
75638663dc Merge pull request #495 from chrox/kopt-config
add more configurable options in koptconfig
2012-10-26 07:02:01 -07:00
chrox
83cc0ea24b add justification option in koptconfig dialog 2012-10-26 19:48:28 +08:00
chrox
f3f5d0a920 default dst_mar in k2pdfopt should be 0.06 2012-10-26 17:20:56 +08:00
chrox
f4a2b5f3a0 add page margin and text wrap and contrast option in koptconfig 2012-10-26 17:16:31 +08:00
Dobrica Pavlinušić
2621474916 Merge pull request #494 from chrox/kopt-config
some UI tweaks on koptconfig and readerchooser to accommodate DXG screen
2012-10-26 01:12:31 -07:00
chrox
496591730f align option name to right and option item to left 2012-10-26 13:43:32 +08:00
chrox
251f002ee0 use fixed width and height window to get better UI in DXG 2012-10-26 13:15:36 +08:00
chrox
472e669670 bugfix: make option names and items default to dirty at each call
Otherwise when call Koptconfig again option names and items will not be
drawn. And some variables' name are changed from 'value' to 'item' which
are consistent across this module now.
2012-10-26 13:00:26 +08:00
Dobrica Pavlinušić
ac218923d3 Merge pull request #493 from chrox/kopt-config
add config dialog for koptreader
2012-10-25 14:45:35 -07:00
chrox
c240f88b8d add koptconfig.lua in Makefile 2012-10-26 00:41:37 +08:00
chrox
b4417c73de add config dialog for koptreader
For now only line spaceing and word spaceing are configurable with
'F'/'Aa' commands. And device size are passed to k2pdfopt in place of
the hard-coded default width and height(via @dpavlin).
2012-10-26 00:37:50 +08:00
Dobrica Pavlinušić
a7b396b3b1 Merge pull request #491 from tigran123/master
fix to Makefile: extr depends on MUPDFLIBS and THIRDPARTYLIBS
2012-10-25 03:34:26 -07:00
Tigran Aivazian
84571c315c Makefile: extr depends on MUPDFLIBS/THIRDPARTYLIBS 2012-10-25 10:53:12 +01:00
Dobrica Pavlinušić
0f34ca7398 Merge pull request #490 from tigran123/cleanup
Cleanups to extr.c and pdfattach
2012-10-25 00:32:51 -07:00
Tigran Aivazian
17726663b2 Adjust the error message as well. 2012-10-24 23:24:54 +01:00
Tigran Aivazian
85a97a641b Cleanups to extr.c and pdfattach
1. In extr.c the error message should use the correct full pathname, not
the base filename.
2. In pdfattach the check for existence of input files should be
replaced with the check for read access to them.
2012-10-24 23:22:21 +01:00
Dobrica Pavlinušić
b16f33f8f8 Merge pull request #488 from tigran123/pdf-extract
Extract attachments from PDF file via Alt-S
2012-10-24 14:42:39 -07:00
Tigran Aivazian
47d507c406 Escape ampersand & in the filename also.
I am amazed what stupid filenames some people come up with, instead of
abiding by old good [a-zA-Z0-9] character set and 8.3 filename length...
2012-10-24 22:03:35 +01:00
Tigran Aivazian
90376422d9 More enhancements to pdfattach
1. Emit the list of attached files first and then emit each individual
attachment one per page.
2. Use hyperlinks in the list of attached files so one can jump directly
to the file which he wants to extract.
2012-10-24 20:35:10 +01:00
Tigran Aivazian
c2bc496d35 Merge pull request #489 from chrox/kopt-isolated
bugfix: isolate doc settings of koptreader from pdfreader/djvureader and feedback zoom value used by page reflow
2012-10-24 09:28:00 -07:00
Tigran Aivazian
9ad3577be8 Enhance pdfattach script
1. Set the page size to 9x12cm as appropriate for Kindle 3
2. Together with each attachment print its base filename and file size
in bytes.
3. Print the total size of all attachments (so one can estimate whether
it is safe to extract the attachments or not).
2012-10-24 17:15:50 +01:00
chrox
e05366f464 bugfix: dpi should be multiplied by shrink_factor not zoom 2012-10-24 23:53:22 +08:00
Tigran Aivazian
be1996d0a0 Use tabs not spaces for indenting. 2012-10-24 16:23:16 +01:00
Tigran Aivazian
3eb1e83002 Make the pdfattach utility more robust
1. Handle filenames with spaces
2. Check if pdflatex and attachfile packages are installed before trying
to use them.
3. Use a more intuitive interface "pdfattach -o file.pdf file1.djvu
[file2.djvu]..." instead of forcing the user to specify "-i" option for
every input file.
2012-10-24 15:57:42 +01:00
chrox
564f73d035 feedback zoom value used by page reflow
So that when zoom value exceed the upper limit of reflowable page size
user will notice that zoom value cannot be increased.
2012-10-24 22:01:36 +08:00
Tigran Aivazian
1264adcda1 Utility for attaching files inside PDF
This utility creates a PDF file containing specified files embedded into
it as attachments. The attachments can be extracted from the PDF file by
using extr utility.
I placed this in a separate "utils" directory to signify that this is
NOT intended to run on a Kindle (it requires pdfLaTeX to generate the
PDF file) but only on the desktop Linux workstation.
2012-10-24 14:28:43 +01:00
Tigran Aivazian
0feb47335f Handle absolute attachment pathnames
We must use only the basename part of the embedded attachment filename,
because the directories used in the path on the machine where the
attachments were created may not even exist on the machine where they
are extracted.
2012-10-24 14:13:12 +01:00
chrox
88fb136376 isolate doc settings of koptreader from pdfreader/djvureader 2012-10-24 20:39:20 +08:00
Tigran Aivazian
cbada0f8ef Correct the comment.
The global variable "doc" is actually shared by ALL functions, so the
old comment was incorrect.
2012-10-24 11:48:20 +01:00
Tigran Aivazian
ff96c601f1 Support for extracting attachments from PDF file
This commit adds Alt-S command which invokes the external utility "extr"
passing it the full pathname of the open PDF file and the current page
number. The utility extracts all attachments on this page (if there are
any) and saves them in the same directory as the PDF file. The file
names given to attachments are decoded from within the PDF file itself,
i.e. they are the same as the original file names of the files embedded
in the PDF.
2012-10-24 11:24:05 +01:00
Tigran Aivazian
bb94c20bcf Make Space in FileChooser refresh the file list
The Space command in FileChooser should actually re-read the directory
and not just redraw the current (possibly stale) data. This is
especially useful in two situations:
1. You have extracted some attachments in the current directory
2. You wish to see the current state of the Last Documents list.
2012-10-24 10:45:20 +01:00
Tigran Aivazian
772dda7e57 Make file info more resilient
We shouldn't crash the whole KPV application just because for some
reason we can't obtain the valid unpacked size of the zip archive.
2012-10-24 10:42:08 +01:00
Dobrica Pavlinušić
6311ff40e5 Merge pull request #484 from tigran123/selectmenu-jump
Add ability to jump to any location in SelectMenu
2012-10-23 13:26:10 -07:00
Dobrica Pavlinušić
cdd2eddca9 Merge pull request #483 from tigran123/selectmenu-home
Use only Back not Home to exit dialogs
2012-10-23 13:25:45 -07:00
Tigran Aivazian
47302a339a Merge pull request #485 from chrox/readerchooser
using local variable optbar_T instead of self.options_bar_T
2012-10-23 01:56:47 -07:00
chrox
d870d1c905 using local variable optbar_T instead of self.options_bar_T 2012-10-23 16:43:59 +08:00
Tigran Aivazian
3305021115 Merge pull request #480 from chrox/readerchooser
add readerchooser to prompt users to select alternative readers
2012-10-23 01:13:48 -07:00
chrox
76844ec996 shorten info messages 2012-10-23 16:09:39 +08:00
chrox
5ad0805410 use PDFReflow and DJVUReflow to differentiate between KOPTReader and
PDFReader/DJVUReader
2012-10-23 13:51:03 +08:00
Tigran Aivazian
d20ee50f10 Add ability to jump to any location in SelectMenu
For large SelectMenu lists (e.g. Encyclopedias/Dictionaries with huge
TOC) it is very awkward to navigate the menu one page at a time.
Therefore, this patch implements the jump to 10%,20%,... locations.
2012-10-22 21:58:39 +01:00
Tigran Aivazian
357656f79d Don't use HOME key to exit manual bbox dialog 2012-10-22 20:28:46 +01:00
chrox
f48a87bfdf disable exiting readerchooser dialog with Home key 2012-10-23 03:26:50 +08:00
Tigran Aivazian
c3ded9f8fe Don't use Home for exiting InputBox dialog 2012-10-22 20:23:31 +01:00
Tigran Aivazian
d82e7ca4d2 Use only Back not Home to exit select menu
It is not a good idea to use the key that exits the whole application
for exiting a dialog, because accidentally pressing that key twice will
exit the application and annoy the user.
2012-10-22 20:15:19 +01:00
chrox
84971cd941 bugfix: return the first reader found 2012-10-23 03:01:32 +08:00
chrox
067be63258 add option of remembering default reader for certain file type 2012-10-23 02:47:54 +08:00
chrox
c3be6ef214 Cleanup: using length operator 2012-10-22 23:58:04 +08:00
chrox
1c72becc71 reader cleanup 2012-10-22 22:16:51 +08:00