]> git.lyx.org Git - lyx.git/blobdiff - src/Format.cpp
Update it.po
[lyx.git] / src / Format.cpp
index e6ad5962d523d3850bd8025645c3c15b855d694b..a99125ef94a720ee9888834f0b4fcbae02abd038 100644 (file)
@@ -24,6 +24,7 @@
 #include "support/lstrings.h"
 #include "support/os.h"
 #include "support/Systemcall.h"
+#include "support/textutils.h"
 
 #include <algorithm>
 
@@ -102,7 +103,7 @@ bool Format::isChildFormat() const
 {
        if (name_.empty())
                return false;
-       return isdigit(name_[name_.length() - 1]);
+       return isDigitASCII(name_[name_.length() - 1]);
 }
 
 
@@ -318,14 +319,9 @@ bool Formats::view(Buffer const & buffer, FileName const & filename,
        buffer.message(_("Executing command: ") + from_utf8(command));
 
        Systemcall one;
-       int const res = one.startscript(Systemcall::DontWait, command);
+       one.startscript(Systemcall::DontWait, command);
 
-       if (res) {
-               Alert::error(_("Cannot view file"),
-                            bformat(_("An error occurred whilst running %1$s"),
-                              makeDisplayPath(command, 50)));
-               return false;
-       }
+       // we can't report any sort of error, since we aren't waiting
        return true;
 }
 
@@ -364,7 +360,7 @@ bool Formats::edit(Buffer const & buffer, FileName const & filename,
                                prettyName(format_name)));
                return false;
        }
-       
+
        // editor is 'auto'
        if (format->editor() == "auto") {
                if (os::autoOpenFile(filename.absFileName(), os::EDIT))
@@ -390,14 +386,9 @@ bool Formats::edit(Buffer const & buffer, FileName const & filename,
        buffer.message(_("Executing command: ") + from_utf8(command));
 
        Systemcall one;
-       int const res = one.startscript(Systemcall::DontWait, command);
+       one.startscript(Systemcall::DontWait, command);
 
-       if (res) {
-               Alert::error(_("Cannot edit file"),
-                            bformat(_("An error occurred whilst running %1$s"),
-                              makeDisplayPath(command, 50)));
-               return false;
-       }
+       // we can't report any sort of error, since we aren't waiting
        return true;
 }