color scheme signalling, patch by Andrew Lake
CCMAIL:jamboarder@yahoo.com svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=779435
This commit is contained in:
parent
8379d47abb
commit
450d289094
@ -30,6 +30,7 @@
|
|||||||
#include <KSelectionWatcher>
|
#include <KSelectionWatcher>
|
||||||
#include <KSharedConfig>
|
#include <KSharedConfig>
|
||||||
#include <KStandardDirs>
|
#include <KStandardDirs>
|
||||||
|
#include <KGlobalSettings>
|
||||||
|
|
||||||
#include "plasma/packages_p.h"
|
#include "plasma/packages_p.h"
|
||||||
|
|
||||||
@ -149,6 +150,11 @@ void Theme::compositingChanged()
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Theme::colorsChanged()
|
||||||
|
{
|
||||||
|
emit changed();
|
||||||
|
}
|
||||||
|
|
||||||
void Theme::setThemeName(const QString &themeName)
|
void Theme::setThemeName(const QString &themeName)
|
||||||
{
|
{
|
||||||
QString theme = themeName;
|
QString theme = themeName;
|
||||||
@ -179,8 +185,10 @@ void Theme::setThemeName(const QString &themeName)
|
|||||||
QString colorsFile = KStandardDirs::locate("data", "desktoptheme/" + theme + "/colors");
|
QString colorsFile = KStandardDirs::locate("data", "desktoptheme/" + theme + "/colors");
|
||||||
//kDebug() << "we're going for..." << colorsFile << "*******************";
|
//kDebug() << "we're going for..." << colorsFile << "*******************";
|
||||||
|
|
||||||
|
disconnect(KGlobalSettings::self(), SIGNAL(kdisplayPaletteChanged()), this, SLOT(colorsChanged()));
|
||||||
if (colorsFile.isEmpty()) {
|
if (colorsFile.isEmpty()) {
|
||||||
d->colors = 0;
|
d->colors = 0;
|
||||||
|
connect(KGlobalSettings::self(), SIGNAL(kdisplayPaletteChanged()), this, SLOT(colorsChanged()));
|
||||||
} else {
|
} else {
|
||||||
d->colors = KSharedConfig::openConfig(colorsFile);
|
d->colors = KSharedConfig::openConfig(colorsFile);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user