]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/xforms/lyx_gui.C
Change glob() API to accept a dir parameter.
[lyx.git] / src / frontends / xforms / lyx_gui.C
index c9c27233e3073e121c2542af7b3bc23cb8c2a955..de220cdc583e3b7f6abef03ce04cbd5985785b1a 100644 (file)
 
 #include <boost/bind.hpp>
 
-#include "support/std_sstream.h"
-#include <iomanip>
 #include <fcntl.h>
 
+#include <sstream>
+#include <iomanip>
+
 using lyx::support::AddName;
 using lyx::support::user_lyxdir;
 
@@ -303,10 +304,8 @@ void start(string const & batch, vector<string> const & files)
        lyxsocket = new LyXServerSocket(&view->getLyXFunc(),
                          os::slashify_path(os::getTmpDir() + "/lyxsocket"));
 
-       vector<string>::const_iterator cit = files.begin();
-       vector<string>::const_iterator end = files.end();
-       for (; cit != end; ++cit)
-               view->view()->loadLyXFile(*cit, true);
+       for_each(files.begin(), files.end(),
+               bind(&BufferView::loadLyXFile, view->view(), _1, true));
 
        // handle the batch commands the user asked for
        if (!batch.empty())
@@ -357,9 +356,9 @@ string const hexname(LColor_color col)
                lyxerr << "X can't find color for \"" << lcolor.getLyXName(col)
                       << '"' << endl;
                return string();
-        }
+       }
 
-        ostringstream os;
+       ostringstream os;
 
        os << setbase(16) << setfill('0')
           << setw(2) << r
@@ -388,28 +387,6 @@ bool font_available(LyXFont const & font)
        return fontloader.available(font);
 }
 
-namespace {
-
-extern "C"
-void C_read_callback(int, void * data)
-{
-       LyXComm * comm = static_cast<LyXComm *>(data);
-       comm->read_ready();
-}
-
-}
-
-
-void set_read_callback(int fd, LyXComm * comm)
-{
-       fl_add_io_callback(fd, FL_READ, C_read_callback, comm);
-}
-
-void remove_read_callback(int fd)
-{
-       fl_remove_io_callback(fd, FL_READ, C_read_callback);
-}
-
 
 namespace {