summaryrefslogtreecommitdiffabout
path: root/microkde/kdeui/ktoolbar.cpp
authorzautrix <zautrix>2005-04-02 12:16:34 (UTC)
committer zautrix <zautrix>2005-04-02 12:16:34 (UTC)
commit997e7660a81baa2b8aeb1b66a3cc3ebe54e00ebe (patch) (side-by-side diff)
treef788b37459574b5cea0d2ab874882c6a396c240d /microkde/kdeui/ktoolbar.cpp
parente0d51120d2f0c178115746e0c1357af40f95bc77 (diff)
downloadkdepimpi-997e7660a81baa2b8aeb1b66a3cc3ebe54e00ebe.zip
kdepimpi-997e7660a81baa2b8aeb1b66a3cc3ebe54e00ebe.tar.gz
kdepimpi-997e7660a81baa2b8aeb1b66a3cc3ebe54e00ebe.tar.bz2
more fixes
Diffstat (limited to 'microkde/kdeui/ktoolbar.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--microkde/kdeui/ktoolbar.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/microkde/kdeui/ktoolbar.cpp b/microkde/kdeui/ktoolbar.cpp
index 35d4916..36ede81 100644
--- a/microkde/kdeui/ktoolbar.cpp
+++ b/microkde/kdeui/ktoolbar.cpp
@@ -1132,64 +1132,65 @@ void KToolBar::saveState()
if (just_append)
local.documentElement().appendChild( current );
KXMLGUIFactory::saveConfigFile(local, d->m_xmlguiClient->localXMLFile(), d->m_xmlguiClient->instance() );
return;
}
*/
// if that didn't work, we save to the config file
KConfig *config = KGlobal::config();
saveSettings(config, QString::null);
config->sync();
}
QString KToolBar::settingsGroup()
{
QString configGroup;
if (!::qstrcmp(name(), "unnamed") || !::qstrcmp(name(), "mainToolBar"))
configGroup = "Toolbar style";
else
configGroup = QString(name()) + " Toolbar style";
if ( this->mainWindow() )
{
configGroup.prepend(" ");
configGroup.prepend( this->mainWindow()->name() );
}
return configGroup;
}
void KToolBar::saveSettings(KConfig *config, const QString &_configGroup)
{
+ return;
QString configGroup = _configGroup;
if (configGroup.isEmpty())
configGroup = settingsGroup();
//kdDebug(220) << "KToolBar::saveSettings group=" << _configGroup << " -> " << configGroup << endl;
QString position, icontext;
int index;
getAttributes( position, icontext, index );
//kdDebug(220) << "KToolBar::saveSettings " << name() << " newLine=" << newLine << endl;
KConfigGroupSaver saver(config, configGroup);
if ( position != d->PositionDefault )
config->writeEntry("Position", position);
else
config->deleteEntry("Position");
if ( icontext != d->IconTextDefault )
config->writeEntry("IconText", icontext);
else
config->deleteEntry("IconText");
if ( iconSize() != d->IconSizeDefault )
config->writeEntry("IconSize", iconSize());
else
config->deleteEntry("IconSize");
if ( isHidden() != d->HiddenDefault )
config->writeEntry("Hidden", isHidden());
else
config->deleteEntry("Hidden");
@@ -1575,64 +1576,65 @@ bool KToolBar::highlightSetting()
{
QString grpToolbar(QString::fromLatin1("Toolbar style"));
KConfigGroupSaver saver(KGlobal::config(), grpToolbar);
return KGlobal::config()->readBoolEntry(QString::fromLatin1("Highlighting"),true);
}
//static
bool KToolBar::transparentSetting()
{
QString grpToolbar(QString::fromLatin1("Toolbar style"));
KConfigGroupSaver saver(KGlobal::config(), grpToolbar);
return KGlobal::config()->readBoolEntry(QString::fromLatin1("TransparentMoving"),true);
}
//static
KToolBar::IconText KToolBar::iconTextSetting()
{
QString grpToolbar(QString::fromLatin1("Toolbar style"));
KConfigGroupSaver saver(KGlobal::config(), grpToolbar);
QString icontext = KGlobal::config()->readEntry(QString::fromLatin1("IconText"),QString::fromLatin1("IconOnly"));
if ( icontext == "IconTextRight" )
return IconTextRight;
else if ( icontext == "IconTextBottom" )
return IconTextBottom;
else if ( icontext == "TextOnly" )
return TextOnly;
else
return IconOnly;
}
void KToolBar::applyAppearanceSettings(KConfig *config, const QString &_configGroup, bool forceGlobal)
{
+ return;
QString configGroup = _configGroup.isEmpty() ? settingsGroup() : _configGroup;
//kdDebug(220) << "KToolBar::applyAppearanceSettings: configGroup=" << configGroup << endl;
// We have application-specific settings in the XML file,
// and nothing in the application's config file
// -> don't apply the global defaults, the XML ones are preferred
// See applySettings for a full explanation
/*US :we do not support xml files
if ( d->m_xmlguiClient && !d->m_xmlguiClient->xmlFile().isEmpty() &&
!config->hasGroup(configGroup) )
{
//kdDebug(220) << "skipping global defaults, using XML ones instead" << endl;
return;
}
*/
if ( !config->hasGroup(configGroup) )
{
//kdDebug(220) << "skipping global defaults, using XML ones instead" << endl;
return;
}
KConfig *gconfig = KGlobal::config();
/*US
static const QString &attrIconText = KGlobal::staticQString("IconText");
static const QString &attrHighlight = KGlobal::staticQString("Highlighting");
static const QString &attrTrans = KGlobal::staticQString("TransparentMoving");
static const QString &attrSize = KGlobal::staticQString("IconSize");
*/
// we actually do this in two steps.
// First, we read in the global styles [Toolbar style] (from the KControl module).
// Then, if the toolbar is NOT 'mainToolBar', we will also try to read in [barname Toolbar style]
bool highlight;