]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/gtk/GSearch.C
Change glob() API to accept a dir parameter.
[lyx.git] / src / frontends / gtk / GSearch.C
index e6d748fbfa78bbd71712005767b99568e80ce1a8..c966ede402383d5a2e4cc4818fae41b6f1bc9314 100644 (file)
@@ -9,11 +9,16 @@
  */
 
 #include <config.h>
-#include <gtkmm.h>
+
+// Too hard to make concept checks work with this file
+#ifdef _GLIBCPP_CONCEPT_CHECKS
+#undef _GLIBCPP_CONCEPT_CHECKS
+#endif
 
 #include "GSearch.h"
 #include "ControlSearch.h"
 #include "ghelpers.h"
+
 #include <libglademm.h>
 
 using std::string;
@@ -62,6 +67,13 @@ void GSearch::doBuild()
 }
 
 
+void GSearch::update()
+{
+       bc().refreshReadOnly();
+       onFindEntryChanged();
+}
+
+
 void GSearch::onFindNext()
 {
        controller().find(findentry->get_text(),
@@ -101,8 +113,8 @@ void GSearch::onFindEntryChanged()
                replaceallbutton->set_sensitive(false);
        } else {
                findnextbutton->set_sensitive(true);
-               replacebutton->set_sensitive(true);
-               replaceallbutton->set_sensitive(true);
+               replacebutton->set_sensitive(!readOnly());
+               replaceallbutton->set_sensitive(!readOnly());
        }
 }