]> git.lyx.org Git - lyx.git/blobdiff - src/insets/inseturl.C
pos=string::npos for regex not found, use handcoded transform in lstring.C, fix the...
[lyx.git] / src / insets / inseturl.C
index 4d6fba49f33c24220d0f0487c96bcf3dcd42b49c..2b6b41484813590d34ecf13342997ee1a4bedd3d 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,13 +111,14 @@ void InsetUrl::Edit(int, int)
 {
        static int ow = -1, oh;
 
-       if(current_view->currentBuffer()->isReadonly())
-               WarnReadonly();
+       if(current_view->buffer()->isReadonly())
+               WarnReadonly(current_view->buffer()->fileName());
 
        if (!fd_form_url) {
                fd_form_url = create_form_form_url();
                fd_form_url->button_close->u_vdata = this;
-               fl_set_form_atclose(fd_form_url->form_url,CancelCloseBoxCB, 0);
+               fl_set_form_atclose(fd_form_url->form_url,
+                                   CancelCloseBoxCB, 0);
        }
        fl_set_input(fd_form_url->url_name, getContents().c_str());
        fl_set_input(fd_form_url->name_name, getOptions().c_str());
@@ -161,17 +162,17 @@ string InsetUrl::getScreenLabel() const
 }
 
 
-int InsetUrl::Latex(FILE * file, signed char fragile)
+int InsetUrl::Latex(ostream & os, signed char fragile)
 {
        string latex_output;
        int res = Latex(latex_output, fragile);
-       fprintf(file, "%s", latex_output.c_str());
+       os << latex_output;
 
        return res;
 }
 
 
-int InsetUrl::Latex(string &file, signed char fragile)
+int InsetUrl::Latex(string & file, signed char fragile)
 {
        if (!getOptions().empty())
                file += getOptions() + ' ';