]> git.lyx.org Git - lyx.git/blobdiff - src/LyX.cpp
Streamlining CollapseStatus stuff
[lyx.git] / src / LyX.cpp
index d77ffa30f3e64cd165abda25a0b9b4e5a8321569..e93cfe64941f027ef76d0d6934ed9d5c8c28c8ab 100644 (file)
 #include <string>
 #include <vector>
 
+using std::endl;
+using std::for_each;
+using std::map;
+using std::make_pair;
+using std::string;
+using std::vector;
+
+#ifndef CXX_GLOBAL_CSTD
+using std::exit;
+using std::signal;
+using std::system;
+#endif
+
+namespace fs = boost::filesystem;
 
 namespace lyx {
 
@@ -89,23 +103,11 @@ using support::package;
 using support::prependEnvPath;
 using support::rtrim;
 using support::Systemcall;
+using frontend::LyXView;
 
 namespace Alert = frontend::Alert;
 namespace os = support::os;
-namespace fs = boost::filesystem;
-
-using std::endl;
-using std::for_each;
-using std::map;
-using std::make_pair;
-using std::string;
-using std::vector;
 
-#ifndef CXX_GLOBAL_CSTD
-using std::exit;
-using std::signal;
-using std::system;
-#endif
 
 
 /// are we using the GUI at all?
@@ -364,7 +366,7 @@ void LyX::setGuiLanguage(std::string const & language)
 
 Buffer const * const LyX::updateInset(Inset const * inset) const
 {
-       if (!inset)
+       if (quitting || !inset)
                return 0;
 
        Buffer const * buffer_ptr = 0;
@@ -383,7 +385,7 @@ Buffer const * const LyX::updateInset(Inset const * inset) const
 
 void LyX::hideDialogs(std::string const & name, Inset * inset) const
 {
-       if (quitting)
+       if (quitting || !use_gui)
                return;
 
        vector<int> const & view_ids = pimpl_->application_->gui().viewIds();
@@ -413,6 +415,10 @@ int LyX::exec(int & argc, char * argv[])
                }
        }
 
+       // Reinit the messages machinery in case package() knows
+       // something interesting about the locale directory.
+       Messages::init();
+
        if (!use_gui) {
                // FIXME: create a ConsoleApplication
                int exit_status = init(argc, argv);