#include "LyXRC.h"
#include "debug.h"
#include "gettext.h"
-#include "LyXServerSocket.h"
+#include "ServerSocket.h"
#include "frontends/Application.h"
#include "frontends/alert.h" //to be removed?
#include <boost/filesystem/operations.hpp>
+using std::find_if;
+using std::string;
+using std::distance;
+
namespace lyx {
using support::Systemcall;
using support::token;
-using std::string;
-using std::distance;
-
namespace Alert = frontend::Alert;
namespace fs = boost::filesystem;
namespace os = support::os;
Format::Format(string const & n, string const & e, string const & p,
string const & s, string const & v, string const & ed,
- int flags)
+ int flags)
: name_(n), extension_(e), prettyname_(p), shortcut_(s), viewer_(v),
editor_(ed), flags_(flags)
{}
void Formats::add(string const & name, string const & extension,
string const & prettyname, string const & shortcut,
- string const & viewer, string const & editor,
- int flags)
+ string const & viewer, string const & editor,
+ int flags)
{
FormatList::iterator it =
find_if(formatlist.begin(), formatlist.end(),
FormatNamesEqual(name));
if (it == formatlist.end())
formatlist.push_back(Format(name, extension, prettyname,
- shortcut, viewer, editor, flags));
+ shortcut, viewer, editor, flags));
else
*it = Format(name, extension, prettyname, shortcut, viewer,
editor, flags);
command = subst(command, token_from_format, quoteName(filename.toFilesystemEncoding()));
command = subst(command, token_path_format, quoteName(onlyPath(filename.toFilesystemEncoding())));
- command = subst(command, token_socket_format, quoteName(theLyXServerSocket().address()));
+ command = subst(command, token_socket_format, quoteName(theServerSocket().address()));
LYXERR(Debug::FILES) << "Executing command: " << command << std::endl;
// FIXME UNICODE utf8 can be wrong for files
buffer.message(_("Executing command: ") + from_utf8(command));
command = subst(command, token_from_format, quoteName(filename.toFilesystemEncoding()));
command = subst(command, token_path_format, quoteName(onlyPath(filename.toFilesystemEncoding())));
- command = subst(command, token_socket_format, quoteName(theLyXServerSocket().address()));
+ command = subst(command, token_socket_format, quoteName(theServerSocket().address()));
LYXERR(Debug::FILES) << "Executing command: " << command << std::endl;
// FIXME UNICODE utf8 can be wrong for files
buffer.message(_("Executing command: ") + from_utf8(command));