]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/Dialogs.C
Martin's changes to the Note inset.
[lyx.git] / src / frontends / Dialogs.C
index 8f31720b854685ee83f12e384ab243fabcc901cc..08dfde0335a54b90edad5baf569e63178bdb50ef 100644 (file)
@@ -95,6 +95,7 @@ void Dialogs::show(string const & name, string const & data)
        if (!dialog)
                return;
 
+       // FIXME! Should check that the dialog is NOT an inset dialog.
        dialog->show(data);
 }
 
@@ -105,11 +106,22 @@ void Dialogs::show(string const & name, string const & data, InsetBase * inset)
        if (!dialog)
                return;
 
+       // FIXME! Should check that the dialog IS an inset dialog.
        dialog->show(data);
        open_insets_[name] = inset;
 }
 
 
+bool Dialogs::visible(string const & name) const
+{
+       std::map<string, DialogPtr>::const_iterator it =
+               dialogs_.find(name);
+       if (it == dialogs_.end())
+               return false;
+       return it->second.get()->isVisible();
+}
+
+
 void Dialogs::update(string const & name, string const & data)
 {
        Dialog * dialog = find(name);