- 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. Must now generate 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");
+ docstring ret;
+
+ if (!displayGraphic(params))
+ ret = _("Not shown.");
+ else {
+ switch (status) {
+ case graphics::WaitingToLoad:
+ ret = _("Not shown.");
+ break;
+ case graphics::Loading:
+ ret = _("Loading...");
+ break;
+ case graphics::Converting:
+ ret = _("Converting to loadable format...");
+ break;
+ case graphics::Loaded:
+ ret = _("Loaded into memory. Generating pixmap...");
+ break;
+ case graphics::ScalingEtc:
+ ret = _("Scaling etc...");
+ break;
+ case graphics::Ready:
+ ret = _("Ready to display");
+ break;
+ case graphics::ErrorNoFile:
+ ret = _("No file found!");
+ break;
+ case graphics::ErrorConverting:
+ ret = _("Error converting to loadable format");
+ break;
+ case graphics::ErrorLoading:
+ ret = _("Error loading file into memory");
+ break;
+ case graphics::ErrorGeneratingPixmap:
+ ret = _("Error generating the pixmap");
+ break;
+ case graphics::ErrorUnknown:
+ ret = _("No image");
+ break;
+ }