diff options
Diffstat (limited to 'src/kdmtheme.cpp')
-rw-r--r-- | src/kdmtheme.cpp | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/src/kdmtheme.cpp b/src/kdmtheme.cpp index 9cb57df..a4da499 100644 --- a/src/kdmtheme.cpp +++ b/src/kdmtheme.cpp @@ -18,7 +18,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ -#include "kdmtheme.h" +#include "tdmtheme.h" #include <kdialog.h> #include <kglobal.h> @@ -57,10 +57,10 @@ class ThemeData : public TQListViewItem { TQString description; }; -typedef KGenericFactory<KDMThemeWidget, TQWidget> kdmthemeFactory; -K_EXPORT_COMPONENT_FACTORY( kcm_kdmtheme, kdmthemeFactory("kcmkdmtheme")) +typedef KGenericFactory<TDMThemeWidget, TQWidget> tdmthemeFactory; +K_EXPORT_COMPONENT_FACTORY( kcm_tdmtheme, tdmthemeFactory("kcmtdmtheme")) -KDMThemeWidget::KDMThemeWidget( TQWidget *parent, const char *name, const TQStringList& ) +TDMThemeWidget::TDMThemeWidget( TQWidget *parent, const char *name, const TQStringList& ) : KCModule(parent, name), config( 0L ) { TQGridLayout *ml = new TQGridLayout( this ); @@ -68,7 +68,7 @@ KDMThemeWidget::KDMThemeWidget( TQWidget *parent, const char *name, const TQStri ml->setMargin( KDialog::marginHint() ); cUseTheme = new TQCheckBox( this ); - cUseTheme->setText( i18n( "En&able KDM Themes" ) ); + cUseTheme->setText( i18n( "En&able TDM Themes" ) ); ml->addMultiCellWidget( cUseTheme, 0, 0, 0, 2 ); themeWidget = new TQListView( this ); @@ -85,7 +85,7 @@ KDMThemeWidget::KDMThemeWidget( TQWidget *parent, const char *name, const TQStri preview = new TQLabel( this ); preview->setFixedSize( TQSize( 200, 150 ) ); preview->setScaledContents( true ); - TQWhatsThis::add(preview, i18n("This is a screen shot of what KDM will look like.") ); + TQWhatsThis::add(preview, i18n("This is a screen shot of what TDM will look like.") ); ml->addWidget( preview, 1, 2 ); @@ -111,8 +111,8 @@ KDMThemeWidget::KDMThemeWidget( TQWidget *parent, const char *name, const TQStri connect( bRemoveTheme, TQT_SIGNAL(clicked()), TQT_SLOT(removeSelectedThemes()) ); connect( cUseTheme, TQT_SIGNAL( toggled( bool ) ), TQT_SLOT( toggleUseTheme( bool ) ) ); - TQStringList themeDirs = KGlobal::dirs()->findDirs("data","kdm/"); - themeDir = KGlobal::dirs()->findDirs("data","kdm/").last(); + TQStringList themeDirs = KGlobal::dirs()->findDirs("data","tdm/"); + themeDir = KGlobal::dirs()->findDirs("data","tdm/").last(); TQDir d; for ( TQStringList::Iterator dirs = themeDirs.begin(); dirs != themeDirs.end(); ++dirs ) { kdDebug() << "Loading themes... ( " + *dirs + "themes/" + " )" << endl; @@ -133,7 +133,7 @@ KDMThemeWidget::KDMThemeWidget( TQWidget *parent, const char *name, const TQStri } } -void KDMThemeWidget::selectTheme( const TQString &path ) +void TDMThemeWidget::selectTheme( const TQString &path ) { for ( TQListViewItemIterator tdi( themeWidget ); tdi.current(); tdi++ ) { ThemeData * td = ((ThemeData *)*tdi); @@ -145,22 +145,22 @@ void KDMThemeWidget::selectTheme( const TQString &path ) } } -void KDMThemeWidget::load() +void TDMThemeWidget::load() { - TQString kdmrc = KGlobal::dirs()->findResource("config", "kdm/kdmrc"); - if ( kdmrc.isEmpty() ) { - kdError() << "Failed to find kdm resource file kdmrc!" << endl; + TQString tdmrc = KGlobal::dirs()->findResource("config", "tdm/tdmrc"); + if ( tdmrc.isEmpty() ) { + kdError() << "Failed to find tdm resource file tdmrc!" << endl; KMessageBox msgBox; - msgBox.sorry(0, i18n("I can't find the configuration file for the Login Manager, kdm. Check you have set up the Login Manager from the Control Center, and that you have permision to read and write the Login Manager's configuration file.\n\n You must set-up the Login Manager before you can use its themes."), i18n("Can't find Configuration File")); + msgBox.sorry(0, i18n("I can't find the configuration file for the Login Manager, tdm. Check you have set up the Login Manager from the Control Center, and that you have permision to read and write the Login Manager's configuration file.\n\n You must set-up the Login Manager before you can use its themes."), i18n("Can't find Configuration File")); delete config; config = NULL; } else { - kdDebug() << "Loading... ( " + kdmrc + " )" << endl; + kdDebug() << "Loading... ( " + tdmrc + " )" << endl; delete config; - config = new KConfig( kdmrc ); + config = new KConfig( tdmrc ); config->setGroup( "X-*-Greeter" ); cUseTheme->setChecked( config->readBoolEntry( "UseTheme", false ) ); @@ -168,7 +168,7 @@ void KDMThemeWidget::load() } } -void KDMThemeWidget::save() +void TDMThemeWidget::save() { kdDebug() << "Saving: Theme " << defaultTheme->path << " - UseTheme " << cUseTheme->isChecked() << endl; config->writeEntry( "Theme", defaultTheme->path ); @@ -176,26 +176,26 @@ void KDMThemeWidget::save() config->sync(); } -void KDMThemeWidget::defaults() +void TDMThemeWidget::defaults() { selectTheme( themeDir + "circles" ); emit changed(true); } -void KDMThemeWidget::toggleUseTheme(bool useTheme) { +void TDMThemeWidget::toggleUseTheme(bool useTheme) { setReadOnly( useTheme ); emit changed(true); } -void KDMThemeWidget::setReadOnly(bool ro) +void TDMThemeWidget::setReadOnly(bool ro) { themeWidget->setEnabled( ro ); bInstallTheme->setEnabled( ro ); bRemoveTheme->setEnabled( ro ); } -void KDMThemeWidget::insertTheme( const TQString &_theme ) +void TDMThemeWidget::insertTheme( const TQString &_theme ) { KConfig * themeConfig; TQString name; @@ -231,7 +231,7 @@ void KDMThemeWidget::insertTheme( const TQString &_theme ) child->description = themeConfig->readEntry( "Description" ); } -void KDMThemeWidget::updateInfoView( ThemeData *theme ) +void TDMThemeWidget::updateInfoView( ThemeData *theme ) { info->setText( ((theme->copyright.length() > 0) ? @@ -245,7 +245,7 @@ void KDMThemeWidget::updateInfoView( ThemeData *theme ) "Screenshot not available" : TQString() ); } -void KDMThemeWidget::installNewTheme() +void TDMThemeWidget::installNewTheme() { KURLRequesterDlg fileRequester( TQString(), this, i18n("Drag or Type Theme URL") ); fileRequester.urlRequester()->setMode( KFile::File | KFile::Directory | KFile::ExistingOnly ); @@ -258,9 +258,9 @@ void KDMThemeWidget::installNewTheme() if (!KIO::NetAccess::download( themeURL, themeTmpFile, this )) { TQString sorryText; if (themeURL.isLocalFile()) - sorryText = i18n("Unable to find the KDM theme archive %1.",themeURL.prettyURL()); + sorryText = i18n("Unable to find the TDM theme archive %1.",themeURL.prettyURL()); else - sorryText = i18n("Unable to download the KDM theme archive;\n" + sorryText = i18n("Unable to download the TDM theme archive;\n" "please check that address %1 is correct.",themeURL.prettyURL()); KMessageBox::sorry( this, sorryText ); return; @@ -286,10 +286,10 @@ void KDMThemeWidget::installNewTheme() } if (foundThemes.isEmpty()) - KMessageBox::error( this, i18n("The file is not a valid KDM theme archive.") ); + KMessageBox::error( this, i18n("The file is not a valid TDM theme archive.") ); else { KProgressDialog progressDiag( this, - i18n("Installing KDM themes"), TQString() ); + i18n("Installing TDM themes"), TQString() ); progressDiag.setModal( true ); progressDiag.setAutoClose( true ); progressDiag.progressBar()->setTotalSteps( foundThemes.count() ); @@ -317,7 +317,7 @@ void KDMThemeWidget::installNewTheme() KIO::NetAccess::removeTempFile( themeTmpFile ); } -void KDMThemeWidget::themeSelected() +void TDMThemeWidget::themeSelected() { if (themeWidget->selectedItem()) { defaultTheme = (ThemeData *)(themeWidget->selectedItem()); @@ -327,13 +327,13 @@ void KDMThemeWidget::themeSelected() emit changed(true); } -void KDMThemeWidget::removeSelectedThemes() +void TDMThemeWidget::removeSelectedThemes() { TQListViewItem * themes = themeWidget->selectedItem(); if (!themes) return; if (KMessageBox::questionYesNoList( this, - i18n("Are you sure you want to remove this KDM theme?"), + i18n("Are you sure you want to remove this TDM theme?"), themes->text(0), i18n("Remove theme?") ) != KMessageBox::Yes) return; KIO::del( ((ThemeData *)themes)->path ); // XXX error check @@ -341,4 +341,4 @@ void KDMThemeWidget::removeSelectedThemes() themeWidget->takeItem( themes ); } -#include "kdmtheme.moc" +#include "tdmtheme.moc" |