]> git.lyx.org Git - lyx.git/blobdiff - src/lyx_cb.C
* remove various xforms relicts, in particular:
[lyx.git] / src / lyx_cb.C
index 3286ce49287ffc64d37baec7ff7946a7be7446fa..fcd809bec78b41e5c312b975bc68ae9e5f22b8e7 100644 (file)
@@ -98,7 +98,7 @@ bool quitting;        // flag, that we are quitting the program
 // Menu callbacks
 //
 
-bool MenuWrite(Buffer * buffer)
+bool menuWrite(Buffer * buffer)
 {
        if (buffer->save()) {
                LyX::ref().session().addLastFile(buffer->fileName());
@@ -115,13 +115,13 @@ bool MenuWrite(Buffer * buffer)
                text, 0, 1, _("&Rename"), _("&Cancel"));
 
        if (ret == 0)
-               return WriteAs(buffer);
+               return writeAs(buffer);
        return false;
 }
 
 
 
-bool WriteAs(Buffer * buffer, string const & filename)
+bool writeAs(Buffer * buffer, string const & filename)
 {
        string fname = buffer->fileName();
        string const oldname = fname;
@@ -129,7 +129,7 @@ bool WriteAs(Buffer * buffer, string const & filename)
        if (filename.empty()) {
 
                FileDialog fileDlg(_("Choose a filename to save document as"),
-                       LFUN_WRITEAS,
+                       LFUN_BUFFER_WRITE_AS,
                        make_pair(string(_("Documents|#o#O")),
                                  string(lyxrc.document_path)),
                        make_pair(string(_("Templates|#T#t")),
@@ -177,7 +177,7 @@ bool WriteAs(Buffer * buffer, string const & filename)
        bool unnamed = buffer->isUnnamed();
        buffer->setUnnamed(false);
 
-       if (!MenuWrite(buffer)) {
+       if (!menuWrite(buffer)) {
                buffer->setFileName(oldname);
                buffer->setUnnamed(unnamed);
                return false;
@@ -188,7 +188,7 @@ bool WriteAs(Buffer * buffer, string const & filename)
 }
 
 
-void QuitLyX(bool noask)
+void quitLyX(bool noask)
 {
        lyxerr[Debug::INFO] << "Running QuitLyX." << endl;
 
@@ -216,7 +216,7 @@ void QuitLyX(bool noask)
                Alert::warning(_("Unable to remove temporary directory"), msg);
        }
 
-       lyx_gui::exit();
+       lyx_gui::exit(0);
 }
 
 
@@ -297,7 +297,7 @@ int AutoSaveBuffer::generateChild()
 } // namespace anon
 
 
-void AutoSave(BufferView * bv)
+void autoSave(BufferView * bv)
        // should probably be moved into BufferList (Lgb)
        // Perfect target for a thread...
 {
@@ -333,20 +333,11 @@ void AutoSave(BufferView * bv)
 // create new file with template
 // SERVERCMD !
 //
-void NewFile(BufferView * bv, string const & filename)
+void newFile(BufferView * bv, string const & filename)
 {
        // Split argument by :
        string name;
        string tmpname = split(filename, name, ':');
-#ifdef __EMX__ // Fix me! lyx_cb.C may not be low level enough to allow this.
-       if (name.length() == 1
-           && isalpha(static_cast<unsigned char>(name[0]))
-           && (prefixIs(tmpname, "/") || prefixIs(tmpname, "\\"))) {
-               name += ':';
-               name += token(tmpname, ':', 0);
-               tmpname = split(tmpname, ':');
-       }
-#endif
        lyxerr[Debug::INFO] << "Arg is " << filename
                            << "\nName is " << name
                            << "\nTemplate is " << tmpname << endl;
@@ -356,7 +347,7 @@ void NewFile(BufferView * bv, string const & filename)
 
 
 // Insert ascii file (if filename is empty, prompt for one)
-void InsertAsciiFile(BufferView * bv, string const & f, bool asParagraph)
+void insertAsciiFile(BufferView * bv, string const & f, bool asParagraph)
 {
        if (!bv->available())
                return;
@@ -440,15 +431,13 @@ string getContentsOfAsciiFile(BufferView * bv, string const & f, bool asParagrap
 
 // This function runs "configure" and then rereads lyx.defaults to
 // reconfigure the automatic settings.
-void Reconfigure(BufferView * bv)
+void reconfigure(BufferView * bv)
 {
        bv->owner()->message(_("Running configure..."));
 
        // Run configure in user lyx directory
        Path p(package().user_support());
-       string const configure_script =
-               addName(package().system_support(), "configure.py");
-       string const configure_command = "python " + quoteName(configure_script);
+       string const configure_command = package().configure_command();
        Systemcall one;
        one.startscript(Systemcall::Wait, configure_command);
        p.pop();