|
|
|
@ -61,7 +61,7 @@ typedef KGenericFactory<TDMThemeWidget, TQWidget> tdmthemeFactory;
|
|
|
|
|
K_EXPORT_COMPONENT_FACTORY( kcm_tdmtheme, tdmthemeFactory("kcmtdmtheme"))
|
|
|
|
|
|
|
|
|
|
TDMThemeWidget::TDMThemeWidget( TQWidget *parent, const char *name, const TQStringList& )
|
|
|
|
|
: KCModule(parent, name), config( 0L )
|
|
|
|
|
: TDECModule(parent, name), config( 0L )
|
|
|
|
|
{
|
|
|
|
|
TQGridLayout *ml = new TQGridLayout( this );
|
|
|
|
|
ml->setSpacing( KDialog::spacingHint() );
|
|
|
|
@ -160,7 +160,7 @@ void TDMThemeWidget::load()
|
|
|
|
|
kdDebug() << "Loading... ( " + tdmrc + " )" << endl;
|
|
|
|
|
|
|
|
|
|
delete config;
|
|
|
|
|
config = new KConfig( tdmrc );
|
|
|
|
|
config = new TDEConfig( tdmrc );
|
|
|
|
|
config->setGroup( "X-*-Greeter" );
|
|
|
|
|
cUseTheme->setChecked( config->readBoolEntry( "UseTheme", false ) );
|
|
|
|
|
|
|
|
|
@ -197,16 +197,16 @@ void TDMThemeWidget::setReadOnly(bool ro)
|
|
|
|
|
|
|
|
|
|
void TDMThemeWidget::insertTheme( const TQString &_theme )
|
|
|
|
|
{
|
|
|
|
|
KConfig * themeConfig;
|
|
|
|
|
TDEConfig * themeConfig;
|
|
|
|
|
TQString name;
|
|
|
|
|
|
|
|
|
|
kdDebug() << "Looking for " << _theme << "/KdmGreeterTheme.desktop" << endl;
|
|
|
|
|
themeConfig = new KConfig( _theme + "/KdmGreeterTheme.desktop");
|
|
|
|
|
themeConfig = new TDEConfig( _theme + "/KdmGreeterTheme.desktop");
|
|
|
|
|
themeConfig->setGroup( "GdmGreeterTheme" );
|
|
|
|
|
name = themeConfig->readEntry( "Name" );
|
|
|
|
|
if (name.isEmpty()) {
|
|
|
|
|
kdDebug() << "Looking for " << _theme << "/GdmGreeterTheme.desktop" << endl;
|
|
|
|
|
themeConfig = new KConfig( _theme + "/GdmGreeterTheme.desktop");
|
|
|
|
|
themeConfig = new TDEConfig( _theme + "/GdmGreeterTheme.desktop");
|
|
|
|
|
themeConfig->setGroup( "GdmGreeterTheme" );
|
|
|
|
|
|
|
|
|
|
name = themeConfig->readEntry( "Name" );
|
|
|
|
@ -255,7 +255,7 @@ void TDMThemeWidget::installNewTheme()
|
|
|
|
|
|
|
|
|
|
TQString themeTmpFile;
|
|
|
|
|
|
|
|
|
|
if (!KIO::NetAccess::download( themeURL, themeTmpFile, this )) {
|
|
|
|
|
if (!TDEIO::NetAccess::download( themeURL, themeTmpFile, this )) {
|
|
|
|
|
TQString sorryText;
|
|
|
|
|
if (themeURL.isLocalFile())
|
|
|
|
|
sorryText = i18n("Unable to find the TDM theme archive %1.",themeURL.prettyURL());
|
|
|
|
@ -314,7 +314,7 @@ void TDMThemeWidget::installNewTheme()
|
|
|
|
|
|
|
|
|
|
archive.close();
|
|
|
|
|
|
|
|
|
|
KIO::NetAccess::removeTempFile( themeTmpFile );
|
|
|
|
|
TDEIO::NetAccess::removeTempFile( themeTmpFile );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void TDMThemeWidget::themeSelected()
|
|
|
|
@ -336,7 +336,7 @@ void TDMThemeWidget::removeSelectedThemes()
|
|
|
|
|
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
|
|
|
|
|
TDEIO::del( ((ThemeData *)themes)->path ); // XXX error check
|
|
|
|
|
|
|
|
|
|
themeWidget->takeItem( themes );
|
|
|
|
|
}
|
|
|
|
|