From: Abdelrazak Younes Date: Fri, 2 May 2008 21:38:23 +0000 (+0000) Subject: * Delegates.h: clarify some comments. X-Git-Tag: 1.6.10~4920 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=b9c526aaa2603c6ffa77ede1543b0dda86f7ab74;p=features.git * Delegates.h: clarify some comments. * Dialog: get rid of updateData() git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24589 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/frontends/Delegates.h b/src/frontends/Delegates.h index 96c134bf56..c1ef6556a4 100644 --- a/src/frontends/Delegates.h +++ b/src/frontends/Delegates.h @@ -45,9 +45,9 @@ public: virtual void showDialog(std::string const & name, std::string const & data, Inset * inset = 0) = 0; - /// This function is called when some dialogs needs to be updated. + /// This function is called when some dialogs needs to be reset. /** \param name == "citation", "bibtex" etc; an identifier used - to update the contents of a particular dialog with \param data. + to reset the contents of a particular dialog with \param data. See the comments to 'show', above. */ virtual void updateDialog(std::string const & name, diff --git a/src/frontends/qt4/Dialog.cpp b/src/frontends/qt4/Dialog.cpp index fc741985d8..d4bd227e12 100644 --- a/src/frontends/qt4/Dialog.cpp +++ b/src/frontends/qt4/Dialog.cpp @@ -163,21 +163,6 @@ void Dialog::apply() } -void Dialog::updateData(string const & data) -{ - if (!initialiseParams(data)) { - LYXERR0("Dialog \"" << fromqstr(name()) - << "\" could not be initialized"); - return; - } - - if (lyxview_->buffer()) - updateView(); - else - enableView(false); -} - - void Dialog::showView() { // Make sure the dialog controls are correctly enabled/disabled with diff --git a/src/frontends/qt4/Dialog.h b/src/frontends/qt4/Dialog.h index 1bd75673c5..9c7b3b6c56 100644 --- a/src/frontends/qt4/Dialog.h +++ b/src/frontends/qt4/Dialog.h @@ -87,7 +87,6 @@ public: /// \param data is a string encoding of the data to be displayed. /// It is passed to the Controller to be translated into a useable form. virtual void showData(std::string const & data); - virtual void updateData(std::string const & data); //@} /** Check whether we may apply our data. diff --git a/src/frontends/qt4/GuiView.cpp b/src/frontends/qt4/GuiView.cpp index 46b0a83f9d..f4cdda665f 100644 --- a/src/frontends/qt4/GuiView.cpp +++ b/src/frontends/qt4/GuiView.cpp @@ -941,7 +941,7 @@ void GuiView::updateDialog(string const & name, string const & data) Dialog * const dialog = it->second.get(); if (dialog->isVisibleView()) - dialog->updateData(data); + dialog->initialiseParams(data); } diff --git a/src/frontends/qt4/GuiView.h b/src/frontends/qt4/GuiView.h index d3e041f3d5..7400c27e0c 100644 --- a/src/frontends/qt4/GuiView.h +++ b/src/frontends/qt4/GuiView.h @@ -229,7 +229,7 @@ public: std::string const & data, Inset * inset = 0); /** \param name == "citation", "bibtex" etc; an identifier used - to update the contents of a particular dialog with \param data. + to reset the contents of a particular dialog with \param data. See the comments to 'show', above. */ void updateDialog(std::string const & name, std::string const & data);