- switch (loader_.status()) {
- case lyx::graphics::WaitingToLoad:
- return _("Not shown.");
- case lyx::graphics::Loading:
- return _("Loading...");
- case lyx::graphics::Converting:
- return _("Converting to loadable format...");
- case lyx::graphics::Loaded:
- return _("Loaded into memory. Must now generate pixmap.");
- case lyx::graphics::ScalingEtc:
- return _("Scaling etc...");
- case lyx::graphics::Ready:
- return _("Ready to display");
- case lyx::graphics::ErrorNoFile:
- return _("No file found!");
- case lyx::graphics::ErrorConverting:
- return _("Error converting to loadable format");
- case lyx::graphics::ErrorLoading:
- return _("Error loading file into memory");
- case lyx::graphics::ErrorGeneratingPixmap:
- return _("Error generating the pixmap");
- case lyx::graphics::ErrorUnknown:
- return _("No image");
+ if (!displayGraphic(params))
+ return _("Not shown.");
+
+ switch (status) {
+ case graphics::WaitingToLoad:
+ return _("Not shown.");
+ case graphics::Loading:
+ return _("Loading...");
+ case graphics::Converting:
+ return _("Converting to loadable format...");
+ case graphics::Loaded:
+ return _("Loaded into memory. Generating pixmap...");
+ case graphics::ScalingEtc:
+ return _("Scaling etc...");
+ case graphics::Ready:
+ return _("Ready to display");
+ case graphics::ErrorNoFile:
+ return _("No file found!");
+ case graphics::ErrorConverting:
+ return _("Error converting to loadable format");
+ case graphics::ErrorLoading:
+ return _("Error loading file into memory");
+ case graphics::ErrorGeneratingPixmap:
+ return _("Error generating the pixmap");
+ case graphics::ErrorUnknown:
+ return _("No image");