]> git.lyx.org Git - lyx.git/blobdiff - src/lyx_cb.C
Herbert's patch, part 1
[lyx.git] / src / lyx_cb.C
index 8390461d15083d16a52c1173f6e8fe6ce712a7d7..1306b2bddf820c18679e0b00ff5d432af49597ff 100644 (file)
 #include <utility> 
 #include <iostream>
 
-#include FORMS_H_LOCATION
-
 #include "lyx_cb.h"
 #include "lyx_gui_misc.h"
 #include "lyx_main.h"
+#include "buffer.h"
 #include "bufferlist.h"
 #include "bufferview_funcs.h"
+#include "debug.h"
 #include "lastfiles.h"
 #include "LyXView.h"
 #include "lyxrc.h"
 #include "lyxtext.h"
 #include "frontends/FileDialog.h"
+#include "frontends/GUIRunTime.h"
 #include "insets/insetlabel.h"
 #include "support/FileInfo.h"
 #include "support/filetools.h"
 #include "support/path.h"
 #include "support/syscall.h"
+#include "support/lstrings.h"
 #include "gettext.h"
 #include "BufferView.h"
 
@@ -134,7 +136,7 @@ void ShowMessage(Buffer const * buf,
 bool MenuWrite(BufferView * bv, Buffer * buffer)
 {
        // FIXME: needed ?
-       XFlush(fl_get_display());
+       XFlush(GUIRunTime::x11Display());
  
        if (!buffer->save()) {
                string const fname = buffer->fileName();
@@ -472,7 +474,7 @@ void InsertAsciiFile(BufferView * bv, string const & f, bool asParagraph)
 void MenuInsertLabel(BufferView * bv, string const & arg)
 {
        string label(arg);
-       ProhibitInput(bv);
+       bv->owner()->prohibitInput();
        if (label.empty()) {
                Paragraph * par = bv->text->cursor.par();
                LyXLayout const * layout =
@@ -520,7 +522,7 @@ void MenuInsertLabel(BufferView * bv, string const & arg)
                InsetLabel * inset = new InsetLabel( p );
                bv->insertInset( inset );
        }
-       AllowInput(bv);
+       bv->owner()->allowInput();
 }