}
-bool Format::hasExtension(string const & e) const
+bool Format::hasExtension(string const & ext) const
{
- return (find(extension_list_.begin(), extension_list_.end(), e)
+ return (find(extension_list_.begin(), extension_list_.end(), ext)
!= extension_list_.end());
}
} else if (stamp == "\377\330") {
format = "jpg";
+ } else if (prefixIs(str, "\x89PNG")) {
+ format = "png";
+
} else if (stamp == "\001\332") {
format = "sgi";
+
} else if (prefixIs(str, binEPSStamp)) {
format = "eps";
else if (contains(str, " EMF"))
format = "emf";
- else if (contains(str, "PNG"))
- format = "png";
-
else if (contains(str, "%!PS-Adobe")) {
// eps or ps
ifs >> str;
// by the caller (this should be "utility" code)
Alert::error(_("Cannot view file"),
bformat(_("No information for viewing %1$s"),
- prettyName(format_name)));
+ translateIfPossible(prettyName(format_name))));
return false;
}
// viewer is 'auto'
// be done by the caller (this should be "utility" code)
Alert::error(_("Cannot edit file"),
bformat(_("No information for editing %1$s"),
- prettyName(format_name)));
+ translateIfPossible(prettyName(format_name))));
return false;
}