Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:javierllorente:iberia
kdelibs4
plasma-libs.diff
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File plasma-libs.diff of Package kdelibs4
diff --git a/plasma/containment.cpp b/plasma/containment.cpp index c3c688f..2837882 100644 --- a/plasma/containment.cpp +++ b/plasma/containment.cpp @@ -143,6 +143,18 @@ Containment::Containment(const QString &packagePath, uint appletId, const QVaria setHasConfigurationInterface(false); } +Containment::Containment(QObject *parent, const QVariantList &args, bool showToolBox) + : Applet(parent, args), + d(new ContainmentPrivate(this)) +{ + // WARNING: do not access config() OR globalConfig() in this method! + // that requires a scene, which is not available at this point + setPos(0, 0); + setBackgroundHints(NoBackground); + setHasConfigurationInterface(false); + d->showToolBox=showToolBox; +} + Containment::~Containment() { delete d; diff --git a/plasma/containment.h b/plasma/containment.h index a6ebcdd..810b05f 100644 --- a/plasma/containment.h +++ b/plasma/containment.h @@ -128,6 +128,8 @@ class PLASMA_EXPORT Containment : public Applet */ Containment(QObject *parent, const QVariantList &args); + Containment(QObject *parent, const QVariantList &args, bool showToolBox); + ~Containment(); /** diff --git a/plasma/private/containment_p.h b/plasma/private/containment_p.h index 4025bf4..3eff519 100644 --- a/plasma/private/containment_p.h +++ b/plasma/private/containment_p.h @@ -60,6 +60,7 @@ public: type(Containment::NoContainmentType), showDropZoneDelayTimer(0), drawWallpaper(true), + showToolBox(true), dropZoneStarted(false), containmentActionsSource(Global) { @@ -183,6 +184,7 @@ public: QHash<KJob*, KMenu*> dropMenus; QTimer *showDropZoneDelayTimer; bool drawWallpaper : 1; + bool showToolBox : 1; bool dropZoneStarted : 1; enum ContainmentActionsSource { diff --git a/plasma/theme.cpp b/plasma/theme.cpp index cdb7fc6..06a78fb 100644 --- a/plasma/theme.cpp +++ b/plasma/theme.cpp @@ -80,7 +80,6 @@ public: colorScheme(QPalette::Active, KColorScheme::Window, KSharedConfigPtr(0)), buttonColorScheme(QPalette::Active, KColorScheme::Button, KSharedConfigPtr(0)), viewColorScheme(QPalette::Active, KColorScheme::View, KSharedConfigPtr(0)), - defaultWallpaperTheme(DEFAULT_WALLPAPER_THEME), defaultWallpaperSuffix(DEFAULT_WALLPAPER_SUFFIX), defaultWallpaperWidth(DEFAULT_WALLPAPER_WIDTH), defaultWallpaperHeight(DEFAULT_WALLPAPER_HEIGHT), @@ -97,6 +96,10 @@ public: ThemeConfig config; cacheTheme = config.cacheTheme(); + KSharedConfigPtr defaultconfig = KSharedConfig::openConfig("plasma-desktoprc"); + KConfigGroup group = KConfigGroup(defaultconfig, "Defaults"); + defaultWallpaperTheme = group.readEntry("wallpaper", DEFAULT_WALLPAPER_THEME); + if (QPixmap::defaultDepth() > 8) { QObject::connect(KWindowSystem::self(), SIGNAL(compositingChanged(bool)), q, SLOT(compositingChanged(bool))); #ifdef Q_WS_X11 @@ -533,7 +536,10 @@ void ThemePrivate::processWallpaperSettings(KConfigBase *metadata) cg = config(); } - defaultWallpaperTheme = cg.readEntry("defaultWallpaperTheme", DEFAULT_WALLPAPER_THEME); + KSharedConfigPtr defaultconfig = KSharedConfig::openConfig("plasma-desktoprc"); + KConfigGroup group = KConfigGroup(defaultconfig, "Defaults"); + defaultWallpaperTheme = cg.readEntry("defaultWallpaperTheme", group.readEntry("wallpaper", DEFAULT_WALLPAPER_THEME)); + defaultWallpaperSuffix = cg.readEntry("defaultFileSuffix", DEFAULT_WALLPAPER_SUFFIX); defaultWallpaperWidth = cg.readEntry("defaultWidth", DEFAULT_WALLPAPER_WIDTH); defaultWallpaperHeight = cg.readEntry("defaultHeight", DEFAULT_WALLPAPER_HEIGHT); @@ -785,6 +791,10 @@ QString Theme::wallpaperPath(const QSize &size) const } } + if (!QFile::exists(fullPath)) { + fullPath = KStandardDirs::locate("wallpaper", d->defaultWallpaperTheme); + } + return fullPath; }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor