Commit graph

466 commits

Author SHA1 Message Date
Albert Astals Cid b20b0aeec5 Avoid warning abou key beign unused
svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=374733
2005-01-01 20:04:46 +00:00
Tobias Koenig d67d3d16b0 Make kpdf aware of the /PageMode/FullScreen tag in PDF files, so it starts
in presentation mode when the flag is available.

svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=374668
2005-01-01 15:44:44 +00:00
Tobias Koenig 6a3c3d6c97 Hide cursor in presentation mode after 3 seconds
svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=374489
2004-12-31 15:34:08 +00:00
Enrico Ros 2cd31678ce Implemented Tobias requests on presentation mode. Made them all
configurable. Presentation mode is fully configurable now (at least with
bools). We should remove some options in the future. Changed some bits in
configuration dialog's "general" page.
CCMAIL:tokoe@kde.org

svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=374340
2004-12-30 22:43:15 +00:00
Enrico Ros 5e13e0a1c1 Revered previous commit and hidden our menu entry.
Default "Settings->Full Screen Mode" entry remains and is visible in both
the Shell and when embedded in konqueror.

svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=373859
2004-12-28 22:43:35 +00:00
Enrico Ros 571951fb1b Fix double Fullscreen item in menus (as reported by Albert)
svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=373830
2004-12-28 20:57:51 +00:00
Enrico Ros 207c2842cd more important items
svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=373816
2004-12-28 19:11:00 +00:00
Enrico Ros 160d6a4f7e Async generation fixes. I hope all segfaults and mutex overlocking have
been fixed. If someone finds one of those, please tell me.
Here are thread generator pros/cons:
- generation is ~20% slower
+ thumbnaillist or pageview scrolling is fast (never blocked anymore)
+ all UI feels so better and responsive
So:
o thumbnaillist will be all ASYNC.
o pageview will use ASYNC for _preloading_ next pages and a mixed A/S for
  scrolling/viewing the document
p previewwidget and others (searches, etc) are SYNC as obvious.
Btw now async generation is enabled everywhere.

svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=373810
2004-12-28 18:50:11 +00:00
Enrico Ros 5136a86798 Asyncronous PDF Generator implementation. The threaded pixmap generation
is working and features an hyperLock BUG due to my ignorance.
What to expect: more responsiveness from the UI, preloading, 'really'
continous scrolling, bubblegum and naked penguins.
Gonna hount insects now.

svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=373763
2004-12-28 16:06:11 +00:00
Enrico Ros 92c653cf55 Leak fix encrypted document opening.
svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=373695
2004-12-28 11:25:46 +00:00
André Wöbbeking 2fb64506de workaround for unsermake: add empty generator.cpp which only includes generator.moc
CCMAIL: coolo@kde.org

obviously automake can handle this. is this a bug or a missing feature in unsermake?

svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=373626
2004-12-27 23:30:59 +00:00
Albert Astals Cid 48b80d82e4 Fix leak
svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=373451
2004-12-26 22:34:50 +00:00
Albert Astals Cid 3b0cc84aaf - Update the cursor an wheelEvents
- Only put the pointingHandCursor where we are over a rect that is a link and not all the rects

svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=373440
2004-12-26 21:20:17 +00:00
Albert Astals Cid ebdff63443 if there's no page over the cursor and we were showing the pointingHandCursor go back to the normal one
svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=373428
2004-12-26 19:23:44 +00:00
Enrico Ros 03ad75ea82 CVS_SILENT ++wishes;
svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=373127
2004-12-24 11:04:18 +00:00
Enrico Ros 6eb004c5eb sync
svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=373126
2004-12-24 11:02:34 +00:00
Enrico Ros 4502706beb Better policies for memory management. Auto memory clean when a document is
opened. More stuff for getting async generator to work. Leakfix.

Note: memory management coolness Vol.1 : now kpdf has memory profiles that
allow using up to xx% of the total memory and clip maximum usable memory to
a half of the free one. Example: an istance of kpdf is using all the
memory (as regular cache). You open some memory hungry app or another kpdf
and you'll see the first istance dropping cached pages (freeing memory!)
to leave room for the other app! It's dynamic, fast, avoids swap and
something cool from my programmer's viewpoint.

svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=373123
2004-12-24 10:24:10 +00:00
Albert Astals Cid 41d4933460 Remove possible trigraph as per Scott Wheeler suggestion
svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=372828
2004-12-22 20:43:48 +00:00
Albert Astals Cid 174650af34 fix xpdf buffer overflow
By Dirk Mueller

svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=372821
2004-12-22 20:21:56 +00:00
Enrico Ros 16908b2f0c Changed pixmap requesting methods. Now each request is packed into a
PixmapRequest class. When requesting pixmaps, one or multiple requests are
sent to the Document that (frees memory as in current policy) and send each
PixmapRequest to the current Generator. Added a signal in generators to
notify the Document when a pixmap generation has finished.

PageView, ThumbnailsList, PreviewWidget have been unbroken after the memory
management commit. (mem management seems in pretty good shape..it's smart.)
Added 'visible widgets' list to those classes to speed up searching and
processing on visible widgets only.

Note: asyncronous pixmap requests can now be queued and we're getting very
close to the threaded generator.

Note2: Leakfixes and memory improvements.

Final NOTE: head merging is possible now, as all remaining work can be
considered bugfixes.. API is getting final. It will only change in xpdf
dep stuff, the already undefined Viewport object and some bits in
Generators.

svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=372787
2004-12-22 18:21:36 +00:00
Albert Astals Cid c9dc4c5bc9 Commit the current changes of "authorship"
Enrico feel free to add your description on the main.cpp file and/or change your mail addreesses

svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=372585
2004-12-21 20:14:27 +00:00
Aaron J. Seigo 6511b29275 don't search after every single key press as that tends to freeze the gui
up nice and solid when viewing large PDFs, even on fast machines. instead
search after the user has paused typing

svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=372580
2004-12-21 19:58:51 +00:00
Enrico Ros 05924776fa The long awaited (by me) memory manager is in place. It unloads pixmaps
not on screen starting from the oldest generated one. Rules (aka memory
profiles) are simple by now, but they work as expected.
Plus: added functions for getting Linux total memory and free memory by
querying the /proc filesystem. Generator creation by mimetype. -Fixes.
BROKEN: thumbnail, presentation (need to reimpl a virtual method)
TODO1: notify generators when cancelling jobs.
TODO2: add forward caching.
TODO3: rationalize code, clean it up and update README.png
TODO4: periodically check for free memory and unload pixmaps if needed.
TODO5: wisely choose default values for memory profiles.

svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=372514
2004-12-21 12:38:52 +00:00
Enrico Ros 70ea81ca15 Added full screen 'Presentation' support. Only Replace and Dissolve pdf
effects are implemented for now. TODO: detect Transitions from the PDF
(maybe xpdf don't tell us).
Adding this (another DocumentObserver) is helping me to better focus the
'memory manager' concept. But still there are some clouds..

svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=371429
2004-12-17 17:14:46 +00:00
Enrico Ros 58797ffe73 bits
svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=371428
2004-12-17 17:10:47 +00:00
Enrico Ros eed32c7654 FixPack 1: Small fix all over the code. Searwidget rewrite: looks good,
feels better. Updated TODO with interesting things.
Note: I feel performance loss. Need to check carefully all zoom functions,
relayouts and wasted paints. I'll love to do that after merging to HEAD.
Note to all: HEAD merge only after API will be final (the only 2 variables
are MemManager, ThreadedGen and maybe a DocumentDom (if I can make it next
weekend, but I think not)).

svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=370404
2004-12-13 18:21:37 +00:00
Enrico Ros dea9cfdf8d Tidy up the structure.
svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=370401
2004-12-13 18:15:39 +00:00
Albert Astals Cid 6de9874082 Update zoom text
svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=370270
2004-12-13 00:28:52 +00:00
Albert Astals Cid 1df24e0951 fullscreenmode lovin'
svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=370269
2004-12-13 00:27:09 +00:00
Albert Astals Cid f46c9176e4 When in non continous mode and scrolling up a page, set the viewport at the bottom of the page (Albert)
svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=370246
2004-12-12 22:57:54 +00:00
Enrico Ros f7406846d0 Added a wish by Pino Toscano and many other for sure: bookmarks.
svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=370140
2004-12-12 17:10:59 +00:00
Enrico Ros 001c5b03d4 ++items; Adding a little feature+cleanup.
svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=370059
2004-12-12 11:21:59 +00:00
Enrico Ros 62da55011c Changed max slider width. Not sure about the default (1st time) one. Will
check later.

svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=370057
2004-12-12 11:13:15 +00:00
Enrico Ros 8aaec0dd08 TOC displays the Synopsis DomTree and reacts on clicks. Viewport changes
moved to #1 in TODO list. Let's hope next items won't start from #2..

svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=370056
2004-12-12 11:11:57 +00:00
Enrico Ros 246d0b5e78 Cosmetic fix :-) after a day of non-gui changes that broke up many things I
had to do a candy-little-commit.. just to relax.. ^_^

svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=369972
2004-12-11 21:54:00 +00:00
Enrico Ros 0c5cd4e01a Fixed a GeneratorPDF <-> KPDFOutputDev bug.
Abstracted xpdf's Outline to a Dom Tree. Fixed MERGE tags through the code.
Added comments (documentation) to KPDFDocument class and other classes in
document.h. Changed a little Generator interface.
Moved code from toc.h/.cpp to GeneratorPDF and shrinked a lot.

TODO (now): Convert TOC (widget) to use the Dom tree as data source.

svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=369914
2004-12-11 17:25:03 +00:00
Enrico Ros 8724403042 Merge ASAP. Only left a couple of items as merge blockers and moved other
stuff to the fix-after-merge list.

svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=369799
2004-12-11 08:51:55 +00:00
Albert Astals Cid b7588b4b33 Show the window maximized when the user opens the program for the very first time
svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=369730
2004-12-10 22:27:55 +00:00
Enrico Ros 3ff4415c92 Modified to insert the new DocumentInfo class into the game.
svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=369655
2004-12-10 16:12:55 +00:00
Enrico Ros 5f4236d801 Abstracted Generator and ported xpdf dependant code (most of) to the
GeneratorPDF class. Adapted the whole KPDFLink class to a hieracy of
classes and added a Viewport description associated to 'Goto' links.

Link hasn't got geometry properties. A PageRect class has born to describe
all 'active rects' on a page (hand pointed on mouse over). PageRect can
contain many type of objects such as Links or other active items (images,
...). The Page class now stores PageRects only (no more geometric Links,
as already said).

Added a DocumentInfo class filled in by generators and used by the
PropertiesDialog.

Outline hasn't been abstracted while now, but a DocumentSynopsis class
is in place and work needs to be done to make GeneratorPDF fill in a
DocumentSynopsis instance and pass it to the Toc widget.

Note1: Document has nothing more to do with xpdf, it only commands its
generator.
Note2: 2 remaining classes to be abstracted: Outline, TextPage. But
waning..

svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=369651
2004-12-10 16:04:45 +00:00
Enrico Ros 18e7d798c8 A quick picture made with kolourpaint to explain internal hieracy of kpdf,
from the gui to the intrnals.

svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=369614
2004-12-10 12:35:54 +00:00
Albert Astals Cid 0bbd77931f fixuifiles
svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=368770
2004-12-05 22:49:17 +00:00
Albert Astals Cid d2fab9ae82 PDF properties dialog
svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=368769
2004-12-05 22:47:32 +00:00
Albert Astals Cid 57b31da376 %1 -> %n, at least is what i was getting at the shell
svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=368763
2004-12-05 22:34:15 +00:00
Albert Astals Cid b9dbc95cbf Add another possible font path, used by Gentoo Linux
svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=368646
2004-12-05 13:22:06 +00:00
Albert Astals Cid 3b38216405 fixuifiles
svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=368550
2004-12-05 00:12:31 +00:00
Albert Astals Cid ba20068539 Support for show/hide menubar in rmb menu, different from HEAD so that supports Konqueror too
svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=368536
2004-12-04 23:23:18 +00:00
Enrico Ros adaa58f11a sync
svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=368321
2004-12-04 10:59:52 +00:00
Albert Astals Cid a461a21ba7 Add watch file option.
Enrico, i've added it in the menu, do you prefer it to be in the configuration dialog?
CCMAIL: rosenric@dei.unipd.it

svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=367732
2004-12-01 22:18:27 +00:00
Aaron J. Seigo e7b59fbb92 fix the plurality, both for english and for translation.
i wonder if it shouldn't reference the document title in this popup too?

svn path=/branches/kpdf_experiments/kdegraphics/kpdf/; revision=367453
2004-11-30 20:03:45 +00:00