|
|
|
|
@ -26,9 +26,9 @@ KbfxConfig::KbfxConfig()
|
|
|
|
|
/* set default configuration values */
|
|
|
|
|
|
|
|
|
|
/* KBFX internal settings */
|
|
|
|
|
KbfxThemeRcDestination = TDEGlobal::dirs()->saveLocation ( "data", TQString ( "kbfx/themerc/" ), TRUE );
|
|
|
|
|
KbfxThemeRcDestination = TDEGlobal::dirs()->saveLocation ( "data", TQString ( "kbfx/themerc/" ), true );
|
|
|
|
|
KbfxRcPath = TDEGlobal::dirs()->findResource ( "config", "kbfxrc" );
|
|
|
|
|
m_KbfxDeleteOldConf = FALSE;
|
|
|
|
|
m_KbfxDeleteOldConf = false;
|
|
|
|
|
TQString _unspecified = tr2i18n ( "Not Specified" );
|
|
|
|
|
TQString path = locate ( "data", "kbfx/skins/default/bg.png" );
|
|
|
|
|
path.remove ( "default/bg.png" );
|
|
|
|
|
@ -47,19 +47,19 @@ KbfxConfig::KbfxConfig()
|
|
|
|
|
m_UserSpinxThemeBasePathDefault = path;
|
|
|
|
|
|
|
|
|
|
m_KbfxMenuTypeDefault = "spinx";
|
|
|
|
|
m_ToolBarResizeDefault = FALSE;
|
|
|
|
|
m_KbfxWatcherDefault = TRUE;
|
|
|
|
|
m_KbfxShowOldThemesDefault = FALSE;
|
|
|
|
|
m_ToolBarResizeDefault = false;
|
|
|
|
|
m_KbfxWatcherDefault = true;
|
|
|
|
|
m_KbfxShowOldThemesDefault = false;
|
|
|
|
|
|
|
|
|
|
/* user(dude) image properties */
|
|
|
|
|
m_SpinxDudeBlinkDefault = FALSE;
|
|
|
|
|
m_SpinxDudeBlinkDefault = false;
|
|
|
|
|
KUser *user = new KUser();
|
|
|
|
|
m_SpinxDudeImageDefault = locate ( "data", user->homeDir () + "/.face.icon" );
|
|
|
|
|
delete user;
|
|
|
|
|
|
|
|
|
|
/* tooltip properties */
|
|
|
|
|
m_ToolTipDefault = FALSE;
|
|
|
|
|
m_ToolTipAnimationDefault = TRUE;
|
|
|
|
|
m_ToolTipDefault = false;
|
|
|
|
|
m_ToolTipAnimationDefault = true;
|
|
|
|
|
m_ToolTipTextDefault = "Application menu";
|
|
|
|
|
m_ToolTipAvatarDefault = path + "default/butterfly.png";
|
|
|
|
|
m_SpinxTooltipDudeboxDefault = path + "default/tooltip_dudebox.png";
|
|
|
|
|
@ -87,7 +87,7 @@ KbfxConfig::KbfxConfig()
|
|
|
|
|
m_faceIconWDefault = 65;
|
|
|
|
|
m_userNamePos_xDefault = 130;
|
|
|
|
|
m_userNamePos_yDefault = 32;
|
|
|
|
|
m_faceBoxHideTextDefault = FALSE;
|
|
|
|
|
m_faceBoxHideTextDefault = false;
|
|
|
|
|
|
|
|
|
|
/* top bar properties */
|
|
|
|
|
m_topBar_xDefault = 0;
|
|
|
|
|
@ -118,7 +118,7 @@ KbfxConfig::KbfxConfig()
|
|
|
|
|
m_searchBox_wDefault = 240;
|
|
|
|
|
m_searchBox_xDefault = 130;
|
|
|
|
|
m_searchBox_yDefault = 48;
|
|
|
|
|
m_searchBox_staticDefault = TRUE;
|
|
|
|
|
m_searchBox_staticDefault = true;
|
|
|
|
|
|
|
|
|
|
/* item view properties */
|
|
|
|
|
m_itemView_hDefault = 380;
|
|
|
|
|
@ -133,9 +133,9 @@ KbfxConfig::KbfxConfig()
|
|
|
|
|
/* KBFX misc properties */
|
|
|
|
|
m_userMenuHeightDefault = 513;
|
|
|
|
|
m_userMenuWidthDefault = 504;
|
|
|
|
|
m_startHiddenDefault = FALSE;
|
|
|
|
|
m_startHiddenDefault = false;
|
|
|
|
|
m_fadeTimeDefault = 75;
|
|
|
|
|
m_noCommentsDefault = FALSE;
|
|
|
|
|
m_noCommentsDefault = false;
|
|
|
|
|
m_commentMargineDefault = 66;
|
|
|
|
|
m_iconSizeDefault = 32;
|
|
|
|
|
|
|
|
|
|
@ -155,7 +155,7 @@ KbfxConfig::KbfxConfig()
|
|
|
|
|
m_pluginNameColorDefault = TQColor ( 0,0,0 );
|
|
|
|
|
m_pluginNameFontDefault = TQFont ( "Arial", 8, TQFont::Normal );
|
|
|
|
|
m_lineColorDefault = TQColor ( 255,220,125 );
|
|
|
|
|
m_fontHoverBoldDefault = FALSE;
|
|
|
|
|
m_fontHoverBoldDefault = false;
|
|
|
|
|
|
|
|
|
|
/* set default theme info values */
|
|
|
|
|
m_InfoVersionDefault = _unspecified;
|
|
|
|
|
@ -300,7 +300,7 @@ void KbfxConfig::readThemeInfo ( TQString &themePath, TQString &themeName )
|
|
|
|
|
TQFileInfo * info_theme = new TQFileInfo ( themePath + themeName + "/" + m_KbfxThemesVersion );
|
|
|
|
|
TDEConfig * infoconfig = 0;
|
|
|
|
|
|
|
|
|
|
if ( info_theme->exists() == TRUE )
|
|
|
|
|
if ( info_theme->exists() )
|
|
|
|
|
{
|
|
|
|
|
infoconfig = new TDEConfig ( info_theme->absFilePath() );
|
|
|
|
|
infoconfig->setGroup ( "ThemeGeneral" );
|
|
|
|
|
@ -329,7 +329,7 @@ void KbfxConfig::read()
|
|
|
|
|
|
|
|
|
|
TDEConfig *conf = confskel->config();
|
|
|
|
|
|
|
|
|
|
TQString __default = TDEGlobal::iconLoader()->iconPath ( "kbfx", ( int ) TDEIcon::Desktop, FALSE );
|
|
|
|
|
TQString __default = TDEGlobal::iconLoader()->iconPath ( "kbfx", ( int ) TDEIcon::Desktop, false );
|
|
|
|
|
|
|
|
|
|
conf->setGroup ( "KbfxGeneral" );
|
|
|
|
|
m_KbfxGeneralVersion = conf->readNumEntry ( "Version", 0 );
|
|
|
|
|
@ -396,7 +396,7 @@ void KbfxConfig::read()
|
|
|
|
|
if ( m_KbfxGeneralVersion < m_KbfxGeneralVersionDefault )
|
|
|
|
|
{
|
|
|
|
|
m_KbfxGeneralVersion = m_KbfxGeneralVersionDefault;
|
|
|
|
|
m_KbfxDeleteOldConf = TRUE;
|
|
|
|
|
m_KbfxDeleteOldConf = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -417,13 +417,13 @@ void KbfxConfig::readFontrc ( TQString & themePath, TQString & themeName, bool u
|
|
|
|
|
TDEConfig * fontconfig = 0;
|
|
|
|
|
|
|
|
|
|
/* if theme kbfxfontrc exists, make its configuration as default values - prefer users' configuration */
|
|
|
|
|
if ( info_theme->exists() == TRUE || info->exists() == TRUE )
|
|
|
|
|
if ( info_theme->exists() || info->exists() )
|
|
|
|
|
{
|
|
|
|
|
if ( info_theme->exists() == TRUE && m_KbfxGeneralVersion >= m_KbfxGeneralVersionDefault && user_rc )
|
|
|
|
|
if ( info_theme->exists() && m_KbfxGeneralVersion >= m_KbfxGeneralVersionDefault && user_rc )
|
|
|
|
|
{
|
|
|
|
|
_abs_path = info_theme->absFilePath();
|
|
|
|
|
}
|
|
|
|
|
else if ( info->exists() == TRUE || m_KbfxGeneralVersion < m_KbfxGeneralVersionDefault )
|
|
|
|
|
else if ( info->exists() || m_KbfxGeneralVersion < m_KbfxGeneralVersionDefault )
|
|
|
|
|
{
|
|
|
|
|
_abs_path = info->absFilePath();
|
|
|
|
|
}
|
|
|
|
|
@ -501,7 +501,7 @@ void KbfxConfig::readThemerc ( TQString &themePath, TQString &themeName, bool us
|
|
|
|
|
/* use theme's default dude image if any */
|
|
|
|
|
TDEConfigSkeleton *confskel = new TDEConfigSkeleton ( TQString::fromLatin1 ( "kbfxrc" ) );
|
|
|
|
|
TDEConfig *conf = confskel->config();
|
|
|
|
|
TQString __default = TDEGlobal::iconLoader()->iconPath ( "kbfx", ( int ) TDEIcon::Desktop, FALSE );
|
|
|
|
|
TQString __default = TDEGlobal::iconLoader()->iconPath ( "kbfx", ( int ) TDEIcon::Desktop, false );
|
|
|
|
|
|
|
|
|
|
if ( m_SpinxDudeImageDefault == TQString() || !TDEStandardDirs::exists ( m_SpinxDudeImageDefault ) )
|
|
|
|
|
{
|
|
|
|
|
@ -532,13 +532,13 @@ void KbfxConfig::readThemerc ( TQString &themePath, TQString &themeName, bool us
|
|
|
|
|
TDEConfig *layoutconfig = 0;
|
|
|
|
|
|
|
|
|
|
/* if theme kbfxlayoutrc exists, make its configuration as default values - prefer users' configuration */
|
|
|
|
|
if ( info_theme->exists() == TRUE || info->exists() == TRUE )
|
|
|
|
|
if ( info_theme->exists() || info->exists() )
|
|
|
|
|
{
|
|
|
|
|
if ( info_theme->exists() == TRUE && m_KbfxGeneralVersion >= m_KbfxGeneralVersionDefault && user_rc )
|
|
|
|
|
if ( info_theme->exists() && m_KbfxGeneralVersion >= m_KbfxGeneralVersionDefault && user_rc )
|
|
|
|
|
{
|
|
|
|
|
_abs_path = info_theme->absFilePath();
|
|
|
|
|
}
|
|
|
|
|
else if ( info->exists() == TRUE || m_KbfxGeneralVersion < m_KbfxGeneralVersionDefault )
|
|
|
|
|
else if ( info->exists() || m_KbfxGeneralVersion < m_KbfxGeneralVersionDefault )
|
|
|
|
|
{
|
|
|
|
|
_abs_path = info->absFilePath();
|
|
|
|
|
}
|
|
|
|
|
@ -708,7 +708,7 @@ void KbfxConfig::write()
|
|
|
|
|
TDEConfig *conf = confskel->config();
|
|
|
|
|
|
|
|
|
|
conf->setGroup ( "KDE Action Restrictions" );
|
|
|
|
|
conf->writeEntry ( "warn_unwritable_config", FALSE );
|
|
|
|
|
conf->writeEntry ( "warn_unwritable_config", false );
|
|
|
|
|
|
|
|
|
|
conf->setGroup ( "KbfxGeneral" );
|
|
|
|
|
conf->writeEntry ( "Version", m_KbfxGeneralVersion );
|
|
|
|
|
|