]> git.lyx.org Git - lyx.git/blobdiff - src/lyxvc.C
More fixes to insettabular/text (and some missing features added).
[lyx.git] / src / lyxvc.C
index 3097069d6652395bf4ad3c250e130d8188bdf171..de506a2c032c1c1fbd43329538e29825dda4ec70 100644 (file)
 #include "buffer.h"
 #include "gettext.h"
 #include "support/filetools.h"
+#include "support/lyxlib.h"
 #include "lyxfunc.h"
 #include "LyXView.h"
 
+using std::endl;
+using std::pair;
 
 LyXVC::LyXVC()
 {
@@ -33,9 +36,7 @@ LyXVC::~LyXVC()
                        fl_hide_form(browser->LaTeXLog);
                fl_free_form(browser->LaTeXLog);
        }
-       if (vcs) {
-               delete vcs;
-       }
+       delete vcs;
 }
 
 
@@ -102,8 +103,9 @@ void LyXVC::registrer()
        }
 
        lyxerr[Debug::LYXVC] << "LyXVC: registrer" << endl;
-       pair<bool, string> tmp = askForText(_("LyX VC: Initial description"),
-                                           _("(no initial description)"));
+       pair<bool, string> tmp =
+               askForText(_("LyX VC: Initial description"),
+                          _("(no initial description)"));
        if (!tmp.first || tmp.second.empty()) {
                // should we insist on checking tmp.second.empty()?
                lyxerr[Debug::LYXVC] << "LyXVC: user cancelled" << endl;
@@ -184,7 +186,7 @@ void LyXVC::undoLast()
 
 void LyXVC::toggleReadOnly()
 {
-       switch (vcs->stat()) {
+       switch (vcs->status()) {
        case VCS::UNLOCKED:
                lyxerr[Debug::LYXVC] << "LyXVC: toggle to locked" << endl;
                checkOut();
@@ -278,7 +280,7 @@ void LyXVC::viewLog(string const & fil)
                fl_raise_form(browser->LaTeXLog);
        } else {
                fl_show_form(browser->LaTeXLog,
-                            FL_PLACE_MOUSE | FL_FREE_SIZE, FL_FULLBORDER,
+                            FL_PLACE_MOUSE | FL_FREE_SIZE, FL_TRANSIENT,
                             _("VC History"));
                if (ow < 0) {
                        ow = browser->LaTeXLog->w;
@@ -291,8 +293,8 @@ void LyXVC::viewLog(string const & fil)
 
 void LyXVC::showLog()
 {
-       string tmpf = tmpnam(0);
+       string tmpf = lyx::tempName();
        vcs->getLog(tmpf);
        viewLog(tmpf);
-       unlink(tmpf.c_str());
+       lyx::unlink(tmpf);
 }