|
|
|
@ -298,11 +298,11 @@ void KbfxConfig::readThemeInfo ( TQString &themePath, TQString &themeName )
|
|
|
|
|
setThemeInfoDefault();
|
|
|
|
|
|
|
|
|
|
TQFileInfo * info_theme = new TQFileInfo ( themePath + themeName + "/" + m_KbfxThemesVersion );
|
|
|
|
|
KConfig * infoconfig = 0;
|
|
|
|
|
TDEConfig * infoconfig = 0;
|
|
|
|
|
|
|
|
|
|
if ( info_theme->exists() == TRUE )
|
|
|
|
|
{
|
|
|
|
|
infoconfig = new KConfig ( info_theme->absFilePath() );
|
|
|
|
|
infoconfig = new TDEConfig ( info_theme->absFilePath() );
|
|
|
|
|
infoconfig->setGroup ( "ThemeGeneral" );
|
|
|
|
|
m_InfoVersion = infoconfig->readEntry ( "ThemeVersion", m_InfoVersionDefault );
|
|
|
|
|
m_InfoAuthor = infoconfig->readEntry ( "AuthorName", m_InfoAuthorDefault );
|
|
|
|
@ -325,9 +325,9 @@ void KbfxConfig::readThemeInfo ( TQString &themePath, TQString &themeName )
|
|
|
|
|
void KbfxConfig::read()
|
|
|
|
|
{
|
|
|
|
|
/* read general configuration */
|
|
|
|
|
KConfigSkeleton *confskel = new KConfigSkeleton ( TQString::fromLatin1 ( "kbfxrc" ) );
|
|
|
|
|
TDEConfigSkeleton *confskel = new TDEConfigSkeleton ( TQString::fromLatin1 ( "kbfxrc" ) );
|
|
|
|
|
|
|
|
|
|
KConfig *conf = confskel->config();
|
|
|
|
|
TDEConfig *conf = confskel->config();
|
|
|
|
|
|
|
|
|
|
TQString __default = TDEGlobal::iconLoader()->iconPath ( "kbfx", ( int ) KIcon::Desktop, FALSE );
|
|
|
|
|
|
|
|
|
@ -414,7 +414,7 @@ void KbfxConfig::readFontrc ( TQString & themePath, TQString & themeName, bool u
|
|
|
|
|
TQString _abs_path = "";
|
|
|
|
|
TQFileInfo * info = new TQFileInfo ( themePath + themeName + "/kbfxfontrc" );
|
|
|
|
|
TQFileInfo * info_theme = new TQFileInfo ( KbfxThemeRcDestination + "/" + themeName + "_fontrc" );
|
|
|
|
|
KConfig * fontconfig = 0;
|
|
|
|
|
TDEConfig * fontconfig = 0;
|
|
|
|
|
|
|
|
|
|
/* if theme kbfxfontrc exists, make its configuration as default values - prefer users' configuration */
|
|
|
|
|
if ( info_theme->exists() == TRUE || info->exists() == TRUE )
|
|
|
|
@ -427,7 +427,7 @@ void KbfxConfig::readFontrc ( TQString & themePath, TQString & themeName, bool u
|
|
|
|
|
{
|
|
|
|
|
_abs_path = info->absFilePath();
|
|
|
|
|
}
|
|
|
|
|
fontconfig = new KConfig ( _abs_path );
|
|
|
|
|
fontconfig = new TDEConfig ( _abs_path );
|
|
|
|
|
|
|
|
|
|
fontconfig->setGroup ( "Fonts" );
|
|
|
|
|
m_fontTooltipColor = fontconfig->readColorEntry ( "TooltipText", &m_fontTooltipColorDefault );
|
|
|
|
@ -499,8 +499,8 @@ void KbfxConfig::readThemerc ( TQString &themePath, TQString &themeName, bool us
|
|
|
|
|
KbfxOffImg = TQPixmap ( KbfxPlasmaPixmapProvider::PixmapPath ( "off", themePath, themeName ) );
|
|
|
|
|
|
|
|
|
|
/* use theme's default dude image if any */
|
|
|
|
|
KConfigSkeleton *confskel = new KConfigSkeleton ( TQString::fromLatin1 ( "kbfxrc" ) );
|
|
|
|
|
KConfig *conf = confskel->config();
|
|
|
|
|
TDEConfigSkeleton *confskel = new TDEConfigSkeleton ( TQString::fromLatin1 ( "kbfxrc" ) );
|
|
|
|
|
TDEConfig *conf = confskel->config();
|
|
|
|
|
TQString __default = TDEGlobal::iconLoader()->iconPath ( "kbfx", ( int ) KIcon::Desktop, FALSE );
|
|
|
|
|
|
|
|
|
|
if ( m_SpinxDudeImageDefault == TQString() || !KStandardDirs::exists ( m_SpinxDudeImageDefault ) )
|
|
|
|
@ -529,7 +529,7 @@ void KbfxConfig::readThemerc ( TQString &themePath, TQString &themeName, bool us
|
|
|
|
|
TQString _abs_path = "";
|
|
|
|
|
TQFileInfo * info = new TQFileInfo ( themePath + themeName + "/kbfxlayoutrc" );
|
|
|
|
|
TQFileInfo * info_theme = new TQFileInfo ( KbfxThemeRcDestination + "/" + themeName + "_layoutrc" );
|
|
|
|
|
KConfig *layoutconfig = 0;
|
|
|
|
|
TDEConfig *layoutconfig = 0;
|
|
|
|
|
|
|
|
|
|
/* if theme kbfxlayoutrc exists, make its configuration as default values - prefer users' configuration */
|
|
|
|
|
if ( info_theme->exists() == TRUE || info->exists() == TRUE )
|
|
|
|
@ -543,7 +543,7 @@ void KbfxConfig::readThemerc ( TQString &themePath, TQString &themeName, bool us
|
|
|
|
|
_abs_path = info->absFilePath();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
layoutconfig = new KConfig ( _abs_path );
|
|
|
|
|
layoutconfig = new TDEConfig ( _abs_path );
|
|
|
|
|
|
|
|
|
|
layoutconfig->setGroup ( "KbfxButton" );
|
|
|
|
|
m_KbfxNormalButtonPath = layoutconfig->readEntry ( "Normal", m_KbfxNormalButtonPathDefault );
|
|
|
|
@ -702,10 +702,10 @@ void KbfxConfig::write()
|
|
|
|
|
kdDebug() << "Deleting general RC file: " << KbfxRcPath << endl;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
KConfigSkeleton *confskel = new KConfigSkeleton ( TQString::fromLatin1 ( "kbfxrc" ) );
|
|
|
|
|
TDEConfigSkeleton *confskel = new TDEConfigSkeleton ( TQString::fromLatin1 ( "kbfxrc" ) );
|
|
|
|
|
|
|
|
|
|
/* write general KBFX configuration options */
|
|
|
|
|
KConfig *conf = confskel->config();
|
|
|
|
|
TDEConfig *conf = confskel->config();
|
|
|
|
|
|
|
|
|
|
conf->setGroup ( "KDE Action Restrictions" );
|
|
|
|
|
conf->writeEntry ( "warn_unwritable_config", FALSE );
|
|
|
|
@ -746,7 +746,7 @@ void KbfxConfig::write()
|
|
|
|
|
void KbfxConfig::writeFontrc ( TQString & themeName )
|
|
|
|
|
{
|
|
|
|
|
/* write fonts KBFX configuration from theme name */
|
|
|
|
|
KConfig *fontconfig = new KConfig ( KbfxThemeRcDestination + "/" + themeName + "_fontrc" );
|
|
|
|
|
TDEConfig *fontconfig = new TDEConfig ( KbfxThemeRcDestination + "/" + themeName + "_fontrc" );
|
|
|
|
|
|
|
|
|
|
fontconfig->setGroup ( "Fonts" );
|
|
|
|
|
fontconfig->writeEntry ( "TooltipText", m_fontTooltipColor );
|
|
|
|
@ -775,7 +775,7 @@ void KbfxConfig::writeThemerc ( TQString & themeName )
|
|
|
|
|
checkValues();
|
|
|
|
|
|
|
|
|
|
/* write layout theme configuration from theme name */
|
|
|
|
|
KConfig *layoutconfig = new KConfig ( KbfxThemeRcDestination + "/" + themeName + "_layoutrc" );
|
|
|
|
|
TDEConfig *layoutconfig = new TDEConfig ( KbfxThemeRcDestination + "/" + themeName + "_layoutrc" );
|
|
|
|
|
|
|
|
|
|
layoutconfig->setGroup ( "KbfxButton" );
|
|
|
|
|
layoutconfig->writeEntry ( "Normal", m_KbfxNormalButtonPath );
|
|
|
|
|