From ddb684f332750fef0ae2c6d6c32f4c120f30fdb4 Mon Sep 17 00:00:00 2001 From: Angus Leeming Date: Wed, 17 Jul 2002 17:55:21 +0000 Subject: [PATCH] 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 --- src/frontends/xforms/ChangeLog | 4 ++++ src/frontends/xforms/xformsImage.C | 5 ++++- src/graphics/ChangeLog | 6 ++++++ src/graphics/GraphicsCacheItem.C | 12 ++---------- src/graphics/GraphicsLoader.h | 7 ++++--- src/graphics/GraphicsParams.h | 2 +- src/graphics/Makefile.am | 2 ++ src/graphics/PreviewLoader.h | 4 ++-- src/insets/ChangeLog | 5 +++++ 9 files changed, 30 insertions(+), 17 deletions(-) diff --git a/src/frontends/xforms/ChangeLog b/src/frontends/xforms/ChangeLog index 88d029c1ed..8ba656bbb6 100644 --- a/src/frontends/xforms/ChangeLog +++ b/src/frontends/xforms/ChangeLog @@ -1,3 +1,7 @@ +2002-07-17 Angus Leeming + + * xformsImage.C (init_graphics): disable direct loading of PostScript + files. It's more effort than it's worth. 2002-07-17 André Pönitz diff --git a/src/frontends/xforms/xformsImage.C b/src/frontends/xforms/xformsImage.C index 63f82c3910..918a226ab6 100644 --- a/src/frontends/xforms/xformsImage.C +++ b/src/frontends/xforms/xformsImage.C @@ -423,7 +423,10 @@ void init_graphics() #ifdef HAVE_FLIMAGE_ENABLE_PS // xforms recognises PS but not EPS - flimage_enable_ps(); + // It dies horribly with lots of older PostScript files. + // Easiest, therefore, to disable PS support and insist that a PS-type + // file is converted to a bitmap format. + // flimage_enable_ps(); #endif flimage_enable_sgi(); diff --git a/src/graphics/ChangeLog b/src/graphics/ChangeLog index d0c5596ee5..1799ddb69e 100644 --- a/src/graphics/ChangeLog +++ b/src/graphics/ChangeLog @@ -1,3 +1,9 @@ +2002-06-17 Herbert Voss + + * GraphicsCachItem.C (findTargetFormat): remove the speciell case + for old ps-files (Garst). It's now handled by defining a converter and + disabling the ps-support of xforms. + 2002-07-17 Angus Leeming Be true to the Pimpl idiom, moving all signals into the respective diff --git a/src/graphics/GraphicsCacheItem.C b/src/graphics/GraphicsCacheItem.C index 9d839ff003..44dd44c867 100644 --- a/src/graphics/GraphicsCacheItem.C +++ b/src/graphics/GraphicsCacheItem.C @@ -293,16 +293,8 @@ void CacheItem::Impl::convertToDisplayFormat() } string from = getExtFromContents(filename); - // Some old ps-files make problems, so we do not need direct - // loading of an ps-file - if (from == "ps") { - lyxerr[Debug::GRAPHICS] - << "\n\tThe file contains PostScript format data.\n" - << "\tchanging it to eps-format to get it converted to xpm\n"; - from = "eps"; - } else - lyxerr[Debug::GRAPHICS] - << "\n\tThe file contains " << from << " format data." << endl; + lyxerr[Debug::GRAPHICS] + << "\n\tThe file contains " << from << " format data." << endl; string const to = findTargetFormat(from); if (from == to) { diff --git a/src/graphics/GraphicsLoader.h b/src/graphics/GraphicsLoader.h index 08f30fa69a..f0959daf73 100644 --- a/src/graphics/GraphicsLoader.h +++ b/src/graphics/GraphicsLoader.h @@ -11,9 +11,10 @@ * * The user supplies an image file and the display parameters. * * He can change the file or the display parameters through a reset() method. * * He must start the loading process explicitly with startLoading(). - * * He receives a statusChanged signal when the loading status changes. - * * When (status() == Ready), he uses image() to access the loaded image - * and passes it to the Painter. + * * If he is connected through the connect() method, then he'll be informed + * when the loading status changes. + * * When (status() == Ready), he can use image() to access the loaded image + * and pass it to the Painter. * * What could be simpler? */ diff --git a/src/graphics/GraphicsParams.h b/src/graphics/GraphicsParams.h index e1e3f4d1ed..611fe99598 100644 --- a/src/graphics/GraphicsParams.h +++ b/src/graphics/GraphicsParams.h @@ -6,7 +6,7 @@ * * \author Angus Leeming * - * Used internally by the GraphicsCache. + * Used internally by the grfx::Image. */ #ifndef GRAPHICSPARAMS_H diff --git a/src/graphics/Makefile.am b/src/graphics/Makefile.am index 01e377553e..e1b3bb77ec 100644 --- a/src/graphics/Makefile.am +++ b/src/graphics/Makefile.am @@ -11,6 +11,8 @@ GRAPHICSIMAGEXPM = GraphicsImageXPM.C GraphicsImageXPM.h endif libgraphics_la_SOURCES = \ + FileMonitor.h \ + FileMonitor.C \ GraphicsCache.h \ GraphicsCache.C \ GraphicsCacheItem.h \ diff --git a/src/graphics/PreviewLoader.h b/src/graphics/PreviewLoader.h index edad57b640..82947e2ac4 100644 --- a/src/graphics/PreviewLoader.h +++ b/src/graphics/PreviewLoader.h @@ -9,8 +9,8 @@ * grfx::PreviewLoader collects latex snippets together. Then, on a * startLoading() call, these are dumped to file and processed, converting * each snippet to a separate bitmap image file. Once a bitmap file is ready - * to be loaded back into LyX, the PreviewLoader emits a readyToDisplay signal - * to inform the initiating process. + * to be loaded back into LyX, the PreviewLoader emits a signal to inform + * the initiating process. */ #ifndef PREVIEWLOADER_H diff --git a/src/insets/ChangeLog b/src/insets/ChangeLog index 818baa2e5a..baf2e83933 100644 --- a/src/insets/ChangeLog +++ b/src/insets/ChangeLog @@ -1,3 +1,8 @@ +2002-07-17 Angus Leeming + + * insetgraphics.C (Cache c-tor): bind to the GraphicsLoader through + a method rather than to the signal directly. + 2002-07-17 John Levon * insettext.C: use view_state_changed, switchKeyMap -- 2.39.5