mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-11 13:46:43 +00:00
b31ab56c83
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2850 a592a061-630c-0410-9148-cb99ea01b6c8
46 lines
859 B
C
46 lines
859 B
C
/**
|
|
* \file ControlShowFile.C
|
|
* Copyright 2001 The LyX Team.
|
|
* See the file COPYING.
|
|
*
|
|
* \author Herbert Voss <voss@perce.de>
|
|
*/
|
|
|
|
#include <config.h>
|
|
#include <fstream>
|
|
|
|
#ifdef __GNUG__
|
|
#pragma implementation
|
|
#endif
|
|
|
|
#include "ViewBase.h"
|
|
#include "ButtonControllerBase.h"
|
|
#include "ControlShowFile.h"
|
|
#include "Dialogs.h"
|
|
#include "LyXView.h"
|
|
#include "BufferView.h"
|
|
#include "gettext.h"
|
|
#include "support/filetools.h" // FileSearch
|
|
|
|
ControlShowFile::ControlShowFile(LyXView & lv, Dialogs & d)
|
|
: ControlDialog<ControlConnectBI>(lv, d)
|
|
{
|
|
d_.showFile.connect(SigC::slot(this, &ControlShowFile::showFile));
|
|
}
|
|
|
|
void ControlShowFile::showFile(string const & file)
|
|
{
|
|
filename_ = file;
|
|
show();
|
|
}
|
|
|
|
string ControlShowFile::getFileContents()
|
|
{
|
|
return GetFileContents(filename_);
|
|
}
|
|
|
|
string ControlShowFile::getFileName()
|
|
{
|
|
return OnlyFilename(filename_);
|
|
}
|