tdf#168509 Change "Voting:" to "Rating:" on the "Extensions: Gallery" dialog
Change the label in the ui file
Change the UI elements and C++ field names from voting to rating
Change-Id: I9d1060c5deb1495454befcb9b523fc88ac135937
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199015
Tested-by: Jenkins
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
This commit is contained in:
committed by
Heiko Tietze
parent
df481fa4ad
commit
b2dbdfaa21
@@ -439,7 +439,7 @@ AdditionsDialog::AdditionsDialog(weld::Window* pParent, const OUString& sAdditio
|
||||
, m_xGearBtn(m_xBuilder->weld_menu_button(u"buttonGear"_ustr))
|
||||
{
|
||||
m_xGearBtn->connect_selected(LINK(this, AdditionsDialog, GearHdl));
|
||||
m_xGearBtn->set_item_active(u"gear_sort_voting"_ustr, true);
|
||||
m_xGearBtn->set_item_active(u"gear_sort_rating"_ustr, true);
|
||||
|
||||
m_aSearchDataTimer.SetInvokeHandler(LINK(this, AdditionsDialog, ImplUpdateDataHdl));
|
||||
m_aSearchDataTimer.SetTimeout(EDIT_UPDATEDATA_TIMEOUT);
|
||||
@@ -617,11 +617,11 @@ AdditionsItem::AdditionsItem(weld::Box* pParentBox, AdditionsDialog* pParentDial
|
||||
, m_xLabelLicense(m_xBuilder->weld_label(u"lbLicenseText"_ustr))
|
||||
, m_xLabelVersion(m_xBuilder->weld_label(u"lbVersionText"_ustr))
|
||||
, m_xLinkButtonComments(m_xBuilder->weld_link_button(u"linkButtonComments"_ustr))
|
||||
, m_xImageVoting1(m_xBuilder->weld_image(u"imageVoting1"_ustr))
|
||||
, m_xImageVoting2(m_xBuilder->weld_image(u"imageVoting2"_ustr))
|
||||
, m_xImageVoting3(m_xBuilder->weld_image(u"imageVoting3"_ustr))
|
||||
, m_xImageVoting4(m_xBuilder->weld_image(u"imageVoting4"_ustr))
|
||||
, m_xImageVoting5(m_xBuilder->weld_image(u"imageVoting5"_ustr))
|
||||
, m_xImageRating1(m_xBuilder->weld_image(u"imageRating1"_ustr))
|
||||
, m_xImageRating2(m_xBuilder->weld_image(u"imageRating2"_ustr))
|
||||
, m_xImageRating3(m_xBuilder->weld_image(u"imageRating3"_ustr))
|
||||
, m_xImageRating4(m_xBuilder->weld_image(u"imageRating4"_ustr))
|
||||
, m_xImageRating5(m_xBuilder->weld_image(u"imageRating5"_ustr))
|
||||
, m_xLabelDownloadNumber(m_xBuilder->weld_label(u"labelDownloadNumber"_ustr))
|
||||
, m_pParentDialog(pParentDialog)
|
||||
, m_sDownloadURL(u""_ustr)
|
||||
@@ -652,19 +652,19 @@ AdditionsItem::AdditionsItem(weld::Box* pParentBox, AdditionsDialog* pParentDial
|
||||
switch (std::isnan(aExtensionRating) ? 0 : int(std::clamp(aExtensionRating, 0.0, 5.0)))
|
||||
{
|
||||
case 5:
|
||||
m_xImageVoting5->set_from_icon_name(RID_SVXBMP_STARS_FULL);
|
||||
m_xImageRating5->set_from_icon_name(RID_SVXBMP_STARS_FULL);
|
||||
[[fallthrough]];
|
||||
case 4:
|
||||
m_xImageVoting4->set_from_icon_name(RID_SVXBMP_STARS_FULL);
|
||||
m_xImageRating4->set_from_icon_name(RID_SVXBMP_STARS_FULL);
|
||||
[[fallthrough]];
|
||||
case 3:
|
||||
m_xImageVoting3->set_from_icon_name(RID_SVXBMP_STARS_FULL);
|
||||
m_xImageRating3->set_from_icon_name(RID_SVXBMP_STARS_FULL);
|
||||
[[fallthrough]];
|
||||
case 2:
|
||||
m_xImageVoting2->set_from_icon_name(RID_SVXBMP_STARS_FULL);
|
||||
m_xImageRating2->set_from_icon_name(RID_SVXBMP_STARS_FULL);
|
||||
[[fallthrough]];
|
||||
case 1:
|
||||
m_xImageVoting1->set_from_icon_name(RID_SVXBMP_STARS_FULL);
|
||||
m_xImageRating1->set_from_icon_name(RID_SVXBMP_STARS_FULL);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -852,7 +852,7 @@ void TmpRepositoryCommandEnv::pop() {}
|
||||
|
||||
IMPL_LINK(AdditionsDialog, GearHdl, const OUString&, rIdent, void)
|
||||
{
|
||||
if (rIdent == "gear_sort_voting")
|
||||
if (rIdent == "gear_sort_rating")
|
||||
{
|
||||
std::sort(m_aAllExtensionsVector.begin(), m_aAllExtensionsVector.end(), sortByRating);
|
||||
}
|
||||
|
||||
@@ -123,11 +123,11 @@ public:
|
||||
std::unique_ptr<weld::Label> m_xLabelLicense;
|
||||
std::unique_ptr<weld::Label> m_xLabelVersion;
|
||||
std::unique_ptr<weld::LinkButton> m_xLinkButtonComments;
|
||||
std::unique_ptr<weld::Image> m_xImageVoting1;
|
||||
std::unique_ptr<weld::Image> m_xImageVoting2;
|
||||
std::unique_ptr<weld::Image> m_xImageVoting3;
|
||||
std::unique_ptr<weld::Image> m_xImageVoting4;
|
||||
std::unique_ptr<weld::Image> m_xImageVoting5;
|
||||
std::unique_ptr<weld::Image> m_xImageRating1;
|
||||
std::unique_ptr<weld::Image> m_xImageRating2;
|
||||
std::unique_ptr<weld::Image> m_xImageRating3;
|
||||
std::unique_ptr<weld::Image> m_xImageRating4;
|
||||
std::unique_ptr<weld::Image> m_xImageRating5;
|
||||
std::unique_ptr<weld::Label> m_xLabelDownloadNumber;
|
||||
AdditionsDialog* m_pParentDialog;
|
||||
OUString m_sDownloadURL;
|
||||
|
||||
@@ -28,10 +28,10 @@
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<child>
|
||||
<object class="GtkRadioMenuItem" id="gear_sort_voting">
|
||||
<object class="GtkRadioMenuItem" id="gear_sort_rating">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="label" translatable="yes" context="menuassignpage|gear_textOnly">Voting</property>
|
||||
<property name="label" translatable="yes" context="menuassignpage|gear_textOnly">Rating</property>
|
||||
<property name="draw-as-radio">True</property>
|
||||
</object>
|
||||
</child>
|
||||
@@ -41,7 +41,7 @@
|
||||
<property name="can-focus">False</property>
|
||||
<property name="label" translatable="yes" context="menuassignpage|gear_textOnly">Downloads</property>
|
||||
<property name="draw-as-radio">True</property>
|
||||
<property name="group">gear_sort_voting</property>
|
||||
<property name="group">gear_sort_rating</property>
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
@@ -50,7 +50,7 @@
|
||||
<property name="can-focus">False</property>
|
||||
<property name="label" translatable="yes" context="menuassignpage|gear_textOnly">Comments</property>
|
||||
<property name="draw-as-radio">True</property>
|
||||
<property name="group">gear_sort_voting</property>
|
||||
<property name="group">gear_sort_rating</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
|
||||
@@ -43,18 +43,18 @@
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="votingLabel">
|
||||
<object class="GtkLabel" id="ratingLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="label" translatable="yes" context="additionsEntry|votingLabel">Voting:</property>
|
||||
<property name="label" translatable="yes" context="additionsEntry|ratingLabel">Rating:</property>
|
||||
<property name="xalign">0</property>
|
||||
<accessibility>
|
||||
<relation type="label-for" target="imageVoting1"/>
|
||||
<relation type="label-for" target="imageVoting2"/>
|
||||
<relation type="label-for" target="imageVoting3"/>
|
||||
<relation type="label-for" target="imageVoting4"/>
|
||||
<relation type="label-for" target="imageVoting5"/>
|
||||
<relation type="label-for" target="imageRating1"/>
|
||||
<relation type="label-for" target="imageRating2"/>
|
||||
<relation type="label-for" target="imageRating3"/>
|
||||
<relation type="label-for" target="imageRating4"/>
|
||||
<relation type="label-for" target="imageRating5"/>
|
||||
</accessibility>
|
||||
</object>
|
||||
<packing>
|
||||
@@ -212,14 +212,14 @@
|
||||
<property name="valign">center</property>
|
||||
<property name="hexpand">True</property>
|
||||
<child>
|
||||
<object class="GtkImage" id="imageVoting1">
|
||||
<object class="GtkImage" id="imageRating1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="icon-name">cmd/sc_stars-empty.png</property>
|
||||
<accessibility>
|
||||
<relation type="labelled-by" target="votingLabel"/>
|
||||
<relation type="labelled-by" target="ratingLabel"/>
|
||||
</accessibility>
|
||||
</object>
|
||||
<packing>
|
||||
@@ -229,14 +229,14 @@
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImage" id="imageVoting2">
|
||||
<object class="GtkImage" id="imageRating2">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="icon-name">cmd/sc_stars-empty.png</property>
|
||||
<accessibility>
|
||||
<relation type="labelled-by" target="votingLabel"/>
|
||||
<relation type="labelled-by" target="ratingLabel"/>
|
||||
</accessibility>
|
||||
</object>
|
||||
<packing>
|
||||
@@ -246,14 +246,14 @@
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImage" id="imageVoting3">
|
||||
<object class="GtkImage" id="imageRating3">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="icon-name">cmd/sc_stars-empty.png</property>
|
||||
<accessibility>
|
||||
<relation type="labelled-by" target="votingLabel"/>
|
||||
<relation type="labelled-by" target="ratingLabel"/>
|
||||
</accessibility>
|
||||
</object>
|
||||
<packing>
|
||||
@@ -263,14 +263,14 @@
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImage" id="imageVoting4">
|
||||
<object class="GtkImage" id="imageRating4">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="icon-name">cmd/sc_stars-empty.png</property>
|
||||
<accessibility>
|
||||
<relation type="labelled-by" target="votingLabel"/>
|
||||
<relation type="labelled-by" target="ratingLabel"/>
|
||||
</accessibility>
|
||||
</object>
|
||||
<packing>
|
||||
@@ -280,14 +280,14 @@
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImage" id="imageVoting5">
|
||||
<object class="GtkImage" id="imageRating5">
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="icon-name">cmd/sc_stars-empty.png</property>
|
||||
<accessibility>
|
||||
<relation type="labelled-by" target="votingLabel"/>
|
||||
<relation type="labelled-by" target="ratingLabel"/>
|
||||
</accessibility>
|
||||
</object>
|
||||
<packing>
|
||||
|
||||
Reference in New Issue
Block a user