]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/controllers/ControlButtons.C
The reference dialog now disconnects from the inset on Apply. Its behaviour
[lyx.git] / src / frontends / controllers / ControlButtons.C
index 1f27c14a3c04121c95a2c395ee3c20e8aee0810f..06f31205eb93c8cfcaa5e665c3039c5e3966bbd9 100644 (file)
@@ -1,4 +1,3 @@
-// -*- C++ -*-
 /* This file is part of
  * ====================================================== 
  *
 #endif
 
 #include "ControlButtons.h"
+#include "ButtonControllerBase.h"
+#include "ViewBase.h"
+#include "lyxrc.h"
+
+ControlButtons::ControlButtons()
+       : is_closing_(false)
+{}
+
 
 void ControlButtons::ApplyButton()
 {
@@ -29,7 +36,9 @@ void ControlButtons::ApplyButton()
 
 void ControlButtons::OKButton()
 {
+       is_closing_ = true;
        apply();
+       is_closing_ = false;
        hide();
        bc().ok();
 }
@@ -47,3 +56,9 @@ void ControlButtons::RestoreButton()
        update();
        bc().restore();
 }
+
+
+bool ControlButtons::IconifyWithMain() const
+{
+        return lyxrc.dialogs_iconify_with_main;
+}