]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/controllers/ControlChanges.h
fix crash due to invalidated iterator
[lyx.git] / src / frontends / controllers / ControlChanges.h
index 733393db562e4e4f96de2a6edc2c31c4c0b2d5bf..f146befa450ed5e0836ca83444d1a4f844c59e14 100644 (file)
@@ -6,40 +6,52 @@
  *
  * \author John Levon
  *
- * Full author contact details are available in file CREDITS
+ * Full author contact details are available in file CREDITS.
  */
 
 #ifndef CONTROLCHANGES_H
 #define CONTROLCHANGES_H
 
-#include "ControlDialog_impl.h"
-#include "LString.h"
+#include "Dialog.h"
+
+namespace lyx {
+namespace frontend {
 
 /**
  * A controller for the merge changes dialog.
  */
-class ControlChanges : public ControlDialogBD {
+class ControlChanges : public Dialog::Controller {
 public:
-       ControlChanges(LyXView &, Dialogs &);
+       ///
+       ControlChanges(Dialog &);
+       /// Nothing to initialise in this case.
+       virtual bool initialiseParams(std::string const &) { return true; }
+       ///
+       virtual void clearParams() {}
+       ///
+       virtual void dispatchParams() {}
+       ///
+       virtual bool isBufferDependent() const { return true; }
+       /// always true since dispatchParams() is empty
+       virtual bool canApply() const { return true; }
 
        /// find the next merge chunk and highlight it
-       void find();
+       bool find();
 
        /// return date of change
-       string const getChangeDate();
+       std::string const getChangeDate();
 
        /// return author of change
-       string const getChangeAuthor();
+       std::string const getChangeAuthor();
 
        /// accept the current merge
-       void accept();
+       bool accept();
 
        /// reject the current merge
-       void reject();
-
-private:
-       /// not needed.
-       virtual void apply() {}
+       bool reject();
 };
 
+} // namespace frontend
+} // namespace lyx
+
 #endif // CONTROLCHANGES_H