From 1eed486fc4292906c57130b7b42f327fdba0c1d8 Mon Sep 17 00:00:00 2001 From: Abdelrazak Younes Date: Sun, 7 Feb 2010 21:46:40 +0000 Subject: [PATCH] ERT and Box insets: simplify dialog creation and don't hide the dialogs upon destruction anymore git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33356 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/qt4/ui/ERTUi.ui | 91 ++++++++++++++++++----------------- src/insets/InsetBox.cpp | 9 +--- src/insets/InsetBox.h | 2 - src/insets/InsetERT.cpp | 9 +--- src/insets/InsetERT.h | 2 - 5 files changed, 49 insertions(+), 64 deletions(-) diff --git a/src/frontends/qt4/ui/ERTUi.ui b/src/frontends/qt4/ui/ERTUi.ui index 26e9d8d4b7..0f855dfd0e 100644 --- a/src/frontends/qt4/ui/ERTUi.ui +++ b/src/frontends/qt4/ui/ERTUi.ui @@ -1,10 +1,8 @@ - - - - + + ERTUi - - + + 0 0 @@ -12,47 +10,47 @@ 135 - + - + true - - - 11 - - + + 6 + + 11 + - - + + Display - - - 11 - - + + 6 - - - + + 11 + + + + Show ERT button only - + &Collapsed - - + + Show ERT contents - + O&pen @@ -61,22 +59,22 @@ - - - 0 - - + + 6 + + 0 + - + Qt::Horizontal - + QSizePolicy::Expanding - + 20 20 @@ -85,21 +83,27 @@ - - - &OK + + + + + + &New + + + false - + false - - + + Close - + true @@ -108,9 +112,8 @@ - - qt_i18n.h + qt_i18n.h diff --git a/src/insets/InsetBox.cpp b/src/insets/InsetBox.cpp index 77e6a5b396..fe4f44b2cc 100644 --- a/src/insets/InsetBox.cpp +++ b/src/insets/InsetBox.cpp @@ -102,12 +102,6 @@ InsetBox::InsetBox(Buffer * buffer, string const & label) {} -InsetBox::~InsetBox() -{ - hideDialogs("box", this); -} - - docstring InsetBox::name() const { // FIXME: UNICODE @@ -192,8 +186,7 @@ bool InsetBox::forcePlainLayout(idx_type) const bool InsetBox::showInsetDialog(BufferView * bv) const { - bv->showDialog("box", params2string(params_), - const_cast(this)); + bv->showDialog("box"); return true; } diff --git a/src/insets/InsetBox.h b/src/insets/InsetBox.h index 60ecfbda64..b838cc8e47 100644 --- a/src/insets/InsetBox.h +++ b/src/insets/InsetBox.h @@ -78,8 +78,6 @@ public: /// InsetBox(Buffer *, std::string const &); /// - ~InsetBox(); - /// static std::string params2string(InsetBoxParams const &); /// static void string2params(std::string const &, InsetBoxParams &); diff --git a/src/insets/InsetERT.cpp b/src/insets/InsetERT.cpp index d1e15bae8b..10452d7cf1 100644 --- a/src/insets/InsetERT.cpp +++ b/src/insets/InsetERT.cpp @@ -51,12 +51,6 @@ InsetERT::InsetERT(Buffer * buf, CollapseStatus status) } -InsetERT::~InsetERT() -{ - hideDialogs("ert", this); -} - - void InsetERT::write(ostream & os) const { os << "ERT" << "\n"; @@ -155,8 +149,7 @@ docstring const InsetERT::buttonLabel(BufferView const & bv) const bool InsetERT::showInsetDialog(BufferView * bv) const { - bv->showDialog("ert", params2string(status(*bv)), - const_cast(this)); + bv->showDialog("ert"); return true; } diff --git a/src/insets/InsetERT.h b/src/insets/InsetERT.h index 3f38f0e70e..b530e05f3f 100644 --- a/src/insets/InsetERT.h +++ b/src/insets/InsetERT.h @@ -34,8 +34,6 @@ public: /// InsetERT(Buffer *, CollapseStatus status = Open); /// - ~InsetERT(); - /// static CollapseStatus string2params(std::string const &); /// static std::string params2string(CollapseStatus); -- 2.39.5