tdf#134628 Improve clarity of 'Ignore system input language' option
-Using positive phrase "Apply system input language to new text". -Inverted the checkbox logic in the UI to match the phrase. -Renamed UI to reflect positive phrase (useinputlanguage) -Updated tooltip to describe the behavior. Co-authored-by: Isha Desai <2020.isha.desai@ves.ac.in> Change-Id: Ib443e86671e1defc7e49ae3a5fed2aef8dc5ecda Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203205 Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org> Tested-by: Jenkins
This commit is contained in:
committed by
Heiko Tietze
co-authored by
Isha Desai
parent
1a9ed75748
commit
f331da1fe4
@@ -937,8 +937,8 @@ OfaLanguagesTabPage::OfaLanguagesTabPage(weld::Container* pPage, weld::DialogCon
|
||||
, m_xComplexLanguageFT(m_xBuilder->weld_label(u"complex"_ustr))
|
||||
, m_xComplexLanguageImg(m_xBuilder->weld_widget(u"lockcomplexlanguage"_ustr))
|
||||
, m_xCurrentDocCB(m_xBuilder->weld_check_button(u"currentdoc"_ustr))
|
||||
, m_xIgnoreLanguageChangeCB(m_xBuilder->weld_check_button(u"ignorelanguagechange"_ustr))
|
||||
, m_xIgnoreLanguageChangeImg(m_xBuilder->weld_widget(u"lockignorelanguagechange"_ustr))
|
||||
, m_xUseInputLanguageCB(m_xBuilder->weld_check_button(u"useinputlanguage"_ustr))
|
||||
, m_xUseInputLanguageImg(m_xBuilder->weld_widget(u"lockuseinputlanguage"_ustr))
|
||||
{
|
||||
// tdf#125483 save original default label
|
||||
m_sDecimalSeparatorLabel = m_xDecimalSeparatorCB->get_label();
|
||||
@@ -1068,7 +1068,7 @@ OfaLanguagesTabPage::OfaLanguagesTabPage(weld::Container* pPage, weld::DialogCon
|
||||
m_xLocaleSettingLB->connect_changed( LINK( this, OfaLanguagesTabPage, LocaleSettingHdl ) );
|
||||
m_xDatePatternsED->connect_changed( LINK( this, OfaLanguagesTabPage, DatePatternsHdl ) );
|
||||
|
||||
m_xIgnoreLanguageChangeCB->set_active( pLangConfig->aSysLocaleOptions.IsIgnoreLanguageChange() );
|
||||
m_xUseInputLanguageCB->set_active( !pLangConfig->aSysLocaleOptions.IsIgnoreLanguageChange() );
|
||||
}
|
||||
|
||||
OfaLanguagesTabPage::~OfaLanguagesTabPage()
|
||||
@@ -1094,7 +1094,7 @@ OUString OfaLanguagesTabPage::GetAllStrings()
|
||||
}
|
||||
|
||||
OUString checkButton[]
|
||||
= { u"decimalseparator"_ustr, u"currentdoc"_ustr, u"ignorelanguagechange"_ustr };
|
||||
= { u"decimalseparator"_ustr, u"currentdoc"_ustr, u"useinputlanguage"_ustr };
|
||||
|
||||
for (const auto& check : checkButton)
|
||||
{
|
||||
@@ -1207,8 +1207,9 @@ bool OfaLanguagesTabPage::FillItemSet( SfxItemSet* rSet )
|
||||
if(m_xDecimalSeparatorCB->get_state_changed_from_saved())
|
||||
pLangConfig->aSysLocaleOptions.SetDecimalSeparatorAsLocale(m_xDecimalSeparatorCB->get_active());
|
||||
|
||||
if(m_xIgnoreLanguageChangeCB->get_state_changed_from_saved())
|
||||
pLangConfig->aSysLocaleOptions.SetIgnoreLanguageChange(m_xIgnoreLanguageChangeCB->get_active());
|
||||
if(m_xUseInputLanguageCB->get_state_changed_from_saved())
|
||||
pLangConfig->aSysLocaleOptions.SetIgnoreLanguageChange(
|
||||
!m_xUseInputLanguageCB->get_active());
|
||||
|
||||
// Configured currency, for example, USD-en-US or EUR-de-DE, or empty for locale default.
|
||||
OUString sOldCurr = pLangConfig->aSysLocaleOptions.GetCurrencyConfigString();
|
||||
@@ -1329,11 +1330,11 @@ void OfaLanguagesTabPage::Reset( const SfxItemSet* rSet )
|
||||
m_xDecimalSeparatorImg->set_visible(bReadonly);
|
||||
m_xDecimalSeparatorCB->save_state();
|
||||
|
||||
m_xIgnoreLanguageChangeCB->set_active( pLangConfig->aSysLocaleOptions.IsIgnoreLanguageChange());
|
||||
m_xUseInputLanguageCB->set_active(!pLangConfig->aSysLocaleOptions.IsIgnoreLanguageChange());
|
||||
bReadonly = pLangConfig->aSysLocaleOptions.IsReadOnly(SvtSysLocaleOptions::EOption::IgnoreLanguageChange);
|
||||
m_xIgnoreLanguageChangeCB->set_sensitive(!bReadonly);
|
||||
m_xIgnoreLanguageChangeImg->set_visible(bReadonly);
|
||||
m_xIgnoreLanguageChangeCB->save_state();
|
||||
m_xUseInputLanguageCB->set_sensitive(!bReadonly);
|
||||
m_xUseInputLanguageImg->set_visible(bReadonly);
|
||||
m_xUseInputLanguageCB->save_state();
|
||||
|
||||
// let LocaleSettingHdl enable/disable checkboxes for CJK/CTL support
|
||||
// #i15812# must be done *before* the configured currency is set
|
||||
@@ -1457,7 +1458,7 @@ void OfaLanguagesTabPage::Reset( const SfxItemSet* rSet )
|
||||
m_xWesternLanguageLB->save_active_id();
|
||||
m_xAsianLanguageLB->save_active_id();
|
||||
m_xComplexLanguageLB->save_active_id();
|
||||
m_xIgnoreLanguageChangeCB->save_state();
|
||||
m_xUseInputLanguageCB->save_state();
|
||||
m_xCurrentDocCB->save_state();
|
||||
|
||||
bool bEnable = !pLangConfig->aLinguConfig.IsReadOnly( u"DefaultLocale" );
|
||||
|
||||
@@ -171,8 +171,8 @@ class OfaLanguagesTabPage : public SfxTabPage
|
||||
std::unique_ptr<weld::Label> m_xComplexLanguageFT;
|
||||
std::unique_ptr<weld::Widget> m_xComplexLanguageImg;
|
||||
std::unique_ptr<weld::CheckButton> m_xCurrentDocCB;
|
||||
std::unique_ptr<weld::CheckButton> m_xIgnoreLanguageChangeCB;
|
||||
std::unique_ptr<weld::Widget> m_xIgnoreLanguageChangeImg;
|
||||
std::unique_ptr<weld::CheckButton> m_xUseInputLanguageCB;
|
||||
std::unique_ptr<weld::Widget> m_xUseInputLanguageImg;
|
||||
|
||||
DECL_LINK(LocaleSettingHdl, weld::ComboBox&, void);
|
||||
DECL_LINK(DatePatternsHdl, weld::Entry&, void);
|
||||
|
||||
@@ -357,16 +357,18 @@
|
||||
<property name="margin-top">6</property>
|
||||
<property name="row-spacing">6</property>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="ignorelanguagechange">
|
||||
<property name="label" translatable="yes" context="optlanguagespage|ignorelanguagechange">Ignore s_ystem input language</property>
|
||||
<object class="GtkCheckButton" id="useinputlanguage">
|
||||
<property name="label" translatable="yes" context="optlanguagespage|useinputlanguage">Apply s_ystem input language to new text</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can-focus">True</property>
|
||||
<property name="receives-default">False</property>
|
||||
<property name="use-underline">True</property>
|
||||
<property name="draw-indicator">True</property>
|
||||
<child internal-child="accessible">
|
||||
<object class="AtkObject" id="ignorelanguagechange-atkobject">
|
||||
<property name="AtkObject::accessible-description" translatable="yes" context="extended_tip|ignorelanguagechange">Indicates whether changes to the system input language/keyboard will be ignored. If ignored, when new text is typed that text will follow the language of the document or current paragraph, not the current system language.</property>
|
||||
<object class="AtkObject" id="useinputlanguage-atkobject">
|
||||
<property name="AtkObject::accessible-description" translatable="yes" context="extended_tip|useinputlanguage">
|
||||
Indicates whether the system input language is applied to newly typed text; when disabled, the document or paragraph language is used instead.
|
||||
</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
@@ -376,7 +378,7 @@
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkImage" id="lockignorelanguagechange">
|
||||
<object class="GtkImage" id="lockuseinputlanguage">
|
||||
<property name="can-focus">False</property>
|
||||
<property name="no-show-all">True</property>
|
||||
<property name="halign">center</property>
|
||||
|
||||
Reference in New Issue
Block a user