]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiParagraph.cpp
Complete the removal of the embedding stuff. Maybe. It's hard to be sure we got every...
[lyx.git] / src / frontends / qt4 / GuiParagraph.cpp
index 49668942083464142f35adf5bbceada905462b3d..b73a5f53ae7285ae7d48d84720671d1d400f0485 100644 (file)
@@ -64,6 +64,7 @@ GuiParagraph::GuiParagraph(GuiView & lv)
        // foreground and are hidden when the main window is not focused.
        setWindowFlags(Qt::Tool);
        synchronizedViewCB->setChecked(true);
+       closePB->setText(qt_("&Cancel"));
 #else
        synchronizedViewCB->setChecked(false);
 #endif
@@ -151,6 +152,11 @@ void GuiParagraph::on_synchronizedViewCB_toggled()
        bool in_sync = synchronizedViewCB->isChecked();
        restorePB->setEnabled(!in_sync);
        applyPB->setEnabled(!in_sync);
+       okPB->setEnabled(!in_sync);
+       if (!in_sync)
+               closePB->setText(qt_("&Cancel"));
+       else
+               closePB->setText(qt_("&Close"));
 }
 
 
@@ -162,6 +168,31 @@ void GuiParagraph::changed()
 
 
 void GuiParagraph::on_applyPB_clicked()
+{
+       applyView();
+}
+
+
+void GuiParagraph::on_okPB_clicked()
+{
+       applyView();
+       hide();
+}
+
+
+void GuiParagraph::on_closePB_clicked()
+{
+       hide();
+}
+
+
+void GuiParagraph::on_restorePB_clicked()
+{
+       updateView();
+}
+
+
+void GuiParagraph::applyView()
 {
        ParagraphParameters & pp = params();
 
@@ -201,12 +232,6 @@ void GuiParagraph::on_applyPB_clicked()
 }
 
 
-void GuiParagraph::on_restorePB_clicked()
-{
-       updateView();
-}
-
-
 void GuiParagraph::updateView()
 {
        on_synchronizedViewCB_toggled();