]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/xforms/FormVCLog.C
Bugfixes: checkboxes to radiobuttons (from J�rgen S) and remove a little
[lyx.git] / src / frontends / xforms / FormVCLog.C
index 188cbeb76c7b2f1a841436f1f0faeea106d565e0..b9ccbe3d1ca93d1f488fa979f0e1c7aacca281c7 100644 (file)
@@ -4,46 +4,29 @@
  */
 
 #include <config.h>
-
-#include FORMS_H_LOCATION
+#include "Lsstream.h"
 
 #ifdef __GNUG__
 #pragma implementation
 #endif
 
-#include "gettext.h" 
+#include "xformsBC.h"
+#include "ControlVCLog.h"
 #include "FormVCLog.h"
 #include "form_browser.h"
-#include "LyXView.h"
-#include "Dialogs.h"
-#include "lyxrc.h"
-#include "buffer.h"
-
-#ifdef SIGC_CXX_NAMESPACES
-using SigC::slot;
-#endif
+#include "gettext.h"
 
-FormVCLog::FormVCLog(LyXView * lv, Dialogs * d)
-       : FormBrowser(lv, d, _("Version Control Log"))
-{
-       // let the dialog be shown
-       // This is a permanent connection so we won't bother
-       // storing a copy because we won't be disconnecting.
-       d->showVCLogFile.connect(slot(this, &FormVCLog::show));
-}
+FormVCLog::FormVCLog(ControlVCLog & c)
+       : FormCB<ControlVCLog, FormBrowser>(c, _("Version Control Log"))
+{}
 
 
 void FormVCLog::update()
 {
-       if (!dialog_.get() || !lv_->view()->available())
-               return;
-       const string logfile = lv_->view()->buffer()->lyxvc.getLogFile();
-
        fl_clear_browser(dialog_->browser);
 
-       if (logfile=="" || !fl_load_browser(dialog_->browser, logfile.c_str()))
-               fl_add_browser_line(dialog_->browser, _("No version control log file available"));
-
-       lyx::unlink(logfile); 
+       stringstream ss;
+       fl_add_browser_line(dialog_->browser,
+                           controller().getVCLogFile(ss).str().c_str());
 }