]> git.lyx.org Git - features.git/commitdiff
remove init_graphics()
authorJohn Levon <levon@movementarian.org>
Fri, 12 Jul 2002 16:26:25 +0000 (16:26 +0000)
committerJohn Levon <levon@movementarian.org>
Fri, 12 Jul 2002 16:26:25 +0000 (16:26 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4627 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/ChangeLog
src/frontends/lyx_gui.h
src/frontends/qt2/ChangeLog
src/frontends/qt2/lyx_gui.C
src/frontends/xforms/ChangeLog
src/frontends/xforms/lyx_gui.C
src/graphics/ChangeLog
src/graphics/GraphicsCache.C

index 62e7cce35d3467221c998af2ee697dd74c58c65d..b132925deb2754e0cd374fb66234e5718ce3877f 100644 (file)
@@ -1,3 +1,7 @@
+2002-07-12  John Levon  <moz@compsoc.man.ac.uk>
+
+       * lyx_gui.h: remove init_graphics()
 2002-07-12  John Levon  <moz@compsoc.man.ac.uk>
 
        * Toolbar.h:
index 4da6f3dc390c5af2c05e7e5b4cee364869bbddf4..d4f0c03e4528401ab5aabd97fefaad910bc3b490 100644 (file)
@@ -35,9 +35,6 @@ namespace lyx_gui {
         */
        void start(string const & batch, std::vector<std::string> files);
 
-       /// initialise graphics
-       void init_graphics();
-
        /** Eg, passing LColor::black returns "000000",
         *      passing LColor::white returns "ffffff".
         */
index 2e09439f898b2fa48f7f3641f1fb2a63d017da52..02d9e8989649c603fff2d96a5283e622f9139bfa 100644 (file)
@@ -1,3 +1,7 @@
+2002-07-12  John Levon  <moz@compsoc.man.ac.uk>
+
+       * lyx_gui.C: move init_graphics() to parse_init()
 2002-07-12  John Levon  <moz@compsoc.man.ac.uk>
 
        * Toolbar_pimpl.h:
index b318a1f3a0eb2f3da059636d50021a855f1574c6..5ca81241ccbf8571c92026d3fab3fdc51c5ff1c5 100644 (file)
@@ -58,6 +58,11 @@ LyXServer * lyxserver;
 void lyx_gui::parse_init(int & argc, char * argv[])
 {
        static QApplication a(argc, argv);
+       using namespace grfx;
+
+       Image::newImage = boost::bind(&QLImage::newImage);
+       Image::loadableFormats = boost::bind(&QLImage::loadableFormats);
 }
  
 
@@ -114,15 +119,6 @@ void lyx_gui::start(string const & batch, vector<string> files)
 }
  
  
-void lyx_gui::init_graphics()
-{
-       using namespace grfx;
-
-       Image::newImage = boost::bind(&QLImage::newImage);
-       Image::loadableFormats = boost::bind(&QLImage::loadableFormats);
-}
-
-
 string const lyx_gui::hexname(LColor::color col)
 {
        // FIXME
index d113246a5ccd019a706ed136e9e25f5c7a6174f4..84c084ccbb53547d671e16e90d498622db6da26e 100644 (file)
@@ -1,3 +1,7 @@
+2002-07-12  John Levon  <moz@compsoc.man.ac.uk>
+
+       * lyx_gui.C: move init_graphics() into setup
 2002-07-12  Angus Leeming  <leeming@lyx.org>
 
        * xformsImage.C (width): apply fudge irrespective of library version.
index 7eaaf8f3b108cdcc7b3b7224a759140f194b24de..67c55eede8d6fec5571650438a77afecd48a7f1d 100644 (file)
@@ -152,6 +152,18 @@ void lyx_gui::parse_init(int & argc, char * argv[])
        XSetErrorHandler(LyX_XErrHandler);
 
        lyxColorHandler.reset(new LyXColorHandler());
+       using namespace grfx;
+
+#ifdef USE_XFORMS_IMAGE_LOADER
+       // connect the image loader based on the xforms library
+       Image::newImage = boost::bind(&xformsImage::newImage);
+       Image::loadableFormats = boost::bind(&xformsImage::loadableFormats);
+#else
+       // connect the image loader based on the XPM library
+       Image::newImage = boost::bind(&ImageXPM::newImage);
+       Image::loadableFormats = boost::bind(&ImageXPM::loadableFormats);
+#endif
 }
 
 
@@ -297,24 +309,6 @@ void lyx_gui::start(string const & batch, vector<string> files)
 }
 
 
-// Called by the graphics cache to connect the appropriate frontend
-// image loading routines to the LyX kernel.
-void lyx_gui::init_graphics()
-{
-       using namespace grfx;
-
-#ifdef USE_XFORMS_IMAGE_LOADER
-       // connect the image loader based on the xforms library
-       Image::newImage = boost::bind(&xformsImage::newImage);
-       Image::loadableFormats = boost::bind(&xformsImage::loadableFormats);
-#else
-       // connect the image loader based on the XPM library
-       Image::newImage = boost::bind(&ImageXPM::newImage);
-       Image::loadableFormats = boost::bind(&ImageXPM::loadableFormats);
-#endif
-}
-
-
 string const lyx_gui::hexname(LColor::color col)
 {
        string const name = lcolor.getX11Name(col);
index 1a1d6c2f04787ab419068bf991d6a020ca4b2015..23cf06e79046f6c04aaa97b0b0be443f2eb1b375 100644 (file)
@@ -1,3 +1,7 @@
+2002-07-12  John Levon  <moz@compsoc.man.ac.uk>
+
+       * GraphicsCache.C: remove init_graphics()
 2002-07-09  Angus Leeming  <leeming@lyx.org>
 
        * PreviewLoader.C (setAscentFractions): fix bug due to use of integer
index f56c3ae4ee123caea8c570755db1fe3a85177b1d..12ddc91dff3533020431fe3e0a24fa3ff7391322 100644 (file)
@@ -40,12 +40,6 @@ struct Cache::Impl {
        
 Cache & Cache::get()
 {
-       static bool start = true;
-       if (start) {
-               start = false;
-               lyx_gui::init_graphics();
-       }
-
        // Now return the cache
        static Cache singleton;
        return singleton;