]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiExternal.cpp
Use <cstdint> instead of <boost/cstdint.hpp>
[lyx.git] / src / frontends / qt4 / GuiExternal.cpp
index f721bd28b64cf183e88875cacd8110d078953bcb..7be6be0954a69e49f330522003ee9bf7b00fc34d 100644 (file)
@@ -88,9 +88,8 @@ GuiExternal::GuiExternal(GuiView & lv)
 {
        setupUi(this);
 
-       connect(okPB, SIGNAL(clicked()), this, SLOT(slotOK()));
-       connect(applyPB, SIGNAL(clicked()), this, SLOT(slotApply()));
-       connect(closePB, SIGNAL(clicked()), this, SLOT(slotClose()));
+       connect(buttonBox, SIGNAL(clicked(QAbstractButton *)),
+                       this, SLOT(slotButtonBox(QAbstractButton *)));
 
        /*
        connect(displayGB, SIGNAL(toggled(bool)),
@@ -159,9 +158,9 @@ GuiExternal::GuiExternal(GuiView & lv)
 
        bc().setPolicy(ButtonPolicy::NoRepeatedApplyReadOnlyPolicy);
 
-       bc().setOK(okPB);
-       bc().setApply(applyPB);
-       bc().setCancel(closePB);
+       bc().setOK(buttonBox->button(QDialogButtonBox::Ok));
+       bc().setApply(buttonBox->button(QDialogButtonBox::Apply));
+       bc().setCancel(buttonBox->button(QDialogButtonBox::Cancel));
 
        bc().addReadOnly(fileED);
        bc().addReadOnly(browsePB);
@@ -493,6 +492,9 @@ static void getCrop(external::ClipData & data,
 
 void GuiExternal::updateContents()
 {
+       if (params_.filename.empty())
+               tab->setCurrentIndex(0);
+
        string const name =
                params_.filename.outputFileName(fromqstr(bufferFilePath()));
        fileED->setText(toqstr(name));