2010-05-22 06:25:44 +08:00
|
|
|
diff -Naur kdebase-workspace-4.3.90.orig/plasma/desktop/shell/desktopcorona.cpp kdebase-workspace-4.3.90/plasma/desktop/shell/desktopcorona.cpp
|
|
|
|
--- kdebase-workspace-4.3.90.orig/plasma/desktop/shell/desktopcorona.cpp 2009-10-06 23:37:23.000000000 +0200
|
|
|
|
+++ kdebase-workspace-4.3.90/plasma/desktop/shell/desktopcorona.cpp 2010-01-17 21:44:01.000000000 +0100
|
|
|
|
@@ -26,7 +26,7 @@
|
|
|
|
#include <QTimer>
|
|
|
|
#include <QMenu>
|
|
|
|
#include <QSignalMapper>
|
|
|
|
-
|
|
|
|
+#include <QFile>
|
|
|
|
|
|
|
|
#include <KDebug>
|
|
|
|
#include <KDialog>
|
|
|
|
@@ -396,8 +396,8 @@
|
|
|
|
applet->setGlobalShortcut(KShortcut("Alt+F1"));
|
|
|
|
}
|
|
|
|
|
|
|
|
- loadDefaultApplet("pager", panel);
|
|
|
|
loadDefaultApplet("tasks", panel);
|
|
|
|
+
|
|
|
|
Plasma::Applet *sysTray = loadDefaultApplet("systemtray", panel);
|
|
|
|
|
|
|
|
if (sysTray) {
|
|
|
|
@@ -408,6 +408,25 @@
|
|
|
|
}
|
|
|
|
|
|
|
|
loadDefaultApplet("digital-clock", panel);
|
|
|
|
+
|
|
|
|
+ loadDefaultApplet("trash", panel);
|
|
|
|
+
|
|
|
|
+ loadDefaultApplet("notifier", panel);
|
|
|
|
+
|
|
|
|
+ if (QFile::exists("/usr/share/kde4/services/plasma-applet-networkmanagement.desktop")) {
|
2010-05-24 23:18:09 +08:00
|
|
|
+ loadDefaultApplet("org.kde.networkmanagement", panel);
|
2010-05-22 06:25:44 +08:00
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ Plasma::DataEngineManager *engines = Plasma::DataEngineManager::self();
|
|
|
|
+ Plasma::DataEngine *power = engines->loadEngine("powermanagement");
|
|
|
|
+ if (power) {
|
|
|
|
+ const QStringList &batteries = power->query("Battery")["sources"].toStringList();
|
|
|
|
+ if (!batteries.isEmpty()) {
|
|
|
|
+ loadDefaultApplet("battery", panel);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ engines->unloadEngine("powermanagement");
|
|
|
|
+
|
|
|
|
emit containmentAdded(panel);
|
|
|
|
|
|
|
|
QTimer::singleShot(1000, this, SLOT(saveDefaultSetup()));
|
|
|
|
diff -Naur kdebase-workspace-4.3.90.orig/plasma/generic/applets/systemtray/ui/applet.cpp kdebase-workspace-4.3.90/plasma/generic/applets/systemtray/ui/applet.cpp
|
|
|
|
--- kdebase-workspace-4.3.90.orig/plasma/generic/applets/systemtray/ui/applet.cpp 2010-01-06 18:00:20.000000000 +0100
|
|
|
|
+++ kdebase-workspace-4.3.90/plasma/generic/applets/systemtray/ui/applet.cpp 2010-01-17 19:14:42.000000000 +0100
|
|
|
|
@@ -744,20 +744,21 @@
|
|
|
|
void Applet::addDefaultApplets()
|
|
|
|
{
|
|
|
|
QStringList applets = s_manager->applets(this);
|
|
|
|
- if (!applets.contains("notifier")) {
|
|
|
|
- s_manager->addApplet("notifier", this);
|
|
|
|
- }
|
|
|
|
- if (!applets.contains("battery")) {
|
|
|
|
- Plasma::DataEngineManager *engines = Plasma::DataEngineManager::self();
|
|
|
|
- Plasma::DataEngine *power = engines->loadEngine("powermanagement");
|
|
|
|
- if (power) {
|
|
|
|
- const QStringList &batteries = power->query("Battery")["sources"].toStringList();
|
|
|
|
- if (!batteries.isEmpty()) {
|
|
|
|
- s_manager->addApplet("battery", this);
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- engines->unloadEngine("powermanagement");
|
|
|
|
- }
|
|
|
|
+// oh bloody hack, we dont want them here
|
|
|
|
+// if (!applets.contains("notifier")) {
|
|
|
|
+// s_manager->addApplet("notifier", this);
|
|
|
|
+// }
|
|
|
|
+// if (!applets.contains("battery")) {
|
|
|
|
+// Plasma::DataEngineManager *engines = Plasma::DataEngineManager::self();
|
|
|
|
+// Plasma::DataEngine *power = engines->loadEngine("powermanagement");
|
|
|
|
+// if (power) {
|
|
|
|
+// const QStringList &batteries = power->query("Battery")["sources"].toStringList();
|
|
|
|
+// if (!batteries.isEmpty()) {
|
|
|
|
+// s_manager->addApplet("battery", this);
|
|
|
|
+// }
|
|
|
|
+// }
|
|
|
|
+// engines->unloadEngine("powermanagement");
|
|
|
|
+// }
|
|
|
|
}
|
|
|
|
|
|
|
|
NotificationWidget *Applet::addNotification(Notification *notification)
|