Commit Graph

75 Commits

Author SHA1 Message Date
Georg Baum
5ed606f9c5 Add a cache for converted image files. This needs to be enabled in the
preferences file with \use_converter_cache true. It is disabled by default,
and no GUI support for changing the preferences is yet implemented.

	* src/insets/insetgraphics.C
	(InsetGraphics::prepareFile): Use image file cache

	* src/insets/ExternalSupport.C
	(updateExternal): Use image file cache

	* src/exporter.C
	(Exporter::Export): Do not use image file cache

	* src/graphics/GraphicsCacheItem.C

	(CacheItem::Impl::imageConverted): Add the converted file to the
	image file cache
	(CacheItem::Impl::convertToDisplayFo): Use image file cache

	* src/converter.C
	(Converters::convert): Use image file cache if the caller allowed that

	* src/converter.h
	(Converters::convert): Adjust arguments

	* src/Makefile.am: Add new files

	* src/support/lyxlib.h
	(chmod): new function
	(copy): add mode argument

	* src/support/copy.C
	(chmod): new function
	(copy): implement mode argument

	* src/support/mkdir.C
	(lyx::support::mkdir): Add warning if permissions are ignored

	* src/lyxrc.[Ch]: Add new settings \converter_cache_maxage and
	\use_converter_cache

	* src/ConverterCache.[Ch]: New image file cache

	* src/importer.C
	(Importer::Import): Do nut use the image file cache

	* src/lyx_main.C
	(LyX::init): Initialize the image file cache

	* src/mover.[Ch]
	(Mover::do_copy): Add mode argument
	(SpecialisedMover::do_copy): ditto

	* configure.ac: Check for chmod

	* development/cmake/ConfigureChecks.cmake: ditto

	* development/cmake/config.h.cmake: ditto

	* development/scons/SConstruct: ditto

	* development/scons/scons_manifest.py: Add new files


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15897 a592a061-630c-0410-9148-cb99ea01b6c8
2006-11-13 10:27:57 +00:00
André Pönitz
6c300f72a2 move everything into namespace lyx
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@15422 a592a061-630c-0410-9148-cb99ea01b6c8
2006-10-21 00:16:43 +00:00
Abdelrazak Younes
a6444784dc A bunch of conversion to docstring.
- bformat(): contributed by Georg Beaum
- Alert::XXX
- error(): in SpellBase, ispell, psell, aspell, buffer, etc.
- message(), message signal
- displayMessage(), setMessage,
- ErrorItems
- prettyName()
- makeDisplayPath()

and maybe some more...


- etc... 

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14970 a592a061-630c-0410-9148-cb99ea01b6c8
2006-09-11 08:54:10 +00:00
Georg Baum
be1f96045b Fix bug 2637
* src/graphics/GraphicsCacheItem.C
        (CacheItem::Impl::convertToDisplayFormat): Don't derive the temp
        file name from the original file name. This ensures that it is
        composed of valid characters only.

        * src/graphics/GraphicsConverter.C: remove example script, since it
        will get out of date.
        (build_script): Copy the original file to a temp file before the
        conversion chain starts. This avoids problems with converters that
        can't handle ' in filenames.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14459 a592a061-630c-0410-9148-cb99ea01b6c8
2006-07-15 11:25:49 +00:00
Georg Baum
c9eeee5f5d forgot this
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14379 a592a061-630c-0410-9148-cb99ea01b6c8
2006-07-08 15:20:08 +00:00
Lars Gullik Bjønnes
8c93f63b48 * filetools.[Ch]: Make functions that start with a capital
letter start with a lower letter.
	* All other .C and .h in the cs: adjust for above change


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13603 a592a061-630c-0410-9148-cb99ea01b6c8
2006-04-08 22:31:11 +00:00
André Pönitz
1f5c5a06ee support/textutils.h:
support/filetools.h: rename IsDirWriteable IsFileReadable IsLyXFilename
IsSGMLFilename IsLineSeparatorChar IsLetterChar IsPrintable
IsPrintableNonspace IsDigit to lower case initial

lyxvc.C:
LaTeXFeatures.C:
lyx_cb.C:
insets/insetbibtex.C:
insets/insetexternal.C:
insets/insetgraphics.C:
insets/ExternalSupport.C:
insets/insetinclude.C:
BufferView_pimpl.C:
graphics/GraphicsCacheItem.C:
text2.C:
converter.C:
buffer.C:
lyxfunc.C:
frontends/gtk/ghelpers.C:
frontends/controllers/ControlGraphics.C:
frontends/controllers/ControlInclude.C:
frontends/controllers/ControlSpellchecker.C:
support/filetools.C:
support/filetools.h: adjust


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13595 a592a061-630c-0410-9148-cb99ea01b6c8
2006-04-08 09:09:57 +00:00
Georg Baum
d8845c9f9c fix fix of bug 2192
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13317 a592a061-630c-0410-9148-cb99ea01b6c8
2006-03-10 12:38:21 +00:00
Georg Baum
0a7ebf229c fix bug 2192
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10758 a592a061-630c-0410-9148-cb99ea01b6c8
2006-01-19 21:18:25 +00:00
Angus Leeming
d9f29afe1c Trivial fixes to some warnings thrown up by MSVS.Net 2003.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10585 a592a061-630c-0410-9148-cb99ea01b6c8
2005-11-02 20:11:36 +00:00
Angus Leeming
c9f9ba315c Asger's exchanging of the class and struct keywords.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9502 a592a061-630c-0410-9148-cb99ea01b6c8
2005-01-19 15:03:31 +00:00
Georg Baum
dacd4cea26 make gettting the file format from file contents work in the correct way ;-)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9218 a592a061-630c-0410-9148-cb99ea01b6c8
2004-11-09 19:08:34 +00:00
Georg Baum
6fe9e4e30d rename getExtFromContents() to getFormatFromContents()
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9141 a592a061-630c-0410-9148-cb99ea01b6c8
2004-10-29 15:47:55 +00:00
Lars Gullik Bjønnes
ec94b42f51 Use the preferred calling for Boost.Signal
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9010 a592a061-630c-0410-9148-cb99ea01b6c8
2004-09-26 14:19:47 +00:00
Jean-Marc Lasgouttes
d891a896f4 Georg Baum\'s no-tempdir patch
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@8458 a592a061-630c-0410-9148-cb99ea01b6c8
2004-02-25 12:00:53 +00:00
Lars Gullik Bjønnes
44cd0fc9a1 The std::string mammoth path.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7862 a592a061-630c-0410-9148-cb99ea01b6c8
2003-10-06 15:43:21 +00:00
Lars Gullik Bjønnes
fcdb71906b Change Assert to BOOST_ASSERT.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7722 a592a061-630c-0410-9148-cb99ea01b6c8
2003-09-09 17:25:35 +00:00
Angus Leeming
0f9678630c Remove all unnecessary #includes from header files.
Add them as appropriate to .C files.
Rename Voss as Vo�, Juergen as J�rgen and Spitzmueller as Spitzm�ller.
Happy compiling.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7701 a592a061-630c-0410-9148-cb99ea01b6c8
2003-09-07 01:45:40 +00:00
Angus Leeming
c9403be3b0 Strip redundant #includes.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7669 a592a061-630c-0410-9148-cb99ea01b6c8
2003-09-05 03:10:30 +00:00
Angus Leeming
3f50312db5 Be more specific that 'using lyx::support'.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7653 a592a061-630c-0410-9148-cb99ea01b6c8
2003-09-04 00:29:22 +00:00
Angus Leeming
0be0fcfd59 If I ever see another licence blurb again, it'll be too soon...
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7598 a592a061-630c-0410-9148-cb99ea01b6c8
2003-08-23 00:17:00 +00:00
Angus Leeming
0d4d71dfe6 Finish the migration from namespace grfx to lyx::graphics.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7334 a592a061-630c-0410-9148-cb99ea01b6c8
2003-07-21 21:30:57 +00:00
Lars Gullik Bjønnes
fe390e9da1 namespace grfx -> lyx::graphics
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7239 a592a061-630c-0410-9148-cb99ea01b6c8
2003-07-04 08:23:23 +00:00
Lars Gullik Bjønnes
92d522b7f1 introduce namespace lyx::support
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7224 a592a061-630c-0410-9148-cb99ea01b6c8
2003-06-30 23:56:22 +00:00
Angus Leeming
282037a2bc Move warning message inside the !success block.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6262 a592a061-630c-0410-9148-cb99ea01b6c8
2003-02-25 16:58:57 +00:00
Lars Gullik Bjønnes
99d1627a47 dont use pragma impementation and interface anymore
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6138 a592a061-630c-0410-9148-cb99ea01b6c8
2003-02-13 16:53:15 +00:00
Angus Leeming
1106989d36 Re-define the catch-all conversion format from XPM to PPM, although
personally I'm still of the opinion that people too lazy to define
their own get what they deserve ;-)


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5947 a592a061-630c-0410-9148-cb99ea01b6c8
2003-01-13 23:03:48 +00:00
Lars Gullik Bjønnes
53274e31ec the string -> char patch
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5725 a592a061-630c-0410-9148-cb99ea01b6c8
2002-11-27 10:30:28 +00:00
Angus Leeming
ab1aef2187 Graphics debug message: unable to convert from ABC to XYZ.
That should help diagnosis...


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5444 a592a061-630c-0410-9148-cb99ea01b6c8
2002-10-18 14:35:42 +00:00
Angus Leeming
1eb8155fa0 This file is part of LyX, the document processor.
Licence details can be found in the file COPYING.

and thank God for sed.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5211 a592a061-630c-0410-9148-cb99ea01b6c8
2002-09-05 15:14:23 +00:00
Angus Leeming
6fac1dc980 Really dull and boring header shit
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5210 a592a061-630c-0410-9148-cb99ea01b6c8
2002-09-05 14:10:50 +00:00
Angus Leeming
3aa7e91a82 Modify the headers of files in src/graphics as discussed on the list.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5206 a592a061-630c-0410-9148-cb99ea01b6c8
2002-09-05 11:31:30 +00:00
Jean-Marc Lasgouttes
78c894f8ab configure script fixes; compile fix
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4706 a592a061-630c-0410-9148-cb99ea01b6c8
2002-07-18 21:24:47 +00:00
Angus Leeming
6206e59009 File monitoring is Go!
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4703 a592a061-630c-0410-9148-cb99ea01b6c8
2002-07-18 14:01:42 +00:00
Angus Leeming
ddb684f332 Disable direct loading of PostScript files by the xforms image loader.
Apply Herbert's patch removing special casing to deal with rogue PostScript
files.
Fix a few more comments.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4693 a592a061-630c-0410-9148-cb99ea01b6c8
2002-07-17 17:55:21 +00:00
Angus Leeming
f643df79a8 * Make the graphics files conform strictly to the Pimpl idiom by moving
the boost::signals into the relevant Impl classes and creating new,
publicly-accessible connect() methods.
* Const-ify all publicly-accessible methods, reflecting the fact that each
class contains only a const pimpl_ member variable.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4687 a592a061-630c-0410-9148-cb99ea01b6c8
2002-07-17 16:56:42 +00:00
Angus Leeming
a674f70d4a Pedantic change of email only.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4637 a592a061-630c-0410-9148-cb99ea01b6c8
2002-07-15 10:19:45 +00:00
Angus Leeming
888532c465 Asymptotic approach to a well-designed graphics loader.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4502 a592a061-630c-0410-9148-cb99ea01b6c8
2002-06-28 11:22:56 +00:00
Angus Leeming
514156adbb * Split the graphics loader into a frontend and a backend.
* Add frontend code to generate and display the pixmap to InsetGraphics.
* Add (much simpler) frontend code to the LyXScreen to show the splash screen
once more.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4480 a592a061-630c-0410-9148-cb99ea01b6c8
2002-06-25 15:59:10 +00:00
John Levon
481937ef95 Herbert's graphics diff
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4423 a592a061-630c-0410-9148-cb99ea01b6c8
2002-06-18 20:47:49 +00:00
Lars Gullik Bjønnes
1e39473100 Switch from SigC signals to boost::signals
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4281 a592a061-630c-0410-9148-cb99ea01b6c8
2002-05-29 16:21:03 +00:00
André Pönitz
551e3864c6 move inset related stuff from src/graphics to src/inset/
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4247 a592a061-630c-0410-9148-cb99ea01b6c8
2002-05-28 11:50:04 +00:00
Angus Leeming
48f5aa9517 Remove the Alert popups from the graphics cache.
Sometimes, these Alerts are displayed with only part of the background
greyed out, which smacks of "wierd xforms bug".

I can obtain this when loading a buffer from the command line "lyx buffer.lyx".
It appears that xforms isn't happy if the goodie is displayed before the
main window. Just a guess though...


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4007 a592a061-630c-0410-9148-cb99ea01b6c8
2002-04-16 12:43:42 +00:00
Angus Leeming
db1f26a781 I _think_ we had a reference to a temp object going out of scope. No more.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3986 a592a061-630c-0410-9148-cb99ea01b6c8
2002-04-12 14:08:00 +00:00
Angus Leeming
b95a56f37a (Herbert): discover the "Bounding Box" of non-(e)ps graphics files, and
use it in the graphics dialog.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3973 a592a061-630c-0410-9148-cb99ea01b6c8
2002-04-11 17:40:44 +00:00
Angus Leeming
ab6db13160 Remove string() as default argument to GraphicsParams c-tor.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3839 a592a061-630c-0410-9148-cb99ea01b6c8
2002-03-26 12:43:21 +00:00
Angus Leeming
d11fd01ce7 Don't launch that Alert if the graphics file isn't found. It doesn't work
properly for some reason and the message is displayed in the inset anyway.


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3836 a592a061-630c-0410-9148-cb99ea01b6c8
2002-03-26 12:14:23 +00:00
Lars Gullik Bjønnes
8283e978f8 ws cleanup
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3803 a592a061-630c-0410-9148-cb99ea01b6c8
2002-03-21 17:27:08 +00:00
Lars Gullik Bjønnes
b49f5ac419 doxy, ws and const change
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3718 a592a061-630c-0410-9148-cb99ea01b6c8
2002-03-11 22:58:05 +00:00
Angus Leeming
1bb8334771 if we can load direct without conversion, then do that.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3618 a592a061-630c-0410-9148-cb99ea01b6c8
2002-02-28 19:55:26 +00:00