File plasma-branding-defaults-applets.diff of Package kdebase4-workspace
Index: plasma/desktop/applets/kickoff/applet/applet.cpp
===================================================================
--- plasma/desktop/applets/kickoff/applet/applet.cpp.orig
+++ plasma/desktop/applets/kickoff/applet/applet.cpp
@@ -27,6 +27,7 @@
#include <QtGui/QVBoxLayout>
#include <QtGui/QLabel>
#include <QtGui/QGraphicsLinearLayout>
+#include <QFile>
// KDE
#include <KAuthorized>
@@ -191,7 +192,10 @@ void LauncherApplet::toolTipAboutToShow(
void LauncherApplet::configChanged()
{
KConfigGroup cg = config();
- setPopupIcon(cg.readEntry("icon", "start-here-kde"));
+ if (QFile::exists("/usr/share/icons/oxygen/scalable/places/start-here-branding.svg"))
+ setPopupIcon(cg.readEntry("icon", "start-here-branding"));
+ else
+ setPopupIcon(cg.readEntry("icon", "start-here-kde"));
constraintsEvent(Plasma::ImmutableConstraint);
if (d->launcher) {
@@ -210,7 +214,12 @@ void LauncherApplet::configAccepted()
d->createLauncher();
KConfigGroup cg = config();
- const QString oldIcon = cg.readEntry("icon", "start-here-kde");
+ QString oldIcon;
+ if (QFile::exists("/usr/share/icons/oxygen/scalable/places/start-here-branding.svg"))
+ oldIcon = cg.readEntry("icon", "start-here-branding");
+ else
+ oldIcon = cg.readEntry("icon", "start-here-kde");
+
if (!iconname.isEmpty() && iconname != oldIcon) {
cg.writeEntry("icon", iconname);
Index: plasma/desktop/applets/kickoff/core/favoritesmodel.cpp
===================================================================
--- plasma/desktop/applets/kickoff/core/favoritesmodel.cpp.orig
+++ plasma/desktop/applets/kickoff/core/favoritesmodel.cpp
@@ -167,6 +167,11 @@ FavoritesModel::~FavoritesModel()
void FavoritesModel::add(const QString& url)
{
+ KService::Ptr service = KService::serviceByStorageId(url);
+ if (!service) {
+ return;
+ }
+
Private::globalFavoriteList << url;
Private::globalFavoriteSet << url;
Index: plasma/desktop/applets/kickoff/core/models.cpp
===================================================================
--- plasma/desktop/applets/kickoff/core/models.cpp.orig
+++ plasma/desktop/applets/kickoff/core/models.cpp
@@ -177,7 +177,19 @@ QStringList Kickoff::systemApplicationLi
{
KConfigGroup appsGroup = componentData().config()->group("SystemApplications");
QStringList apps;
- apps << "systemsettings";
+
+ if (QFile::exists("/usr/share/applications/YaST.desktop"))
+ apps << "YaST.desktop";
+
+ if (QFile::exists("/usr/share/applications/package-manager.desktop"))
+ apps << "package-manager.desktop";
+
+ if (QFile::exists("/usr/share/applications/kde4/kinfocenter.desktop"))
+ apps << "kinfocenter.desktop";
+
+ if (KService::serviceByStorageId("YaST2/live-installer.desktop"))
+ apps << "YaST2/live-installer.desktop";
+
apps = appsGroup.readEntry("DesktopFiles", apps);
return apps;
}
Index: plasma/desktop/applets/kickoff/core/systemmodel.cpp
===================================================================
--- plasma/desktop/applets/kickoff/core/systemmodel.cpp.orig
+++ plasma/desktop/applets/kickoff/core/systemmodel.cpp
@@ -71,7 +71,7 @@ public:
connect(placesModel, SIGNAL(rowsRemoved(QModelIndex,int,int)),
q, SLOT(sourceRowsRemoved(QModelIndex,int,int)));
- topLevelSections << i18n("Applications")
+ topLevelSections << i18n("Administration")
<< i18n("Places")
<< i18n("Removable Storage")
<< i18n("Storage");
Index: plasma/desktop/applets/kickoff/simpleapplet/simpleapplet.cpp
===================================================================
--- plasma/desktop/applets/kickoff/simpleapplet/simpleapplet.cpp.orig
+++ plasma/desktop/applets/kickoff/simpleapplet/simpleapplet.cpp
@@ -36,6 +36,7 @@
#include <QtGui/QSpacerItem>
#include <QtGui/QListWidget>
#include <QtGui/QListWidgetItem>
+#include <QFile>
// KDE Libs
#include <KActionCollection>
@@ -305,7 +306,10 @@ MenuLauncherApplet::MenuLauncherApplet(Q
d->viewtypes << "RunCommand";
}
d->viewtypes << "Leave";
- d->iconname = "start-here-kde";
+ if (QFile::exists("/usr/share/icons/oxygen/scalable/places/start-here-branding.svg"))
+ d->iconname = "start-here-branding";
+ else
+ d->iconname = "start-here-kde";
}
}
d->formattype = NameDescription;