[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-i18n-doc
Subject: KDE/kdebase/runtime/kcontrol/locale
From: John Layt <john () layt ! net>
Date: 2010-11-30 10:26:57
Message-ID: 20101130102657.7EBDFAC8A4 () svn ! kde ! org
[Download RAW message or body]
SVN commit 1202285 by jlayt:
Locale kcm fix Country and Language default buttons, add back buinary units
example string accidentally deleted as ok'ed on i18n list.
CCMAIL: kde-i18n-doc@kde.org
M +31 -17 kcmlocale.cpp
M +17 -3 kcmlocalewidget.ui
--- trunk/KDE/kdebase/runtime/kcontrol/locale/kcmlocale.cpp #1202284:1202285
@@ -359,9 +359,6 @@
// The update all the widgets to use the new settings
initAllWidgets();
-
- // TODO Not sure why this is needed here, but it is on first load!
- m_ui->m_buttonResetCountry->setEnabled( false );
}
// Defaults == User has clicked on Defaults to load default settings
@@ -514,6 +511,11 @@
void KCMLocale::initAllWidgets()
{
+ //Common
+ initTabs();
+ initSample();
+ initResetButtons();
+
//Country tab
initCountry();
initCountryDivision();
@@ -529,11 +531,6 @@
{
// Initialise the settings widgets with the default values whenever the country \
or language changes
- //Common
- initTabs();
- initSample();
- initResetButtons();
-
//Numeric tab
initNumericThousandsSeparator();
initNumericDecimalSymbol();
@@ -1019,13 +1016,6 @@
}
}
- m_ui->m_listTranslationsAvailable->blockSignals( false );
- m_ui->m_listTranslationsSelected->blockSignals( false );
- m_ui->m_buttonTranslationsUp->blockSignals( false );
- m_ui->m_buttonTranslationsDown->blockSignals( false );
- m_ui->m_buttonTranslationsAdd->blockSignals( false );
- m_ui->m_buttonTranslationsRemove->blockSignals( false );
-
// Default to selecting the first Selected language,
// otherwise the first Available language,
// otherwise no languages so disable all buttons
@@ -1042,6 +1032,20 @@
m_ui->m_buttonTranslationsDown->setEnabled( false );
}
+ if ( m_kcmSettings.readEntry( "Language", QString() ) ==
+ m_defaultSettings.readEntry( "Language", QString() ) ) {
+ m_ui->m_buttonResetTranslations->setEnabled( false );
+ } else {
+ m_ui->m_buttonResetTranslations->setEnabled( true );
+ }
+
+ m_ui->m_listTranslationsAvailable->blockSignals( false );
+ m_ui->m_listTranslationsSelected->blockSignals( false );
+ m_ui->m_buttonTranslationsUp->blockSignals( false );
+ m_ui->m_buttonTranslationsDown->blockSignals( false );
+ m_ui->m_buttonTranslationsAdd->blockSignals( false );
+ m_ui->m_buttonTranslationsRemove->blockSignals( false );
+
// Now tell the user about the missing languages
foreach ( const QString &languageCode, missingLanguages ) {
KMessageBox::information(this, ki18n("You have the language with code '%1' \
in your list " @@ -1056,7 +1060,7 @@
void KCMLocale::defaultTranslations()
{
- changeTranslations( m_defaultSettings.readEntry( "Langauge", QString() ) );
+ changeTranslations( m_defaultSettings.readEntry( "Language", QString() ) );
}
void KCMLocale::changeTranslations()
@@ -2285,6 +2289,11 @@
changeMonthNamePossessive( m_kcmSettings.readEntry( "DateMonthNamePossessive", \
false ) );
+ // Hide the option as it's not usable without ordinal day numbers
+ m_ui->m_labelMonthNamePossessive->setHidden( true );
+ m_ui->m_checkMonthNamePossessive->setHidden( true );
+ m_ui->m_buttonResetMonthNamePossessive->setHidden( true );
+
m_ui->m_checkMonthNamePossessive->blockSignals( false );
}
@@ -2521,7 +2530,12 @@
{
setComboItem( "BinaryUnitDialect", newValue,
m_ui->m_comboBinaryUnitDialect, \
m_ui->m_buttonResetBinaryUnitDialect );
- m_kcmLocale->setBinaryUnitDialect( (KLocale::BinaryUnitDialect) \
m_kcmSettings.readEntry( "BinaryUnitDialect", 0 ) ); + \
m_kcmLocale->setBinaryUnitDialect( (KLocale::BinaryUnitDialect) + \
m_kcmSettings.readEntry( "BinaryUnitDialect", 0 ) ); + \
m_ui->m_labelBinaryUnitSample->setText( ki18nc("Example test for binary unit \
dialect", + "Example: 2000 bytes \
equals %1") + .subs( \
m_kcmLocale->formatByteSize( 2000, 2 ) ) + \
.toString( m_kcmLocale ) ); }
KLocale::CalendarSystem KCMLocale::calendarTypeToCalendarSystem(const QString \
&calendarType) const
--- trunk/KDE/kdebase/runtime/kcontrol/locale/kcmlocalewidget.ui #1202284:1202285
@@ -1374,6 +1374,9 @@
</item>
<item row="5" column="0">
<widget class="QLabel" name="m_labelMonthNamePossessive">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
<property name="toolTip">
<string/>
</property>
@@ -1410,7 +1413,11 @@
</widget>
</item>
<item>
- <widget class="KPushButton" name="m_buttonResetMonthNamePossessive"/>
+ <widget class="KPushButton" name="m_buttonResetMonthNamePossessive">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ </widget>
</item>
</layout>
</item>
@@ -1532,7 +1539,7 @@
</item>
</layout>
</item>
- <item row="2" column="1">
+ <item row="3" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_36">
<item>
<widget class="KComboBox" name="m_comboBinaryUnitDialect">
@@ -1555,7 +1562,7 @@
</item>
</layout>
</item>
- <item row="2" column="0">
+ <item row="3" column="0">
<widget class="QLabel" name="m_labelBinaryUnitDialect">
<property name="text">
<string>Byte size units</string>
@@ -1565,6 +1572,13 @@
</property>
</widget>
</item>
+ <item row="4" column="1">
+ <widget class="QLabel" name="m_labelBinaryUnitSample">
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
</layout>
</widget>
</widget>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic