]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/controllers/ControlShowFile.C
Add a buffer_path arg to InsetGraphicsMailer's params2string, string2params.
[lyx.git] / src / frontends / controllers / ControlShowFile.C
index 9d5e0b5ce66f4b4cb537b3632f84846c43e7a328..5a756c0ad2e1724fe38bc7f4c912c892ea6e1fbe 100644 (file)
@@ -1,42 +1,36 @@
 /**
  * \file ControlShowFile.C
- * Copyright 2001 The LyX Team.
- * See the file COPYING.
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
  *
- * \author Herbert Voss <voss@perce.de>
+ * \author Herbert Voss
+ *
+ * Full author contact details are available in file CREDITS
  */
 
 #include <config.h>
 
-#ifdef __GNUG__
-#pragma implementation
-#endif
-
 #include "ControlShowFile.h"
-#include "ViewBase.h"
-#include "ButtonControllerBase.h"
-#include "Dialogs.h"
-#include "frontends/LyXView.h"
-#include "BufferView.h"
-#include "gettext.h"
+#include "support/filetools.h"
+
+using namespace lyx::support;
 
-#include "support/filetools.h" // FileSearch
 
-#include <boost/bind.hpp>
+ControlShowFile::ControlShowFile(Dialog & parent)
+       : Dialog::Controller(parent)
+{}
 
-#include <fstream>
 
-ControlShowFile::ControlShowFile(LyXView & lv, Dialogs & d)
-       : ControlDialogBI(lv, d)
+bool ControlShowFile::initialiseParams(string const & data)
 {
-       d_.showFile = boost::bind(&ControlShowFile::showFile, this, _1);
+       filename_ = data;
+       return true;
 }
 
 
-void ControlShowFile::showFile(string const & file)
+void ControlShowFile::clearParams()
 {
-       filename_ = file;
-       show();
+       filename_.erase();
 }