author | zautrix <zautrix> | 2005-04-02 12:16:34 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-04-02 12:16:34 (UTC) |
commit | 997e7660a81baa2b8aeb1b66a3cc3ebe54e00ebe (patch) (unidiff) | |
tree | f788b37459574b5cea0d2ab874882c6a396c240d /microkde | |
parent | e0d51120d2f0c178115746e0c1357af40f95bc77 (diff) | |
download | kdepimpi-997e7660a81baa2b8aeb1b66a3cc3ebe54e00ebe.zip kdepimpi-997e7660a81baa2b8aeb1b66a3cc3ebe54e00ebe.tar.gz kdepimpi-997e7660a81baa2b8aeb1b66a3cc3ebe54e00ebe.tar.bz2 |
more fixes
-rw-r--r-- | microkde/kcolordialog.cpp | 1 | ||||
-rw-r--r-- | microkde/kdeui/ktoolbar.cpp | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/microkde/kcolordialog.cpp b/microkde/kcolordialog.cpp index 9a76e5e..a3d8973 100644 --- a/microkde/kcolordialog.cpp +++ b/microkde/kcolordialog.cpp | |||
@@ -62,31 +62,32 @@ KColorDialog::KColorDialog( QWidget *p ):QDialog( p, "input-dialog", true ) | |||
62 | lay->addWidget(lg ,3,0 ); | 62 | lay->addWidget(lg ,3,0 ); |
63 | g = new QSlider ( 0, 255, 1, 1, Horizontal, this ); | 63 | g = new QSlider ( 0, 255, 1, 1, Horizontal, this ); |
64 | lay->addWidget( g ,3,1 ); | 64 | lay->addWidget( g ,3,1 ); |
65 | 65 | ||
66 | QLabel* lb = new QLabel ( "Blue:",this ); | 66 | QLabel* lb = new QLabel ( "Blue:",this ); |
67 | lay->addWidget( lb,4,0 ); | 67 | lay->addWidget( lb,4,0 ); |
68 | b = new QSlider ( 0, 255, 1, 1, Horizontal, this ); | 68 | b = new QSlider ( 0, 255, 1, 1, Horizontal, this ); |
69 | lay->addWidget(b ,4,1 ); | 69 | lay->addWidget(b ,4,1 ); |
70 | 70 | ||
71 | QColor d = backgroundColor(); | 71 | QColor d = backgroundColor(); |
72 | r->setValue(d.red() ); | 72 | r->setValue(d.red() ); |
73 | g->setValue(d.green() ); | 73 | g->setValue(d.green() ); |
74 | b->setValue(d.blue() ); | 74 | b->setValue(d.blue() ); |
75 | old_color->setPalette( QPalette( d.dark() , d ) ); | 75 | old_color->setPalette( QPalette( d.dark() , d ) ); |
76 | // kannst du wieder reinnehmen, aber es geht auch so. | 76 | // kannst du wieder reinnehmen, aber es geht auch so. |
77 | QPushButton * ok = new QPushButton (i18n(" OK "), this ); | 77 | QPushButton * ok = new QPushButton (i18n(" OK "), this ); |
78 | ok->setDefault( true ); | ||
78 | QPushButton * cancel = new QPushButton (i18n(" Cancel "), this ); | 79 | QPushButton * cancel = new QPushButton (i18n(" Cancel "), this ); |
79 | 80 | ||
80 | lay->addWidget(ok ,5,0 ); | 81 | lay->addWidget(ok ,5,0 ); |
81 | lay->addWidget(cancel ,5,1 ); | 82 | lay->addWidget(cancel ,5,1 ); |
82 | connect (ok, SIGNAL( clicked() ), this ,SLOT (accept() )); | 83 | connect (ok, SIGNAL( clicked() ), this ,SLOT (accept() )); |
83 | connect (cancel, SIGNAL( clicked() ), this ,SLOT (reject() )); | 84 | connect (cancel, SIGNAL( clicked() ), this ,SLOT (reject() )); |
84 | connect (r, SIGNAL( valueChanged ( int ) ), this ,SLOT (updateColor( int ) )); | 85 | connect (r, SIGNAL( valueChanged ( int ) ), this ,SLOT (updateColor( int ) )); |
85 | connect (g, SIGNAL( valueChanged ( int ) ), this ,SLOT (updateColor( int ) )); | 86 | connect (g, SIGNAL( valueChanged ( int ) ), this ,SLOT (updateColor( int ) )); |
86 | connect (b, SIGNAL( valueChanged ( int ) ), this ,SLOT (updateColor( int ) )); | 87 | connect (b, SIGNAL( valueChanged ( int ) ), this ,SLOT (updateColor( int ) )); |
87 | } | 88 | } |
88 | void KColorDialog::updateColor( int ) | 89 | void KColorDialog::updateColor( int ) |
89 | { | 90 | { |
90 | QColor c = getColor( ) ; | 91 | QColor c = getColor( ) ; |
91 | new_color->setPalette( QPalette( c.dark(), c ) ); | 92 | new_color->setPalette( QPalette( c.dark(), c ) ); |
92 | } | 93 | } |
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 | |||
@@ -1148,32 +1148,33 @@ QString KToolBar::settingsGroup() | |||
1148 | { | 1148 | { |
1149 | QString configGroup; | 1149 | QString configGroup; |
1150 | if (!::qstrcmp(name(), "unnamed") || !::qstrcmp(name(), "mainToolBar")) | 1150 | if (!::qstrcmp(name(), "unnamed") || !::qstrcmp(name(), "mainToolBar")) |
1151 | configGroup = "Toolbar style"; | 1151 | configGroup = "Toolbar style"; |
1152 | else | 1152 | else |
1153 | configGroup = QString(name()) + " Toolbar style"; | 1153 | configGroup = QString(name()) + " Toolbar style"; |
1154 | if ( this->mainWindow() ) | 1154 | if ( this->mainWindow() ) |
1155 | { | 1155 | { |
1156 | configGroup.prepend(" "); | 1156 | configGroup.prepend(" "); |
1157 | configGroup.prepend( this->mainWindow()->name() ); | 1157 | configGroup.prepend( this->mainWindow()->name() ); |
1158 | } | 1158 | } |
1159 | return configGroup; | 1159 | return configGroup; |
1160 | } | 1160 | } |
1161 | 1161 | ||
1162 | void KToolBar::saveSettings(KConfig *config, const QString &_configGroup) | 1162 | void KToolBar::saveSettings(KConfig *config, const QString &_configGroup) |
1163 | { | 1163 | { |
1164 | return; | ||
1164 | QString configGroup = _configGroup; | 1165 | QString configGroup = _configGroup; |
1165 | if (configGroup.isEmpty()) | 1166 | if (configGroup.isEmpty()) |
1166 | configGroup = settingsGroup(); | 1167 | configGroup = settingsGroup(); |
1167 | //kdDebug(220) << "KToolBar::saveSettings group=" << _configGroup << " -> " << configGroup << endl; | 1168 | //kdDebug(220) << "KToolBar::saveSettings group=" << _configGroup << " -> " << configGroup << endl; |
1168 | 1169 | ||
1169 | QString position, icontext; | 1170 | QString position, icontext; |
1170 | int index; | 1171 | int index; |
1171 | getAttributes( position, icontext, index ); | 1172 | getAttributes( position, icontext, index ); |
1172 | 1173 | ||
1173 | //kdDebug(220) << "KToolBar::saveSettings " << name() << " newLine=" << newLine << endl; | 1174 | //kdDebug(220) << "KToolBar::saveSettings " << name() << " newLine=" << newLine << endl; |
1174 | 1175 | ||
1175 | KConfigGroupSaver saver(config, configGroup); | 1176 | KConfigGroupSaver saver(config, configGroup); |
1176 | 1177 | ||
1177 | if ( position != d->PositionDefault ) | 1178 | if ( position != d->PositionDefault ) |
1178 | config->writeEntry("Position", position); | 1179 | config->writeEntry("Position", position); |
1179 | else | 1180 | else |
@@ -1591,32 +1592,33 @@ KToolBar::IconText KToolBar::iconTextSetting() | |||
1591 | { | 1592 | { |
1592 | QString grpToolbar(QString::fromLatin1("Toolbar style")); | 1593 | QString grpToolbar(QString::fromLatin1("Toolbar style")); |
1593 | KConfigGroupSaver saver(KGlobal::config(), grpToolbar); | 1594 | KConfigGroupSaver saver(KGlobal::config(), grpToolbar); |
1594 | QString icontext = KGlobal::config()->readEntry(QString::fromLatin1("IconText"),QString::fromLatin1("IconOnly")); | 1595 | QString icontext = KGlobal::config()->readEntry(QString::fromLatin1("IconText"),QString::fromLatin1("IconOnly")); |
1595 | if ( icontext == "IconTextRight" ) | 1596 | if ( icontext == "IconTextRight" ) |
1596 | return IconTextRight; | 1597 | return IconTextRight; |
1597 | else if ( icontext == "IconTextBottom" ) | 1598 | else if ( icontext == "IconTextBottom" ) |
1598 | return IconTextBottom; | 1599 | return IconTextBottom; |
1599 | else if ( icontext == "TextOnly" ) | 1600 | else if ( icontext == "TextOnly" ) |
1600 | return TextOnly; | 1601 | return TextOnly; |
1601 | else | 1602 | else |
1602 | return IconOnly; | 1603 | return IconOnly; |
1603 | } | 1604 | } |
1604 | 1605 | ||
1605 | void KToolBar::applyAppearanceSettings(KConfig *config, const QString &_configGroup, bool forceGlobal) | 1606 | void KToolBar::applyAppearanceSettings(KConfig *config, const QString &_configGroup, bool forceGlobal) |
1606 | { | 1607 | { |
1608 | return; | ||
1607 | QString configGroup = _configGroup.isEmpty() ? settingsGroup() : _configGroup; | 1609 | QString configGroup = _configGroup.isEmpty() ? settingsGroup() : _configGroup; |
1608 | //kdDebug(220) << "KToolBar::applyAppearanceSettings: configGroup=" << configGroup << endl; | 1610 | //kdDebug(220) << "KToolBar::applyAppearanceSettings: configGroup=" << configGroup << endl; |
1609 | // We have application-specific settings in the XML file, | 1611 | // We have application-specific settings in the XML file, |
1610 | // and nothing in the application's config file | 1612 | // and nothing in the application's config file |
1611 | // -> don't apply the global defaults, the XML ones are preferred | 1613 | // -> don't apply the global defaults, the XML ones are preferred |
1612 | // See applySettings for a full explanation | 1614 | // See applySettings for a full explanation |
1613 | /*US :we do not support xml files | 1615 | /*US :we do not support xml files |
1614 | if ( d->m_xmlguiClient && !d->m_xmlguiClient->xmlFile().isEmpty() && | 1616 | if ( d->m_xmlguiClient && !d->m_xmlguiClient->xmlFile().isEmpty() && |
1615 | !config->hasGroup(configGroup) ) | 1617 | !config->hasGroup(configGroup) ) |
1616 | { | 1618 | { |
1617 | //kdDebug(220) << "skipping global defaults, using XML ones instead" << endl; | 1619 | //kdDebug(220) << "skipping global defaults, using XML ones instead" << endl; |
1618 | return; | 1620 | return; |
1619 | } | 1621 | } |
1620 | */ | 1622 | */ |
1621 | if ( !config->hasGroup(configGroup) ) | 1623 | if ( !config->hasGroup(configGroup) ) |
1622 | { | 1624 | { |