]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/gtk/GViewBase.C
Change glob() API to accept a dir parameter.
[lyx.git] / src / frontends / gtk / GViewBase.C
index 2c1c61398f8a14dcc9c3a062556faaee7eb712a6..f7762c93c2b5e66220c56ed9cf048acde682ce28 100644 (file)
@@ -9,7 +9,11 @@
  */
 
 #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 "GViewBase.h"
 #include "support/filetools.h"
@@ -44,7 +48,7 @@ void GViewBase::build()
        if (!iconName.empty())
                window()->set_icon_from_file(iconName);
        window()->signal_delete_event().connect(
-               SigC::slot(*this, &GViewBase::onDeleteEvent));
+               sigc::mem_fun(*this, &GViewBase::onDeleteEvent));
        window()->set_title(Glib::locale_to_utf8(getTitle()));
 }
 
@@ -54,6 +58,7 @@ void GViewBase::show()
        if (!window()) {
                build();
        }
+       update();
        window()->show();
 }
 
@@ -74,7 +79,7 @@ void GViewBase::setCancel(Gtk::Button * cancel)
 {
        bcview().setCancel(cancel);
        cancel->signal_clicked().connect(
-               SigC::slot(*this, &GViewBase::onCancel));
+               sigc::mem_fun(*this, &GViewBase::onCancel));
 }
 
 
@@ -82,7 +87,7 @@ void GViewBase::setApply(Gtk::Button * apply)
 {
        bcview().setApply(apply);
        apply->signal_clicked().connect(
-               SigC::slot(*this, &GViewBase::onApply));
+               sigc::mem_fun(*this, &GViewBase::onApply));
 }
 
 
@@ -90,7 +95,7 @@ void GViewBase::setOK(Gtk::Button * ok)
 {
        bcview().setOK(ok);
        ok->signal_clicked().connect(
-               SigC::slot(*this, &GViewBase::onOK));
+               sigc::mem_fun(*this, &GViewBase::onOK));
 }
 
 
@@ -98,7 +103,20 @@ void GViewBase::setRestore(Gtk::Button * restore)
 {
        bcview().setRestore(restore);
        restore->signal_clicked().connect(
-               SigC::slot(*this, &GViewBase::onRestore));
+               sigc::mem_fun(*this, &GViewBase::onRestore));
+}
+
+
+void GViewBase::setTitle(std::string const & title)
+{
+       Dialog::View::setTitle(title);
+       window()->set_title(title);
+}
+
+
+bool GViewBase::readOnly() const
+{
+       return kernel().isBufferReadonly();
 }