diff options
Diffstat (limited to 'src/modules/options/optw_textencoding.cpp')
-rw-r--r-- | src/modules/options/optw_textencoding.cpp | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/src/modules/options/optw_textencoding.cpp b/src/modules/options/optw_textencoding.cpp index 431cdad0..1b44f803 100644 --- a/src/modules/options/optw_textencoding.cpp +++ b/src/modules/options/optw_textencoding.cpp @@ -27,19 +27,19 @@ #include "kvi_app.h" #include "kvi_fileutils.h" -#include <qdir.h> -#include <qmessagebox.h> +#include <tqdir.h> +#include <tqmessagebox.h> -QString g_szPrevSettedLocale; +TQString g_szPrevSettedLocale; -KviTextEncodingOptionsWidget::KviTextEncodingOptionsWidget(QWidget * parent) -: KviOptionsWidget(parent,"textencoding_options_widget") +KviTextEncodingOptionsWidget::KviTextEncodingOptionsWidget(TQWidget * tqparent) +: KviOptionsWidget(tqparent,"textencoding_options_widget") { createLayout(5,2); addLabel(0,0,0,0,__tr2qs_ctx("Default text encoding:","options")); - m_pTextEncodingCombo = new QComboBox(this); + m_pTextEncodingCombo = new TQComboBox(this); addWidgetToLayout(m_pTextEncodingCombo,1,0,1,0); m_pTextEncodingCombo->insertItem(__tr2qs_ctx("Use Language Encoding","options")); @@ -48,7 +48,7 @@ KviTextEncodingOptionsWidget::KviTextEncodingOptionsWidget(QWidget * parent) KviLocale::EncodingDescription * d = KviLocale::encodingDescription(i); while(d->szName) { - if(KviQString::equalCI(d->szName,KVI_OPTION_STRING(KviOption_stringDefaultTextEncoding)))iMatch = i + 1; + if(KviTQString::equalCI(d->szName,KVI_OPTION_STRING(KviOption_stringDefaultTextEncoding)))iMatch = i + 1; m_pTextEncodingCombo->insertItem(d->szName); i++; d = KviLocale::encodingDescription(i); @@ -58,17 +58,17 @@ KviTextEncodingOptionsWidget::KviTextEncodingOptionsWidget(QWidget * parent) addLabel(0,1,0,1,__tr2qs_ctx("Force language:","options")); - m_pForcedLocaleCombo = new QComboBox(this); + m_pForcedLocaleCombo = new TQComboBox(this); addWidgetToLayout(m_pForcedLocaleCombo,1,1,1,1); - QLabel * l = new QLabel(__tr2qs_ctx("<b>Note:</b> You need to restart KVirc to apply a language changing","options"),this); + TQLabel * l = new TQLabel(__tr2qs_ctx("<b>Note:</b> You need to restart KVirc to apply a language changing","options"),this); addWidgetToLayout(l,0,2,1,2); m_pForcedLocaleCombo->insertItem(__tr2qs_ctx("Automatic detection","options")); m_pForcedLocaleCombo->insertItem(__tr2qs_ctx("en","options")); - QString szLangFile=QString("%1/.kvirc_force_locale").arg(QDir::homeDirPath()); + TQString szLangFile=TQString("%1/.kvirc_force_locale").tqarg(TQDir::homeDirPath()); bool bIsDefaultLocale = !KviFileUtils::fileExists(szLangFile); //We Have setted locale, but not restarted kvirc @@ -79,26 +79,26 @@ KviTextEncodingOptionsWidget::KviTextEncodingOptionsWidget(QWidget * parent) m_szLanguage=KviLocale::localeName(); } - QString szLocaleDir; + TQString szLocaleDir; g_pApp->getGlobalKvircDirectory(szLocaleDir,KviApp::Locale); - QStringList list=QDir(szLocaleDir).entryList("kvirc_*.mo",QDir::Files); + TQStringList list=TQDir(szLocaleDir).entryList("kvirc_*.mo",TQDir::Files); i = 0; iMatch = 0; - for ( QStringList::Iterator it = list.begin(); it != list.end(); ++it ) { - QString szTmp=*it; - szTmp.replace("kvirc_",""); - szTmp.replace(".mo",""); + for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it ) { + TQString szTmp=*it; + szTmp.tqreplace("kvirc_",""); + szTmp.tqreplace(".mo",""); m_pForcedLocaleCombo->insertItem(szTmp); - if(KviQString::equalCI(szTmp,m_szLanguage)) + if(KviTQString::equalCI(szTmp,m_szLanguage)) iMatch = i + 2; i++; } if(bIsDefaultLocale) m_pForcedLocaleCombo->setCurrentItem(0); - else if(KviQString::equalCI(m_szLanguage,"en")) + else if(KviTQString::equalCI(m_szLanguage,"en")) m_pForcedLocaleCombo->setCurrentItem(1); else m_pForcedLocaleCombo->setCurrentItem(iMatch); @@ -121,7 +121,7 @@ void KviTextEncodingOptionsWidget::commit() } idx=m_pForcedLocaleCombo->currentItem(); - QString szLangFile=QString("%1/.kvirc_force_locale").arg(QDir::homeDirPath()); + TQString szLangFile=TQString("%1/.kvirc_force_locale").tqarg(TQDir::homeDirPath()); if(idx==0) { if(KviFileUtils::fileExists(szLangFile)) KviFileUtils::removeFile(szLangFile); @@ -129,11 +129,11 @@ void KviTextEncodingOptionsWidget::commit() g_szPrevSettedLocale=m_pForcedLocaleCombo->text(idx); if(!KviFileUtils::writeFile(szLangFile,m_pForcedLocaleCombo->text(idx))) { - QMessageBox::critical(this,"KVIrc",__tr2qs_ctx("Unable to write language information to","options")+"\n"+szLangFile,__tr2qs_ctx("Ok","options")); + TQMessageBox::critical(this,"KVIrc",__tr2qs_ctx("Unable to write language information to","options")+"\n"+szLangFile,__tr2qs_ctx("Ok","options")); } } -/* if(!KviQString::equalCI(m_pForcedLocaleCombo->text(idx),m_szLanguage)) - QMessageBox::information(0,"KVIrc",__tr2qs_ctx("You need to restart KVirc to apply a language changing","options"),QMessageBox::Ok);*/ +/* if(!KviTQString::equalCI(m_pForcedLocaleCombo->text(idx),m_szLanguage)) + TQMessageBox::information(0,"KVIrc",__tr2qs_ctx("You need to restart KVirc to apply a language changing","options"),TQMessageBox::Ok);*/ } #include "m_optw_textencoding.moc" |