remove init_graphics()

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4627 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
John Levon 2002-07-12 16:26:25 +00:00
parent f90e1e249f
commit d42a082c68
8 changed files with 33 additions and 36 deletions

View 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:

View 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".
*/

View 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:

View 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

View 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.

View 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);

View 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

View 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;