Rename KLocale to enhance compatibility with KDE4

pull/2/head
Timothy Pearson 12 years ago
parent 93943a849d
commit 98f4a055ba

@ -540,7 +540,7 @@ extern "C" KDE_EXPORT int kdemain(int argc, char **argv)
{
Kate::Document::setFileChangedDialogsActivated (true);
KLocale::setMainCatalogue("kate"); //lukas: set this to have the kwritepart translated using kate message catalog
TDELocale::setMainCatalogue("kate"); //lukas: set this to have the kwritepart translated using kate message catalog
// here we go, construct the KWrite version
// TQString kWriteVersion = TQString ("%1.%2.%3").arg(KDE::versionMajor() + 1).arg(KDE::versionMinor()).arg(KDE::versionRelease());

@ -233,7 +233,7 @@ extern "C" KDE_EXPORT int kdemain(int argc, char *argv[])
startup = ( strcmp( argv[ 0 ], "kcminit_startup" ) == 0 ); // started from starttde?
KLocale::setMainCatalogue("kcontrol");
TDELocale::setMainCatalogue("kcontrol");
TDEAboutData aboutData( "kcminit", I18N_NOOP("KCMInit"),
"",
I18N_NOOP("KCMInit - runs startups initialization for Control Modules."));
@ -243,7 +243,7 @@ extern "C" KDE_EXPORT int kdemain(int argc, char *argv[])
TDEApplication app;
app.dcopClient()->registerAs( "kcminit", false );
KLocale::setMainCatalogue(0);
TDELocale::setMainCatalogue(0);
KCMInit kcminit( TDECmdLineArgs::parsedArgs());
return 0;
}

@ -110,7 +110,7 @@ static KCmdLineOptions options[] =
int main(int argc, char ** argv)
{
KLocale::setMainCatalogue("filetypes");
TDELocale::setMainCatalogue("filetypes");
TDEAboutData aboutData( "keditfiletype", I18N_NOOP("KEditFileType"), "1.0",
I18N_NOOP("TDE file type editor - simplified version for editing a single file type"),
TDEAboutData::License_GPL,

@ -100,7 +100,7 @@ KControlApp::~KControlApp()
extern "C" KDE_EXPORT int kdemain(int argc, char *argv[])
{
KLocale::setMainCatalogue("kcontrol");
TDELocale::setMainCatalogue("kcontrol");
TDEAboutData aboutKControl( "kcontrol", I18N_NOOP("Trinity Control Center"),
KCONTROL_VERSION, I18N_NOOP("The Trinity Control Center"), TDEAboutData::License_GPL,
I18N_NOOP("(c) 1998-2004, The TDE Control Center Developers"));

@ -108,7 +108,7 @@ int kdemain(int argc, char **argv)
exit(-1);
}
KLocale::setMainCatalogue(KFI_CATALOGUE);
TDELocale::setMainCatalogue(KFI_CATALOGUE);
TDEInstance instance("tdeio_" KFI_KIO_FONTS_PROTOCOL);
KFI::CKioFonts slave(argv[2], argv[3]);

@ -43,7 +43,7 @@
#include "kcmlocale.moc"
#include "toplevel.h"
KLocaleConfig::KLocaleConfig(KLocale *locale,
TDELocaleConfig::TDELocaleConfig(TDELocale *locale,
TQWidget *parent, const char *name)
: TQWidget (parent, name),
m_locale(locale)
@ -120,7 +120,7 @@ KLocaleConfig::KLocaleConfig(KLocale *locale,
}
void KLocaleConfig::slotInstallLanguage()
void TDELocaleConfig::slotInstallLanguage()
{
TDEProcess *proc = new TDEProcess;
@ -132,7 +132,7 @@ void KLocaleConfig::slotInstallLanguage()
proc->start();
}
void KLocaleConfig::slotUninstallLanguage()
void TDELocaleConfig::slotUninstallLanguage()
{
TDEProcess *proc = new TDEProcess;
@ -144,7 +144,7 @@ void KLocaleConfig::slotUninstallLanguage()
proc->start();
}
void KLocaleConfig::slotSelectLanguage()
void TDELocaleConfig::slotSelectLanguage()
{
TDEProcess *proc = new TDEProcess;
@ -156,14 +156,14 @@ void KLocaleConfig::slotSelectLanguage()
proc->start();
}
void KLocaleConfig::slotLanguageSelectorExited(TDEProcess *)
void TDELocaleConfig::slotLanguageSelectorExited(TDEProcess *)
{
//reload here
loadLanguageList();
setEnabled(true);
}
void KLocaleConfig::slotAddLanguage(const TQString & code)
void TDELocaleConfig::slotAddLanguage(const TQString & code)
{
TQStringList languageList = m_locale->languageList();
@ -190,7 +190,7 @@ void KLocaleConfig::slotAddLanguage(const TQString & code)
emit languageChanged();
}
void KLocaleConfig::slotRemoveLanguage()
void TDELocaleConfig::slotRemoveLanguage()
{
TQStringList languageList = m_locale->languageList();
int pos = m_languages->currentItem();
@ -209,7 +209,7 @@ void KLocaleConfig::slotRemoveLanguage()
}
}
void KLocaleConfig::slotLanguageUp()
void TDELocaleConfig::slotLanguageUp()
{
TQStringList languageList = m_locale->languageList();
int pos = m_languages->currentItem();
@ -231,7 +231,7 @@ void KLocaleConfig::slotLanguageUp()
}
}
void KLocaleConfig::slotLanguageDown()
void TDELocaleConfig::slotLanguageDown()
{
TQStringList languageList = m_locale->languageList();
int pos = m_languages->currentItem();
@ -253,10 +253,10 @@ void KLocaleConfig::slotLanguageDown()
}
}
void KLocaleConfig::loadLanguageList()
void TDELocaleConfig::loadLanguageList()
{
// temperary use of our locale as the global locale
KLocale *lsave = TDEGlobal::_locale;
TDELocale *lsave = TDEGlobal::_locale;
TDEGlobal::_locale = m_locale;
// clear the list
@ -316,10 +316,10 @@ void KLocaleConfig::loadLanguageList()
TDEGlobal::_locale = lsave;
}
void KLocaleConfig::loadCountryList()
void TDELocaleConfig::loadCountryList()
{
// temperary use of our locale as the global locale
KLocale *lsave = TDEGlobal::_locale;
TDELocale *lsave = TDEGlobal::_locale;
TDEGlobal::_locale = m_locale;
TQString sub = TQString::fromLatin1("l10n/");
@ -391,11 +391,11 @@ void KLocaleConfig::loadCountryList()
TDEGlobal::_locale = lsave;
}
void KLocaleConfig::readLocale(const TQString &path, TQString &name,
void TDELocaleConfig::readLocale(const TQString &path, TQString &name,
const TQString &sub) const
{
// temperary use of our locale as the global locale
KLocale *lsave = TDEGlobal::_locale;
TDELocale *lsave = TDEGlobal::_locale;
TDEGlobal::_locale = m_locale;
// read the name
@ -411,7 +411,7 @@ void KLocaleConfig::readLocale(const TQString &path, TQString &name,
TDEGlobal::_locale = lsave;
}
void KLocaleConfig::save()
void TDELocaleConfig::save()
{
TDEConfigBase *config = TDEGlobal::config();
@ -427,7 +427,7 @@ void KLocaleConfig::save()
config->sync();
}
void KLocaleConfig::slotCheckButtons()
void TDELocaleConfig::slotCheckButtons()
{
m_removeLanguage->setEnabled( m_languages->currentItem() != -1 );
m_upButton->setEnabled( m_languages->currentItem() > 0 );
@ -435,7 +435,7 @@ void KLocaleConfig::slotCheckButtons()
m_languages->currentItem() < (signed)(m_languages->count() - 1) );
}
void KLocaleConfig::slotLocaleChanged()
void TDELocaleConfig::slotLocaleChanged()
{
loadLanguageList();
loadCountryList();
@ -457,7 +457,7 @@ void KLocaleConfig::slotLocaleChanged()
m_comboCountry->setCurrentItem( m_locale->country() );
}
void KLocaleConfig::slotTranslate()
void TDELocaleConfig::slotTranslate()
{
kdDebug() << "slotTranslate()" << endl;
@ -499,7 +499,7 @@ void KLocaleConfig::slotTranslate()
TQWhatsThis::add( m_removeLanguage, str );
}
TQStringList KLocaleConfig::languageList() const
TQStringList TDELocaleConfig::languageList() const
{
TQString fileName = locate("locale",
TQString::fromLatin1("l10n/%1/entry.desktop")
@ -511,7 +511,7 @@ TQStringList KLocaleConfig::languageList() const
return entry.readListEntry("Languages");
}
void KLocaleConfig::changedCountry(const TQString & code)
void TDELocaleConfig::changedCountry(const TQString & code)
{
m_locale->setCountry(code);

@ -31,19 +31,19 @@
class KAddButton;
class KLanguageButton;
class KLocale;
class KLocaleSample;
class TDELocale;
class TDELocaleSample;
class TQLabel;
class TQListBox;
class TQPushButton;
class KLocaleConfig : public TQWidget
class TDELocaleConfig : public TQWidget
{
Q_OBJECT
public:
KLocaleConfig( KLocale *_locale,
TDELocaleConfig( TDELocale *_locale,
TQWidget *parent = 0, const char *name = 0);
void save();
@ -84,7 +84,7 @@ private slots:
private:
TQStringList languageList() const;
KLocale *m_locale;
TDELocale *m_locale;
KLanguageButton *m_comboCountry;

@ -36,7 +36,7 @@
#include "klocalesample.h"
#include "klocalesample.moc"
KLocaleSample::KLocaleSample(KLocale *locale,
TDELocaleSample::TDELocaleSample(TDELocale *locale,
TQWidget *parent, const char*name)
: TQWidget(parent, name),
m_locale(locale)
@ -82,11 +82,11 @@ KLocaleSample::KLocaleSample(KLocale *locale,
timer->start(1000);
}
KLocaleSample::~KLocaleSample()
TDELocaleSample::~TDELocaleSample()
{
}
void KLocaleSample::slotUpdateTime()
void TDELocaleSample::slotUpdateTime()
{
TQDateTime dt = TQDateTime::currentDateTime();
@ -95,7 +95,7 @@ void KLocaleSample::slotUpdateTime()
m_timeSample->setText(m_locale->formatTime(TQT_TQTIME_OBJECT(dt.time()), true));
}
void KLocaleSample::slotLocaleChanged()
void TDELocaleSample::slotLocaleChanged()
{
m_numberSample->setText(m_locale->formatNumber(1234567.89) +
TQString::fromLatin1(" / ") +

@ -30,15 +30,15 @@
class TQLabel;
class TQResizeEvent;
class KLocale;
class TDELocale;
class KLocaleSample : public TQWidget
class TDELocaleSample : public TQWidget
{
Q_OBJECT
public:
KLocaleSample(KLocale *_locale,
TDELocaleSample(TDELocale *_locale,
TQWidget *parent = 0, const char*name = 0);
virtual ~KLocaleSample();
virtual ~TDELocaleSample();
public slots:
void slotLocaleChanged();
@ -47,7 +47,7 @@ protected slots:
void slotUpdateTime();
private:
KLocale *m_locale;
TDELocale *m_locale;
TQLabel *m_numberSample, *m_labNumber;
TQLabel *m_moneySample, *m_labMoney;
TQLabel *m_timeSample, *m_labTime;

@ -41,7 +41,7 @@
#include "localemon.h"
#include "localemon.moc"
KLocaleConfigMoney::KLocaleConfigMoney(KLocale *locale,
TDELocaleConfigMoney::TDELocaleConfigMoney(TDELocale *locale,
TQWidget *parent, const char*name)
: TQWidget(parent, name),
m_locale(locale)
@ -121,11 +121,11 @@ KLocaleConfigMoney::KLocaleConfigMoney(KLocale *locale,
adjustSize();
}
KLocaleConfigMoney::~KLocaleConfigMoney()
TDELocaleConfigMoney::~TDELocaleConfigMoney()
{
}
void KLocaleConfigMoney::save()
void TDELocaleConfigMoney::save()
{
TDEConfig *config = TDEGlobal::config();
TDEConfigGroupSaver saver(config, "Locale");
@ -178,7 +178,7 @@ void KLocaleConfigMoney::save()
m_locale->negativePrefixCurrencySymbol(), true, true);
i = ent.readNumEntry("PositiveMonetarySignPosition",
(int)KLocale::BeforeQuantityMoney);
(int)TDELocale::BeforeQuantityMoney);
config->deleteEntry("PositiveMonetarySignPosition", false, true);
if (i != m_locale->positiveMonetarySignPosition())
config->writeEntry("PositiveMonetarySignPosition",
@ -186,7 +186,7 @@ void KLocaleConfigMoney::save()
true, true);
i = ent.readNumEntry("NegativeMonetarySignPosition",
(int)KLocale::ParensAround);
(int)TDELocale::ParensAround);
config->deleteEntry("NegativeMonetarySignPosition", false, true);
if (i != m_locale->negativeMonetarySignPosition())
config->writeEntry("NegativeMonetarySignPosition",
@ -196,7 +196,7 @@ void KLocaleConfigMoney::save()
config->sync();
}
void KLocaleConfigMoney::slotLocaleChanged()
void TDELocaleConfigMoney::slotLocaleChanged()
{
m_edMonCurSym->setText( m_locale->currencySymbol() );
m_edMonDecSym->setText( m_locale->monetaryDecimalSymbol() );
@ -209,55 +209,55 @@ void KLocaleConfigMoney::slotLocaleChanged()
m_cmbMonNegMonSignPos->setCurrentItem( m_locale->negativeMonetarySignPosition() );
}
void KLocaleConfigMoney::slotMonCurSymChanged(const TQString &t)
void TDELocaleConfigMoney::slotMonCurSymChanged(const TQString &t)
{
m_locale->setCurrencySymbol(t);
emit localeChanged();
}
void KLocaleConfigMoney::slotMonDecSymChanged(const TQString &t)
void TDELocaleConfigMoney::slotMonDecSymChanged(const TQString &t)
{
m_locale->setMonetaryDecimalSymbol(t);
emit localeChanged();
}
void KLocaleConfigMoney::slotMonThoSepChanged(const TQString &t)
void TDELocaleConfigMoney::slotMonThoSepChanged(const TQString &t)
{
m_locale->setMonetaryThousandsSeparator(t);
emit localeChanged();
}
void KLocaleConfigMoney::slotMonFraDigChanged(int value)
void TDELocaleConfigMoney::slotMonFraDigChanged(int value)
{
m_locale->setFracDigits(value);
emit localeChanged();
}
void KLocaleConfigMoney::slotMonPosPreCurSymChanged()
void TDELocaleConfigMoney::slotMonPosPreCurSymChanged()
{
m_locale->setPositivePrefixCurrencySymbol(m_chMonPosPreCurSym->isChecked());
emit localeChanged();
}
void KLocaleConfigMoney::slotMonNegPreCurSymChanged()
void TDELocaleConfigMoney::slotMonNegPreCurSymChanged()
{
m_locale->setNegativePrefixCurrencySymbol(m_chMonNegPreCurSym->isChecked());
emit localeChanged();
}
void KLocaleConfigMoney::slotMonPosMonSignPosChanged(int i)
void TDELocaleConfigMoney::slotMonPosMonSignPosChanged(int i)
{
m_locale->setPositiveMonetarySignPosition((KLocale::SignPosition)i);
m_locale->setPositiveMonetarySignPosition((TDELocale::SignPosition)i);
emit localeChanged();
}
void KLocaleConfigMoney::slotMonNegMonSignPosChanged(int i)
void TDELocaleConfigMoney::slotMonNegMonSignPosChanged(int i)
{
m_locale->setNegativeMonetarySignPosition((KLocale::SignPosition)i);
m_locale->setNegativeMonetarySignPosition((TDELocale::SignPosition)i);
emit localeChanged();
}
void KLocaleConfigMoney::slotTranslate()
void TDELocaleConfigMoney::slotTranslate()
{
TQObjectList list;
list.append(TQT_TQOBJECT(m_cmbMonPosMonSignPos));

@ -32,16 +32,16 @@ class TQComboBox;
class TQLineEdit;
class KIntNumInput;
class KLocale;
class TDELocale;
class KLanguageCombo;
class KLocaleConfigMoney : public TQWidget
class TDELocaleConfigMoney : public TQWidget
{
Q_OBJECT
public:
KLocaleConfigMoney(KLocale *locale, TQWidget *parent = 0, const char *name = 0);
virtual ~KLocaleConfigMoney();
TDELocaleConfigMoney(TDELocale *locale, TQWidget *parent = 0, const char *name = 0);
virtual ~TDELocaleConfigMoney();
void save();
@ -70,7 +70,7 @@ private slots:
void slotMonNegMonSignPosChanged(int i);
private:
KLocale *m_locale;
TDELocale *m_locale;
// Money
TQLabel *m_labMonCurSym;

@ -35,7 +35,7 @@
#include "localenum.h"
#include "localenum.moc"
KLocaleConfigNumber::KLocaleConfigNumber(KLocale *locale,
TDELocaleConfigNumber::TDELocaleConfigNumber(TDELocale *locale,
TQWidget *parent, const char*name)
: TQWidget(parent, name),
m_locale(locale)
@ -75,14 +75,14 @@ KLocaleConfigNumber::KLocaleConfigNumber(KLocale *locale,
TQT_SLOT(slotLocaleChanged()));
}
KLocaleConfigNumber::~KLocaleConfigNumber()
TDELocaleConfigNumber::~TDELocaleConfigNumber()
{
}
void KLocaleConfigNumber::save()
void TDELocaleConfigNumber::save()
{
// temperary use of our locale as the global locale
KLocale *lsave = TDEGlobal::_locale;
TDELocale *lsave = TDEGlobal::_locale;
TDEGlobal::_locale = m_locale;
TDEConfig *config = TDEGlobal::config();
@ -125,7 +125,7 @@ void KLocaleConfigNumber::save()
TDEGlobal::_locale = lsave;
}
void KLocaleConfigNumber::slotLocaleChanged()
void TDELocaleConfigNumber::slotLocaleChanged()
{
// #### load all settings here
m_edDecSym->setText( m_locale->decimalSymbol() );
@ -134,31 +134,31 @@ void KLocaleConfigNumber::slotLocaleChanged()
m_edMonNegSign->setText( m_locale->negativeSign() );
}
void KLocaleConfigNumber::slotDecSymChanged(const TQString &t)
void TDELocaleConfigNumber::slotDecSymChanged(const TQString &t)
{
m_locale->setDecimalSymbol(t);
emit localeChanged();
}
void KLocaleConfigNumber::slotThoSepChanged(const TQString &t)
void TDELocaleConfigNumber::slotThoSepChanged(const TQString &t)
{
m_locale->setThousandsSeparator(t);
emit localeChanged();
}
void KLocaleConfigNumber::slotMonPosSignChanged(const TQString &t)
void TDELocaleConfigNumber::slotMonPosSignChanged(const TQString &t)
{
m_locale->setPositiveSign(t);
emit localeChanged();
}
void KLocaleConfigNumber::slotMonNegSignChanged(const TQString &t)
void TDELocaleConfigNumber::slotMonNegSignChanged(const TQString &t)
{
m_locale->setNegativeSign(t);
emit localeChanged();
}
void KLocaleConfigNumber::slotTranslate()
void TDELocaleConfigNumber::slotTranslate()
{
TQString str;

@ -31,17 +31,17 @@ class TQCheckBox;
class TQComboBox;
class TQLineEdit;
class KLocale;
class TDELocale;
class KLanguageCombo;
class KLocaleConfigNumber : public TQWidget
class TDELocaleConfigNumber : public TQWidget
{
Q_OBJECT
public:
KLocaleConfigNumber( KLocale *_locale,
TDELocaleConfigNumber( TDELocale *_locale,
TQWidget *parent=0, const char *name=0);
virtual ~KLocaleConfigNumber( );
virtual ~TDELocaleConfigNumber( );
void save();
@ -66,7 +66,7 @@ private slots:
void slotThoSepChanged(const TQString &t);
private:
KLocale *m_locale;
TDELocale *m_locale;
// Numbers
TQLabel *m_labDecSym;

@ -35,7 +35,7 @@
#include "localeother.moc"
KLocaleConfigOther::KLocaleConfigOther(KLocale *locale,
TDELocaleConfigOther::TDELocaleConfigOther(TDELocale *locale,
TQWidget *parent, const char*name)
: TQWidget(parent, name),
m_locale(locale)
@ -70,11 +70,11 @@ KLocaleConfigOther::KLocaleConfigOther(KLocale *locale,
adjustSize();
}
KLocaleConfigOther::~KLocaleConfigOther()
TDELocaleConfigOther::~TDELocaleConfigOther()
{
}
void KLocaleConfigOther::save()
void TDELocaleConfigOther::save()
{
TDEConfig *config = TDEGlobal::config();
TDEConfigGroupSaver saver(config, "Locale");
@ -92,7 +92,7 @@ void KLocaleConfigOther::save()
config->writeEntry("PageSize",
m_locale->pageSize(), true, true);
i = ent.readNumEntry("MeasureSystem", (int)KLocale::Metric);
i = ent.readNumEntry("MeasureSystem", (int)TDELocale::Metric);
config->deleteEntry("MeasureSystem", false, true);
if (i != m_locale->measureSystem())
config->writeEntry("MeasureSystem",
@ -101,7 +101,7 @@ void KLocaleConfigOther::save()
config->sync();
}
void KLocaleConfigOther::slotLocaleChanged()
void TDELocaleConfigOther::slotLocaleChanged()
{
m_combMeasureSystem->setCurrentItem(m_locale->measureSystem());
@ -113,7 +113,7 @@ void KLocaleConfigOther::slotLocaleChanged()
m_combPageSize->setCurrentItem(i);
}
void KLocaleConfigOther::slotTranslate()
void TDELocaleConfigOther::slotTranslate()
{
m_combMeasureSystem->changeItem( m_locale->translate("The Metric System",
"Metric"), 0 );
@ -124,7 +124,7 @@ void KLocaleConfigOther::slotTranslate()
m_combPageSize->changeItem( m_locale->translate("US Letter"), 1 );
}
void KLocaleConfigOther::slotPageSizeChanged(int i)
void TDELocaleConfigOther::slotPageSizeChanged(int i)
{
TQPrinter::PageSize pageSize = TQPrinter::A4;
@ -135,8 +135,8 @@ void KLocaleConfigOther::slotPageSizeChanged(int i)
emit localeChanged();
}
void KLocaleConfigOther::slotMeasureSystemChanged(int i)
void TDELocaleConfigOther::slotMeasureSystemChanged(int i)
{
m_locale->setMeasureSystem((KLocale::MeasureSystem)i);
m_locale->setMeasureSystem((TDELocale::MeasureSystem)i);
emit localeChanged();
}

@ -29,15 +29,15 @@
class TQLabel;
class TQComboBox;
class KLocale;
class TDELocale;
class KLocaleConfigOther : public TQWidget
class TDELocaleConfigOther : public TQWidget
{
Q_OBJECT
public:
KLocaleConfigOther(KLocale *locale, TQWidget *parent = 0, const char *name = 0);
virtual ~KLocaleConfigOther();
TDELocaleConfigOther(TDELocale *locale, TQWidget *parent = 0, const char *name = 0);
virtual ~TDELocaleConfigOther();
void save();
@ -59,7 +59,7 @@ private slots:
void slotMeasureSystemChanged(int i);
private:
KLocale *m_locale;
TDELocale *m_locale;
TQLabel *m_labMeasureSystem;
TQComboBox *m_combMeasureSystem;

@ -80,7 +80,7 @@ bool operator>= (const StringPair &p1, const StringPair &p2)
return ! (p1.userName>=p2.userName);
}
StringPair KLocaleConfigTime::buildStringPair(const TQChar &c, const TQString &s) const
StringPair TDELocaleConfigTime::buildStringPair(const TQChar &c, const TQString &s) const
{
StringPair pair;
pair.storeName=c;
@ -88,7 +88,7 @@ StringPair KLocaleConfigTime::buildStringPair(const TQChar &c, const TQString &s
return pair;
}
TQValueList<StringPair> KLocaleConfigTime::timeMap() const
TQValueList<StringPair> TDELocaleConfigTime::timeMap() const
{
TQValueList < StringPair > list;
list+=buildStringPair('H',m_locale->translate("HH"));
@ -104,7 +104,7 @@ TQValueList<StringPair> KLocaleConfigTime::timeMap() const
return list;
}
TQValueList <StringPair> KLocaleConfigTime::dateMap() const
TQValueList <StringPair> TDELocaleConfigTime::dateMap() const
{
TQValueList < StringPair > list;
list+=buildStringPair('Y',m_locale->translate("YYYY"));
@ -123,7 +123,7 @@ TQValueList <StringPair> KLocaleConfigTime::dateMap() const
return list;
}
TQString KLocaleConfigTime::userToStore(const TQValueList<StringPair> & list,
TQString TDELocaleConfigTime::userToStore(const TQValueList<StringPair> & list,
const TQString & userFormat) const
{
TQString result;
@ -161,7 +161,7 @@ TQString KLocaleConfigTime::userToStore(const TQValueList<StringPair> & list,
return result;
}
TQString KLocaleConfigTime::storeToUser(const TQValueList<StringPair> & list,
TQString TDELocaleConfigTime::storeToUser(const TQValueList<StringPair> & list,
const TQString & storeFormat) const
{
TQString result;
@ -189,7 +189,7 @@ TQString KLocaleConfigTime::storeToUser(const TQValueList<StringPair> & list,
return result;
}
KLocaleConfigTime::KLocaleConfigTime(KLocale *_locale,
TDELocaleConfigTime::TDELocaleConfigTime(TDELocale *_locale,
TQWidget *parent, const char*name)
: TQWidget(parent, name),
m_locale(_locale)
@ -239,14 +239,14 @@ KLocaleConfigTime::KLocaleConfigTime(KLocale *_locale,
lay->setColStretch(1, 1);
}
KLocaleConfigTime::~KLocaleConfigTime()
TDELocaleConfigTime::~TDELocaleConfigTime()
{
}
void KLocaleConfigTime::save()
void TDELocaleConfigTime::save()
{
// temperary use of our locale as the global locale
KLocale *lsave = TDEGlobal::_locale;
TDELocale *lsave = TDEGlobal::_locale;
TDEGlobal::_locale = m_locale;
TDEConfig *config = TDEGlobal::config();
@ -302,7 +302,7 @@ void KLocaleConfigTime::save()
TDEGlobal::_locale = lsave;
}
void KLocaleConfigTime::showEvent( TQShowEvent *e )
void TDELocaleConfigTime::showEvent( TQShowEvent *e )
{
// This option makes sense only for languages where nouns are declined
if ( !m_locale->nounDeclension() )
@ -310,7 +310,7 @@ void KLocaleConfigTime::showEvent( TQShowEvent *e )
TQWidget::showEvent( e );
}
void KLocaleConfigTime::slotCalendarSystemChanged(int calendarSystem)
void TDELocaleConfigTime::slotCalendarSystemChanged(int calendarSystem)
{
kdDebug() << "CalendarSystem: " << calendarSystem << endl;
@ -333,7 +333,7 @@ void KLocaleConfigTime::slotCalendarSystemChanged(int calendarSystem)
emit localeChanged();
}
void KLocaleConfigTime::slotLocaleChanged()
void TDELocaleConfigTime::slotLocaleChanged()
{
typedef TQValueVector<TQString> CalendarVector;
CalendarVector calendars(4);
@ -375,7 +375,7 @@ calendarType);
}
void KLocaleConfigTime::slotTimeFmtChanged(const TQString &t)
void TDELocaleConfigTime::slotTimeFmtChanged(const TQString &t)
{
// m_locale->setTimeFormat(t);
m_locale->setTimeFormat( userToStore( timeMap(), t ) );
@ -383,27 +383,27 @@ void KLocaleConfigTime::slotTimeFmtChanged(const TQString &t)
emit localeChanged();
}
void KLocaleConfigTime::slotDateFmtChanged(const TQString &t)
void TDELocaleConfigTime::slotDateFmtChanged(const TQString &t)
{
// m_locale->setDateFormat(t);
m_locale->setDateFormat( userToStore( dateMap(), t ) );
emit localeChanged();
}
void KLocaleConfigTime::slotDateFmtShortChanged(const TQString &t)
void TDELocaleConfigTime::slotDateFmtShortChanged(const TQString &t)
{
//m_locale->setDateFormatShort(t);
m_locale->setDateFormatShort( userToStore( dateMap(), t ) );
emit localeChanged();
}
void KLocaleConfigTime::slotWeekStartDayChanged(int firstDay) {
void TDELocaleConfigTime::slotWeekStartDayChanged(int firstDay) {
kdDebug(173) << k_funcinfo << "first day is now: " << firstDay << endl;
m_locale->setWeekStartDay(m_comboWeekStartDay->currentItem() + 1);
emit localeChanged();
}
void KLocaleConfigTime::slotDateMonthNamePossChanged()
void TDELocaleConfigTime::slotDateMonthNamePossChanged()
{
if (m_locale->nounDeclension())
{
@ -412,7 +412,7 @@ void KLocaleConfigTime::slotDateMonthNamePossChanged()
}
}
void KLocaleConfigTime::slotTranslate()
void TDELocaleConfigTime::slotTranslate()
{
TQString str;
@ -531,7 +531,7 @@ void KLocaleConfigTime::slotTranslate()
}
}
void KLocaleConfigTime::updateWeekDayNames()
void TDELocaleConfigTime::updateWeekDayNames()
{
const KCalendarSystem * calendar = m_locale->calendar();

@ -31,18 +31,18 @@
class TQCheckBox;
class TQComboBox;
class KLocale;
class TDELocale;
class KLanguageCombo;
class StringPair;
class KLocaleConfigTime : public TQWidget
class TDELocaleConfigTime : public TQWidget
{
Q_OBJECT
public:
KLocaleConfigTime( KLocale *_locale, TQWidget *parent=0, const char *name=0);
virtual ~KLocaleConfigTime( );
TDELocaleConfigTime( TDELocale *_locale, TQWidget *parent=0, const char *name=0);
virtual ~TDELocaleConfigTime( );
void save();
@ -83,7 +83,7 @@ private:
const TQString & userFormat) const;
StringPair buildStringPair(const TQChar &storeName, const TQString &userName) const;
KLocale *m_locale;
TDELocale *m_locale;
// Time & dates
TQLabel *m_labTimeFmt;

@ -23,16 +23,16 @@
extern "C" {
KDE_EXPORT void *init_kcm_locale() {
KLocale::setMainCatalogue("kcmlocale");
return new KLocaleFactory("kcmlocale");
TDELocale::setMainCatalogue("kcmlocale");
return new TDELocaleFactory("kcmlocale");
}
}
/*
extern "C" {
TDECModule *create_locale(TQWidget *parent, const char* name) {
KLocale::setMainCatalogue("kcmlocale");
return new KLocaleApplication(parent, "kcmlocale");
TDELocale::setMainCatalogue("kcmlocale");
return new TDELocaleApplication(parent, "kcmlocale");
}
}
*/

@ -45,9 +45,9 @@
#include "kcmlocale.h"
#include "toplevel.moc"
KLocaleApplication::KLocaleApplication(TQWidget *parent, const char* /*name*/,
TDELocaleApplication::TDELocaleApplication(TQWidget *parent, const char* /*name*/,
const TQStringList &args)
: TDECModule( KLocaleFactory::instance(), parent, args)
: TDECModule( TDELocaleFactory::instance(), parent, args)
{
TDEAboutData* aboutData = new TDEAboutData("kcmlocale",
I18N_NOOP("KCMLocale"),
@ -62,26 +62,26 @@ KLocaleApplication::KLocaleApplication(TQWidget *parent, const char* /*name*/,
m_nullConfig = new TDEConfig(TQString::null, false, false);
m_globalConfig = new TDEConfig(TQString::null, false, true);
m_locale = new KLocale(TQString::fromLatin1("kcmlocale"), m_nullConfig);
m_locale = new TDELocale(TQString::fromLatin1("kcmlocale"), m_nullConfig);
TQVBoxLayout *l = new TQVBoxLayout(this, 0, KDialog::spacingHint());
l->setAutoAdd(TRUE);
m_tab = new TQTabWidget(this);
m_localemain = new KLocaleConfig(m_locale, this);
m_localemain = new TDELocaleConfig(m_locale, this);
m_tab->addTab( m_localemain, TQString::null);
m_localenum = new KLocaleConfigNumber(m_locale, this);
m_localenum = new TDELocaleConfigNumber(m_locale, this);
m_tab->addTab( m_localenum, TQString::null );
m_localemon = new KLocaleConfigMoney(m_locale, this);
m_localemon = new TDELocaleConfigMoney(m_locale, this);
m_tab->addTab( m_localemon, TQString::null );
m_localetime = new KLocaleConfigTime(m_locale, this);
m_localetime = new TDELocaleConfigTime(m_locale, this);
m_tab->addTab( m_localetime, TQString::null );
m_localeother = new KLocaleConfigOther(m_locale, this);
m_localeother = new TDELocaleConfigOther(m_locale, this);
m_tab->addTab( m_localeother, TQString::null );
// Examples
m_gbox = new TQVGroupBox(this);
m_sample = new KLocaleSample(m_locale, m_gbox);
m_sample = new TDELocaleSample(m_locale, m_gbox);
// getting signals from childs
connect(m_localemain, TQT_SIGNAL(localeChanged()),
@ -146,33 +146,33 @@ KLocaleApplication::KLocaleApplication(TQWidget *parent, const char* /*name*/,
load();
}
KLocaleApplication::~KLocaleApplication()
TDELocaleApplication::~TDELocaleApplication()
{
delete m_locale;
delete m_globalConfig;
delete m_nullConfig;
}
void KLocaleApplication::load()
void TDELocaleApplication::load()
{
load( false );
}
void KLocaleApplication::load( bool useDefaults )
void TDELocaleApplication::load( bool useDefaults )
{
m_globalConfig->setReadDefaults( useDefaults );
m_globalConfig->reparseConfiguration();
*m_locale = KLocale(TQString::fromLatin1("kcmlocale"), m_globalConfig);
*m_locale = TDELocale(TQString::fromLatin1("kcmlocale"), m_globalConfig);
emit localeChanged();
emit languageChanged();
emit changed(useDefaults);
}
void KLocaleApplication::save()
void TDELocaleApplication::save()
{
// temperary use of our locale as the global locale
KLocale *lsave = TDEGlobal::_locale;
TDELocale *lsave = TDEGlobal::_locale;
TDEGlobal::_locale = m_locale;
KMessageBox::information(this, m_locale->translate
("Changed language settings apply only to "
@ -206,12 +206,12 @@ void KLocaleApplication::save()
emit changed(false);
}
void KLocaleApplication::defaults()
void TDELocaleApplication::defaults()
{
load( true );
}
TQString KLocaleApplication::quickHelp() const
TQString TDELocaleApplication::quickHelp() const
{
return m_locale->translate("<h1>Country/Region & Language</h1>\n"
"<p>From here you can configure language, numeric, and time \n"
@ -222,7 +222,7 @@ TQString KLocaleApplication::quickHelp() const
"to use 24 hours and and use comma as decimal separator.</p>\n");
}
void KLocaleApplication::slotTranslate()
void TDELocaleApplication::slotTranslate()
{
// The untranslated string for TQLabel are stored in
// the name() so we use that when retranslating
@ -269,7 +269,7 @@ void KLocaleApplication::slotTranslate()
// not retranslated.
}
void KLocaleApplication::slotChanged()
void TDELocaleApplication::slotChanged()
{
emit changed(true);
}

@ -32,21 +32,21 @@ class TQTabWidget;
class TQGroupBox;
class TDEConfig;
class KLocale;
class KLocaleConfig;
class KLocaleConfigMoney;
class KLocaleConfigNumber;
class KLocaleConfigTime;
class KLocaleConfigOther;
class KLocaleSample;
class KLocaleApplication : public TDECModule
class TDELocale;
class TDELocaleConfig;
class TDELocaleConfigMoney;
class TDELocaleConfigNumber;
class TDELocaleConfigTime;
class TDELocaleConfigOther;
class TDELocaleSample;
class TDELocaleApplication : public TDECModule
{
Q_OBJECT
public:
KLocaleApplication(TQWidget *parent, const char *name, const TQStringList &);
virtual ~KLocaleApplication();
TDELocaleApplication(TQWidget *parent, const char *name, const TQStringList &);
virtual ~TDELocaleApplication();
virtual void load();
virtual void load(bool useDefault);
@ -66,22 +66,22 @@ public slots:
void slotChanged();
private:
KLocale *m_locale;
TDELocale *m_locale;
TQTabWidget *m_tab;
KLocaleConfig *m_localemain;
KLocaleConfigNumber *m_localenum;
KLocaleConfigMoney *m_localemon;
KLocaleConfigTime *m_localetime;
KLocaleConfigOther *m_localeother;
TDELocaleConfig *m_localemain;
TDELocaleConfigNumber *m_localenum;
TDELocaleConfigMoney *m_localemon;
TDELocaleConfigTime *m_localetime;
TDELocaleConfigOther *m_localeother;
TQGroupBox *m_gbox;
KLocaleSample *m_sample;
TDELocaleSample *m_sample;
TDEConfig * m_globalConfig;
TDEConfig * m_nullConfig;
};
typedef KGenericFactory<KLocaleApplication, TQWidget > KLocaleFactory;
typedef KGenericFactory<TDELocaleApplication, TQWidget > TDELocaleFactory;
#endif

@ -205,7 +205,7 @@ static int trapXErrors(Display *, XErrorEvent *)
int main( int argc, char **argv )
{
KLocale::setMainCatalogue("kdesktop");
TDELocale::setMainCatalogue("kdesktop");
TDECmdLineArgs::init( argc, argv, "kdesktop_lock", I18N_NOOP("KDesktop Locker"), I18N_NOOP("Session Locker for KDesktop"), "2.1" );
TDECmdLineArgs::addCmdLineOptions( options );

@ -21,7 +21,7 @@ static KCmdLineOptions options[] =
int main( int argc, char ** argv )
{
KLocale::setMainCatalogue("kfindpart");
TDELocale::setMainCatalogue("kfindpart");
TDEAboutData aboutData( "kfind", I18N_NOOP("KFind"),
KFIND_VERSION, description, TDEAboutData::License_GPL,
I18N_NOOP("(c) 1998-2003, The KDE Developers"));

@ -1540,7 +1540,7 @@ void ClockApplet::aboutToShowContextMenu()
menu->clear();
menu->insertTitle( SmallIcon( "clock" ), i18n( "Clock" ) );
KLocale *loc = TDEGlobal::locale();
TDELocale *loc = TDEGlobal::locale();
TQDateTime dt = TQDateTime::currentDateTime();
dt = TQT_TQDATETIME_OBJECT(dt.addSecs(TZoffset));

@ -34,7 +34,7 @@ static const char version[] = "1.0";
extern "C" int KDE_EXPORT kdemain( int argc, char **argv )
{
KLocale::setMainCatalogue("kmenuedit");
TDELocale::setMainCatalogue("kmenuedit");
TDEAboutData aboutData("kcontroledit", I18N_NOOP("TDE Control Center Editor"),
version, description, TDEAboutData::License_GPL,
"(C) 2000-2004, Waldo Bastian, Raffaele Sandrini, Matthias Elter");

@ -113,7 +113,7 @@ static int askUser(TDEApplication &app, TQString filename, bool &readonly) {
#include <kactioncollection.h>
extern "C" KDE_EXPORT int kdemain(int argc, char **argv) {
KLocale::setMainCatalogue("konqueror");
TDELocale::setMainCatalogue("konqueror");
TDEAboutData aboutData("keditbookmarks", I18N_NOOP("Bookmark Editor"), VERSION,
I18N_NOOP("Konqueror Bookmarks Editor"),
TDEAboutData::License_GPL,

@ -169,7 +169,7 @@ bool KCountryPage::save(KLanguageButton *comboCountry, KLanguageButton *comboLan
TDEProcess proc;
proc << TQString::fromLatin1("tdebuildsycoca");
proc.start(TDEProcess::DontCare);
kdDebug() << "KLocaleConfig::save : sending signal to kdesktop" << endl;
kdDebug() << "TDELocaleConfig::save : sending signal to kdesktop" << endl;
// inform kicker and kdeskop about the new language
kapp->dcopClient()->send( "kicker", "Panel", "restart()", TQString::null);
// call, not send, so that we know it's done before coming back

@ -87,8 +87,8 @@ KPersonalizer::KPersonalizer(TQWidget *parent, const char *name)
setFinishEnabled(TQWizard::page(4), true);
locale = new KLocale("kpersonalizer");
locale->setLanguage(KLocale::defaultLanguage());
locale = new TDELocale("kpersonalizer");
locale->setLanguage(TDELocale::defaultLanguage());
connect(ospage, TQT_SIGNAL(selectedOS(const TQString&)), stylepage, TQT_SLOT(presetStyle(const TQString&)));
connect(ospage, TQT_SIGNAL(selectedOS(const TQString&)), eyecandy, TQT_SLOT(slotPresetSlider(const TQString&)));

@ -28,7 +28,7 @@
/** prototypes */
class KLanguageCombo;
class KLocale;
class TDELocale;
class KCountryPage;
class KOSPage;
class KEyeCandyPage;
@ -79,7 +79,7 @@ private:
KEyeCandyPage* eyecandy;
KStylePage* stylepage;
KRefinePage* refinepage;
KLocale* locale;
TDELocale* locale;
bool os_dirty, eye_dirty, style_dirty;
static bool before_session;

@ -45,7 +45,7 @@ int main(int argc, char *argv[])
TDECmdLineArgs::init( argc, argv, &aboutData );
TDECmdLineArgs::addCmdLineOptions( options ); // Add our own options.
KLocale::setMainCatalogue("kpersonalizer");
TDELocale::setMainCatalogue("kpersonalizer");
TDEApplication a;
if ( !kapp->dcopClient()->isAttached() )

@ -529,7 +529,7 @@ int main( int argc, char **argv )
"0.3", "nspluginscan", TDEAboutData::License_GPL,
"(c) 2000,2001 by Stefan Schimanski" );
KLocale::setMainCatalogue("nsplugin");
TDELocale::setMainCatalogue("nsplugin");
TDECmdLineArgs::init( argc, argv, &aboutData );
TDECmdLineArgs::addCmdLineOptions( options );
TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();

@ -240,13 +240,13 @@ int main(int argc, char** argv)
_notifiers[2].setAutoDelete( TRUE );
kdDebug(1430) << "4 - KXtApplication app" << endl;
KLocale::setMainCatalogue("nsplugin");
TDELocale::setMainCatalogue("nsplugin");
KXtApplication app(dpy, argc, argv, "nspluginviewer");
#else
kdDebug(1430) << "3 - create QXtEventLoop" << endl;
QXtEventLoop integrator( "nspluginviewer" );
parseCommandLine(argc, argv);
KLocale::setMainCatalogue("nsplugin");
TDELocale::setMainCatalogue("nsplugin");
kdDebug(1430) << "4 - create TDEApplication" << endl;
TDEApplication app( argc, argv, "nspluginviewer" );

@ -126,7 +126,7 @@ static void ripper(int)
int KDE_EXPORT kdemain( int argc, char **argv )
{
KLocale::setMainCatalogue("tdeio_fish");
TDELocale::setMainCatalogue("tdeio_fish");
TDEInstance instance("fish");
myDebug( << "*** Starting fish " << endl);

@ -100,7 +100,7 @@ bool hasDirectRendering () {
int main(int argc, char *argv[])
{
KLocale::setMainCatalogue("tdescreensaver");
TDELocale::setMainCatalogue("tdescreensaver");
TDECmdLineArgs::init(argc, argv, appName, I18N_NOOP("Random screen saver"), description, version);
TDECmdLineArgs::addCmdLineOptions(options);

@ -117,7 +117,7 @@ main( int argc, char *argv[] )
{
TDEApplication::disableAutoDcopRegistration();
KLocale::setMainCatalogue( "kdesktop" );
TDELocale::setMainCatalogue( "kdesktop" );
TDECmdLineArgs::init( argc, argv, "krootimage", I18N_NOOP( "KRootImage" ), description, version );
TDECmdLineArgs::addCmdLineOptions( options );

@ -275,7 +275,7 @@ static const KCmdLineOptions options[] =
extern "C"
KDE_EXPORT int kdemain( int argc, char* argv[] )
{
KLocale::setMainCatalogue( "kcmtwinrules" );
TDELocale::setMainCatalogue( "kcmtwinrules" );
TDECmdLineArgs::init( argc, argv, "twin_rules_dialog", I18N_NOOP( "TWin" ),
I18N_NOOP( "TWin helper utility" ), "1.0" );
TDECmdLineArgs::addCmdLineOptions( options );

@ -45,7 +45,7 @@ static const KCmdLineOptions options[] =
int main( int argc, char* argv[] )
{
KLocale::setMainCatalogue( "twin" ); // the messages are in twin's .po file
TDELocale::setMainCatalogue( "twin" ); // the messages are in twin's .po file
TDECmdLineArgs::init( argc, argv, "twin_killer_helper", I18N_NOOP( "TWin" ),
I18N_NOOP( "TWin helper utility" ), "1.0" );
TDECmdLineArgs::addCmdLineOptions( options );

@ -44,7 +44,7 @@ static const KCmdLineOptions options[] =
int main( int argc, char* argv[] )
{
KLocale::setMainCatalogue( "twin" ); // the messages are in twin's .po file
TDELocale::setMainCatalogue( "twin" ); // the messages are in twin's .po file
TDECmdLineArgs::init( argc, argv, "twin_resume_helper", I18N_NOOP( "TWin" ),
I18N_NOOP( "TWin helper utility" ), "1.0" );
TDECmdLineArgs::addCmdLineOptions( options );

Loading…
Cancel
Save