]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/GuiHSpace.cpp
Compil fix.
[lyx.git] / src / frontends / qt4 / GuiHSpace.cpp
index 43a4e89b6ffc597f13b937eb3d13f530f2c79a35..60a279e9f90dfe4acadb6a13b060f24c3d59b824 100644 (file)
@@ -19,6 +19,7 @@
 #include "LyXRC.h"
 #include "Spacing.h"
 #include "FuncRequest.h"
+
 #include "insets/InsetSpace.h"
 
 #include "support/gettext.h"
@@ -95,6 +96,12 @@ void GuiHSpace::enableWidgets(int selection)
                selection == 0 || selection == 3  ||
                (selection == 6 && pattern == 0) || selection == 7;
        keepCB->setEnabled(enable_keep);
+       if (selection == 3)
+               keepCB->setToolTip(qt_("Insert the spacing even after a line break.\n"
+                                      "Note that a protected Half Quad will be turned into\n"
+                                      "a vertical space if used at the beginning of a paragraph!"));
+       else
+               keepCB->setToolTip(qt_("Insert the spacing even after a line break"));
        changed();
 }
 
@@ -158,6 +165,22 @@ static void setWidgetsFromHSpace(InsetSpaceParams const & params,
                        item = 6;
                        pattern = 2;
                        break;
+               case InsetSpaceParams::LEFTARROWFILL:
+                       item = 6;
+                       pattern = 3;
+                       break;
+               case InsetSpaceParams::RIGHTARROWFILL:
+                       item = 6;
+                       pattern = 4;
+                       break;
+               case InsetSpaceParams::UPBRACEFILL:
+                       item = 6;
+                       pattern = 5;
+                       break;
+               case InsetSpaceParams::DOWNBRACEFILL:
+                       item = 6;
+                       pattern = 6;
+                       break;
                case InsetSpaceParams::CUSTOM:
                        item = 7;
                        break;
@@ -213,6 +236,14 @@ static InsetSpaceParams setHSpaceFromWidgets(int spacing,
                                params.kind = InsetSpaceParams::DOTFILL;
                        else if (fill == 2)
                                params.kind = InsetSpaceParams::HRULEFILL;
+                       else if (fill == 3)
+                               params.kind = InsetSpaceParams::LEFTARROWFILL;
+                       else if (fill == 4)
+                               params.kind = InsetSpaceParams::RIGHTARROWFILL;
+                       else if (fill == 5)
+                               params.kind = InsetSpaceParams::UPBRACEFILL;
+                       else if (fill == 6)
+                               params.kind = InsetSpaceParams::DOWNBRACEFILL;
                        else if (keep)
                                params.kind = InsetSpaceParams::HFILL_PROTECTED;
                        else
@@ -248,9 +279,8 @@ void GuiHSpace::updateContents()
 
 bool GuiHSpace::initialiseParams(string const & data)
 {
-       InsetSpaceMailer::string2params(data, params_);
+       InsetSpace::string2params(data, params_);
        setButtonsValid(true);
-
        return true;
 }
 
@@ -263,13 +293,13 @@ void GuiHSpace::clearParams()
 
 void GuiHSpace::dispatchParams()
 {
-       dispatch(FuncRequest(getLfun(), InsetSpaceMailer::params2string(params_)));
+       dispatch(FuncRequest(getLfun(), InsetSpace::params2string(params_)));
 }
 
 
 bool GuiHSpace::isValid()
 {
-       return (spacingCO->currentIndex() != 7 || !valueLE->text().isEmpty());
+       return spacingCO->currentIndex() != 7 || !valueLE->text().isEmpty();
 }