} // namespace anon
-
+
namespace grfx {
GConverter & GConverter::get()
static GConverter singleton;
return singleton;
}
-
+
bool GConverter::isReachable(string const & from_format_name,
string const & to_format_name) const
on_finish->emit(string());
return;
}
-
+
fs << script.str().c_str();
fs.close();
// Launch the conversion process.
ConvProcessPtr shared_ptr;
- shared_ptr.reset(new ConvProcess(script_file, script_command,
+ shared_ptr.reset(new ConvProcess(script_file, script_command,
to_file, on_finish));
all_processes_.push_back(shared_ptr);
}
namespace {
typedef boost::shared_ptr<ConvProcess> ConvProcessPtr;
-
+
class Find_Ptr {
public:
Find_Ptr(ConvProcess * ptr) : ptr_(ptr) {}
};
} // namespace anon
-
+
void GConverter::erase(ConvProcess * process)
{
}
-bool GConverter::build_script(string const & from_file,
+bool GConverter::build_script(string const & from_file,
string const & to_file_base,
string const & from_format,
string const & to_format,
// Store in the shell script
script << "\n" << command << "\n\n";
- // Test that this was successful. If not, remove
+ // Test that this was successful. If not, remove
// ${outfile} and exit the shell script
script << "if [ $? -ne 0 ]; then\n"
<< "\t'rm' -f ${outfile}\n"
}
-ConvProcess::ConvProcess(string const & script_file,
+ConvProcess::ConvProcess(string const & script_file,
string const & script_command,
string const & to_file, SignalTypePtr on_finish)
: script_file_(script_file), to_file_(to_file), on_finish_(on_finish)
Forkedcall::SignalTypePtr convert_ptr;
convert_ptr.reset(new Forkedcall::SignalType);
- convert_ptr->connect(SigC::slot(this, &ConvProcess::converted));
+ convert_ptr->connect(SigC::slot(this, &ConvProcess::converted));
Forkedcall call;
int retval = call.startscript(script_command, convert_ptr);
}
-void ConvProcess::converted(string /* cmd */, pid_t /* pid */, int retval)
+void ConvProcess::converted(string const &/* cmd */,
+ pid_t /* pid */, int retval)
{
// Clean-up behind ourselves
lyx::unlink(script_file_);