]> git.lyx.org Git - lyx.git/blobdiff - src/lyx_cb.C
Collapse all those LFUN_XYZ_APPLY to a single LFUN_INSET_APPLY.
[lyx.git] / src / lyx_cb.C
index 757487b531d9ce26a0715cdb6bfab8b71eda3565..e3578314111db3cc6f221767fdd4d4196ab0cddb 100644 (file)
@@ -104,8 +104,7 @@ bool WriteAs(BufferView * bv, Buffer * buffer, string const & filename)
 
        if (filename.empty()) {
 
-               FileDialog fileDlg(bv->owner(),
-                                  _("Choose a filename to save document as"),
+               FileDialog fileDlg(_("Choose a filename to save document as"),
                        LFUN_WRITEAS,
                        make_pair(string(_("Documents|#o#O")),
                                  string(lyxrc.document_path)),
@@ -117,7 +116,7 @@ bool WriteAs(BufferView * bv, Buffer * buffer, string const & filename)
 
                FileDialog::Result result =
                        fileDlg.save(OnlyPath(fname),
-                                      _("*.lyx|LyX Documents (*.lyx)"),
+                                      _("*.lyx| LyX Documents (*.lyx)"),
                                       OnlyFilename(fname));
 
                if (result.first == FileDialog::Later)
@@ -420,7 +419,7 @@ string getContentsOfAsciiFile(BufferView * bv, string const & f, bool asParagrap
        string fname = f;
 
        if (fname.empty()) {
-               FileDialog fileDlg(bv->owner(), _("Select file to insert"),
+               FileDialog fileDlg(_("Select file to insert"),
                        (asParagraph) ? LFUN_FILE_INSERT_ASCII_PARA : LFUN_FILE_INSERT_ASCII);
 
                FileDialog::Result result = fileDlg.open(bv->owner()->buffer()->filePath());
@@ -444,7 +443,7 @@ string getContentsOfAsciiFile(BufferView * bv, string const & f, bool asParagrap
 
        ifstream ifs(fname.c_str());
        if (!ifs) {
-               Alert::err_alert(_("Error! Cannot open specified file: "),
+               Alert::err_alert(_("Error! Cannot open specified file:"),
                             MakeDisplayPath(fname, 50));
                return string();
        }
@@ -473,7 +472,6 @@ string getContentsOfAsciiFile(BufferView * bv, string const & f, bool asParagrap
 void MenuInsertLabel(BufferView * bv, string const & arg)
 {
        string label = arg;
-       bv->owner()->prohibitInput();
        if (label.empty()) {
                Paragraph * par = bv->getLyXText()->cursor.par();
                LyXLayout_ptr layout = par->layout();
@@ -518,7 +516,6 @@ void MenuInsertLabel(BufferView * bv, string const & arg)
                InsetLabel * inset = new InsetLabel(p);
                bv->insertInset(inset);
        }
-       bv->owner()->allowInput();
 }