]> git.lyx.org Git - lyx.git/blobdiff - src/lyx_cb.C
Fix crash when running lyx -dbg insets -e ...
[lyx.git] / src / lyx_cb.C
index 8390461d15083d16a52c1173f6e8fe6ce712a7d7..c8b5566d2a8b57dace66d87d5ea0578e5b02e0ec 100644 (file)
@@ -15,8 +15,6 @@
 #include <utility> 
 #include <iostream>
 
-#include FORMS_H_LOCATION
-
 #include "lyx_cb.h"
 #include "lyx_gui_misc.h"
 #include "lyx_main.h"
@@ -27,6 +25,7 @@
 #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"
@@ -134,7 +133,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 +471,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 +519,7 @@ void MenuInsertLabel(BufferView * bv, string const & arg)
                InsetLabel * inset = new InsetLabel( p );
                bv->insertInset( inset );
        }
-       AllowInput(bv);
+       bv->owner()->allowInput();
 }