mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
changes because of function name change in BufferView and LyXView.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@301 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
df8157e6b9
commit
a94cb21697
@ -950,7 +950,7 @@ static void RegisterFigure(InsetFig *fi)
|
||||
|
||||
if (lyxerr.debugging()) {
|
||||
lyxerr << "Register Figure: buffer:["
|
||||
<< current_view->currentBuffer() << "]" << endl;
|
||||
<< current_view->buffer() << "]" << endl;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1276,7 +1276,7 @@ void InsetFig::Edit(int, int)
|
||||
// We should have RO-versions of the form instead.
|
||||
// The actual prevention of altering a readonly doc
|
||||
// is done in CallbackFig()
|
||||
if(current_view->currentBuffer()->isReadonly())
|
||||
if(current_view->buffer()->isReadonly())
|
||||
WarnReadonly();
|
||||
|
||||
if (!form) {
|
||||
@ -1302,7 +1302,7 @@ Inset *InsetFig::Clone()
|
||||
|
||||
if (lyxerr.debugging()) {
|
||||
lyxerr << "Clone Figure: buffer:["
|
||||
<< current_view->currentBuffer()
|
||||
<< current_view->buffer()
|
||||
<< "], cbuffer:[xx]" << endl;
|
||||
}
|
||||
|
||||
@ -1897,7 +1897,7 @@ void InsetFig::CallbackFig(long arg)
|
||||
break;
|
||||
case 7: /* apply */
|
||||
case 8: /* ok (apply and close) */
|
||||
if(!current_view->currentBuffer()->isReadonly())
|
||||
if(!current_view->buffer()->isReadonly())
|
||||
{
|
||||
wtype = twtype;
|
||||
htype = thtype;
|
||||
@ -2083,7 +2083,7 @@ void InsetFig::RestoreForm()
|
||||
}
|
||||
else fl_set_input(form->EpsFile, "");
|
||||
fl_set_input(form->Subcaption, subcaption.c_str());
|
||||
if(current_view->currentBuffer()->isReadonly())
|
||||
if(current_view->buffer()->isReadonly())
|
||||
DisableFigurePanel(form);
|
||||
|
||||
TempRegenerate();
|
||||
|
@ -36,8 +36,8 @@ extern "C" void bibitem_cb(FL_OBJECT *, long data)
|
||||
switch (data) {
|
||||
case 1: // OK, citation
|
||||
{
|
||||
if(!current_view->currentBuffer()->isReadonly()) {
|
||||
InsetCommand *inset = static_cast<InsetCommand*>(citation_form->citation_form->u_vdata);
|
||||
if(!current_view->buffer()->isReadonly()) {
|
||||
InsetCommand * inset = static_cast<InsetCommand*>(citation_form->citation_form->u_vdata);
|
||||
inset->setContents(bibcombox->getline());
|
||||
inset->setOptions(fl_get_input(citation_form->label));
|
||||
fl_hide_form(citation_form->citation_form);
|
||||
@ -52,14 +52,14 @@ extern "C" void bibitem_cb(FL_OBJECT *, long data)
|
||||
break;
|
||||
case 3: // OK, bibitem
|
||||
{
|
||||
if(!current_view->currentBuffer()->isReadonly()) {
|
||||
if(!current_view->buffer()->isReadonly()) {
|
||||
InsetCommand *inset = static_cast<InsetCommand*>(bibitem_form->bibitem_form->u_vdata);
|
||||
inset->setContents(fl_get_input(bibitem_form->key));
|
||||
inset->setOptions(fl_get_input(bibitem_form->label));
|
||||
fl_hide_form(bibitem_form->bibitem_form);
|
||||
// Does look like a hack? It is! (but will change at 0.13)
|
||||
current_view->currentBuffer()->text->RedoParagraph();
|
||||
current_view->currentBuffer()->update(1);
|
||||
current_view->buffer()->text->RedoParagraph();
|
||||
current_view->buffer()->update(1);
|
||||
break;
|
||||
} // fall through to Cancel on RO-mode
|
||||
}
|
||||
@ -146,7 +146,7 @@ InsetCitation::~InsetCitation()
|
||||
|
||||
void InsetCitation::Edit(int, int)
|
||||
{
|
||||
if(current_view->currentBuffer()->isReadonly())
|
||||
if(current_view->buffer()->isReadonly())
|
||||
WarnReadonly();
|
||||
|
||||
if (!citation_form) {
|
||||
@ -248,7 +248,7 @@ string InsetBibKey::getScreenLabel() const
|
||||
*/
|
||||
void InsetBibKey::Edit(int, int)
|
||||
{
|
||||
if(current_view->currentBuffer()->isReadonly())
|
||||
if(current_view->buffer()->isReadonly())
|
||||
WarnReadonly();
|
||||
|
||||
if (!bibitem_form) {
|
||||
@ -310,7 +310,7 @@ int InsetBibtex::Latex(string &file, signed char /*fragile*/)
|
||||
// inset is cut and pasted. Such hacks will not be needed
|
||||
// later (JMarc)
|
||||
if (!owner) {
|
||||
owner = current_view->currentBuffer();
|
||||
owner = current_view->buffer();
|
||||
}
|
||||
// If we generate in a temp dir, we might need to give an
|
||||
// absolute path there. This is a bit complicated since we can
|
||||
@ -351,7 +351,7 @@ string InsetBibtex::getKeys()
|
||||
// This hack is copied from InsetBibtex::Latex.
|
||||
// Is it still needed? Probably yes.
|
||||
if (!owner) {
|
||||
owner = current_view->currentBuffer();
|
||||
owner = current_view->buffer();
|
||||
}
|
||||
|
||||
// We need to create absolute path names for bibliographies
|
||||
@ -474,11 +474,11 @@ void BibitemUpdate(Combox * combox)
|
||||
if (!current_view->available())
|
||||
return;
|
||||
|
||||
string tmp, bibkeys = current_view->currentBuffer()->getBibkeyList(',');
|
||||
bibkeys=split(bibkeys, tmp,',');
|
||||
string tmp, bibkeys = current_view->buffer()->getBibkeyList(',');
|
||||
bibkeys = split(bibkeys, tmp,',');
|
||||
while (!tmp.empty()) {
|
||||
combox->addto(tmp.c_str());
|
||||
bibkeys=split(bibkeys, tmp,',');
|
||||
bibkeys = split(bibkeys, tmp,',');
|
||||
}
|
||||
}
|
||||
|
||||
@ -489,7 +489,7 @@ int bibitemMaxWidth(LyXFont const & font)
|
||||
{
|
||||
int w = 0;
|
||||
// Does look like a hack? It is! (but will change at 0.13)
|
||||
LyXParagraph *par = current_view->currentBuffer()->paragraph;
|
||||
LyXParagraph * par = current_view->buffer()->paragraph;
|
||||
|
||||
while (par) {
|
||||
if (par->bibkey) {
|
||||
@ -507,8 +507,8 @@ string bibitemWidthest()
|
||||
{
|
||||
int w = 0;
|
||||
// Does look like a hack? It is! (but will change at 0.13)
|
||||
LyXParagraph * par = current_view->currentBuffer()->paragraph;
|
||||
InsetBibKey * bkey=0;
|
||||
LyXParagraph * par = current_view->buffer()->paragraph;
|
||||
InsetBibKey * bkey = 0;
|
||||
LyXFont font;
|
||||
|
||||
while (par) {
|
||||
|
@ -131,7 +131,7 @@ extern "C" void include_cb(FL_OBJECT *, long arg)
|
||||
}
|
||||
|
||||
case 1:
|
||||
if(!current_view->currentBuffer()->isReadonly()) {
|
||||
if(!current_view->buffer()->isReadonly()) {
|
||||
inset->setContents(fl_get_input(form->input));
|
||||
// don't typeset
|
||||
inset->setNoLoad(fl_get_button(form->flag1));
|
||||
@ -153,7 +153,7 @@ extern "C" void include_cb(FL_OBJECT *, long arg)
|
||||
fl_hide_form(form->include);
|
||||
break;
|
||||
case 5:
|
||||
if(!current_view->currentBuffer()->isReadonly()) {
|
||||
if(!current_view->buffer()->isReadonly()) {
|
||||
inset->setContents(fl_get_input(form->input));
|
||||
inset->setNoLoad(fl_get_button(form->flag1));
|
||||
if (fl_get_button(form->flag2))
|
||||
@ -167,7 +167,7 @@ extern "C" void include_cb(FL_OBJECT *, long arg)
|
||||
|
||||
fl_hide_form(form->include);
|
||||
UpdateInset(inset);
|
||||
current_view->getOwner()->getLyXFunc()->Dispatch(LFUN_CHILDOPEN, inset->getContents().c_str());
|
||||
current_view->owner()->getLyXFunc()->Dispatch(LFUN_CHILDOPEN, inset->getContents().c_str());
|
||||
}
|
||||
break;
|
||||
|
||||
@ -227,7 +227,7 @@ Inset * InsetInclude::Clone()
|
||||
|
||||
void InsetInclude::Edit(int, int)
|
||||
{
|
||||
if(current_view->currentBuffer()->isReadonly())
|
||||
if(current_view->buffer()->isReadonly())
|
||||
WarnReadonly();
|
||||
|
||||
if (!form) {
|
||||
|
@ -26,7 +26,7 @@ extern "C" void index_cb(FL_OBJECT *, long data)
|
||||
|
||||
switch (data) {
|
||||
case 1: // OK
|
||||
if(!current_view->currentBuffer()->isReadonly()) {
|
||||
if(!current_view->buffer()->isReadonly()) {
|
||||
string tmp = fl_get_input(index_form->key);
|
||||
if(tmp != inset->getContents()) {
|
||||
inset->setContents(tmp);
|
||||
@ -88,7 +88,7 @@ InsetIndex::~InsetIndex()
|
||||
|
||||
void InsetIndex::Edit(int, int)
|
||||
{
|
||||
if(current_view->currentBuffer()->isReadonly())
|
||||
if(current_view->buffer()->isReadonly())
|
||||
WarnReadonly();
|
||||
|
||||
if (!index_form)
|
||||
|
@ -157,7 +157,7 @@ void InsetInfo::CloseInfoCB(FL_OBJECT * ob, long)
|
||||
{
|
||||
InsetInfo * inset = static_cast<InsetInfo*>(ob->u_vdata);
|
||||
string tmp = fl_get_input(inset->strobj);
|
||||
Buffer * buffer = current_view->currentBuffer();
|
||||
Buffer * buffer = current_view->buffer();
|
||||
if(tmp != inset->contents && !(buffer->isReadonly()) ) {
|
||||
buffer->markDirty();
|
||||
inset->contents = tmp;
|
||||
@ -181,7 +181,7 @@ void InsetInfo::Edit(int, int)
|
||||
{
|
||||
static int ow = -1, oh;
|
||||
|
||||
if(current_view->currentBuffer()->isReadonly())
|
||||
if(current_view->buffer()->isReadonly())
|
||||
WarnReadonly();
|
||||
|
||||
if (!form) {
|
||||
|
@ -38,7 +38,7 @@ InsetParent::InsetParent(string fn, Buffer * owner): InsetCommand("lyxparent")
|
||||
|
||||
void InsetParent::Edit(int, int)
|
||||
{
|
||||
current_view->getOwner()->getLyXFunc()->Dispatch(LFUN_CHILDOPEN,
|
||||
current_view->owner()->getLyXFunc()->Dispatch(LFUN_CHILDOPEN,
|
||||
getContents().c_str());
|
||||
}
|
||||
|
||||
|
@ -228,7 +228,7 @@ int InsetQuotes::Latex(FILE * file, signed char /*fragile*/)
|
||||
int InsetQuotes::Latex(string & file, signed char /*fragile*/)
|
||||
{
|
||||
string doclang =
|
||||
current_view->currentBuffer()->GetLanguage();
|
||||
current_view->buffer()->GetLanguage();
|
||||
int quoteind = quote_index[side][language];
|
||||
string qstr;
|
||||
|
||||
@ -288,7 +288,7 @@ void InsetQuotes::Validate(LaTeXFeatures & features) const
|
||||
{
|
||||
char type = quote_char[quote_index[side][language]];
|
||||
|
||||
if (current_view->currentBuffer()->GetLanguage() == "default"
|
||||
if (current_view->buffer()->GetLanguage() == "default"
|
||||
&& lyxrc->fontenc != "T1") {
|
||||
if (times == InsetQuotes::SingleQ)
|
||||
switch (type) {
|
||||
|
@ -50,7 +50,7 @@ InsetRef::~InsetRef()
|
||||
|
||||
void InsetRef::Edit(int, int)
|
||||
{
|
||||
current_view->getOwner()->getLyXFunc()
|
||||
current_view->owner()->getLyXFunc()
|
||||
->Dispatch(LFUN_REFGOTO, getContents().c_str());
|
||||
}
|
||||
|
||||
@ -63,7 +63,7 @@ string InsetRef::getScreenLabel() const
|
||||
else
|
||||
temp += _("Ref: ");
|
||||
temp += getContents();
|
||||
if(!current_view->currentBuffer()->isLatex()
|
||||
if(!current_view->buffer()->isLatex()
|
||||
&& !getOptions().empty()) {
|
||||
temp += "||";
|
||||
temp += getOptions();
|
||||
|
@ -15,7 +15,7 @@ extern BufferView * current_view;
|
||||
|
||||
void InsetTOC::Edit(int, int)
|
||||
{
|
||||
current_view->getOwner()->getLyXFunc()->Dispatch(LFUN_TOCVIEW);
|
||||
current_view->owner()->getLyXFunc()->Dispatch(LFUN_TOCVIEW);
|
||||
}
|
||||
|
||||
int InsetTOC::Linuxdoc(string & file)
|
||||
|
@ -76,7 +76,7 @@ void InsetUrl::CloseUrlCB(FL_OBJECT * ob, long)
|
||||
else
|
||||
cmdname = "url";
|
||||
|
||||
Buffer * buffer = current_view->currentBuffer();
|
||||
Buffer * buffer = current_view->buffer();
|
||||
|
||||
if ((url != inset->getContents() ||
|
||||
name != inset->getOptions() ||
|
||||
@ -111,7 +111,7 @@ void InsetUrl::Edit(int, int)
|
||||
{
|
||||
static int ow = -1, oh;
|
||||
|
||||
if(current_view->currentBuffer()->isReadonly())
|
||||
if(current_view->buffer()->isReadonly())
|
||||
WarnReadonly();
|
||||
|
||||
if (!fd_form_url) {
|
||||
|
Loading…
Reference in New Issue
Block a user