]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiCharacter.cpp
do what the FIXME suggested
[lyx.git] / src / frontends / qt4 / GuiCharacter.cpp
index aafec8693d99e1b7a2080dc1c196221f944f48a4..a5bf25cbe79513870acf4d367e2f535bc849bbd3 100644 (file)
@@ -21,7 +21,6 @@
 #include "FuncRequest.h"
 #include "Language.h"
 
-#include <QCloseEvent>
 
 using namespace std;
 
@@ -269,11 +268,10 @@ static vector<FamilyPair> const getFamilyData()
 
 
 GuiCharacter::GuiCharacter(GuiView & lv)
-       : GuiDialog(lv, "character"), font_(ignore_font),
+       : GuiDialog(lv, "character", qt_("Text Style")), font_(ignore_font),
          toggleall_(false), reset_lang_(false)
 {
        setupUi(this);
-       setViewTitle(_("Text Style"));
 
        connect(okPB, SIGNAL(clicked()), this, SLOT(slotOK()));
        connect(applyPB, SIGNAL(clicked()), this, SLOT(slotApply()));
@@ -288,6 +286,13 @@ GuiCharacter::GuiCharacter(GuiView & lv)
        connect(langCO, SIGNAL(activated(int)), this, SLOT(change_adaptor()));
        connect(toggleallCB, SIGNAL(clicked()), this, SLOT(change_adaptor()));
 
+#ifdef Q_WS_MACX
+       // On Mac it's common to have tool windows which are always in the
+       // foreground and are hidden when the main window is not focused.
+       setWindowFlags(Qt::Tool);
+       autoapplyCB->setChecked(true);
+#endif
+
        family = getFamilyData();
        series = getSeriesData();
        shape  = getShapeData();
@@ -371,13 +376,6 @@ void GuiCharacter::change_adaptor()
 }
 
 
-void GuiCharacter::closeEvent(QCloseEvent * e)
-{
-       slotClose();
-       GuiDialog::closeEvent(e);
-}
-
-
 template<class A, class B>
 static int findPos2nd(vector<pair<A, B> > const & vec, B const & val)
 {