*/
#include <config.h>
-#include <gtkmm.h>
#include "lyx_gui.h"
-#include "support/lyxlib.h"
-#include "support/os.h"
-#include "support/filetools.h"
-#include "support/path_defines.h"
-
#include "debug.h"
#include "funcrequest.h"
#include "gettext.h"
#include "xftFontLoader.h"
#include "GWorkArea.h"
-#include "support/std_sstream.h"
-#include <iomanip>
-#include <fcntl.h>
-#include <boost/bind.hpp>
-#include <boost/function.hpp>
-#include <boost/shared_ptr.hpp>
-
//just for xforms
#include "lyx_forms.h"
#include "xformsImage.h"
#include "xforms_helpers.h"
+#include "support/lyxlib.h"
+#include "support/os.h"
+#include "support/filetools.h"
+#include "support/path_defines.h"
+
+#include <gtkmm.h>
+
+#include <boost/bind.hpp>
+#include <boost/function.hpp>
+#include <boost/shared_ptr.hpp>
+
+#include <fcntl.h>
+
+#include <sstream>
+#include <iomanip>
+
namespace os = lyx::support::os;
using std::ostringstream;
view.show();
view.init();
- // FIXME: some code below needs moving
+ // FIXME: server code below needs moving
lyxserver = new LyXServer(&view.getLyXFunc(), lyxrc.lyxpipes);
lyxsocket = new LyXServerSocket(&view.getLyXFunc(),
os::slashify_path(os::getTmpDir() + "/lyxsocket"));
- std::vector<string>::const_iterator cit = files.begin();
- std::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()) {
}
-FuncStatus lyx_gui::getStatus(FuncRequest const & /*ev*/)
+FuncStatus lyx_gui::getStatus(FuncRequest const & ev)
{
- // Nothing interesting to do here
- return FuncStatus();
+ FuncStatus flag;
+ switch (ev.action) {
+ // Add this back if the gtk doc prefs dialog includes preamble - jcs
+ /*case LFUN_DIALOG_SHOW:
+ if (ev.argument == "preamble")
+ flag.unknown(true);
+ break;*/
+ case LFUN_TOOLTIPS_TOGGLE:
+ flag.unknown(true);
+ break;
+ default:
+ break;
+ }
+
+ return flag;
}