]> git.lyx.org Git - features.git/commitdiff
changes because of function name change in BufferView and LyXView.
authorLars Gullik Bjønnes <larsbj@gullik.org>
Tue, 9 Nov 1999 22:53:41 +0000 (22:53 +0000)
committerLars Gullik Bjønnes <larsbj@gullik.org>
Tue, 9 Nov 1999 22:53:41 +0000 (22:53 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@301 a592a061-630c-0410-9148-cb99ea01b6c8

src/insets/figinset.C
src/insets/insetbib.C
src/insets/insetinclude.C
src/insets/insetindex.C
src/insets/insetinfo.C
src/insets/insetparent.C
src/insets/insetquotes.C
src/insets/insetref.C
src/insets/insettoc.C
src/insets/inseturl.C

index 48ba4d3b727785df51cfa8540d568f22d4ebf8fb..b58b7dc4fcb0b5183f91dc47f42326626e9ee12d 100644 (file)
@@ -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();
index ec5f1c064eb3ed3a3330bb1c372168757f2fbb74..e91280a4872a046f192b1b056bd2eaa8aa70de50 100644 (file)
@@ -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) {
index f881d9b1030dfe39598f8c2fe231743fcb1ff2f1..9353fb97dcb552f8c583f699cd0b00c2541b995b 100644 (file)
@@ -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) {
index a46d471e2d7cea918e3fd7b2fdec249f7d2cc508..a4868a40692b0a6bc8487d4d3556dfed8da449bd 100644 (file)
@@ -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)
index 139d32167d61931ba1efd4b52efa080a21f0ce85..21a7f066803817ef61afc9e691463c218fc3fcd3 100644 (file)
@@ -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) {
index 173072f885f31a2ffc8cfd96d9b23009238e03bf..525709accd47d464c40cce408ab606b1acd1c9d5 100644 (file)
@@ -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());
 }
 
index 3fba432722d2a7fb9f9bf3c7378a0abd80c99910..889c2fe295cb370e5e62392c8122812f2496284a 100644 (file)
@@ -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) {
index a66d536ade98408df1c6ddc8880f76a2515db893..8ef66fdc9ea68f3dfd90b80bf3ce4e652ba575f7 100644 (file)
@@ -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();
index 77ad1928d9aa324dde00bdcf88c7f61b6c7c13b3..d7da8300c1b2eec269e29d8eddfc6b119ac0ab81 100644 (file)
@@ -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)
index 4d6fba49f33c24220d0f0487c96bcf3dcd42b49c..436d68bb67d08db7fe5d32c93497997974c64bcb 100644 (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) {