]> git.lyx.org Git - lyx.git/blobdiff - src/lyx_cb.C
Look for mathed xpms. Doesn't do anything yet due to lack of workable XPMs
[lyx.git] / src / lyx_cb.C
index ba68ea63236e3b4dba45d610ac8aea905921d41d..30f2d89da14f0d98808660482f405574260099a5 100644 (file)
@@ -278,7 +278,7 @@ void AutoSave(BufferView * bv)
 
                string const tmp_ret = lyx::tempName(string(), "lyxauto");
                if (!tmp_ret.empty()) {
-                       bv->buffer()->writeFile(tmp_ret, 1);
+                       bv->buffer()->writeFile(tmp_ret);
                        // assume successful write of tmp_ret
                        if (!lyx::rename(tmp_ret, fname)) {
                                failed = true;
@@ -293,7 +293,7 @@ void AutoSave(BufferView * bv)
 
                if (failed) {
                        // failed to write/rename tmp_ret so try writing direct
-                       if (!bv->buffer()->writeFile(fname, 1)) {
+                       if (!bv->buffer()->writeFile(fname)) {
                                // It is dangerous to do this in the child,
                                // but safe in the parent, so...
                                if (pid == -1)
@@ -317,7 +317,7 @@ void AutoSave(BufferView * bv)
 // create new file with template
 // SERVERCMD !
 //
-Buffer * NewLyxFile(string const & filename)
+Buffer * NewFile(string const & filename)
 {
        // Split argument by :
        string name;
@@ -428,7 +428,7 @@ string getContentsOfAsciiFile(BufferView * bv, string const & f, bool asParagrap
 
 void MenuInsertLabel(BufferView * bv, string const & arg)
 {
-       string label(arg);
+       string label = arg;
        bv->owner()->prohibitInput();
        if (label.empty()) {
                Paragraph * par = bv->getLyXText()->cursor.par();
@@ -466,7 +466,7 @@ void MenuInsertLabel(BufferView * bv, string const & arg)
                pair<bool, string> result =
                        Alert::askForText(_("Enter new label to insert:"), text);
                if (result.first) {
-                       label = frontStrip(strip(result.second));
+                       label = trim(result.second);
                }
        }
        if (!label.empty()) {