X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Flyx_cb.C;h=1306b2bddf820c18679e0b00ff5d432af49597ff;hb=00d24ec87650e4ac7db77ad54cb4aa2f688100f3;hp=dc73658688abe5de12ebcae5af6b1358c1f46de4;hpb=76ef051b1cb1fb51c3ffd8ccc9105be4471e74d4;p=lyx.git diff --git a/src/lyx_cb.C b/src/lyx_cb.C index dc73658688..1306b2bddf 100644 --- a/src/lyx_cb.C +++ b/src/lyx_cb.C @@ -15,23 +15,25 @@ #include #include -#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" @@ -63,15 +65,15 @@ extern bool finished; // all cleanup done just let it run through now. During the lock, all button and keyboard events will be modified and send to the inset through the following inset-features. Note that - Inset::InsetUnlock will be called from inside UnlockInset. It is meant + Inset::insetUnlock will be called from inside UnlockInset. It is meant to contain the code for restoring the menus and things like this. - virtual void InsetButtonPress(int x, int y, int button); - virtual void InsetButtonRelease(int x, int y, int button); - virtual void InsetKeyPress(XKeyEvent *ev); - virtual void InsetMotionNotify(int x, int y, int state); - virtual void InsetUnlock(); + virtual void insetButtonPress(int x, int y, int button); + virtual void insetButtonRelease(int x, int y, int button); + virtual void insetKeyPress(XKeyEvent *ev); + virtual void insetMotionNotify(int x, int y, int state); + virtual void insetUnlock(); If a inset wishes any redraw and/or update it just has to call UpdateInset(this). @@ -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(); @@ -280,7 +282,7 @@ void QuitLyX() lyxerr[Debug::INFO] << "Running QuitLyX." << endl; if (lyxrc.use_gui) { - if (!bufferlist.QwriteAll()) + if (!bufferlist.qwriteAll()) return; lastfiles->writeFile(lyxrc.lastfiles); @@ -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(); }