mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-10 20:04:46 +00:00
call message more directly
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1951 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
6b95441288
commit
ec57ed1e96
@ -33,7 +33,6 @@
|
|||||||
#include "support/lyxfunctional.h" //equal_1st_in_pair
|
#include "support/lyxfunctional.h" //equal_1st_in_pair
|
||||||
#include "language.h"
|
#include "language.h"
|
||||||
#include "gettext.h"
|
#include "gettext.h"
|
||||||
#include "lyxfunc.h"
|
|
||||||
|
|
||||||
extern BufferList bufferlist;
|
extern BufferList bufferlist;
|
||||||
|
|
||||||
@ -425,8 +424,7 @@ void BufferView::insertNote()
|
|||||||
void BufferView::openStuff()
|
void BufferView::openStuff()
|
||||||
{
|
{
|
||||||
if (available()) {
|
if (available()) {
|
||||||
owner()->getLyXFunc()->Dispatch(LFUN_MESSAGE,
|
owner()->message(_("Open/Close..."));
|
||||||
_("Open/Close..."));
|
|
||||||
hideCursor();
|
hideCursor();
|
||||||
beforeChange(text);
|
beforeChange(text);
|
||||||
update(text, BufferView::SELECT|BufferView::FITCUR);
|
update(text, BufferView::SELECT|BufferView::FITCUR);
|
||||||
@ -440,8 +438,7 @@ void BufferView::openStuff()
|
|||||||
void BufferView::toggleFloat()
|
void BufferView::toggleFloat()
|
||||||
{
|
{
|
||||||
if (available()) {
|
if (available()) {
|
||||||
owner()->getLyXFunc()->Dispatch(LFUN_MESSAGE,
|
owner()->message(_("Open/Close..."));
|
||||||
_("Open/Close..."));
|
|
||||||
hideCursor();
|
hideCursor();
|
||||||
beforeChange(text);
|
beforeChange(text);
|
||||||
update(text, BufferView::SELECT|BufferView::FITCUR);
|
update(text, BufferView::SELECT|BufferView::FITCUR);
|
||||||
@ -455,13 +452,12 @@ void BufferView::toggleFloat()
|
|||||||
void BufferView::menuUndo()
|
void BufferView::menuUndo()
|
||||||
{
|
{
|
||||||
if (available()) {
|
if (available()) {
|
||||||
owner()->getLyXFunc()->Dispatch(LFUN_MESSAGE, _("Undo"));
|
owner()->message(_("Undo"));
|
||||||
hideCursor();
|
hideCursor();
|
||||||
beforeChange(text);
|
beforeChange(text);
|
||||||
update(text, BufferView::SELECT|BufferView::FITCUR);
|
update(text, BufferView::SELECT|BufferView::FITCUR);
|
||||||
if (!text->TextUndo(this))
|
if (!text->TextUndo(this))
|
||||||
owner()->getLyXFunc()->Dispatch(LFUN_MESSAGE,
|
owner()->message(_("No forther undo information"));
|
||||||
_("No forther undo information"));
|
|
||||||
else
|
else
|
||||||
update(text, BufferView::SELECT|BufferView::FITCUR|BufferView::CHANGE);
|
update(text, BufferView::SELECT|BufferView::FITCUR|BufferView::CHANGE);
|
||||||
setState();
|
setState();
|
||||||
@ -472,20 +468,17 @@ void BufferView::menuUndo()
|
|||||||
void BufferView::menuRedo()
|
void BufferView::menuRedo()
|
||||||
{
|
{
|
||||||
if (theLockingInset()) {
|
if (theLockingInset()) {
|
||||||
owner()->getLyXFunc()->Dispatch(LFUN_MESSAGE,
|
owner()->message(_("Redo not yet supported in math mode"));
|
||||||
_("Redo not yet supported in math mode"));
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (available()) {
|
if (available()) {
|
||||||
owner()->getLyXFunc()->Dispatch(LFUN_MESSAGE,
|
owner()->message(_("Redo"));
|
||||||
_("Redo"));
|
|
||||||
hideCursor();
|
hideCursor();
|
||||||
beforeChange(text);
|
beforeChange(text);
|
||||||
update(text, BufferView::SELECT|BufferView::FITCUR);
|
update(text, BufferView::SELECT|BufferView::FITCUR);
|
||||||
if (!text->TextRedo(this))
|
if (!text->TextRedo(this))
|
||||||
owner()->getLyXFunc()->Dispatch(LFUN_MESSAGE,
|
owner()->message(_("No further redo information"));
|
||||||
_("No further redo information"));
|
|
||||||
else
|
else
|
||||||
update(text, BufferView::SELECT|BufferView::FITCUR|BufferView::CHANGE);
|
update(text, BufferView::SELECT|BufferView::FITCUR|BufferView::CHANGE);
|
||||||
setState();
|
setState();
|
||||||
@ -586,8 +579,7 @@ void BufferView::copyEnvironment()
|
|||||||
toggleSelection();
|
toggleSelection();
|
||||||
text->ClearSelection(this);
|
text->ClearSelection(this);
|
||||||
update(text, BufferView::SELECT|BufferView::FITCUR);
|
update(text, BufferView::SELECT|BufferView::FITCUR);
|
||||||
owner()->getLyXFunc()->Dispatch(LFUN_MESSAGE,
|
owner()->message(_("Paragraph environment type copied"));
|
||||||
_("Paragraph environment type copied"));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -596,8 +588,7 @@ void BufferView::pasteEnvironment()
|
|||||||
{
|
{
|
||||||
if (available()) {
|
if (available()) {
|
||||||
text->pasteEnvironmentType(this);
|
text->pasteEnvironmentType(this);
|
||||||
owner()->getLyXFunc()->Dispatch(LFUN_MESSAGE,
|
owner()->message(_("Paragraph environment type set"));
|
||||||
_("Paragraph environment type set"));
|
|
||||||
update(text, BufferView::SELECT|BufferView::FITCUR|BufferView::CHANGE);
|
update(text, BufferView::SELECT|BufferView::FITCUR|BufferView::CHANGE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -611,7 +602,7 @@ void BufferView::copy()
|
|||||||
toggleSelection();
|
toggleSelection();
|
||||||
text->ClearSelection(this);
|
text->ClearSelection(this);
|
||||||
update(text, BufferView::SELECT|BufferView::FITCUR);
|
update(text, BufferView::SELECT|BufferView::FITCUR);
|
||||||
owner()->getLyXFunc()->Dispatch(LFUN_MESSAGE, _("Copy"));
|
owner()->message(_("Copy"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -622,7 +613,7 @@ void BufferView::cut()
|
|||||||
update(text, BufferView::SELECT|BufferView::FITCUR);
|
update(text, BufferView::SELECT|BufferView::FITCUR);
|
||||||
text->CutSelection(this);
|
text->CutSelection(this);
|
||||||
update(text, BufferView::SELECT|BufferView::FITCUR|BufferView::CHANGE);
|
update(text, BufferView::SELECT|BufferView::FITCUR|BufferView::CHANGE);
|
||||||
owner()->getLyXFunc()->Dispatch(LFUN_MESSAGE, _("Cut"));
|
owner()->message(_("Cut"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -631,7 +622,7 @@ void BufferView::paste()
|
|||||||
{
|
{
|
||||||
if (!available()) return;
|
if (!available()) return;
|
||||||
|
|
||||||
owner()->getLyXFunc()->Dispatch(LFUN_MESSAGE, _("Paste"));
|
owner()->message(_("Paste"));
|
||||||
|
|
||||||
hideCursor();
|
hideCursor();
|
||||||
// clear the selection
|
// clear the selection
|
||||||
@ -677,14 +668,10 @@ void BufferView::gotoInset(std::vector<Inset::Code> const & codes,
|
|||||||
text->cursor.pos(0);
|
text->cursor.pos(0);
|
||||||
if (!text->GotoNextInset(this, codes, contents)) {
|
if (!text->GotoNextInset(this, codes, contents)) {
|
||||||
text->cursor = tmp;
|
text->cursor = tmp;
|
||||||
owner()->getLyXFunc()
|
owner()->message(_("No more insets"));
|
||||||
->Dispatch(LFUN_MESSAGE,
|
|
||||||
_("No more insets"));
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
owner()->getLyXFunc()
|
owner()->message(_("No more insets"));
|
||||||
->Dispatch(LFUN_MESSAGE,
|
|
||||||
_("No more insets"));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
update(text, BufferView::SELECT|BufferView::FITCUR);
|
update(text, BufferView::SELECT|BufferView::FITCUR);
|
||||||
|
@ -16,7 +16,6 @@
|
|||||||
#include "lyxrow.h"
|
#include "lyxrow.h"
|
||||||
#include "LyXView.h"
|
#include "LyXView.h"
|
||||||
#include "commandtags.h"
|
#include "commandtags.h"
|
||||||
#include "lyxfunc.h"
|
|
||||||
#include "font.h"
|
#include "font.h"
|
||||||
#include "bufferview_funcs.h"
|
#include "bufferview_funcs.h"
|
||||||
#include "TextCache.h"
|
#include "TextCache.h"
|
||||||
@ -288,8 +287,7 @@ int BufferView::Pimpl::resizeCurrentBuffer()
|
|||||||
|
|
||||||
ProhibitInput(bv_);
|
ProhibitInput(bv_);
|
||||||
|
|
||||||
owner_->getLyXFunc()->Dispatch(LFUN_MESSAGE,
|
owner_->message(_("Formatting document..."));
|
||||||
_("Formatting document..."));
|
|
||||||
|
|
||||||
if (bv_->text) {
|
if (bv_->text) {
|
||||||
par = bv_->text->cursor.par();
|
par = bv_->text->cursor.par();
|
||||||
@ -634,8 +632,7 @@ void BufferView::Pimpl::workAreaButtonPress(int xpos, int ypos,
|
|||||||
UpdatableInset * inset = static_cast<UpdatableInset *>(inset_hit);
|
UpdatableInset * inset = static_cast<UpdatableInset *>(inset_hit);
|
||||||
selection_possible = false;
|
selection_possible = false;
|
||||||
owner_->updateLayoutChoice();
|
owner_->updateLayoutChoice();
|
||||||
owner_->getLyXFunc()->Dispatch(LFUN_MESSAGE,
|
owner_->message(inset->EditMessage());
|
||||||
inset->EditMessage());
|
|
||||||
inset->InsetButtonPress(bv_, xpos, ypos, button);
|
inset->InsetButtonPress(bv_, xpos, ypos, button);
|
||||||
inset->Edit(bv_, xpos, ypos, button);
|
inset->Edit(bv_, xpos, ypos, button);
|
||||||
return;
|
return;
|
||||||
@ -797,8 +794,7 @@ void BufferView::Pimpl::workAreaButtonRelease(int x, int y,
|
|||||||
bv_->text->SetCursorParUndo(bv_->buffer());
|
bv_->text->SetCursorParUndo(bv_->buffer());
|
||||||
}
|
}
|
||||||
|
|
||||||
owner_->getLyXFunc()->Dispatch(LFUN_MESSAGE,
|
owner_->message(inset_hit->EditMessage());
|
||||||
inset_hit->EditMessage());
|
|
||||||
|
|
||||||
if (inset_hit->Editable()==Inset::HIGHLY_EDITABLE) {
|
if (inset_hit->Editable()==Inset::HIGHLY_EDITABLE) {
|
||||||
// Highly editable inset, like math
|
// Highly editable inset, like math
|
||||||
@ -1213,7 +1209,7 @@ void BufferView::Pimpl::savePosition(unsigned int i)
|
|||||||
bv_->text->cursor.pos());
|
bv_->text->cursor.pos());
|
||||||
if (i > 0) {
|
if (i > 0) {
|
||||||
string const str = _("Saved bookmark") + ' ' + tostr(i);
|
string const str = _("Saved bookmark") + ' ' + tostr(i);
|
||||||
owner_->getLyXFunc()->Dispatch(LFUN_MESSAGE, str);
|
owner_->message(str);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1248,7 +1244,7 @@ void BufferView::Pimpl::restorePosition(unsigned int i)
|
|||||||
update(bv_->text, BufferView::SELECT|BufferView::FITCUR);
|
update(bv_->text, BufferView::SELECT|BufferView::FITCUR);
|
||||||
if (i > 0) {
|
if (i > 0) {
|
||||||
string const str = _("Moved to bookmark") + ' ' + tostr(i);
|
string const str = _("Moved to bookmark") + ' ' + tostr(i);
|
||||||
owner_->getLyXFunc()->Dispatch(LFUN_MESSAGE, str);
|
owner_->message(str);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1467,8 +1463,7 @@ void BufferView::Pimpl::MenuInsertLyXFile(string const & filen)
|
|||||||
|
|
||||||
// check selected filename
|
// check selected filename
|
||||||
if (filename.empty()) {
|
if (filename.empty()) {
|
||||||
owner_->getLyXFunc()->Dispatch(LFUN_MESSAGE,
|
owner_->message(_("Canceled."));
|
||||||
_("Canceled."));
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1482,16 +1477,16 @@ void BufferView::Pimpl::MenuInsertLyXFile(string const & filen)
|
|||||||
// Inserts document
|
// Inserts document
|
||||||
string const s1 = _("Inserting document") + ' '
|
string const s1 = _("Inserting document") + ' '
|
||||||
+ MakeDisplayPath(filename) + " ...";
|
+ MakeDisplayPath(filename) + " ...";
|
||||||
owner_->getLyXFunc()->Dispatch(LFUN_MESSAGE, s1);
|
owner_->message(s1);
|
||||||
bool const res = bv_->insertLyXFile(filename);
|
bool const res = bv_->insertLyXFile(filename);
|
||||||
if (res) {
|
if (res) {
|
||||||
string const str = _("Document") + ' '
|
string const str = _("Document") + ' '
|
||||||
+ MakeDisplayPath(filename) + ' ' + _("inserted.");
|
+ MakeDisplayPath(filename) + ' ' + _("inserted.");
|
||||||
owner_->getLyXFunc()->Dispatch(LFUN_MESSAGE, str);
|
owner_->message(str);
|
||||||
} else {
|
} else {
|
||||||
string const str = _("Could not insert document") + ' '
|
string const str = _("Could not insert document") + ' '
|
||||||
+ MakeDisplayPath(filename);
|
+ MakeDisplayPath(filename);
|
||||||
owner_->getLyXFunc()->Dispatch(LFUN_MESSAGE, str);
|
owner_->message(str);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,5 +1,21 @@
|
|||||||
2001-04-24 Lars Gullik Bjønnes <larsbj@birdstep.com>
|
2001-04-24 Lars Gullik Bjønnes <larsbj@birdstep.com>
|
||||||
|
|
||||||
|
* call message directly through LyXView instead of through LyXFunc
|
||||||
|
* BufferView2.C: adjust
|
||||||
|
* BufferView_pimpl.C: adjust
|
||||||
|
* FontLoader.C: adjust
|
||||||
|
* buffer.C: adjust
|
||||||
|
* bufferview_funcs.C: adjust
|
||||||
|
* converter.C: adjust
|
||||||
|
* figureForm.C: adjust
|
||||||
|
* importer.C: adjust
|
||||||
|
* lyx_cb.C: adjust
|
||||||
|
* lyx_gui_misc.C: adjust
|
||||||
|
* lyxfunc.C: adjust
|
||||||
|
* lyxvc.C: adjust
|
||||||
|
* text2.C: adjust
|
||||||
|
+ more files in subdirs
|
||||||
|
|
||||||
* lyxparagraph.h (size): move up int file
|
* lyxparagraph.h (size): move up int file
|
||||||
(GetLayout): ditto
|
(GetLayout): ditto
|
||||||
|
|
||||||
|
@ -23,7 +23,6 @@
|
|||||||
#include "lyxrc.h" // lyxrc.font_*
|
#include "lyxrc.h" // lyxrc.font_*
|
||||||
#include "BufferView.h"
|
#include "BufferView.h"
|
||||||
#include "LyXView.h"
|
#include "LyXView.h"
|
||||||
#include "lyxfunc.h"
|
|
||||||
|
|
||||||
using std::endl;
|
using std::endl;
|
||||||
|
|
||||||
@ -246,9 +245,7 @@ XFontStruct * FontLoader::doLoad(LyXFont::FONT_FAMILY family,
|
|||||||
|
|
||||||
XFontStruct * fs = 0;
|
XFontStruct * fs = 0;
|
||||||
|
|
||||||
current_view->owner()->getLyXFunc()
|
current_view->owner()->messagePush(_("Loading font into X-Server..."));
|
||||||
->Dispatch(LFUN_MESSAGE_PUSH,
|
|
||||||
_("Loading font into X-Server..."));
|
|
||||||
|
|
||||||
fs = XLoadQueryFont(fl_get_display(), font.c_str());
|
fs = XLoadQueryFont(fl_get_display(), font.c_str());
|
||||||
|
|
||||||
@ -276,7 +273,7 @@ XFontStruct * FontLoader::doLoad(LyXFont::FONT_FAMILY family,
|
|||||||
<< "' matched by\n" << font << endl;
|
<< "' matched by\n" << font << endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
current_view->owner()->getLyXFunc()->Dispatch(LFUN_MESSAGE_POP);
|
current_view->owner()->messagePop();
|
||||||
|
|
||||||
fontstruct[family][series][shape][size] = fs;
|
fontstruct[family][series][shape][size] = fs;
|
||||||
return fs;
|
return fs;
|
||||||
|
@ -23,7 +23,6 @@
|
|||||||
#include "lyxlookup.h"
|
#include "lyxlookup.h"
|
||||||
#endif
|
#endif
|
||||||
#include "minibuffer.h"
|
#include "minibuffer.h"
|
||||||
#include "lyxfunc.h"
|
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
#include "intl.h"
|
#include "intl.h"
|
||||||
#include "lyxrc.h"
|
#include "lyxrc.h"
|
||||||
@ -39,6 +38,7 @@
|
|||||||
#include "lyx_gui_misc.h" // [update,Close,Redraw]AllBufferRelatedDialogs
|
#include "lyx_gui_misc.h" // [update,Close,Redraw]AllBufferRelatedDialogs
|
||||||
#include "bufferview_funcs.h" // CurrentState()
|
#include "bufferview_funcs.h" // CurrentState()
|
||||||
#include "gettext.h"
|
#include "gettext.h"
|
||||||
|
#include "lyxfunc.h"
|
||||||
|
|
||||||
using std::endl;
|
using std::endl;
|
||||||
|
|
||||||
|
@ -19,7 +19,6 @@
|
|||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
#include "support/lstrings.h"
|
#include "support/lstrings.h"
|
||||||
#include "LyXView.h"
|
#include "LyXView.h"
|
||||||
#include "lyxfunc.h"
|
|
||||||
|
|
||||||
#if FL_REVISION < 89 || (FL_REVISION == 89 && FL_FIXLEVEL < 5)
|
#if FL_REVISION < 89 || (FL_REVISION == 89 && FL_FIXLEVEL < 5)
|
||||||
#include "lyxlookup.h"
|
#include "lyxlookup.h"
|
||||||
|
@ -3482,8 +3482,7 @@ int Buffer::runChktex()
|
|||||||
}
|
}
|
||||||
|
|
||||||
Path p(path); // path to LaTeX file
|
Path p(path); // path to LaTeX file
|
||||||
users->owner()->getLyXFunc()->Dispatch(LFUN_MESSAGE,
|
users->owner()->message(_("Running chktex..."));
|
||||||
_("Running chktex..."));
|
|
||||||
|
|
||||||
// Remove all error insets
|
// Remove all error insets
|
||||||
bool const removedErrorInsets = users->removeAutoInsets();
|
bool const removedErrorInsets = users->removeAutoInsets();
|
||||||
|
@ -26,7 +26,6 @@
|
|||||||
#include "lyx_cb.h"
|
#include "lyx_cb.h"
|
||||||
#include "language.h"
|
#include "language.h"
|
||||||
#include "gettext.h"
|
#include "gettext.h"
|
||||||
#include "lyxfunc.h"
|
|
||||||
|
|
||||||
#ifndef NEW_INSETS
|
#ifndef NEW_INSETS
|
||||||
void Foot(BufferView * bv)
|
void Foot(BufferView * bv)
|
||||||
@ -72,7 +71,7 @@ void Noun(BufferView * bv)
|
|||||||
void Margin(BufferView * bv)
|
void Margin(BufferView * bv)
|
||||||
{
|
{
|
||||||
if (bv->available()) {
|
if (bv->available()) {
|
||||||
bv->owner()->getLyXFunc()->Dispatch(LFUN_MESSAGE, _("Inserting margin note...");
|
bv->owner()->message(_("Inserting margin note...");
|
||||||
bv->hideCursor();
|
bv->hideCursor();
|
||||||
bv->update(bv->text, BufferView::SELECT|BufferView::FITCUR);
|
bv->update(bv->text, BufferView::SELECT|BufferView::FITCUR);
|
||||||
bv->text->InsertFootnoteEnvironment(bv, LyXParagraph::MARGIN);
|
bv->text->InsertFootnoteEnvironment(bv, LyXParagraph::MARGIN);
|
||||||
@ -105,7 +104,7 @@ void Melt(BufferView * bv)
|
|||||||
{
|
{
|
||||||
if (!bv->available()) return;
|
if (!bv->available()) return;
|
||||||
|
|
||||||
bv->owner()->getLyXFunc()->Dispatch(LFUN_MESSAGE, _("Melt"));
|
bv->owner()->message(_("Melt"));
|
||||||
bv->hideCursor();
|
bv->hideCursor();
|
||||||
bv->beforeChange(bv->text);
|
bv->beforeChange(bv->text);
|
||||||
bv->update(bv->text, BufferView::SELECT|BufferView::FITCUR);
|
bv->update(bv->text, BufferView::SELECT|BufferView::FITCUR);
|
||||||
@ -140,10 +139,8 @@ void changeDepth(BufferView * bv, LyXText * text, int decInc)
|
|||||||
if (text->inset_owner)
|
if (text->inset_owner)
|
||||||
bv->updateInset((Inset *)text->inset_owner, true);
|
bv->updateInset((Inset *)text->inset_owner, true);
|
||||||
bv->update(bv->text, BufferView::SELECT|BufferView::FITCUR|BufferView::CHANGE);
|
bv->update(bv->text, BufferView::SELECT|BufferView::FITCUR|BufferView::CHANGE);
|
||||||
bv->owner()->getLyXFunc()
|
bv->owner()->message(_("Changed environment depth "
|
||||||
->Dispatch(LFUN_MESSAGE,
|
"(in possible range, maybe not)"));
|
||||||
_("Changed environment depth "
|
|
||||||
"(in possible range, maybe not)"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -28,7 +28,6 @@
|
|||||||
#include "lyx_gui_misc.h"
|
#include "lyx_gui_misc.h"
|
||||||
#include "lyx_cb.h" // ShowMessage()
|
#include "lyx_cb.h" // ShowMessage()
|
||||||
#include "support/lyxfunctional.h"
|
#include "support/lyxfunctional.h"
|
||||||
#include "lyxfunc.h"
|
|
||||||
#include "gettext.h"
|
#include "gettext.h"
|
||||||
|
|
||||||
using std::vector;
|
using std::vector;
|
||||||
@ -818,8 +817,7 @@ bool Converters::runLaTeX(Buffer const * buffer, string const & command)
|
|||||||
|
|
||||||
if (bv) {
|
if (bv) {
|
||||||
ProhibitInput(bv);
|
ProhibitInput(bv);
|
||||||
bv->owner()->getLyXFunc()->Dispatch(LFUN_MESSAGE,
|
bv->owner()->message(_("Running LaTeX..."));
|
||||||
_("Running LaTeX..."));
|
|
||||||
// Remove all error insets
|
// Remove all error insets
|
||||||
need_redraw = bv->removeAutoInsets();
|
need_redraw = bv->removeAutoInsets();
|
||||||
}
|
}
|
||||||
|
@ -22,7 +22,6 @@
|
|||||||
#include "BufferView.h"
|
#include "BufferView.h"
|
||||||
#include "lyxtext.h"
|
#include "lyxtext.h"
|
||||||
#include "LyXView.h"
|
#include "LyXView.h"
|
||||||
#include "lyxfunc.h"
|
|
||||||
#include "gettext.h"
|
#include "gettext.h"
|
||||||
|
|
||||||
extern FD_form_figure * fd_form_figure;
|
extern FD_form_figure * fd_form_figure;
|
||||||
@ -51,15 +50,11 @@ void FigureApplyCB(FL_OBJECT *, long)
|
|||||||
if (buffer->isReadonly()) // paranoia
|
if (buffer->isReadonly()) // paranoia
|
||||||
return;
|
return;
|
||||||
|
|
||||||
current_view->owner()->getLyXFunc()
|
current_view->owner()->message(_("Inserting figure..."));
|
||||||
->Dispatch(LFUN_MESSAGE,
|
|
||||||
_("Inserting figure..."));
|
|
||||||
if (fl_get_button(fd_form_figure->radio_inline)) {
|
if (fl_get_button(fd_form_figure->radio_inline)) {
|
||||||
InsetFig * new_inset = new InsetFig(100, 20, *buffer);
|
InsetFig * new_inset = new InsetFig(100, 20, *buffer);
|
||||||
current_view->insertInset(new_inset);
|
current_view->insertInset(new_inset);
|
||||||
current_view->owner()->getLyXFunc()
|
current_view->owner()->message(_("Figure inserted"));
|
||||||
->Dispatch(LFUN_MESSAGE,
|
|
||||||
_("Figure inserted"));
|
|
||||||
new_inset->Edit(current_view, 0, 0, 0);
|
new_inset->Edit(current_view, 0, 0, 0);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -119,8 +114,7 @@ void FigureApplyCB(FL_OBJECT *, long)
|
|||||||
current_view->insertInset(new_inset);
|
current_view->insertInset(new_inset);
|
||||||
new_inset->Edit(current_view, 0, 0, 0);
|
new_inset->Edit(current_view, 0, 0, 0);
|
||||||
current_view->update(current_view->text, BufferView::SELECT|BufferView::FITCUR);
|
current_view->update(current_view->text, BufferView::SELECT|BufferView::FITCUR);
|
||||||
current_view->owner()->getLyXFunc()->Dispatch(LFUN_MESSAGE,
|
current_view->owner()->message(_("Figure inserted"));
|
||||||
_("Figure inserted"));
|
|
||||||
current_view->text->UnFreezeUndo();
|
current_view->text->UnFreezeUndo();
|
||||||
current_view->setState();
|
current_view->setState();
|
||||||
}
|
}
|
||||||
|
@ -27,7 +27,6 @@
|
|||||||
#include "exporter.h"
|
#include "exporter.h"
|
||||||
#include "converter.h"
|
#include "converter.h"
|
||||||
#include "support/syscall.h"
|
#include "support/syscall.h"
|
||||||
#include "lyxfunc.h"
|
|
||||||
|
|
||||||
using std::endl;
|
using std::endl;
|
||||||
|
|
||||||
|
@ -20,8 +20,8 @@
|
|||||||
#include "ControlCommand.h"
|
#include "ControlCommand.h"
|
||||||
#include "buffer.h"
|
#include "buffer.h"
|
||||||
#include "Dialogs.h"
|
#include "Dialogs.h"
|
||||||
#include "lyxfunc.h"
|
|
||||||
#include "LyXView.h"
|
#include "LyXView.h"
|
||||||
|
#include "lyxfunc.h"
|
||||||
|
|
||||||
ControlCommand::ControlCommand(LyXView & lv, Dialogs & d, kb_action ac)
|
ControlCommand::ControlCommand(LyXView & lv, Dialogs & d, kb_action ac)
|
||||||
: ControlInset<InsetCommand, InsetCommandParams>(lv, d),
|
: ControlInset<InsetCommand, InsetCommandParams>(lv, d),
|
||||||
@ -36,17 +36,20 @@ InsetCommandParams const ControlCommand::getParams(string const & arg)
|
|||||||
return params;
|
return params;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
InsetCommandParams const ControlCommand::getParams(InsetCommand const & inset)
|
InsetCommandParams const ControlCommand::getParams(InsetCommand const & inset)
|
||||||
{
|
{
|
||||||
return inset.params();
|
return inset.params();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void ControlCommand::applyParamsToInset()
|
void ControlCommand::applyParamsToInset()
|
||||||
{
|
{
|
||||||
inset()->setParams(params());
|
inset()->setParams(params());
|
||||||
lv_.view()->updateInset(inset(), true);
|
lv_.view()->updateInset(inset(), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void ControlCommand::applyParamsNoInset()
|
void ControlCommand::applyParamsNoInset()
|
||||||
{
|
{
|
||||||
if (action_ == LFUN_NOACTION) return;
|
if (action_ == LFUN_NOACTION) return;
|
||||||
|
@ -20,7 +20,6 @@
|
|||||||
#include "ControlGraphics.h"
|
#include "ControlGraphics.h"
|
||||||
#include "buffer.h"
|
#include "buffer.h"
|
||||||
#include "Dialogs.h"
|
#include "Dialogs.h"
|
||||||
#include "lyxfunc.h"
|
|
||||||
#include "LyXView.h"
|
#include "LyXView.h"
|
||||||
#include "gettext.h"
|
#include "gettext.h"
|
||||||
|
|
||||||
|
@ -18,7 +18,6 @@
|
|||||||
#include "ControlInclude.h"
|
#include "ControlInclude.h"
|
||||||
#include "buffer.h"
|
#include "buffer.h"
|
||||||
#include "Dialogs.h"
|
#include "Dialogs.h"
|
||||||
#include "lyxfunc.h"
|
|
||||||
#include "LyXView.h"
|
#include "LyXView.h"
|
||||||
#include "gettext.h"
|
#include "gettext.h"
|
||||||
|
|
||||||
|
@ -22,8 +22,6 @@
|
|||||||
#include "LyXView.h"
|
#include "LyXView.h"
|
||||||
#include "buffer.h"
|
#include "buffer.h"
|
||||||
|
|
||||||
#include "lyxfunc.h"
|
|
||||||
|
|
||||||
using SigC::slot;
|
using SigC::slot;
|
||||||
|
|
||||||
ControlUrl::ControlUrl(LyXView & lv, Dialogs & d)
|
ControlUrl::ControlUrl(LyXView & lv, Dialogs & d)
|
||||||
|
@ -19,10 +19,10 @@
|
|||||||
#include "form_maths_delim.h"
|
#include "form_maths_delim.h"
|
||||||
#include "Dialogs.h"
|
#include "Dialogs.h"
|
||||||
#include "LyXView.h"
|
#include "LyXView.h"
|
||||||
#include "lyxfunc.h"
|
|
||||||
#include "bmtable.h"
|
#include "bmtable.h"
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
#include "mathed/symbol_def.h"
|
#include "mathed/symbol_def.h"
|
||||||
|
#include "lyxfunc.h"
|
||||||
|
|
||||||
#include "delim.xbm"
|
#include "delim.xbm"
|
||||||
#include "delim0.xpm"
|
#include "delim0.xpm"
|
||||||
@ -80,8 +80,8 @@ void FormMathsDelim::build()
|
|||||||
|
|
||||||
void FormMathsDelim::apply()
|
void FormMathsDelim::apply()
|
||||||
{
|
{
|
||||||
int left = int(dialog_->radio_left->u_ldata);
|
int const left = int(dialog_->radio_left->u_ldata);
|
||||||
int right= int(dialog_->radio_right->u_ldata);
|
int const right= int(dialog_->radio_right->u_ldata);
|
||||||
|
|
||||||
std::ostringstream ost;
|
std::ostringstream ost;
|
||||||
ost << delim_values[left] << ' ' << delim_values[right];
|
ost << delim_values[left] << ' ' << delim_values[right];
|
||||||
|
@ -19,8 +19,8 @@
|
|||||||
#include "form_maths_matrix.h"
|
#include "form_maths_matrix.h"
|
||||||
#include "Dialogs.h"
|
#include "Dialogs.h"
|
||||||
#include "LyXView.h"
|
#include "LyXView.h"
|
||||||
#include "lyxfunc.h"
|
|
||||||
#include "Lsstream.h"
|
#include "Lsstream.h"
|
||||||
|
#include "lyxfunc.h"
|
||||||
|
|
||||||
static char h_align_str[80] = "c";
|
static char h_align_str[80] = "c";
|
||||||
static char v_align_c[] = "tcb";
|
static char v_align_c[] = "tcb";
|
||||||
|
@ -17,11 +17,11 @@
|
|||||||
|
|
||||||
#include "Dialogs.h"
|
#include "Dialogs.h"
|
||||||
#include "LyXView.h"
|
#include "LyXView.h"
|
||||||
#include "lyxfunc.h"
|
|
||||||
#include "FormMathsPanel.h"
|
#include "FormMathsPanel.h"
|
||||||
#include "form_maths_panel.h"
|
#include "form_maths_panel.h"
|
||||||
#include "MathsSymbols.h"
|
#include "MathsSymbols.h"
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
|
#include "lyxfunc.h"
|
||||||
|
|
||||||
#include "form_maths_deco.h"
|
#include "form_maths_deco.h"
|
||||||
#include "form_maths_delim.h"
|
#include "form_maths_delim.h"
|
||||||
|
@ -31,8 +31,8 @@
|
|||||||
#include "form_preferences.h"
|
#include "form_preferences.h"
|
||||||
#include "input_validators.h"
|
#include "input_validators.h"
|
||||||
#include "LyXView.h"
|
#include "LyXView.h"
|
||||||
#include "language.h"
|
|
||||||
#include "lyxfunc.h"
|
#include "lyxfunc.h"
|
||||||
|
#include "language.h"
|
||||||
#include "Dialogs.h"
|
#include "Dialogs.h"
|
||||||
#include "lyxrc.h"
|
#include "lyxrc.h"
|
||||||
#include "combox.h"
|
#include "combox.h"
|
||||||
|
@ -31,7 +31,6 @@
|
|||||||
#include "LyXView.h"
|
#include "LyXView.h"
|
||||||
#include "buffer.h"
|
#include "buffer.h"
|
||||||
#include "form_ref.h"
|
#include "form_ref.h"
|
||||||
#include "lyxfunc.h"
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
using std::find;
|
using std::find;
|
||||||
|
@ -19,11 +19,11 @@
|
|||||||
#include "support/LAssert.h"
|
#include "support/LAssert.h"
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
#include "LyXAction.h"
|
#include "LyXAction.h"
|
||||||
#include "lyxfunc.h"
|
|
||||||
#include "kbmap.h"
|
#include "kbmap.h"
|
||||||
#include "buffer.h"
|
#include "buffer.h"
|
||||||
#include "Dialogs.h"
|
#include "Dialogs.h"
|
||||||
#include "LyXView.h"
|
#include "LyXView.h"
|
||||||
|
#include "lyxfunc.h"
|
||||||
#include "MenuBackend.h"
|
#include "MenuBackend.h"
|
||||||
#include "Menubar_pimpl.h"
|
#include "Menubar_pimpl.h"
|
||||||
#include "gettext.h"
|
#include "gettext.h"
|
||||||
|
@ -20,9 +20,9 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "Toolbar_pimpl.h"
|
#include "Toolbar_pimpl.h"
|
||||||
#include "lyxfunc.h"
|
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
#include "LyXView.h"
|
#include "LyXView.h"
|
||||||
|
#include "lyxfunc.h"
|
||||||
#include "BufferView.h"
|
#include "BufferView.h"
|
||||||
#include "buffer.h"
|
#include "buffer.h"
|
||||||
#include "LyXAction.h"
|
#include "LyXAction.h"
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
#include "converter.h"
|
#include "converter.h"
|
||||||
#include "LyXView.h"
|
#include "LyXView.h"
|
||||||
#include "lyxfunc.h"
|
#include "lyxfunc.h"
|
||||||
|
|
||||||
#include "bufferlist.h"
|
#include "bufferlist.h"
|
||||||
#include "support/filetools.h"
|
#include "support/filetools.h"
|
||||||
#include "lyx_gui_misc.h" //WriteAlert
|
#include "lyx_gui_misc.h" //WriteAlert
|
||||||
@ -37,7 +38,7 @@ bool Importer::Import(LyXView * lv, string const & filename,
|
|||||||
{
|
{
|
||||||
string const displaypath = MakeDisplayPath(filename);
|
string const displaypath = MakeDisplayPath(filename);
|
||||||
string const s1 = _("Importing") + ' ' + displaypath + "...";
|
string const s1 = _("Importing") + ' ' + displaypath + "...";
|
||||||
lv->getLyXFunc()->Dispatch(LFUN_MESSAGE, s1);
|
lv->message(s1);
|
||||||
|
|
||||||
string const lyxfile = ChangeExtension(filename, ".lyx");
|
string const lyxfile = ChangeExtension(filename, ".lyx");
|
||||||
|
|
||||||
@ -79,7 +80,7 @@ bool Importer::Import(LyXView * lv, string const & filename,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// we are done
|
// we are done
|
||||||
lv->getLyXFunc()->Dispatch(LFUN_MESSAGE, _("imported."));
|
lv->message(_("imported."));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -20,7 +20,6 @@
|
|||||||
#include "gettext.h"
|
#include "gettext.h"
|
||||||
#include "support/FileInfo.h"
|
#include "support/FileInfo.h"
|
||||||
#include "layout.h"
|
#include "layout.h"
|
||||||
#include "lyxfunc.h"
|
|
||||||
|
|
||||||
using std::ostream;
|
using std::ostream;
|
||||||
using std::endl;
|
using std::endl;
|
||||||
|
@ -21,10 +21,10 @@
|
|||||||
#include "support/filetools.h"
|
#include "support/filetools.h"
|
||||||
#include "BufferView.h"
|
#include "BufferView.h"
|
||||||
#include "LyXView.h"
|
#include "LyXView.h"
|
||||||
#include "lyxfunc.h"
|
|
||||||
#include "commandtags.h"
|
#include "commandtags.h"
|
||||||
#include "buffer.h"
|
#include "buffer.h"
|
||||||
#include "gettext.h"
|
#include "gettext.h"
|
||||||
|
#include "lyxfunc.h"
|
||||||
|
|
||||||
using std::ostream;
|
using std::ostream;
|
||||||
|
|
||||||
|
@ -10,9 +10,9 @@
|
|||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
#include "gettext.h"
|
#include "gettext.h"
|
||||||
#include "LaTeXFeatures.h"
|
#include "LaTeXFeatures.h"
|
||||||
#include "lyxfunc.h"
|
|
||||||
#include "LyXView.h"
|
#include "LyXView.h"
|
||||||
#include "frontends/Dialogs.h"
|
#include "frontends/Dialogs.h"
|
||||||
|
#include "lyxfunc.h"
|
||||||
|
|
||||||
using std::ostream;
|
using std::ostream;
|
||||||
|
|
||||||
|
@ -30,11 +30,9 @@
|
|||||||
#include "lyxtext.h"
|
#include "lyxtext.h"
|
||||||
#include "lyx_gui_misc.h"
|
#include "lyx_gui_misc.h"
|
||||||
#include "LyXView.h"
|
#include "LyXView.h"
|
||||||
#include "lyxfunc.h"
|
|
||||||
#include "insets/insettext.h"
|
#include "insets/insettext.h"
|
||||||
#include "frontends/Dialogs.h"
|
#include "frontends/Dialogs.h"
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
#include "lyxfunc.h"
|
|
||||||
#include "WorkArea.h"
|
#include "WorkArea.h"
|
||||||
#include "gettext.h"
|
#include "gettext.h"
|
||||||
#include "language.h"
|
#include "language.h"
|
||||||
|
@ -46,7 +46,6 @@
|
|||||||
#include "trans_mgr.h"
|
#include "trans_mgr.h"
|
||||||
#include "lyxscreen.h"
|
#include "lyxscreen.h"
|
||||||
#include "WorkArea.h"
|
#include "WorkArea.h"
|
||||||
#include "lyxfunc.h"
|
|
||||||
#include "gettext.h"
|
#include "gettext.h"
|
||||||
|
|
||||||
using std::ostream;
|
using std::ostream;
|
||||||
@ -1099,8 +1098,8 @@ InsetText::LocalDispatch(BufferView * bv,
|
|||||||
// and current buffer's textclass (number). */
|
// and current buffer's textclass (number). */
|
||||||
LyXTextClassList::ClassList::size_type tclass =
|
LyXTextClassList::ClassList::size_type tclass =
|
||||||
bv->buffer()->params.textclass;
|
bv->buffer()->params.textclass;
|
||||||
std::pair <bool, LyXTextClass::size_type> layout =
|
std::pair<bool, LyXTextClass::size_type> layout =
|
||||||
textclasslist.NumberOfLayout(tclass, arg);
|
textclasslist.NumberOfLayout(tclass, arg);
|
||||||
|
|
||||||
// If the entry is obsolete, use the new one instead.
|
// If the entry is obsolete, use the new one instead.
|
||||||
if (layout.first) {
|
if (layout.first) {
|
||||||
@ -1113,8 +1112,7 @@ InsetText::LocalDispatch(BufferView * bv,
|
|||||||
// see if we found the layout number:
|
// see if we found the layout number:
|
||||||
if (!layout.first) {
|
if (!layout.first) {
|
||||||
string const msg = string(N_("Layout ")) + arg + N_(" not known");
|
string const msg = string(N_("Layout ")) + arg + N_(" not known");
|
||||||
bv->owner()->getLyXFunc()
|
bv->owner()->message(msg);
|
||||||
->Dispatch(LFUN_MESSAGE, msg);
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
18
src/lyx_cb.C
18
src/lyx_cb.C
@ -32,7 +32,6 @@
|
|||||||
#include "support/filetools.h"
|
#include "support/filetools.h"
|
||||||
#include "support/path.h"
|
#include "support/path.h"
|
||||||
#include "support/syscall.h"
|
#include "support/syscall.h"
|
||||||
#include "lyxfunc.h"
|
|
||||||
#include "gettext.h"
|
#include "gettext.h"
|
||||||
|
|
||||||
using std::vector;
|
using std::vector;
|
||||||
@ -117,8 +116,7 @@ void ShowMessage(Buffer const * buf,
|
|||||||
{
|
{
|
||||||
if (lyxrc.use_gui) {
|
if (lyxrc.use_gui) {
|
||||||
string const str = msg1 + ' ' + msg2 + ' ' + msg3;
|
string const str = msg1 + ' ' + msg2 + ' ' + msg3;
|
||||||
buf->getUser()->owner()->getLyXFunc()->Dispatch(LFUN_MESSAGE,
|
buf->getUser()->owner()->message(str);
|
||||||
str);
|
|
||||||
} else
|
} else
|
||||||
lyxerr << msg1 << msg2 << msg3 << endl;
|
lyxerr << msg1 << msg2 << msg3 << endl;
|
||||||
}
|
}
|
||||||
@ -317,9 +315,7 @@ void AutoSave(BufferView * bv)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
bv->owner()->getLyXFunc()
|
bv->owner()->message(_("Autosaving current document..."));
|
||||||
->Dispatch(LFUN_MESSAGE,
|
|
||||||
_("Autosaving current document..."));
|
|
||||||
|
|
||||||
// create autosave filename
|
// create autosave filename
|
||||||
string fname = OnlyPath(bv->buffer()->fileName());
|
string fname = OnlyPath(bv->buffer()->fileName());
|
||||||
@ -359,9 +355,7 @@ void AutoSave(BufferView * bv)
|
|||||||
// It is dangerous to do this in the child,
|
// It is dangerous to do this in the child,
|
||||||
// but safe in the parent, so...
|
// but safe in the parent, so...
|
||||||
if (pid == -1)
|
if (pid == -1)
|
||||||
bv->owner()->getLyXFunc()
|
bv->owner()->message(_("Autosave Failed!"));
|
||||||
->Dispatch(LFUN_MESSAGE,
|
|
||||||
_("Autosave Failed!"));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (pid == 0) { // we are the child so...
|
if (pid == 0) { // we are the child so...
|
||||||
@ -573,16 +567,14 @@ void MenuLayoutSave(BufferView * bv)
|
|||||||
// reconfigure the automatic settings.
|
// reconfigure the automatic settings.
|
||||||
void Reconfigure(BufferView * bv)
|
void Reconfigure(BufferView * bv)
|
||||||
{
|
{
|
||||||
bv->owner()->getLyXFunc()->Dispatch(LFUN_MESSAGE,
|
bv->owner()->message(_("Running configure..."));
|
||||||
_("Running configure..."));
|
|
||||||
|
|
||||||
// Run configure in user lyx directory
|
// Run configure in user lyx directory
|
||||||
Path p(user_lyxdir);
|
Path p(user_lyxdir);
|
||||||
Systemcalls one(Systemcalls::System,
|
Systemcalls one(Systemcalls::System,
|
||||||
AddName(system_lyxdir, "configure"));
|
AddName(system_lyxdir, "configure"));
|
||||||
p.pop();
|
p.pop();
|
||||||
bv->owner()->getLyXFunc()->Dispatch(LFUN_MESSAGE,
|
bv->owner()->message(_("Reloading configuration..."));
|
||||||
_("Reloading configuration..."));
|
|
||||||
lyxrc.read(LibFileSearch(string(), "lyxrc.defaults"));
|
lyxrc.read(LibFileSearch(string(), "lyxrc.defaults"));
|
||||||
WriteAlert(_("The system has been reconfigured."),
|
WriteAlert(_("The system has been reconfigured."),
|
||||||
_("You need to restart LyX to make use of any"),
|
_("You need to restart LyX to make use of any"),
|
||||||
|
@ -29,7 +29,6 @@
|
|||||||
#include "bufferview_funcs.h"
|
#include "bufferview_funcs.h"
|
||||||
#include "support/filetools.h"
|
#include "support/filetools.h"
|
||||||
#include "lyxrc.h"
|
#include "lyxrc.h"
|
||||||
#include "lyxfunc.h"
|
|
||||||
|
|
||||||
using std::pair;
|
using std::pair;
|
||||||
using std::make_pair;
|
using std::make_pair;
|
||||||
@ -139,14 +138,14 @@ char const * flyx_ident_extract(char const * sc)
|
|||||||
//
|
//
|
||||||
void WriteAlert(string const & s1, string const & s2, string const & s3)
|
void WriteAlert(string const & s1, string const & s2, string const & s3)
|
||||||
{
|
{
|
||||||
LyXFunc * lfun = 0;
|
LyXView * lview = 0;
|
||||||
if (current_view && current_view->owner())
|
if (current_view && current_view->owner())
|
||||||
lfun = current_view->owner()->getLyXFunc();
|
lview = current_view->owner();
|
||||||
if (lfun) {
|
if (lview) {
|
||||||
/// Write to minibuffer
|
/// Write to minibuffer
|
||||||
ProhibitInput(current_view);
|
ProhibitInput(current_view);
|
||||||
string const msg = s1 + ' ' + s2 + ' ' + s3;
|
string const msg = s1 + ' ' + s2 + ' ' + s3;
|
||||||
lfun->Dispatch(LFUN_MESSAGE, msg);
|
lview->message(msg);
|
||||||
fl_set_resource("flAlert.dismiss.label", _("Dismiss"));
|
fl_set_resource("flAlert.dismiss.label", _("Dismiss"));
|
||||||
fl_show_alert(s1.c_str(), s2.c_str(), s3.c_str(), 0);
|
fl_show_alert(s1.c_str(), s2.c_str(), s3.c_str(), 0);
|
||||||
AllowInput(current_view);
|
AllowInput(current_view);
|
||||||
|
@ -1604,7 +1604,7 @@ void LyXFunc::MenuNew(bool fromTemplate)
|
|||||||
_("newfile"));
|
_("newfile"));
|
||||||
|
|
||||||
if (result.second.empty()) {
|
if (result.second.empty()) {
|
||||||
Dispatch(LFUN_MESSAGE, _("Canceled."));
|
owner->message(_("Canceled."));
|
||||||
lyxerr.debug() << "New Document Cancelled." << endl;
|
lyxerr.debug() << "New Document Cancelled." << endl;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -1631,7 +1631,7 @@ void LyXFunc::MenuNew(bool fromTemplate)
|
|||||||
owner->view()->buffer(bufferlist.getBuffer(s));
|
owner->view()->buffer(bufferlist.getBuffer(s));
|
||||||
return;
|
return;
|
||||||
case 3: // Cancel: Do nothing
|
case 3: // Cancel: Do nothing
|
||||||
Dispatch(LFUN_MESSAGE, _("Canceled."));
|
owner->message(_("Canceled."));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1643,14 +1643,14 @@ void LyXFunc::MenuNew(bool fromTemplate)
|
|||||||
MakeDisplayPath(s, 50),
|
MakeDisplayPath(s, 50),
|
||||||
_("Do you want to open the document?"))) {
|
_("Do you want to open the document?"))) {
|
||||||
// loads document
|
// loads document
|
||||||
Dispatch(LFUN_MESSAGE, _("Opening document")
|
owner->message(_("Opening document") + ' '
|
||||||
+ ' ' + MakeDisplayPath(s) + "...");
|
+ MakeDisplayPath(s) + "...");
|
||||||
XFlush(fl_get_display());
|
XFlush(fl_get_display());
|
||||||
owner->view()->buffer(
|
owner->view()->buffer(
|
||||||
bufferlist.loadLyXFile(s));
|
bufferlist.loadLyXFile(s));
|
||||||
Dispatch(LFUN_MESSAGE, _("Document")
|
owner->message(_("Document") + ' '
|
||||||
+ ' ' + MakeDisplayPath(s) + ' '
|
+ MakeDisplayPath(s) + ' '
|
||||||
+ _("opened."));
|
+ _("opened."));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1729,7 +1729,7 @@ void LyXFunc::Open(string const & fname)
|
|||||||
|
|
||||||
// check selected filename
|
// check selected filename
|
||||||
if (filename.empty()) {
|
if (filename.empty()) {
|
||||||
Dispatch(LFUN_MESSAGE, _("Canceled."));
|
owner->message(_("Canceled."));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
@ -1742,19 +1742,17 @@ void LyXFunc::Open(string const & fname)
|
|||||||
filename += ".lyx";
|
filename += ".lyx";
|
||||||
|
|
||||||
// loads document
|
// loads document
|
||||||
Dispatch(LFUN_MESSAGE,
|
owner->message(_("Opening document") + ' '
|
||||||
_("Opening document") + ' '
|
+ MakeDisplayPath(filename) + "...");
|
||||||
+ MakeDisplayPath(filename) + "...");
|
|
||||||
Buffer * openbuf = bufferlist.loadLyXFile(filename);
|
Buffer * openbuf = bufferlist.loadLyXFile(filename);
|
||||||
if (openbuf) {
|
if (openbuf) {
|
||||||
owner->view()->buffer(openbuf);
|
owner->view()->buffer(openbuf);
|
||||||
Dispatch(LFUN_MESSAGE,
|
owner->message(_("Document") + ' '
|
||||||
_("Document") + ' '
|
+ MakeDisplayPath(filename)
|
||||||
+ MakeDisplayPath(filename) + ' ' + _("opened."));
|
+ ' ' + _("opened."));
|
||||||
} else {
|
} else {
|
||||||
Dispatch(LFUN_MESSAGE,
|
owner->message(_("Could not open document") + ' '
|
||||||
_("Could not open document") + ' '
|
+ MakeDisplayPath(filename));
|
||||||
+ MakeDisplayPath(filename));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1801,7 +1799,7 @@ void LyXFunc::doImport(string const & argument)
|
|||||||
|
|
||||||
// check selected filename
|
// check selected filename
|
||||||
if (filename.empty())
|
if (filename.empty())
|
||||||
Dispatch(LFUN_MESSAGE, _("Canceled."));
|
owner->message(_("Canceled."));
|
||||||
}
|
}
|
||||||
|
|
||||||
// still no filename? abort
|
// still no filename? abort
|
||||||
@ -1829,7 +1827,7 @@ void LyXFunc::doImport(string const & argument)
|
|||||||
owner->view()->buffer(bufferlist.getBuffer(lyxfile));
|
owner->view()->buffer(bufferlist.getBuffer(lyxfile));
|
||||||
return;
|
return;
|
||||||
case 3: // Cancel: Do nothing
|
case 3: // Cancel: Do nothing
|
||||||
Dispatch(LFUN_MESSAGE, _("Canceled."));
|
owner->message(_("Canceled."));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1839,7 +1837,7 @@ void LyXFunc::doImport(string const & argument)
|
|||||||
if (f.exist() && !AskQuestion(_("A document by the name"),
|
if (f.exist() && !AskQuestion(_("A document by the name"),
|
||||||
MakeDisplayPath(lyxfile),
|
MakeDisplayPath(lyxfile),
|
||||||
_("already exists. Overwrite?"))) {
|
_("already exists. Overwrite?"))) {
|
||||||
Dispatch(LFUN_MESSAGE, _("Canceled"));
|
owner->message(_("Canceled"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// filename should be valid now
|
// filename should be valid now
|
||||||
|
@ -50,10 +50,10 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "lyxserver.h"
|
#include "lyxserver.h"
|
||||||
#include "lyxfunc.h"
|
|
||||||
#include "lyx_main.h"
|
#include "lyx_main.h"
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
#include "LyXAction.h"
|
#include "LyXAction.h"
|
||||||
|
#include "lyxfunc.h"
|
||||||
#include "support/lstrings.h"
|
#include "support/lstrings.h"
|
||||||
#include "support/lyxlib.h"
|
#include "support/lyxlib.h"
|
||||||
|
|
||||||
|
@ -15,8 +15,8 @@
|
|||||||
#include "gettext.h"
|
#include "gettext.h"
|
||||||
#include "support/filetools.h"
|
#include "support/filetools.h"
|
||||||
#include "support/lyxlib.h"
|
#include "support/lyxlib.h"
|
||||||
#include "lyxfunc.h"
|
|
||||||
#include "LyXView.h"
|
#include "LyXView.h"
|
||||||
|
#include "lyxfunc.h"
|
||||||
|
|
||||||
using std::endl;
|
using std::endl;
|
||||||
using std::pair;
|
using std::pair;
|
||||||
|
@ -45,7 +45,6 @@
|
|||||||
#include "math_spaceinset.h"
|
#include "math_spaceinset.h"
|
||||||
#include "math_deliminset.h"
|
#include "math_deliminset.h"
|
||||||
#include "mathed/support.h"
|
#include "mathed/support.h"
|
||||||
#include "lyxfunc.h"
|
|
||||||
|
|
||||||
using std::ostream;
|
using std::ostream;
|
||||||
using std::istream;
|
using std::istream;
|
||||||
@ -859,7 +858,7 @@ InsetFormula::LocalDispatch(BufferView * bv, kb_action action,
|
|||||||
case LFUN_GREEK:
|
case LFUN_GREEK:
|
||||||
if (!greek_kb_flag) {
|
if (!greek_kb_flag) {
|
||||||
greek_kb_flag = 1;
|
greek_kb_flag = 1;
|
||||||
bv->owner()->getLyXFunc()->Dispatch(LFUN_MESSAGE, _("Math greek mode on"));
|
bv->owner()->message(_("Math greek mode on"));
|
||||||
} else
|
} else
|
||||||
greek_kb_flag = 0;
|
greek_kb_flag = 0;
|
||||||
break;
|
break;
|
||||||
@ -868,9 +867,9 @@ InsetFormula::LocalDispatch(BufferView * bv, kb_action action,
|
|||||||
case LFUN_GREEK_TOGGLE:
|
case LFUN_GREEK_TOGGLE:
|
||||||
greek_kb_flag = (greek_kb_flag) ? 0 : 2;
|
greek_kb_flag = (greek_kb_flag) ? 0 : 2;
|
||||||
if (greek_kb_flag)
|
if (greek_kb_flag)
|
||||||
bv->owner()->getLyXFunc()->Dispatch(LFUN_MESSAGE, _("Math greek keyboard on"));
|
bv->owner()->message(_("Math greek keyboard on"));
|
||||||
else
|
else
|
||||||
bv->owner()->getLyXFunc()->Dispatch(LFUN_MESSAGE, _("Math greek keyboard off"));
|
bv->owner()->message(_("Math greek keyboard off"));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// Math fonts
|
// Math fonts
|
||||||
@ -884,7 +883,7 @@ InsetFormula::LocalDispatch(BufferView * bv, kb_action action,
|
|||||||
case LFUN_TEX:
|
case LFUN_TEX:
|
||||||
// varcode = LM_TC_TEX;
|
// varcode = LM_TC_TEX;
|
||||||
mathcursor->setLastCode(LM_TC_TEX);
|
mathcursor->setLastCode(LM_TC_TEX);
|
||||||
bv->owner()->getLyXFunc()->Dispatch(LFUN_MESSAGE, _("TeX mode"));
|
bv->owner()->message(_("TeX mode"));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case LFUN_MATH_NUMBER:
|
case LFUN_MATH_NUMBER:
|
||||||
@ -901,10 +900,10 @@ InsetFormula::LocalDispatch(BufferView * bv, kb_action action,
|
|||||||
label_.erase();
|
label_.erase();
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
bv->owner()->getLyXFunc()->Dispatch(LFUN_MESSAGE, _("No number"));
|
bv->owner()->message(_("No number"));
|
||||||
} else {
|
} else {
|
||||||
++type;
|
++type;
|
||||||
bv->owner()->getLyXFunc()->Dispatch(LFUN_MESSAGE, _("Number"));
|
bv->owner()->message(_("Number"));
|
||||||
}
|
}
|
||||||
par->SetType(type);
|
par->SetType(type);
|
||||||
// Andre:
|
// Andre:
|
||||||
@ -1115,8 +1114,7 @@ InsetFormula::LocalDispatch(BufferView * bv, kb_action action,
|
|||||||
// Invalid actions under math mode
|
// Invalid actions under math mode
|
||||||
case LFUN_MATH_MODE:
|
case LFUN_MATH_MODE:
|
||||||
if (mathcursor->getLastCode()!= LM_TC_TEXTRM) {
|
if (mathcursor->getLastCode()!= LM_TC_TEXTRM) {
|
||||||
bv->owner()->getLyXFunc()
|
bv->owner()->message(_("math text mode"));
|
||||||
->Dispatch(LFUN_MESSAGE, _("math text mode"));
|
|
||||||
varcode = LM_TC_TEXTRM;
|
varcode = LM_TC_TEXTRM;
|
||||||
} else {
|
} else {
|
||||||
varcode = LM_TC_VAR;
|
varcode = LM_TC_VAR;
|
||||||
@ -1125,9 +1123,7 @@ InsetFormula::LocalDispatch(BufferView * bv, kb_action action,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case LFUN_UNDO:
|
case LFUN_UNDO:
|
||||||
bv->owner()->getLyXFunc()
|
bv->owner()->message(_("Invalid action in math mode!"));
|
||||||
->Dispatch(LFUN_MESSAGE,
|
|
||||||
_("Invalid action in math mode!"));
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
//------- dummy actions
|
//------- dummy actions
|
||||||
@ -1246,7 +1242,10 @@ InsetFormula::LocalDispatch(BufferView * bv, kb_action action,
|
|||||||
if (was_macro)
|
if (was_macro)
|
||||||
mathcursor->MacroModeClose();
|
mathcursor->MacroModeClose();
|
||||||
// This line nukes the mathcursor. Why?
|
// This line nukes the mathcursor. Why?
|
||||||
//bv->owner()->getLyXFunc()->Dispatch(LFUN_MESSAGE, _("TeX mode"));
|
#ifdef WITH_WARNINGS
|
||||||
|
#warning Still? (Lgb)
|
||||||
|
#endif
|
||||||
|
bv->owner()->message(_("TeX mode"));
|
||||||
mathcursor->setLastCode(LM_TC_TEX);
|
mathcursor->setLastCode(LM_TC_TEX);
|
||||||
}
|
}
|
||||||
// Andre:
|
// Andre:
|
||||||
|
@ -33,7 +33,6 @@
|
|||||||
#include "lyxscreen.h"
|
#include "lyxscreen.h"
|
||||||
#include "bufferview_funcs.h"
|
#include "bufferview_funcs.h"
|
||||||
#include "language.h"
|
#include "language.h"
|
||||||
#include "lyxfunc.h"
|
|
||||||
|
|
||||||
using std::max;
|
using std::max;
|
||||||
using std::min;
|
using std::min;
|
||||||
@ -2110,13 +2109,9 @@ void LyXText::InsertChar(BufferView * bview, char c)
|
|||||||
#endif
|
#endif
|
||||||
)) {
|
)) {
|
||||||
if (cursor.pos() == 0 )
|
if (cursor.pos() == 0 )
|
||||||
bview->owner()->getLyXFunc()
|
bview->owner()->message(_("You cannot insert a space at the beginning of a paragraph. Please read the Tutorial."));
|
||||||
->Dispatch(LFUN_MESSAGE,
|
|
||||||
_("You cannot insert a space at the beginning of a paragraph. Please read the Tutorial."));
|
|
||||||
else
|
else
|
||||||
bview->owner()->getLyXFunc()
|
bview->owner()->message(_("You cannot type two spaces this way. Please read the Tutorial."));
|
||||||
->Dispatch(LFUN_MESSAGE,
|
|
||||||
_("You cannot type two spaces this way. Please read the Tutorial."));
|
|
||||||
charInserted();
|
charInserted();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -42,7 +42,6 @@
|
|||||||
#include "lyxrc.h"
|
#include "lyxrc.h"
|
||||||
#include "FloatList.h"
|
#include "FloatList.h"
|
||||||
#include "language.h"
|
#include "language.h"
|
||||||
#include "lyxfunc.h"
|
|
||||||
|
|
||||||
using std::copy;
|
using std::copy;
|
||||||
using std::find;
|
using std::find;
|
||||||
@ -1322,9 +1321,7 @@ void LyXText::ToggleFree(BufferView * bview,
|
|||||||
// If the mask is completely neutral, tell user
|
// If the mask is completely neutral, tell user
|
||||||
if (font == LyXFont(LyXFont::ALL_IGNORE)) {
|
if (font == LyXFont(LyXFont::ALL_IGNORE)) {
|
||||||
// Could only happen with user style
|
// Could only happen with user style
|
||||||
bview->owner()->getLyXFunc()
|
bview->owner()->message(_("No font change defined. Use Character under the Layout menu to define font change."));
|
||||||
->Dispatch(LFUN_MESSAGE,
|
|
||||||
_("No font change defined. Use Character under the Layout menu to define font change."));
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user