]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/Dialogs.cpp
updated list of LyX translations
[lyx.git] / src / frontends / Dialogs.cpp
index 13132814e556e7c4187df6b29c5e93c2e143014c..a95950c7849126cb24238738bcf8b26a5923e079 100644 (file)
@@ -51,12 +51,12 @@ private:
 
 namespace {
 
-BugfixSignal<boost::signal<void(string const &, InsetBase*)> > hideSignal;
+BugfixSignal<boost::signal<void(string const &, Inset*)> > hideSignal;
 
 }
 
 
-void Dialogs::hide(string const & name, InsetBase* inset)
+void Dialogs::hide(string const & name, Inset* inset)
 {
        // Don't send the signal if we are quitting, because on MSVC it is
        // destructed before the cut stack in CutAndPaste.cpp, and this method
@@ -71,9 +71,13 @@ Dialogs::Dialogs(LyXView & lyxview)
        : lyxview_(lyxview), in_show_(false)
 {
        // Connect signals
-       hideSignal().connect(boost::bind(&Dialogs::hideSlot, this, _1, _2));
+       connection_ = hideSignal().connect(boost::bind(&Dialogs::hideSlot, this, _1, _2));
 }
 
+Dialogs::~Dialogs() 
+{
+       connection_.disconnect();
+}
 
 Dialog * Dialogs::find_or_build(string const & name)
 {
@@ -106,7 +110,7 @@ void Dialogs::show(string const & name, string const & data)
 }
 
 
-void Dialogs::show(string const & name, string const & data, InsetBase * inset)
+void Dialogs::show(string const & name, string const & data, Inset * inset)
 {
        if (in_show_) {
                return;
@@ -145,7 +149,7 @@ void Dialogs::update(string const & name, string const & data)
 }
 
 
-void Dialogs::hideSlot(string const & name, InsetBase * inset)
+void Dialogs::hideSlot(string const & name, Inset * inset)
 {
        std::map<string, DialogPtr>::const_iterator it =
                dialogs_.find(name);
@@ -172,12 +176,12 @@ void Dialogs::disconnect(string const & name)
 }
 
 
-InsetBase * Dialogs::getOpenInset(string const & name) const
+Inset * Dialogs::getOpenInset(string const & name) const
 {
        if (!isValidName(name))
                return 0;
 
-       std::map<string, InsetBase *>::const_iterator it =
+       std::map<string, Inset *>::const_iterator it =
                open_insets_.find(name);
        return it == open_insets_.end() ? 0 : it->second;
 }