rpms/kdebase-workspace/F-12 kdebase-workspace-4.3.75-classicmenu-logout.patch, NONE, 1.1 kdebase-workspace-4.3.75-kio_sysinfo.patch, NONE, 1.1 kdebase-workspace-4.3.75-rootprivs.patch, NONE, 1.1 kdebase-workspace-4.3.75-show_systemsettings.patch, NONE, 1.1 kdebase-workspace-4.3.80-xsession_errors_O_APPEND.patch, NONE, 1.1 kdebase-workspace-4.3.95-brightness_keys.patch, NONE, 1.1 kdebase-workspace-4.3.95-redhat-startkde.patch, NONE, 1.1 kdebase-workspace-4.3.98-battery-plasmoid-showremainingtime.patch, NONE, 1.1 kdebase-workspace-4.3.98-plasma-konsole.patch, NONE, 1.1 kdebase-workspace-4.3.98-platformplugin-widgetstyle4.patch, NONE, 1.1 kdebase-workspace-kde#200184.patch, NONE, 1.1 .cvsignore, 1.42, 1.43 kdebase-workspace-4.2.0-kio_sysinfo.patch, 1.1, NONE kdebase-workspace-4.2.90-show_systemsettings.patch, 1.1, NONE kdebase-workspace-4.2.95-plasma-konsole.patch, 1.1, NONE kdebase-workspace-4.2.95-rootprivs.patch, 1.2, NONE kdebase-workspace-4.2.96-redhat-startkde.patch, 1.1, NONE kdebase-workspace-4.3.0-battery-plasmoid-showremainingtime.patch, 1.1, NONE kdebase-workspace-4.3.0-default_applets.patch, 1.1, NONE kdebase-workspace-4.3.1-classicmenu-logout.patch, 1.1, NONE kdebase-workspace-4.3.4-calendar-akonadi.patch, 1.1, NONE kdebase-workspace-4.3.4-solid_hal_0_5_14.patch, 1.1, NONE kubuntu_101_brightness_fn_keys_and_osd.diff, 1.1, NONE
Lukas Tinkl
ltinkl at fedoraproject.org
Wed Feb 10 14:00:07 UTC 2010
- Previous message: rpms/kdebase-workspace/F-11 kdebase-workspace-4.3.75-classicmenu-logout.patch, NONE, 1.1 kdebase-workspace-4.3.75-kio_sysinfo.patch, NONE, 1.1 kdebase-workspace-4.3.75-rootprivs.patch, NONE, 1.1 kdebase-workspace-4.3.75-show_systemsettings.patch, NONE, 1.1 kdebase-workspace-4.3.80-xsession_errors_O_APPEND.patch, NONE, 1.1 kdebase-workspace-4.3.95-brightness_keys.patch, NONE, 1.1 kdebase-workspace-4.3.95-redhat-startkde.patch, NONE, 1.1 kdebase-workspace-4.3.98-battery-plasmoid-showremainingtime.patch, NONE, 1.1 kdebase-workspace-4.3.98-plasma-konsole.patch, NONE, 1.1 kdebase-workspace-4.3.98-platformplugin-widgetstyle4.patch, NONE, 1.1 kdebase-workspace-kde#200184.patch, NONE, 1.1 .cvsignore, 1.38, 1.39 kdebase-workspace.spec, 1.256, 1.257 sources, 1.43, 1.44 kdebase-workspace-4.2.0-kio_sysinfo.patch, 1.1, NONE kdebase-workspace-4.2.90-show_systemsettings.patch, 1.1, NONE kdebase-workspace-4.2.95-plasma-konsole.patch, 1.1, NONE kdebase-workspace-4.2.95-rootprivs.patch, 1.1, NONE kdebase-workspace-4.2.96-redhat-startkde.patch, 1.1, NONE kdebase-workspace-4.3.0-battery-plasmoid-showremainingtime.patch, 1.1, NONE kdebase-workspace-4.3.0-default_applets.patch, 1.1, NONE kdebase-workspace-4.3.1-classicmenu-logout.patch, 1.1, NONE kdebase-workspace-4.3.4-calendar-akonadi.patch, 1.1, NONE kdebase-workspace-4.3.4-solid_hal_0_5_14.patch, 1.1, NONE kubuntu_101_brightness_fn_keys_and_osd.diff, 1.1, NONE
- Next message: rpms/kdebase-workspace/devel .cvsignore,1.48,1.49
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: ltinkl
Update of /cvs/extras/rpms/kdebase-workspace/F-12
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv7216/F-12
Modified Files:
.cvsignore
Added Files:
kdebase-workspace-4.3.75-classicmenu-logout.patch
kdebase-workspace-4.3.75-kio_sysinfo.patch
kdebase-workspace-4.3.75-rootprivs.patch
kdebase-workspace-4.3.75-show_systemsettings.patch
kdebase-workspace-4.3.80-xsession_errors_O_APPEND.patch
kdebase-workspace-4.3.95-brightness_keys.patch
kdebase-workspace-4.3.95-redhat-startkde.patch
kdebase-workspace-4.3.98-battery-plasmoid-showremainingtime.patch
kdebase-workspace-4.3.98-plasma-konsole.patch
kdebase-workspace-4.3.98-platformplugin-widgetstyle4.patch
kdebase-workspace-kde#200184.patch
Removed Files:
kdebase-workspace-4.2.0-kio_sysinfo.patch
kdebase-workspace-4.2.90-show_systemsettings.patch
kdebase-workspace-4.2.95-plasma-konsole.patch
kdebase-workspace-4.2.95-rootprivs.patch
kdebase-workspace-4.2.96-redhat-startkde.patch
kdebase-workspace-4.3.0-battery-plasmoid-showremainingtime.patch
kdebase-workspace-4.3.0-default_applets.patch
kdebase-workspace-4.3.1-classicmenu-logout.patch
kdebase-workspace-4.3.4-calendar-akonadi.patch
kdebase-workspace-4.3.4-solid_hal_0_5_14.patch
kubuntu_101_brightness_fn_keys_and_osd.diff
Log Message:
KDE 4.4.0
kdebase-workspace-4.3.75-classicmenu-logout.patch:
core/itemhandlers.cpp | 7 ++++++-
simpleapplet/simpleapplet.cpp | 2 ++
simpleapplet/simpleapplet.h | 3 ++-
3 files changed, 10 insertions(+), 2 deletions(-)
--- NEW FILE kdebase-workspace-4.3.75-classicmenu-logout.patch ---
diff -r -U5 kdebase-workspace-4.3.75svn1048496/plasma/desktop/applets/kickoff/core/itemhandlers.cpp kdebase-workspace-4.3.75svn1048496.classicmenu-logout/plasma/desktop/applets/kickoff/core/itemhandlers.cpp
--- kdebase-workspace-4.3.75svn1048496/plasma/desktop/applets/kickoff/core/itemhandlers.cpp 2009-09-16 07:40:52.000000000 -0400
+++ kdebase-workspace-4.3.75svn1048496.classicmenu-logout/plasma/desktop/applets/kickoff/core/itemhandlers.cpp 2009-11-21 17:46:56.000000000 -0500
@@ -107,11 +107,12 @@
} else if (m_logoutAction == "switch") {
// decouple dbus call, otherwise we'll run into a dead-lock
QTimer::singleShot(0, this, SLOT(switchUser()));
return true;
} else if (m_logoutAction == "logout" || m_logoutAction == "logoutonly" ||
- m_logoutAction == "restart" || m_logoutAction == "shutdown") {
+ m_logoutAction == "restart" || m_logoutAction == "shutdown" ||
+ m_logoutAction == "leave") {
// decouple dbus call, otherwise we'll run into a dead-lock
QTimer::singleShot(0, this, SLOT(logout()));
return true;
} else if (m_logoutAction == "savesession") {
// decouple dbus call, otherwise we'll run into a dead-lock
@@ -158,10 +159,14 @@
kDebug() << "Switching user";
} else if (m_logoutAction == "restart") {
type = KWorkSpace::ShutdownTypeReboot;
} else if (m_logoutAction == "shutdown") {
type = KWorkSpace::ShutdownTypeHalt;
+ } else if (m_logoutAction == "leave") {
+ // This one brings up the dialog, for use in the classic menu.
+ confirm = KWorkSpace::ShutdownConfirmYes;
+ type = KWorkSpace::ShutdownTypeDefault;
}
//FIXME: the proper fix is to implement the KWorkSpace methods for Windows
#ifndef Q_WS_WIN
KWorkSpace::requestShutDown(confirm, type);
diff -r -U5 kdebase-workspace-4.3.75svn1048496/plasma/desktop/applets/kickoff/simpleapplet/simpleapplet.cpp kdebase-workspace-4.3.75svn1048496.classicmenu-logout/plasma/desktop/applets/kickoff/simpleapplet/simpleapplet.cpp
--- kdebase-workspace-4.3.75svn1048496/plasma/desktop/applets/kickoff/simpleapplet/simpleapplet.cpp 2009-10-26 05:14:50.000000000 -0400
+++ kdebase-workspace-4.3.75svn1048496.classicmenu-logout/plasma/desktop/applets/kickoff/simpleapplet/simpleapplet.cpp 2009-11-21 17:47:08.000000000 -0500
@@ -200,10 +200,11 @@
case SuspendRAM: return i18n("Sleep");
case Restart: return i18nc("Restart Computer", "Restart");
case Shutdown: return i18n("Shutdown");
case Logout: return i18n("Logout");
case Leave: return i18n("Leave");
+ case LeaveDialog: return i18n("Leave...");
}
return QString();
}
QString viewIcon(MenuLauncherApplet::ViewType vt) const {
@@ -225,10 +226,11 @@
case SuspendRAM: return "system-suspend-hibernate";
case Restart: return "system-reboot";
case Shutdown: return "system-shutdown";
case Logout: return "system-log-out";
case Leave: return "system-shutdown";
+ case LeaveDialog: return "system-shutdown";
}
return QString();
}
MenuLauncherApplet::ViewType viewType(const QByteArray& type) const {
diff -r -U5 kdebase-workspace-4.3.75svn1048496/plasma/desktop/applets/kickoff/simpleapplet/simpleapplet.h kdebase-workspace-4.3.75svn1048496.classicmenu-logout/plasma/desktop/applets/kickoff/simpleapplet/simpleapplet.h
--- kdebase-workspace-4.3.75svn1048496/plasma/desktop/applets/kickoff/simpleapplet/simpleapplet.h 2009-09-16 07:40:52.000000000 -0400
+++ kdebase-workspace-4.3.75svn1048496.classicmenu-logout/plasma/desktop/applets/kickoff/simpleapplet/simpleapplet.h 2009-11-21 17:47:19.000000000 -0500
@@ -57,11 +57,12 @@
SuspendDisk, ///< Suspend to Disk Action
SuspendRAM, ///< Suspend to RAM Action
Restart, ///< Restart Action
Shutdown, ///< Shutdown Action
Logout, ///< Logout Action
- Leave ///< Leave Menu
+ Leave, ///< Leave Menu
+ LeaveDialog ///< Leave Dialog Action
};
/**
* How the text of the menuitems got formatted.
*/
kdebase-workspace-4.3.75-kio_sysinfo.patch:
models.cpp | 2 ++
systemmodel.cpp | 37 ++++++++++++++++++++++++++-----------
2 files changed, 28 insertions(+), 11 deletions(-)
--- NEW FILE kdebase-workspace-4.3.75-kio_sysinfo.patch ---
diff -U5 -r kdebase-workspace-4.3.75svn1048496/plasma/desktop/applets/kickoff/core/models.cpp kdebase-workspace-4.3.75svn1048496.kio_sysinfo/plasma/desktop/applets/kickoff/core/models.cpp
--- kdebase-workspace-4.3.75svn1048496/plasma/desktop/applets/kickoff/core/models.cpp 2009-10-15 12:33:38.000000000 -0400
+++ kdebase-workspace-4.3.75svn1048496.kio_sysinfo/plasma/desktop/applets/kickoff/core/models.cpp 2009-11-21 15:24:44.000000000 -0500
@@ -176,10 +176,12 @@
QStringList Kickoff::systemApplicationList()
{
KConfigGroup appsGroup = componentData().config()->group("SystemApplications");
QStringList apps;
apps << "systemsettings";
+ if (QFile::exists("/usr/share/kde4/services/sysinfo.protocol"))
+ apps << "/usr/share/kde4/services/sysinfo.protocol";
apps = appsGroup.readEntry("DesktopFiles", apps);
return apps;
}
#if 0
diff -U5 -r kdebase-workspace-4.3.75svn1048496/plasma/desktop/applets/kickoff/core/systemmodel.cpp kdebase-workspace-4.3.75svn1048496.kio_sysinfo/plasma/desktop/applets/kickoff/core/systemmodel.cpp
--- kdebase-workspace-4.3.75svn1048496/plasma/desktop/applets/kickoff/core/systemmodel.cpp 2009-11-13 05:57:47.000000000 -0500
+++ kdebase-workspace-4.3.75svn1048496.kio_sysinfo/plasma/desktop/applets/kickoff/core/systemmodel.cpp 2009-11-21 15:25:04.000000000 -0500
@@ -244,21 +244,36 @@
}
}
KService::Ptr service = d->appsList[index.row()];
- switch (role) {
- case Qt::DisplayRole:
- return service->name();
- case Qt::DecorationRole:
- return KIcon(service->icon());
- case SubTitleRole:
- return service->genericName();
- case UrlRole:
- return service->entryPath();
- default:
- return QVariant();
+ if (service->name()=="sysinfo") {
+ switch(role) {
+ case Qt::DisplayRole:
+ return i18n("System Information");
+ case Qt::DecorationRole:
+ return KIcon("hwinfo");
+ case SubTitleRole:
+ return "sysinfo:/";
+ case UrlRole:
+ return "sysinfo:/";
+ default:
+ return QVariant();
+ }
+ } else {
+ switch (role) {
+ case Qt::DisplayRole:
+ return service->name();
+ case Qt::DecorationRole:
+ return KIcon(service->icon());
+ case SubTitleRole:
+ return service->genericName();
+ case UrlRole:
+ return service->entryPath();
+ default:
+ return QVariant();
+ }
}
}
if (role == UrlRole && !d->placesModel->isHidden(mapToSource(index))) {
QModelIndex parent = index.parent();
kdebase-workspace-4.3.75-rootprivs.patch:
ModuleView.cpp | 27 +++++++++++++++++++++++++++
ModuleView.cpp.orig |only
ModuleView.cpp.rej |only
3 files changed, 27 insertions(+)
--- NEW FILE kdebase-workspace-4.3.75-rootprivs.patch ---
diff -U5 -r kdebase-workspace-4.3.75svn1048496/systemsettings/core/ModuleView.cpp kdebase-workspace-4.3.75svn1048496.rootprivs/systemsettings/core/ModuleView.cpp
--- kdebase-workspace-4.3.75svn1048496/systemsettings/core/ModuleView.cpp 2009-10-26 05:14:41.000000000 -0400
+++ kdebase-workspace-4.3.75svn1048496.rootprivs/systemsettings/core/ModuleView.cpp 2009-11-21 06:07:10.000000000 -0500
@@ -38,10 +38,11 @@
#include <KMessageBox>
#include <KCModuleInfo>
#include <KCModuleProxy>
#include <KStandardGuiItem>
#include <KDialogButtonBox>
+#include <KStandardDirs>
#include <kauthaction.h>
#include "MenuItem.h"
class ModuleView::Private {
@@ -122,10 +123,36 @@
{
if ( !menuItem ) {
return;
}
+ if ( menuItem->service()->property( "X-KDE-RootOnly", QVariant::Bool ).toBool() ) {
+ QString kdesu = KStandardDirs::findExe( "kdesu" );
+ QString cmd = menuItem->service()->exec().trimmed();
+
+ /* Prepare the process to run the kcmshell */
+ if ( cmd.left(5) == "kdesu" )
+ {
+ cmd = cmd.remove(0,5).trimmed();
+
+ /* Remove all kdesu switches */
+ while ( cmd.length() > 1 && cmd[ 0 ] == '-' )
+ cmd = cmd.remove( 0, cmd.indexOf( ' ' ) ).trimmed();
+ }
+
+ if ( cmd.left(9) == "kcmshell4" )
+ cmd = cmd.remove(0,9).trimmed();
+
+ QStringList args;
+ args << "-i" << QString( menuItem->service()->icon() ) << "-c" << QString( "%1 %2 --lang %3" ).arg( KStandardDirs::locate("exe", "kcmshell4") ).arg( cmd ).arg( KGlobal::locale()->language() );
+
+ kDebug() << "Starting root module: " << args;
+ QProcess::startDetached( kdesu, args );
+
+ return;
+ }
+
QList<KCModuleInfo*> modules;
if ( menuItem->children().empty() ) {
modules << &menuItem->item();
} else {
foreach ( MenuItem *child, menuItem->children() ) {
Only in kdebase-workspace-4.3.75svn1048496.rootprivs/systemsettings/core: ModuleView.cpp.orig
Only in kdebase-workspace-4.3.75svn1048496.rootprivs/systemsettings/core: ModuleView.cpp.rej
kdebase-workspace-4.3.75-show_systemsettings.patch:
plasma/desktop/applets/kickoff/core/applicationmodel.cpp | 1 -
systemsettings/app/systemsettings.desktop | 1 +
systemsettings/app/systemsettings.desktop.orig |only
3 files changed, 1 insertion(+), 1 deletion(-)
--- NEW FILE kdebase-workspace-4.3.75-show_systemsettings.patch ---
diff -U5 -r kdebase-workspace-4.3.75svn1048496/plasma/desktop/applets/kickoff/core/applicationmodel.cpp kdebase-workspace-4.3.75svn1048496.show_systemsettings/plasma/desktop/applets/kickoff/core/applicationmodel.cpp
--- kdebase-workspace-4.3.75svn1048496/plasma/desktop/applets/kickoff/core/applicationmodel.cpp 2009-11-13 05:57:47.000000000 -0500
+++ kdebase-workspace-4.3.75svn1048496.show_systemsettings/plasma/desktop/applets/kickoff/core/applicationmodel.cpp 2009-11-21 04:55:21.000000000 -0500
@@ -109,11 +109,10 @@
systemApplicationPolicy(ApplicationModel::ShowSystemOnlyPolicy),
primaryNamePolicy(ApplicationModel::GenericNamePrimary),
displayOrder(NameAfterDescription),
allowSeparators(_allowSeparators)
{
- systemApplications = Kickoff::systemApplicationList();
}
~ApplicationModelPrivate()
{
delete root;
diff -U5 -r kdebase-workspace-4.3.75svn1048496/systemsettings/app/systemsettings.desktop kdebase-workspace-4.3.75svn1048496.show_systemsettings/systemsettings/app/systemsettings.desktop
--- kdebase-workspace-4.3.75svn1048496/systemsettings/app/systemsettings.desktop 2009-09-23 15:21:33.000000000 -0400
+++ kdebase-workspace-4.3.75svn1048496.show_systemsettings/systemsettings/app/systemsettings.desktop 2009-11-21 04:55:21.000000000 -0500
@@ -161,5 +161,6 @@
Name[zh_CN]=系统设置
Name[zh_TW]=系統設定
X-DBUS-StartupType=Unique
Categories=Qt;KDE;Settings;
+OnlyShowIn=KDE;
Only in kdebase-workspace-4.3.75svn1048496.show_systemsettings/systemsettings/app: systemsettings.desktop.orig
kdebase-workspace-4.3.80-xsession_errors_O_APPEND.patch:
client.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- NEW FILE kdebase-workspace-4.3.80-xsession_errors_O_APPEND.patch ---
diff -up kdebase-workspace-4.3.80/kdm/backend/client.c.append kdebase-workspace-4.3.80/kdm/backend/client.c
--- kdebase-workspace-4.3.80/kdm/backend/client.c.append 2009-11-02 06:01:32.000000000 -0600
+++ kdebase-workspace-4.3.80/kdm/backend/client.c 2009-12-11 13:16:49.047992973 -0600
@@ -1182,7 +1182,7 @@ createClientLog( const char *log )
if (!(lname = expandMacros( log, macros )))
exit( 1 );
unlink( lname );
- if ((lfd = open( lname, O_WRONLY|O_CREAT|O_EXCL, 0600 )) >= 0) {
+ if ((lfd = open( lname, O_WRONLY|O_CREAT|O_EXCL|O_APPEND, 0600 )) >= 0) {
dup2( lfd, 1 );
dup2( lfd, 2 );
close( lfd );
kdebase-workspace-4.3.95-brightness_keys.patch:
libs/solid/control/powermanager.cpp | 11 +++-
plasma/generic/applets/battery/battery.cpp | 74 ++++++++++++++++++++++++----
plasma/generic/applets/battery/battery.h | 10 +++
powerdevil/daemon/PowerDevilDaemon.cpp | 75 +++++++++++++++++++++++++----
powerdevil/daemon/PowerDevilDaemon.h | 6 ++
powerdevil/daemon/org.kde.PowerDevil.xml | 8 +++
6 files changed, 161 insertions(+), 23 deletions(-)
--- NEW FILE kdebase-workspace-4.3.95-brightness_keys.patch ---
diff -up kdebase-workspace-4.3.95/libs/solid/control/powermanager.cpp.brightness_keys kdebase-workspace-4.3.95/libs/solid/control/powermanager.cpp
--- kdebase-workspace-4.3.95/libs/solid/control/powermanager.cpp.brightness_keys 2010-01-06 11:00:01.000000000 -0600
+++ kdebase-workspace-4.3.95/libs/solid/control/powermanager.cpp 2010-01-23 12:35:12.385641003 -0600
@@ -25,6 +25,8 @@
#include "ifaces/powermanager.h"
#include <kdebug.h>
#include <kglobal.h>
+#include <QDBusInterface>
+#include <QDBusPendingCall>
#include <QX11Info>
K_GLOBAL_STATIC(Solid::Control::PowerManagerPrivate, globalPowerManager)
@@ -160,7 +162,8 @@ bool Solid::Control::PowerManager::setBr
#ifdef Q_WS_WIN
return false;
#else
- return ( xrandr_brightlight( QX11Info::display(), brightness ) >= 0 );
+ if ( xrandr_brightlight( QX11Info::display(), brightness ) < 0 )
+ return false;
#endif
}
else
@@ -170,8 +173,12 @@ bool Solid::Control::PowerManager::setBr
SOLID_CALL(Ifaces::PowerManager *, globalPowerManager->managerBackend(), setBrightness(brightness, device));
}
//TODO - This should be done better, it will return true even if one of the calls returns false. SOLID_CALL does not allow us to get the return value.
- return true;
}
+
+ QDBusInterface iface("org.kde.kded", "/modules/powerdevil", "org.kde.PowerDevil", QDBusConnection::sessionBus());
+ if (iface.isValid())
+ iface.asyncCall("notifyOfBrightnessChange", (int) Solid::Control::PowerManager::brightness());
+ return true;
}
else
{
diff -up kdebase-workspace-4.3.95/plasma/generic/applets/battery/battery.cpp.brightness_keys kdebase-workspace-4.3.95/plasma/generic/applets/battery/battery.cpp
--- kdebase-workspace-4.3.95/plasma/generic/applets/battery/battery.cpp.brightness_keys 2010-01-23 12:35:12.366629154 -0600
+++ kdebase-workspace-4.3.95/plasma/generic/applets/battery/battery.cpp 2010-01-23 12:35:12.386640293 -0600
@@ -31,9 +31,13 @@
#include <QGraphicsGridLayout>
#include <QGraphicsLinearLayout>
#include <QDBusPendingCall>
+#include <QDesktopWidget>
#include <QLabel>
+#include <QProgressBar>
#include <QPropertyAnimation>
+#include <QTimer>
+#include <KApplication>
#include <KDebug>
#include <KIcon>
#include <KSharedConfig>
@@ -87,7 +91,8 @@ Battery::Battery(QObject *parent, const
m_labelAlpha(0),
m_labelAnimation(0),
m_acAlpha(0),
- m_acAnimation(0)
+ m_acAnimation(0),
+ m_brightnessDisplay(0)
{
//kDebug() << "Loading applet battery";
setAcceptsHoverEvents(true);
@@ -314,6 +319,7 @@ void Battery::hoverLeaveEvent(QGraphicsS
Battery::~Battery()
{
+ delete m_brightnessDisplay;
}
void Battery::suspend()
@@ -334,13 +340,17 @@ void Battery::hibernate()
void Battery::brightnessChanged(const int brightness)
{
- Solid::Control::PowerManager::setBrightness(brightness);
+ if (!m_ignoreBrightnessChange) {
+ Solid::Control::PowerManager::setBrightness(brightness);
+ }
}
-void Battery::updateSlider(const float brightness)
+void Battery::updateSlider(int brightness)
{
- if (m_brightnessSlider->value() != (int)brightness) {
- m_brightnessSlider->setValue((int) brightness);
+ if (m_brightnessSlider->value() != brightness) {
+ m_ignoreBrightnessChange = true;
+ m_brightnessSlider->setValue(brightness);
+ m_ignoreBrightnessChange = false;
}
}
@@ -363,6 +373,7 @@ void Battery::initExtenderItem(Plasma::E
// as the battery applet is also embedded into the battery's extender.
if (!m_isEmbedded && item->name() == "powermanagement") {
int row = 0;
+ m_ignoreBrightnessChange = false;
m_controls = new QGraphicsWidget(item);
m_controls->setMinimumWidth(360);
@@ -427,16 +438,12 @@ void Battery::initExtenderItem(Plasma::E
m_brightnessSlider = new Plasma::Slider(m_controls);
m_brightnessSlider->setRange(0, 100);
- m_brightnessSlider->setValue(Solid::Control::PowerManager::brightness());
+ updateSlider(Solid::Control::PowerManager::brightness());
m_brightnessSlider->nativeWidget()->setTickInterval(10);
m_brightnessSlider->setOrientation(Qt::Horizontal);
connect(m_brightnessSlider, SIGNAL(valueChanged(int)),
this, SLOT(brightnessChanged(int)));
- Solid::Control::PowerManager::Notifier *notifier = Solid::Control::PowerManager::notifier();
-
- connect(notifier, SIGNAL(brightnessChanged(float)),
- this, SLOT(updateSlider(float)));
m_controlsLayout->addItem(m_brightnessSlider, row, 1);
row++;
@@ -527,6 +534,21 @@ void Battery::initExtenderItem(Plasma::E
item->setTitle(i18n("Power Management"));
setupFonts();
+
+ m_brightnessDisplay = new QProgressBar();
+ m_brightnessDisplay->setWindowFlags(Qt::X11BypassWindowManagerHint);
+ QDesktopWidget* desktop = KApplication::kApplication()->desktop();
+ //Getting QRect of the screen where cursor is positioned
+ QRect rect = desktop->screenGeometry(QCursor::pos());
+ int width = (rect.width()/2) - (m_brightnessDisplay->width()/2);
+ int height = (rect.height()/2) - (m_brightnessDisplay->height()/2);
+ width += rect.x();
+ height += rect.y();
+ m_brightnessDisplay->move(width, height);
+ m_brightnessDisplayTimer = new QTimer(this);
+ connect(m_brightnessDisplayTimer, SIGNAL(timeout()), this, SLOT(hideOSD()));
+ QDBusConnection::sessionBus().connect("org.kde.kded", "/modules/powerdevil", "org.kde.PowerDevil",
+ "brightnessChanged", this, SLOT(showBrightnessOSD(int,bool)));
}
}
@@ -657,7 +679,7 @@ void Battery::updateStatus()
}
if (m_brightnessSlider) {
- m_brightnessSlider->setValue(Solid::Control::PowerManager::brightness());
+ updateSlider(Solid::Control::PowerManager::brightness());
}
}
@@ -999,4 +1021,34 @@ qreal Battery::acAlpha()
return m_acAlpha;
}
+void Battery::showBrightnessOSD(int brightness, bool byFnKey)
+{
+ if (byFnKey) {
+ m_brightnessDisplay->setValue(brightness);
+ m_brightnessDisplay->show();
+
+ //FIXME, how to get this to work before it is displayed for the first time?
+ QDesktopWidget* desktop = KApplication::kApplication()->desktop();
+ //Getting QRect of the screen where cursor is positioned
+ QRect rect = desktop->screenGeometry(QCursor::pos());
+ int width = (rect.width()/2) - (m_brightnessDisplay->width()/2);
+ int height = (rect.height()/2) - (m_brightnessDisplay->height()/2);
+ width += rect.x();
+ height += rect.y();
+ m_brightnessDisplay->move(width, height);
+
+ m_brightnessDisplayTimer->setInterval(2000);
+ m_brightnessDisplayTimer->start();
+
+ if (m_extenderVisible && m_brightnessSlider) {
+ updateSlider(brightness);
+ }
+ }
+}
+
+void Battery::hideOSD()
+{
+ m_brightnessDisplay->hide();
+}
+
#include "battery.moc"
diff -up kdebase-workspace-4.3.95/plasma/generic/applets/battery/battery.h.brightness_keys kdebase-workspace-4.3.95/plasma/generic/applets/battery/battery.h
--- kdebase-workspace-4.3.95/plasma/generic/applets/battery/battery.h.brightness_keys 2010-01-19 17:19:14.000000000 -0600
+++ kdebase-workspace-4.3.95/plasma/generic/applets/battery/battery.h 2010-01-23 12:35:12.386640293 -0600
@@ -39,6 +39,8 @@ namespace Plasma
class Slider;
}
+class QProgressBar;
+
class Battery : public Plasma::PopupApplet
{
Q_OBJECT
@@ -83,7 +85,7 @@ class Battery : public Plasma::PopupAppl
void sourceAdded(const QString &source);
void sourceRemoved(const QString &source);
void brightnessChanged(const int brightness);
- void updateSlider(const float brightness);
+ void updateSlider(int brightness);
void setFullBrightness();
void openConfig();
void setProfile(const QString &profile);
@@ -91,6 +93,8 @@ class Battery : public Plasma::PopupAppl
void hibernate();
void updateBattery();
void setupFonts();
+ void showBrightnessOSD(int brightness, bool byFnKey);
+ void hideOSD();
private:
void connectSources();
@@ -172,6 +176,10 @@ class Battery : public Plasma::PopupAppl
QPropertyAnimation *m_labelAnimation;
qreal m_acAlpha;
QPropertyAnimation *m_acAnimation;
+
+ bool m_ignoreBrightnessChange;
+ QProgressBar* m_brightnessDisplay;
+ QTimer* m_brightnessDisplayTimer;
};
K_EXPORT_PLASMA_APPLET(battery, Battery)
diff -up kdebase-workspace-4.3.95/powerdevil/daemon/org.kde.PowerDevil.xml.brightness_keys kdebase-workspace-4.3.95/powerdevil/daemon/org.kde.PowerDevil.xml
--- kdebase-workspace-4.3.95/powerdevil/daemon/org.kde.PowerDevil.xml.brightness_keys 2009-09-04 06:30:55.000000000 -0500
+++ kdebase-workspace-4.3.95/powerdevil/daemon/org.kde.PowerDevil.xml 2010-01-23 12:35:12.386640293 -0600
@@ -42,6 +42,10 @@
<arg type="as" direction="out" />
</method>
+ <method name="notifyOfBrightnessChange">
+ <arg type="i" direction="in" />
+ </method>
+
<signal name="lidClosed">
<arg type="i" direction="out" />
<arg type="s" direction="out" />
@@ -56,5 +60,9 @@
</signal>
<signal name="DPMSconfigUpdated">
</signal>
+ <signal name="brightnessChanged">
+ <arg type="i" direction="out" />
+ <arg type="b" direction="out" />
+ </signal>
</interface>
</node>
diff -up kdebase-workspace-4.3.95/powerdevil/daemon/PowerDevilDaemon.cpp.brightness_keys kdebase-workspace-4.3.95/powerdevil/daemon/PowerDevilDaemon.cpp
--- kdebase-workspace-4.3.95/powerdevil/daemon/PowerDevilDaemon.cpp.brightness_keys 2009-12-10 17:14:04.000000000 -0600
+++ kdebase-workspace-4.3.95/powerdevil/daemon/PowerDevilDaemon.cpp 2010-01-23 12:35:12.387639722 -0600
@@ -26,6 +26,8 @@
#include <kdemacros.h>
#include <KAboutData>
+#include <KAction>
+#include <KActionCollection>
#include <KPluginFactory>
#include <KNotification>
#include <KIcon>
@@ -93,6 +95,7 @@ public:
: notifier(Solid::Control::PowerManager::notifier())
, currentConfig(0)
, status(PowerDevilDaemon::NoAction)
+ , brightnessInHardware(false)
, ckSessionInterface(0) {}
Solid::Control::PowerManager::Notifier *notifier;
@@ -119,6 +122,8 @@ public:
int batteryPercent;
int brightness;
+ int cachedBrightness;
+ bool brightnessInHardware;
bool isPlugged;
// ConsoleKit stuff
@@ -174,6 +179,18 @@ PowerDevilDaemon::PowerDevilDaemon(QObje
d->ksmServerIface = new OrgKdeKSMServerInterfaceInterface("org.kde.ksmserver", "/KSMServer",
QDBusConnection::sessionBus(), this);
+ QDBusInterface halManager("org.freedesktop.Hal",
+ "/org/freedesktop/Hal/Manager", "org.freedesktop.Hal.Manager",
+ QDBusConnection::systemBus());
+ QStringList panelDevices = halManager.call("FindDeviceByCapability",
+ "laptop_panel").arguments().at(0).toStringList();
+ if (!panelDevices.empty()) {
+ QDBusInterface deviceInterface("org.freedesktop.Hal", panelDevices.at(0), "org.freedesktop.Hal.Device",
+ QDBusConnection::systemBus());
+ d->brightnessInHardware = deviceInterface.call("GetPropertyBoolean",
+ "laptop_panel.brightness_in_hardware").arguments().at(0).toBool();
+ }
+
/* Not needed anymore; I am not sure if we will need that in a future, so I leave it here
* just in case.
*
@@ -198,6 +215,17 @@ PowerDevilDaemon::PowerDevilDaemon(QObje
QDBusConnection::sessionBus().registerService("org.kde.powerdevil");
// All systems up Houston, let's go!
refreshStatus();
+
+ d->cachedBrightness = (int) Solid::Control::PowerManager::brightness();
+ KActionCollection* actionCollection = new KActionCollection( this );
+
+ KAction* globalAction = static_cast< KAction* >( actionCollection->addAction( "Increase Screen Brightness" ));
+ globalAction->setGlobalShortcut(KShortcut(Qt::Key_MonBrightnessUp));
+ connect(globalAction, SIGNAL(triggered(bool)), SLOT(increaseBrightness()));
+
+ globalAction = static_cast< KAction* >( actionCollection->addAction( "Decrease Screen Brightness" ));
+ globalAction->setGlobalShortcut(KShortcut(Qt::Key_MonBrightnessDown));
+ connect(globalAction, SIGNAL(triggered(bool)), SLOT(decreaseBrightness()));
}
PowerDevilDaemon::~PowerDevilDaemon()
@@ -661,24 +689,40 @@ void PowerDevilDaemon::buttonPressed(int
}
}
-void PowerDevilDaemon::decreaseBrightness()
+void PowerDevilDaemon::incDecBrightness(bool increase)
{
if (!checkIfCurrentSessionActive()) {
return;
}
+
+ int currentBrightness = (int) Solid::Control::PowerManager::brightness();
+ if ((currentBrightness == d->cachedBrightness) && !d->brightnessInHardware)
+ {
+ int newBrightness;
+ if (increase) {
+ newBrightness = qMin(100, currentBrightness + 10);
+ }
+ else {
+ newBrightness = qMax(0, currentBrightness - 10);
+ }
- int currentBrightness = qMax(0, (int)(Solid::Control::PowerManager::brightness() - 10));
- Solid::Control::PowerManager::setBrightness(currentBrightness);
+ Solid::Control::PowerManager::setBrightness(newBrightness);
+ currentBrightness = (int) Solid::Control::PowerManager::brightness();
+ }
+
+ if (!d->brightnessInHardware) {
+ emitBrightnessChanged(currentBrightness, true);
+ }
}
-void PowerDevilDaemon::increaseBrightness()
+void PowerDevilDaemon::decreaseBrightness()
{
- if (!checkIfCurrentSessionActive()) {
- return;
- }
+ incDecBrightness(false);
+}
- int currentBrightness = qMin(100, (int)(Solid::Control::PowerManager::brightness() + 10));
- Solid::Control::PowerManager::setBrightness(currentBrightness);
+void PowerDevilDaemon::increaseBrightness()
+{
+ incDecBrightness(true);
}
void PowerDevilDaemon::shutdownNotification(bool automated)
@@ -1463,4 +1507,17 @@ void PowerDevilDaemon::setUpConsoleKit()
SLOT(refreshStatus()));
}
+void PowerDevilDaemon::notifyOfBrightnessChange(int brightness)
+{
+ emitBrightnessChanged(brightness, false);
+}
+
+void PowerDevilDaemon::emitBrightnessChanged(int brightness, bool byFnKey)
+{
+ if ((d->cachedBrightness != brightness) || byFnKey) {
+ d->cachedBrightness = brightness;
+ emit brightnessChanged(brightness, byFnKey);
+ }
+}
+
#include "PowerDevilDaemon.moc"
diff -up kdebase-workspace-4.3.95/powerdevil/daemon/PowerDevilDaemon.h.brightness_keys kdebase-workspace-4.3.95/powerdevil/daemon/PowerDevilDaemon.h
--- kdebase-workspace-4.3.95/powerdevil/daemon/PowerDevilDaemon.h.brightness_keys 2009-11-30 18:30:27.000000000 -0600
+++ kdebase-workspace-4.3.95/powerdevil/daemon/PowerDevilDaemon.h 2010-01-23 12:35:12.387639722 -0600
@@ -61,10 +61,13 @@ public Q_SLOTS:
SuspensionLockHandler *lockHandler();
+ void notifyOfBrightnessChange(int brightness);
+
private Q_SLOTS:
void acAdapterStateChanged(int state, bool forced = false);
void batteryChargePercentChanged(int percent, const QString &udi);
+ void incDecBrightness(bool increase);
void decreaseBrightness();
void increaseBrightness();
@@ -106,6 +109,7 @@ Q_SIGNALS:
void stateChanged(int, bool);
void profileChanged(const QString &, const QStringList &);
void DPMSconfigUpdated();
+ void brightnessChanged(int brightness, bool byFnKey);
private:
void lockScreen();
@@ -127,6 +131,8 @@ private:
bool checkIfCurrentSessionActive();
+ void emitBrightnessChanged(int brightness, bool byFnKey);
+
public:
enum IdleAction {
None = 0,
kdebase-workspace-4.3.95-redhat-startkde.patch:
startkde.cmake | 63 ++++++++++++++++++++++++++++++++++++++-------------------
1 file changed, 43 insertions(+), 20 deletions(-)
--- NEW FILE kdebase-workspace-4.3.95-redhat-startkde.patch ---
diff -up kdebase-workspace-4.3.95/startkde.cmake.redhat-startkde kdebase-workspace-4.3.95/startkde.cmake
--- kdebase-workspace-4.3.95/startkde.cmake.redhat-startkde 2010-01-19 17:19:16.000000000 -0600
+++ kdebase-workspace-4.3.95/startkde.cmake 2010-01-23 12:28:19.694880339 -0600
@@ -25,33 +25,17 @@ elif test $kcheckrunning_result -eq 2 ;
exit 1
fi
-# Set the background to plain grey.
+# Set the background to the Red Hat default.
# The standard X background is nasty, causing moire effects and exploding
# people's heads. We use colours from the standard KDE palette for those with
# palettised displays.
if test -z "$XDM_MANAGED" || echo "$XDM_MANAGED" | grep ",auto" > /dev/null; then
- xsetroot -solid "#000000"
+ xsetroot -solid "#103D77"
fi
# we have to unset this for Darwin since it will screw up KDE's dynamic-loading
unset DYLD_FORCE_FLAT_NAMESPACE
-# in case we have been started with full pathname spec without being in PATH
-bindir=`echo "$0" | sed -n 's,^\(/.*\)/[^/][^/]*$,\1,p'`
-if [ -n "$bindir" ]; then
- qbindir=`$bindir/kde4-config --qt-binaries`
- if [ -n "$qbindir" ]; then
- case $PATH in
- $qbindir|$qbindir:*|*:$qbindir|*:$qbindir:*) ;;
- *) PATH=$qbindir:$PATH; export PATH;;
- esac
- fi
- case $PATH in
- $bindir|$bindir:*|*:$bindir|*:$bindir:*) ;;
- *) PATH=$bindir:$PATH; export PATH;;
- esac
-fi
-
# Boot sequence:
#
# kdeinit is used to fork off processes which improves memory usage
@@ -72,6 +56,35 @@ fi
kdehome=$HOME/@KDE_DEFAULT_HOME@
test -n "$KDEHOME" && kdehome=`echo "$KDEHOME"|sed "s,^~/,$HOME/,"`
+# Read LANG and write the country part to kdeglobals
+# de_AT.UTF-8 => Country=at
+# This is necessary because klocale.cpp (kdelibs) does only try to read the value
+# from kdeglobals and then falls back to default instead of triyng to detect it
+
+if [ ! -e $kdehome/share/config/kdeglobals ] || [ ! `grep "Country=" $kdehome/share/config/kdeglobals` ]; then
+ if [ ! $LANG ]; then
+ if [ -e /etc/default/locale ]; then
+ localefile='/etc/default/locale'
+ elif [ -e /etc/environment ]; then
+ localefile='/etc/environment'
+ fi
+ if [ $localefile ]; then
+ locale=`sed -ne 's/^LANG="\(.*\)"$/\1/p' $localefile`
+ fi
+ else
+ locale=$LANG
+ fi
+ if [ $locale ]; then
+ country=`echo $locale | sed -ne 's/^[A-Za-z]*_\([A-Za-z]*\).*$/\1/p'|tr 'A-Z' 'a-z'`
+ if [ ! $country = "" ]; then
+cat >>$kdehome/share/config/kdeglobals <<EOF
+[Locale]
+Country=$country
+EOF
+ fi
+ fi
+fi
+
# see kstartupconfig source for usage
mkdir -m 700 -p $kdehome
mkdir -m 700 -p $kdehome/share
@@ -88,7 +101,15 @@ kcmrandrrc [Screen2]
kcmrandrrc [Screen3]
kcmfonts General forceFontDPI 0
kdeglobals Locale Language '' # trigger requesting languages from KLocale
+kdeglobals Locale Country ''
EOF
+# read the default KSplash theme to use out of kde-settings
+if [ -e /usr/share/kde-settings/kde-profile/default/share/config/ksplashrc ]
+ then eval `grep '^Theme=' /usr/share/kde-settings/kde-profile/default/share/config/ksplashrc`
+ if [ -n "$Theme" ]
+ then sed -i -e "s/Default/$Theme/g" $kdehome/share/config/startupconfigkeys
+ fi
+fi
kstartupconfig4
returncode=$?
if test $returncode -ne 0; then
@@ -209,8 +230,9 @@ fi
# better use the Autostart folder.
libpath=`kde4-config --path lib | tr : '\n'`
+envpath=/etc/kde/env/
-for prefix in `echo "$libpath" | sed -n -e 's,/lib[^/]*/,/env/,p'`; do
+for prefix in `echo "$libpath" | sed -n -e 's,/lib[^/]*/,/env/,p'` $envpath ; do
for file in "$prefix"*.sh; do
test -r "$file" && . "$file"
done
@@ -423,7 +445,8 @@ kde3 dcopserver_shutdown --wait 2>/dev/n
echo 'startkde: Running shutdown scripts...' 1>&2
# Run scripts found in $KDEDIRS/shutdown
-for prefix in `echo "$libpath" | sed -n -e 's,/lib[^/]*/,/shutdown/,p'`; do
+shutdownpath=/etc/kde/shutdown/
+for prefix in `echo "$libpath" | sed -n -e 's,/lib[^/]*/,/shutdown/,p'` $shutdownpath; do
for file in `ls "$prefix" 2> /dev/null | egrep -v '(~|\.bak)$'`; do
test -x "$prefix$file" && "$prefix$file"
done
kdebase-workspace-4.3.98-battery-plasmoid-showremainingtime.patch:
battery.cpp | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
--- NEW FILE kdebase-workspace-4.3.98-battery-plasmoid-showremainingtime.patch ---
diff -ur kdebase-workspace-4.3.98/plasma/generic/applets/battery/battery.cpp kdebase-workspace-4.3.98-battery-plasmoid-showremainingtime/plasma/generic/applets/battery/battery.cpp
--- kdebase-workspace-4.3.98/plasma/generic/applets/battery/battery.cpp 2010-01-31 20:30:45.000000000 +0100
+++ kdebase-workspace-4.3.98-battery-plasmoid-showremainingtime/plasma/generic/applets/battery/battery.cpp 2010-02-01 05:42:29.000000000 +0100
@@ -613,7 +613,11 @@
} else {
m_acInfoLabel->setText(i18n("Not plugged in"));
}
- if ((state == "Discharging" || state == "Charging") && m_remainingMSecs > 0 && m_showRemainingTime) {
+ // Always show the remaining time in the popup.
+ // We don't just set m_showRemainingTime to true by default because
+ // that'd try to use the time also for the icon. That won't fit on
+ // small panels.
+ if ((state == "Discharging" || state == "Charging") && m_remainingMSecs > 0) {
m_remainingTimeLabel->show();
m_remainingInfoLabel->show();
// we don't have too much accuracy so only give hours and minutes
kdebase-workspace-4.3.98-plasma-konsole.patch:
menu.cpp | 17 +++++++++++++++--
menu.h | 2 ++
2 files changed, 17 insertions(+), 2 deletions(-)
--- NEW FILE kdebase-workspace-4.3.98-plasma-konsole.patch ---
diff -up kdebase-workspace-4.3.98/plasma/generic/containmentactions/contextmenu/menu.cpp.plasma-konsole kdebase-workspace-4.3.98/plasma/generic/containmentactions/contextmenu/menu.cpp
--- kdebase-workspace-4.3.98/plasma/generic/containmentactions/contextmenu/menu.cpp.plasma-konsole 2010-01-31 13:30:37.000000000 -0600
+++ kdebase-workspace-4.3.98/plasma/generic/containmentactions/contextmenu/menu.cpp 2010-01-31 19:19:23.000000000 -0600
@@ -30,6 +30,7 @@
#include <KDebug>
#include <KIcon>
#include <KMenu>
+#include <ktoolinvocation.h>
#include <Plasma/Containment>
#include <Plasma/Corona>
@@ -46,6 +47,7 @@
ContextMenu::ContextMenu(QObject *parent, const QVariantList &args)
: Plasma::ContainmentActions(parent, args),
+ m_runKonsoleAction(0),
m_runCommandAction(0),
m_lockScreenAction(0),
m_logoutAction(0),
@@ -77,8 +79,8 @@ void ContextMenu::init(const KConfigGrou
defaultEnabled << true << true << true << true << true;
} else {
//FIXME ugly code!
- m_allActions << "_context" << "_run_command" << "add widgets" << "_add panel" << "add sibling containment" << "remove" << "lock widgets" << "zoom in" << "zoom out" << "_sep1" << "_lock_screen" << "_logout" << "_sep2" << "configure" << "configure shortcuts" << "_sep3" << "_wallpaper";
- defaultEnabled << true << true << true << true << false << true << true << false << false << true << true << true << true << true << false << true << true;
+ m_allActions << "_context" << "_run_konsole" << "_run_command" << "add widgets" << "_add panel" << "add sibling containment" << "remove" << "lock widgets" << "zoom in" << "zoom out" << "_sep1" << "_lock_screen" << "_logout" << "_sep2" << "configure" << "configure shortcuts" << "_sep3" << "_wallpaper";
+ defaultEnabled << true << true << true << true << true << false << true << true << false << false << true << true << true << true << true << false << true << true;
}
for (int i = 0; i < m_allActions.count(); ++i) {
@@ -95,6 +97,10 @@ void ContextMenu::init(const KConfigGrou
//panel does its own config action atm... FIXME how do I fit it in properly?
//can I do something with configureRequested? damn privateslot...
} else {
+ m_runKonsoleAction = new QAction(i18n("Konsole"), this);
+ m_runKonsoleAction->setIcon(KIcon("terminal"));
+ connect(m_runKonsoleAction, SIGNAL(triggered(bool)), this, SLOT(runKonsole()));
+
m_runCommandAction = new QAction(i18n("Run Command..."), this);
m_runCommandAction->setIcon(KIcon("system-run"));
connect(m_runCommandAction, SIGNAL(triggered(bool)), this, SLOT(runCommand()));
@@ -179,6 +185,8 @@ QAction *ContextMenu::action(const QStri
if (c->corona() && c->corona()->immutability() == Plasma::Mutable) {
return c->corona()->action("add panel");
}
+ } else if (name == "_run_konsole") {
+ return m_runKonsoleAction;
} else if (name == "_run_command") {
if (KAuthorized::authorizeKAction("run_command")) {
return m_runCommandAction;
@@ -198,6 +206,11 @@ QAction *ContextMenu::action(const QStri
return 0;
}
+void ContextMenu::runKonsole()
+{
+ KToolInvocation::invokeTerminal(QString(), QDir::homePath());
+}
+
void ContextMenu::runCommand()
{
if (!KAuthorized::authorizeKAction("run_command")) {
diff -up kdebase-workspace-4.3.98/plasma/generic/containmentactions/contextmenu/menu.h.plasma-konsole kdebase-workspace-4.3.98/plasma/generic/containmentactions/contextmenu/menu.h
--- kdebase-workspace-4.3.98/plasma/generic/containmentactions/contextmenu/menu.h.plasma-konsole 2010-01-31 13:30:37.000000000 -0600
+++ kdebase-workspace-4.3.98/plasma/generic/containmentactions/contextmenu/menu.h 2010-01-31 19:17:49.000000000 -0600
@@ -41,12 +41,14 @@ public:
void save(KConfigGroup &config);
public slots:
+ void runKonsole();
void runCommand();
void lockScreen();
void startLogout();
void logout();
private:
+ QAction *m_runKonsoleAction;
QAction *m_runCommandAction;
QAction *m_lockScreenAction;
QAction *m_logoutAction;
kdebase-workspace-4.3.98-platformplugin-widgetstyle4.patch:
qguiplatformplugin_kde.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- NEW FILE kdebase-workspace-4.3.98-platformplugin-widgetstyle4.patch ---
diff -ur kdebase-workspace-4.3.98/qguiplatformplugin_kde/qguiplatformplugin_kde.cpp kdebase-workspace-4.3.98-platformplugin-widgetstyle4/qguiplatformplugin_kde/qguiplatformplugin_kde.cpp
--- kdebase-workspace-4.3.98/qguiplatformplugin_kde/qguiplatformplugin_kde.cpp 2009-12-17 17:35:19.000000000 +0100
+++ kdebase-workspace-4.3.98-platformplugin-widgetstyle4/qguiplatformplugin_kde/qguiplatformplugin_kde.cpp 2010-02-02 01:24:26.000000000 +0100
@@ -159,7 +159,7 @@
{
const QString defaultStyle = KStyle::defaultStyle();
const KConfigGroup pConfig(KGlobal::config(), "General");
- return pConfig.readEntry("widgetStyle", defaultStyle);
+ return pConfig.readEntry("widgetStyle4", pConfig.readEntry("widgetStyle", defaultStyle));
}
virtual QPalette palette()
{
kdebase-workspace-kde#200184.patch:
core/systemmodel.cpp | 133 +++++++++++++++++----------------------------------
core/systemmodel.h | 7 +-
ui/launcher.cpp | 7 +-
3 files changed, 54 insertions(+), 93 deletions(-)
--- NEW FILE kdebase-workspace-kde#200184.patch ---
Index: kdebase-workspace/plasma/desktop/applets/kickoff/core/systemmodel.cpp
===================================================================
--- kdebase-workspace/plasma/desktop/applets/kickoff/core/systemmodel.cpp (Revision 1087229)
+++ kdebase-workspace/plasma/desktop/applets/kickoff/core/systemmodel.cpp (Revision 1087230)
@@ -52,21 +52,22 @@
struct UsageInfo {
UsageInfo()
- : used(0),
- available(0),
- dirty(true) {}
+ : used(0),
+ available(0)
+ {}
quint64 used;
quint64 available;
- bool dirty;
};
class SystemModel::Private
{
public:
Private(SystemModel *parent)
- : q(parent)
- , placesModel(new KFilePlacesModel(parent)) {
+ : q(parent),
+ placesModel(new KFilePlacesModel(parent)),
+ currentPlacesModelUsageIndex(0)
+ {
q->setSourceModel(placesModel);
connect(placesModel, SIGNAL(dataChanged(QModelIndex, QModelIndex)),
@@ -84,44 +85,15 @@
<< i18n("Places")
<< i18n("Removable Storage")
<< i18n("Storage");
- loadApplications();
- connect(&refreshTimer, SIGNAL(timeout()),
- q, SLOT(startRefreshingUsageInfo()));
- refreshTimer.start(10000);
- QTimer::singleShot(0, q, SLOT(startRefreshingUsageInfo()));
connect(KSycoca::self(), SIGNAL(databaseChanged(const QStringList&)), q, SLOT(reloadApplications()));
}
- void queryFreeSpace(const QString& mountPoint) {
- KDiskFreeSpaceInfo freeSpace = KDiskFreeSpaceInfo::freeSpaceInfo(mountPoint);
- if (freeSpace.isValid())
- q->freeSpaceInfoAvailable(freeSpace.mountPoint(), freeSpace.size() / 1024,
- freeSpace.used() / 1024, freeSpace.available() / 1024);
- }
-
- void loadApplications() {
- const QStringList apps = Kickoff::systemApplicationList();
- appsList.clear();
-
- foreach(const QString &app, apps) {
- KService::Ptr service = KService::serviceByStorageId(app);
-
- if (!service) {
- continue;
- }
-
- appsList << service;
- }
- //kDebug() << "*************" << appsList;
- }
-
SystemModel * const q;
KFilePlacesModel *placesModel;
QStringList topLevelSections;
KService::List appsList;
- QList<QString> mountPointsQueue;
QMap<QString, UsageInfo> usageByMountpoint;
- QTimer refreshTimer;
+ int currentPlacesModelUsageIndex;
};
SystemModel::SystemModel(QObject *parent)
@@ -137,7 +109,9 @@
QModelIndex SystemModel::mapFromSource(const QModelIndex &sourceIndex) const
{
- if (!sourceIndex.isValid()) return QModelIndex();
+ if (!sourceIndex.isValid()) {
+ return QModelIndex();
+ }
QModelIndex parent;
@@ -356,75 +330,60 @@
}
}
-void SystemModel::startRefreshingUsageInfo()
+void SystemModel::refreshUsageInfo()
{
- if (!d->mountPointsQueue.isEmpty()) {
- return;
- }
-
- int rowCount = d->placesModel->rowCount();
- for (int i = 0; i < rowCount; ++i) {
- QModelIndex index = d->placesModel->index(i, 0);
- if (d->placesModel->isDevice(index)) {
- Solid::Device dev = d->placesModel->deviceForIndex(index);
- Solid::StorageAccess *access = dev.as<Solid::StorageAccess>();
-
- if (access && !access->filePath().isEmpty()) {
- d->mountPointsQueue << access->filePath();
- }
- }
- }
-
- if (!d->mountPointsQueue.isEmpty()) {
- d->queryFreeSpace(d->mountPointsQueue.takeFirst());
- }
+ d->currentPlacesModelUsageIndex = 0;
+ QTimer::singleShot(100, this, SLOT(refreshNextUsageInfo()));
}
-void SystemModel::reloadApplications()
+void SystemModel::stopRefreshingUsageInfo()
{
- d->loadApplications();
+ d->currentPlacesModelUsageIndex = d->placesModel->rowCount();
}
-void SystemModel::freeSpaceInfoAvailable(const QString& mountPoint, quint64,
- quint64 kbUsed, quint64 kbAvailable)
+void SystemModel::refreshNextUsageInfo()
{
- UsageInfo info;
- info.used = kbUsed;
- info.available = kbAvailable;
-
- d->usageByMountpoint[mountPoint] = info;
-
- // More to process
- if (!d->mountPointsQueue.isEmpty()) {
- d->queryFreeSpace(d->mountPointsQueue.takeFirst());
+ if (d->currentPlacesModelUsageIndex >= d->placesModel->rowCount()) {
return;
}
- // We're done, let's emit the changes
- int rowCount = d->placesModel->rowCount();
- for (int i = 0; i < rowCount; ++i) {
- QModelIndex sourceIndex = d->placesModel->index(i, 0);
- if (d->placesModel->isDevice(sourceIndex)) {
- Solid::Device dev = d->placesModel->deviceForIndex(sourceIndex);
- Solid::StorageAccess *access = dev.as<Solid::StorageAccess>();
+ QModelIndex sourceIndex = d->placesModel->index(d->currentPlacesModelUsageIndex, 0);
+ if (d->placesModel->isDevice(sourceIndex)) {
+ Solid::Device dev = d->placesModel->deviceForIndex(sourceIndex);
+ Solid::StorageAccess *access = dev.as<Solid::StorageAccess>();
- if (access && d->usageByMountpoint.contains(access->filePath())) {
- info = d->usageByMountpoint[access->filePath()];
+ if (access && !access->filePath().isEmpty()) {
+ KDiskFreeSpaceInfo freeSpace = KDiskFreeSpaceInfo::freeSpaceInfo(access->filePath());
+ if (freeSpace.isValid()) {
+ UsageInfo info;
+ info.used = freeSpace.used() / 1024;
+ info.available = freeSpace.available() / 1024;
- if (info.dirty) {
- info.dirty = false;
- d->usageByMountpoint[access->filePath()] = info;
- } else {
- d->usageByMountpoint.remove(access->filePath());
- }
-
+ d->usageByMountpoint[freeSpace.mountPoint()] = info;
QModelIndex index = mapFromSource(sourceIndex);
emit dataChanged(index, index);
}
}
}
+
+ ++d->currentPlacesModelUsageIndex;
+ QTimer::singleShot(0, this, SLOT(refreshNextUsageInfo()));
}
+void SystemModel::reloadApplications()
+{
+ const QStringList apps = Kickoff::systemApplicationList();
+ d->appsList.clear();
+
+ foreach (const QString &app, apps) {
+ KService::Ptr service = KService::serviceByStorageId(app);
+
+ if (service) {
+ d->appsList << service;
+ }
+ }
+}
+
void Kickoff::SystemModel::sourceDataChanged(const QModelIndex &start, const QModelIndex &end)
{
if (start.parent().isValid()) return;
Index: kdebase-workspace/plasma/desktop/applets/kickoff/core/systemmodel.h
===================================================================
--- kdebase-workspace/plasma/desktop/applets/kickoff/core/systemmodel.h (Revision 1087229)
+++ kdebase-workspace/plasma/desktop/applets/kickoff/core/systemmodel.h (Revision 1087230)
@@ -48,13 +48,12 @@
virtual int columnCount(const QModelIndex &parent = QModelIndex()) const;
virtual QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
virtual QVariant headerData(int section, Qt::Orientation orientation, int role = Qt::DisplayRole) const;
+ void refreshUsageInfo();
+ void stopRefreshingUsageInfo();
private Q_SLOTS:
- void startRefreshingUsageInfo();
+ void refreshNextUsageInfo();
void reloadApplications();
- void freeSpaceInfoAvailable(const QString& mountPoint, quint64 kbSize,
- quint64 kbUsed, quint64 kbAvailable);
-
void sourceDataChanged(const QModelIndex &start, const QModelIndex &end);
void sourceRowsAboutToBeInserted(const QModelIndex &parent, int start, int end);
void sourceRowsInserted(const QModelIndex &parent, int start, int end);
Index: kdebase-workspace/plasma/desktop/applets/kickoff/ui/launcher.cpp
===================================================================
--- kdebase-workspace/plasma/desktop/applets/kickoff/ui/launcher.cpp (Revision 1087229)
+++ kdebase-workspace/plasma/desktop/applets/kickoff/ui/launcher.cpp (Revision 1087230)
@@ -228,7 +228,7 @@
void setupSystemView()
{
- SystemModel *model = new SystemModel(q);
+ systemModel = new SystemModel(q);
UrlItemView *view = new UrlItemView();
ItemDelegate *delegate = new ItemDelegate(q);
delegate->setRoleMapping(Plasma::Delegate::SubTitleRole, SubTitleRole);
@@ -236,7 +236,7 @@
view->setItemDelegate(delegate);
view->setItemStateProvider(delegate);
- addView(i18n("Computer"), systemIcon(), model, view);
+ addView(i18n("Computer"), systemIcon(), systemModel, view);
}
void setupSearchView()
@@ -448,6 +448,7 @@
ApplicationModel *applicationModel;
RecentlyUsedModel *recentlyUsedModel;
KRunnerModel *searchModel;
+ SystemModel *systemModel;
LeaveModel *leaveModel;
SearchBar *searchBar;
QWidget *footer;
@@ -807,6 +808,7 @@
{
Q_UNUSED(event)
reset();
+ d->systemModel->stopRefreshingUsageInfo();
}
void Launcher::keyPressEvent(QKeyEvent *event)
@@ -828,6 +830,7 @@
void Launcher::showEvent(QShowEvent *e)
{
d->searchBar->setFocus();
+ d->systemModel->refreshUsageInfo();
QWidget::showEvent(e);
}
Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/kdebase-workspace/F-12/.cvsignore,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -p -r1.42 -r1.43
--- .cvsignore 22 Jan 2010 19:23:12 -0000 1.42
+++ .cvsignore 10 Feb 2010 14:00:05 -0000 1.43
@@ -1 +1 @@
-kdebase-workspace-4.3.5.tar.bz2
+kdebase-workspace-4.4.0.tar.bz2
--- kdebase-workspace-4.2.0-kio_sysinfo.patch DELETED ---
--- kdebase-workspace-4.2.90-show_systemsettings.patch DELETED ---
--- kdebase-workspace-4.2.95-plasma-konsole.patch DELETED ---
--- kdebase-workspace-4.2.95-rootprivs.patch DELETED ---
--- kdebase-workspace-4.2.96-redhat-startkde.patch DELETED ---
--- kdebase-workspace-4.3.0-battery-plasmoid-showremainingtime.patch DELETED ---
--- kdebase-workspace-4.3.0-default_applets.patch DELETED ---
--- kdebase-workspace-4.3.1-classicmenu-logout.patch DELETED ---
--- kdebase-workspace-4.3.4-calendar-akonadi.patch DELETED ---
--- kdebase-workspace-4.3.4-solid_hal_0_5_14.patch DELETED ---
--- kubuntu_101_brightness_fn_keys_and_osd.diff DELETED ---
- Previous message: rpms/kdebase-workspace/F-11 kdebase-workspace-4.3.75-classicmenu-logout.patch, NONE, 1.1 kdebase-workspace-4.3.75-kio_sysinfo.patch, NONE, 1.1 kdebase-workspace-4.3.75-rootprivs.patch, NONE, 1.1 kdebase-workspace-4.3.75-show_systemsettings.patch, NONE, 1.1 kdebase-workspace-4.3.80-xsession_errors_O_APPEND.patch, NONE, 1.1 kdebase-workspace-4.3.95-brightness_keys.patch, NONE, 1.1 kdebase-workspace-4.3.95-redhat-startkde.patch, NONE, 1.1 kdebase-workspace-4.3.98-battery-plasmoid-showremainingtime.patch, NONE, 1.1 kdebase-workspace-4.3.98-plasma-konsole.patch, NONE, 1.1 kdebase-workspace-4.3.98-platformplugin-widgetstyle4.patch, NONE, 1.1 kdebase-workspace-kde#200184.patch, NONE, 1.1 .cvsignore, 1.38, 1.39 kdebase-workspace.spec, 1.256, 1.257 sources, 1.43, 1.44 kdebase-workspace-4.2.0-kio_sysinfo.patch, 1.1, NONE kdebase-workspace-4.2.90-show_systemsettings.patch, 1.1, NONE kdebase-workspace-4.2.95-plasma-konsole.patch, 1.1, NONE kdebase-workspace-4.2.95-rootprivs.patch, 1.1, NONE kdebase-workspace-4.2.96-redhat-startkde.patch, 1.1, NONE kdebase-workspace-4.3.0-battery-plasmoid-showremainingtime.patch, 1.1, NONE kdebase-workspace-4.3.0-default_applets.patch, 1.1, NONE kdebase-workspace-4.3.1-classicmenu-logout.patch, 1.1, NONE kdebase-workspace-4.3.4-calendar-akonadi.patch, 1.1, NONE kdebase-workspace-4.3.4-solid_hal_0_5_14.patch, 1.1, NONE kubuntu_101_brightness_fn_keys_and_osd.diff, 1.1, NONE
- Next message: rpms/kdebase-workspace/devel .cvsignore,1.48,1.49
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the scm-commits
mailing list