]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiCharacter.cpp
Have OK/Apply buttons initially disabled.
[lyx.git] / src / frontends / qt4 / GuiCharacter.cpp
index b8051661b65dbb064b3e5187a5845d0b4573c670..349fea2c508ef47bc39fe7d1175d37c8e5ae42cc 100644 (file)
@@ -217,14 +217,14 @@ GuiCharacter::GuiCharacter(GuiView & lv)
        connect(autoapplyCB, SIGNAL(stateChanged(int)), this,
                SLOT(slotAutoApply()));
 
-       connect(ulineCO, SIGNAL(activated(int)), this, SLOT(change_adaptor()));
-       connect(strikeCO, SIGNAL(activated(int)), this, SLOT(change_adaptor()));
-       connect(sizeCO, SIGNAL(activated(int)), this, SLOT(change_adaptor()));
-       connect(familyCO, SIGNAL(activated(int)), this, SLOT(change_adaptor()));
-       connect(seriesCO, SIGNAL(activated(int)), this, SLOT(change_adaptor()));
-       connect(shapeCO, SIGNAL(activated(int)), this, SLOT(change_adaptor()));
-       connect(colorCO, SIGNAL(activated(int)), this, SLOT(change_adaptor()));
-       connect(langCO, SIGNAL(activated(int)), this, SLOT(change_adaptor()));
+       connect(ulineCO, SIGNAL(currentIndexChanged(int)), this, SLOT(change_adaptor()));
+       connect(strikeCO, SIGNAL(currentIndexChanged(int)), this, SLOT(change_adaptor()));
+       connect(sizeCO, SIGNAL(currentIndexChanged(int)), this, SLOT(change_adaptor()));
+       connect(familyCO, SIGNAL(currentIndexChanged(int)), this, SLOT(change_adaptor()));
+       connect(seriesCO, SIGNAL(currentIndexChanged(int)), this, SLOT(change_adaptor()));
+       connect(shapeCO, SIGNAL(currentIndexChanged(int)), this, SLOT(change_adaptor()));
+       connect(colorCO, SIGNAL(currentIndexChanged(int)), this, SLOT(change_adaptor()));
+       connect(langCO, SIGNAL(currentIndexChanged(int)), this, SLOT(change_adaptor()));
 
        family = familyData();
        series = seriesData();
@@ -271,13 +271,6 @@ GuiCharacter::GuiCharacter(GuiView & lv)
        setWindowFlags(Qt::Tool);
        autoapplyCB->setChecked(true);
 #endif
-
-// FIXME: hack to work around resizing bug in Qt >= 4.2
-// bug verified with Qt 4.2.{0-3} (JSpitzm)
-#if QT_VERSION >= 0x040200
-       // qt resizes the comboboxes only after show(), so ...
-       QDialog::show();
-#endif
 }
 
 
@@ -533,6 +526,8 @@ void GuiCharacter::paramsToDialog(Font const & font)
        QString const lang = (font.language() == reset_language)
                ? "reset" : toqstr(font.language()->lang());
        langCO->setCurrentIndex(findPos2nd(language, lang));
+       // disable the OK/Apply buttons, since we have no changes yet
+       bc().setValid(false);
 }