mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-22 07:42:02 +00:00
shuffle some code around
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@20704 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
65d1912cfe
commit
3f5dd9fb3e
@ -148,6 +148,33 @@ namespace Alert = frontend::Alert;
|
|||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
|
// This function runs "configure" and then rereads lyx.defaults to
|
||||||
|
// reconfigure the automatic settings.
|
||||||
|
void reconfigure(LyXView & lv, string const & option)
|
||||||
|
{
|
||||||
|
// emit message signal.
|
||||||
|
lv.message(_("Running configure..."));
|
||||||
|
|
||||||
|
// Run configure in user lyx directory
|
||||||
|
support::Path p(package().user_support());
|
||||||
|
string configure_command = package().configure_command();
|
||||||
|
configure_command += option;
|
||||||
|
Systemcall one;
|
||||||
|
one.startscript(Systemcall::Wait, configure_command);
|
||||||
|
p.pop();
|
||||||
|
// emit message signal.
|
||||||
|
lv.message(_("Reloading configuration..."));
|
||||||
|
lyxrc.read(support::libFileSearch(string(), "lyxrc.defaults"));
|
||||||
|
// Re-read packages.lst
|
||||||
|
LaTeXFeatures::getAvailable();
|
||||||
|
|
||||||
|
Alert::information(_("System reconfigured"),
|
||||||
|
_("The system has been reconfigured.\n"
|
||||||
|
"You need to restart LyX to make use of any\n"
|
||||||
|
"updated document class specifications."));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
bool getLocalStatus(Cursor cursor, FuncRequest const & cmd, FuncStatus & status)
|
bool getLocalStatus(Cursor cursor, FuncRequest const & cmd, FuncStatus & status)
|
||||||
{
|
{
|
||||||
// Try to fix cursor in case it is broken.
|
// Try to fix cursor in case it is broken.
|
||||||
|
@ -188,31 +188,4 @@ docstring const getContentsOfPlaintextFile(BufferView * bv, string const & f,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// This function runs "configure" and then rereads lyx.defaults to
|
|
||||||
// reconfigure the automatic settings.
|
|
||||||
void reconfigure(LyXView & lv, string const & option)
|
|
||||||
{
|
|
||||||
// emit message signal.
|
|
||||||
lv.message(_("Running configure..."));
|
|
||||||
|
|
||||||
// Run configure in user lyx directory
|
|
||||||
support::Path p(package().user_support());
|
|
||||||
string configure_command = package().configure_command();
|
|
||||||
configure_command += option;
|
|
||||||
Systemcall one;
|
|
||||||
one.startscript(Systemcall::Wait, configure_command);
|
|
||||||
p.pop();
|
|
||||||
// emit message signal.
|
|
||||||
lv.message(_("Reloading configuration..."));
|
|
||||||
lyxrc.read(libFileSearch(string(), "lyxrc.defaults"));
|
|
||||||
// Re-read packages.lst
|
|
||||||
LaTeXFeatures::getAvailable();
|
|
||||||
|
|
||||||
Alert::information(_("System reconfigured"),
|
|
||||||
_("The system has been reconfigured.\n"
|
|
||||||
"You need to restart LyX to make use of any\n"
|
|
||||||
"updated document class specifications."));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
} // namespace lyx
|
} // namespace lyx
|
||||||
|
@ -19,10 +19,6 @@ namespace lyx {
|
|||||||
class Buffer;
|
class Buffer;
|
||||||
class BufferView;
|
class BufferView;
|
||||||
|
|
||||||
namespace frontend {
|
|
||||||
class LyXView;
|
|
||||||
}
|
|
||||||
|
|
||||||
///
|
///
|
||||||
extern bool quitting;
|
extern bool quitting;
|
||||||
|
|
||||||
@ -31,8 +27,6 @@ docstring const getContentsOfPlaintextFile(BufferView * bv,
|
|||||||
std::string const & f, bool asParagraph);
|
std::string const & f, bool asParagraph);
|
||||||
///
|
///
|
||||||
void insertPlaintextFile(BufferView * bv, std::string const & f, bool asParagraph);
|
void insertPlaintextFile(BufferView * bv, std::string const & f, bool asParagraph);
|
||||||
///
|
|
||||||
void reconfigure(frontend::LyXView & lv, std::string const & option);
|
|
||||||
|
|
||||||
} // namespace lyx
|
} // namespace lyx
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user