]> git.lyx.org Git - features.git/commitdiff
* src/frontends/qt4/ui/ParagraphUi.ui:
authorJürgen Spitzmüller <spitz@lyx.org>
Tue, 23 Oct 2007 08:10:55 +0000 (08:10 +0000)
committerJürgen Spitzmüller <spitz@lyx.org>
Tue, 23 Oct 2007 08:10:55 +0000 (08:10 +0000)
- fix several duplicated accelerators (bug 4277)
* src/frontends/qt4/GuiParagraph{.cpp, h}:
- reintroduce labelMap; the current implementation
  displays wrong accelerators.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@21144 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/GuiParagraph.cpp
src/frontends/qt4/GuiParagraph.h
src/frontends/qt4/ui/ParagraphUi.ui

index 38b589cf131bd35e4ad1cbfaaf660240b06c9134..8013464a9d48452cf2558398ad7826b024d73c15 100644 (file)
@@ -94,6 +94,11 @@ GuiParagraph::GuiParagraph(LyXView & lv)
        radioMap[LYX_ALIGN_RIGHT]  = alignRightRB;
        radioMap[LYX_ALIGN_CENTER] = alignCenterRB;
 
+       labelMap[LYX_ALIGN_BLOCK]  = _("Justified");
+       labelMap[LYX_ALIGN_LEFT]   = _("Left");
+       labelMap[LYX_ALIGN_RIGHT]  = _("Right");
+       labelMap[LYX_ALIGN_CENTER] = _("Center");
+
        const_cast<QString &>(alignDefaultLabel) = alignDefaultRB->text();
 }
 
@@ -114,8 +119,8 @@ void GuiParagraph::checkAlignmentRadioButtons()
        if (haveMulitParSelection())
                alignDefaultRB->setText(alignDefaultLabel);
        else
-               alignDefaultRB->setText(alignDefaultLabel + " (" 
-                       + radioMap[alignDefault()]->text() + ")");
+               alignDefaultRB->setText(alignDefaultLabel + " ("
+                       + toqstr(labelMap[alignDefault()]) + ")");
 }
 
 
index e66eea3d786728c1b210abbfe8f1765ad4144edd..75f5e16389089b5419c8725f5ab65e90a4401fe7 100644 (file)
@@ -57,6 +57,8 @@ private:
        ///
        typedef std::map<LyXAlignment, QRadioButton *> RadioMap;
        RadioMap radioMap;
+       typedef std::map<LyXAlignment, docstring> AlignmentLabels;
+       AlignmentLabels labelMap;
 
        QString const alignDefaultLabel;
 
index 90f29519030ea5d088672d43aa51985b1dff9fc1..bd72e92066ea3ae599f5913fc89d3ea55f63d261 100644 (file)
@@ -60,7 +60,7 @@
          <string>This text defines the width of the paragraph label</string>
         </property>
         <property name="text" >
-         <string>&amp;Longest label</string>
+         <string>Lo&amp;ngest label</string>
         </property>
         <property name="buddy" >
          <cstring>labelWidth</cstring>
       <item row="4" column="0" >
        <widget class="QRadioButton" name="alignRightRB" >
         <property name="text" >
-         <string>&amp;Right</string>
+         <string>Ri&amp;ght</string>
         </property>
        </widget>
       </item>