mirror of
https://gitdl.cn/https://github.com/chakralinux/desktop.git
synced 2025-01-25 11:02:13 +08:00
90 lines
3.4 KiB
Plaintext
90 lines
3.4 KiB
Plaintext
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")) {
|
|
+ // loadDefaultApplet("org.kde.networkmanagement", panel);
|
|
+ //}
|
|
+
|
|
+ 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
|
|
@@ -713,21 +713,22 @@
|
|
|
|
|
|
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");
|
|
+ //}
|
|
|
|
config().writeEntry("DefaultAppletsAdded", true);
|
|
configChanged();
|