]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetinclude.C
prepare for 1.1.6pre2
[lyx.git] / src / insets / insetinclude.C
index 718032141d15eb0c18f032f5f61022713d399a1f..60cc1b2269be721721a06f08f7e3095e7ddb35e0 100644 (file)
@@ -252,7 +252,7 @@ void InsetInclude::Edit(BufferView * bv, int, int, unsigned int)
 
        if (!form) {
                 form = create_form_include();
-               fl_set_form_atclose(form->include, IgnoreCloseBoxCB, 0);
+               fl_set_form_atclose(form->include, CancelCloseBoxCB, 0);
        }
         form->include->u_vdata = this;
     
@@ -272,7 +272,8 @@ void InsetInclude::Edit(BufferView * bv, int, int, unsigned int)
         if (form->include->visible) {
                fl_raise_form(form->include);
        } else {
-               fl_show_form(form->include, FL_PLACE_MOUSE, FL_FULLBORDER,
+               fl_show_form(form->include,
+                            FL_PLACE_MOUSE | FL_FREE_SIZE, FL_TRANSIENT,
                             _("Include"));
        }
 }
@@ -450,7 +451,9 @@ int InsetInclude::Linuxdoc(Buffer const * buffer, ostream & os) const
        } 
 
        if (isVerb()) {
-               os << "<!-- includefile verbatim=\"" << incfile << "\" -->";
+               os << "<inlinegraphic fileref=\"" << '&' << include_label << ';'
+                  << "\" format=\"linespecific\">"
+                  << "</inlinegraphic>";
        } else 
                os << '&' << include_label << ';';
        
@@ -486,7 +489,9 @@ int InsetInclude::DocBook(Buffer const * buffer, ostream & os) const
        } 
 
        if (isVerb()) {
-               os << "<inlinegraphic fileref=\"" << incfile << "\" format=\"linespecific\">";
+               os << "<inlinegraphic fileref=\"" << '&' << include_label << ';'
+                  << "\" format=\"linespecific\">"
+                  << "</inlinegraphic>";
        } else 
                os << '&' << include_label << ';';
        
@@ -498,14 +503,15 @@ void InsetInclude::Validate(LaTeXFeatures & features) const
 {
 
        string incfile(getContents());
-       string writefile = ChangeExtension(getFileName(), ".sgml");
+       string writefile; // = ChangeExtension(getFileName(), ".sgml");
+
        if (!master->tmppath.empty() && !master->niceFile) {
                incfile = subst(incfile, '/','@');
                writefile = AddName(master->tmppath, incfile);
        } else
-               // writefile = getFileName();
+               writefile = getFileName();
                // Use the relative path.
-               writefile = incfile;
+               //writefile = incfile;
 
        if (IsLyXFilename(getFileName()))
                writefile = ChangeExtension(writefile, ".sgml");