* src/frontends/qt4/ui/ParagraphUi.ui:

- 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
This commit is contained in:
Jürgen Spitzmüller 2007-10-23 08:10:55 +00:00
parent 82d27555cd
commit 72801c16e2
3 changed files with 11 additions and 4 deletions

View 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()]) + ")");
}

View 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;

View 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>
@ -130,7 +130,7 @@
<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>