branches/KDE/4.6/kdebase/workspace/powerdevil
Dario Freddi
drf54321 at gmail.com
Tue Jan 25 13:37:49 CET 2011
2011/1/25 Will Stephenson <wstephenson at kde.org>
> On Monday 24 January 2011 11:17:17 Dario Freddi wrote:
> > SVN commit 1216708 by dafre:
> >
> > CCMAIL: Dirk Mueller <mueller at kde.org>
> > CCMAIL: release-team at kde.org
> >
> > Backporting r1216705
> >
> > This commit is critical and needs to be released in 4.6.0; otherwise it
> > needs to be reverted.
>
> I don't understand this sentence, if the commit is not included in 4.6.0,
> /what/ needs to be reverted?
>
The critical part is that this commit changes the config file format in
regard to the codes of the suspension action. If the commit is not pushed to
4.6.0, I cannot obviously change this during a fix update, as it would
require the user to manually edit his configuration, so this commit (and the
other one) needs to be reverted. This caused an impossibility in the profile
migrator (from 4.5-) to convert the old action codes for lid close, button
press, etc, to the new format.
Summarizing: both commits are aimed to the same thing, and it's all about
the migrator not able to convert correctly the lid close/button/critical
battery actions. If not included in 4.6.0, this fix has to await 4.7
(moreover, it won't be very useful then as users will probably upgrade from
4.6 and hence won't require migration.)
Hope this clears any doubt.
>
> > Please add it to the tag or this issue might cause
> > troubles in the future.
>
> What bug report, so we can look for downstream dupes from the RCs?
>
> >
> > M +6 -40 daemon/actions/bundled/handlebuttonevents.cpp
> > M +9 -7 daemon/actions/bundled/handlebuttoneventsconfig.cpp
> > M +2 -1 daemon/actions/bundled/suspendsession.h
> > M +1 -1 daemon/powerdevilaction.cpp
> > M +1 -1 kcmodule/global/GeneralPage.cpp
> >
> >
> > ---
> >
> branches/KDE/4.6/kdebase/workspace/powerdevil/daemon/actions/bundled/handl
> > ebuttonevents.cpp #1216707:1216708 @@ -19,6 +19,8 @@
> >
> > #include "handlebuttonevents.h"
> >
> > +#include "suspendsession.h"
> > +
> > #include <powerdevilactionpool.h>
> >
> > #include <KConfigGroup>
> > @@ -87,33 +89,13 @@
> > void HandleButtonEvents::processAction(uint action)
> > {
> > // Basically, we simply trigger other actions :)
> > - switch (action) {
> > - case 1:
> > - // Sleep
> > - triggerAction("SuspendSession", qVariantFromValue< uint
> >(1));
> > - break;
> > - case 2:
> > - // Hibernate
> > - triggerAction("SuspendSession", qVariantFromValue< uint
> >(2));
> > - break;
> > - case 3:
> > - // Turn off PC
> > - triggerAction("SuspendSession", qVariantFromValue< uint
> >(8));
> > - break;
> > - case 4:
> > - // Lock
> > - triggerAction("SuspendSession", qVariantFromValue< uint
> > >(32)); - break;
> > - case 5:
> > - // Shutdown dialog
> > - triggerAction("SuspendSession", qVariantFromValue< uint
> > >(16)); - break;
> > - case 6:
> > + switch ((SuspendSession::Mode)action) {
> > + case SuspendSession::TurnOffScreenMode:
> > // Turn off screen
> > triggerAction("DPMSControl", qVariantFromValue< QString
> > >("TurnOff")); break;
> > default:
> > - // Do nothing
> > + triggerAction("SuspendSession", qVariantFromValue< uint
> > >(action)); break;
> > }
> > }
> > @@ -134,25 +116,9 @@
> > {
> > // For now, let's just accept the phantomatic "32" button.
> > if (args["Button"].toInt() == 32) {
> > - switch (args["Button"].toUInt()) {
> > - case 1:
> > - // Sleep
> > - triggerAction("SuspendSession", qVariantFromValue< uint
> >(1));
> > // To RAM - break;
> > - case 2:
> > - // Hibernate
> > - triggerAction("SuspendSession", qVariantFromValue< uint
> >(2));
> > // To disk - break;
> > - case 3:
> > - // Turn off PC
> > - triggerAction("SuspendSession", qVariantFromValue< uint
> >(8));
> > // Shutdown - break;
> > - default:
> > - // Do nothing
> > - break;
> > + triggerAction("SuspendSession", args["Button"]);
> > }
> > }
> > -}
> >
> > bool HandleButtonEvents::loadAction(const KConfigGroup& config)
> > {
> > ---
> >
> branches/KDE/4.6/kdebase/workspace/powerdevil/daemon/actions/bundled/handl
> > ebuttoneventsconfig.cpp #1216707:1216708 @@ -19,6 +19,8 @@
> >
> > #include "handlebuttoneventsconfig.h"
> >
> > +#include "suspendsession.h"
> > +
> > #include <Solid/PowerManagement>
> >
> > #include <KLocalizedString>
> > @@ -72,19 +74,19 @@
> > QSet< Solid::PowerManagement::SleepState > methods =
> > Solid::PowerManagement::supportedSleepStates();
> >
> > foreach (KComboBox *box, boxes) {
> > - box->addItem(KIcon("dialog-cancel"), i18n("Do nothing"),
> > (uint)0); + box->addItem(KIcon("dialog-cancel"), i18n("Do
> > nothing"), (uint)SuspendSession::None); if
> > (methods.contains(Solid::PowerManagement::SuspendState)) { -
> > box->addItem(KIcon("system-suspend"), i18n("Sleep"), (uint)1); +
> > box->addItem(KIcon("system-suspend"), i18n("Sleep"),
> > (uint)SuspendSession::ToRamMode); }
> > if
> (methods.contains(Solid::PowerManagement::HibernateState))
> > { - box->addItem(KIcon("system-suspend-hibernate"),
> > i18n("Hibernate"), (uint)2); +
> > box->addItem(KIcon("system-suspend-hibernate"), i18n("Hibernate"),
> > (uint)SuspendSession::ToDiskMode); }
> > - box->addItem(KIcon("system-shutdown"), i18n("Shutdown"),
> > (uint)3); - box->addItem(KIcon("system-lock-screen"),
> > i18n("Lock screen"), (uint)4); +
> > box->addItem(KIcon("system-shutdown"), i18n("Shutdown"),
> > (uint)SuspendSession::ShutdownMode); +
> > box->addItem(KIcon("system-lock-screen"), i18n("Lock screen"),
> > (uint)SuspendSession::LockScreenMode); if (box != m_lidCloseCombo) {
> > - box->addItem(KIcon("system-log-out"), i18n("Prompt log
> out
> > dialog"), (uint)5); +
> box->addItem(KIcon("system-log-out"),
> > i18n("Prompt log out dialog"), (uint)SuspendSession::LogoutDialogMode); }
> > - box->addItem(KIcon("preferences-desktop-screensaver"),
> > i18n("Turn off screen"), (uint)6); +
> > box->addItem(KIcon("preferences-desktop-screensaver"), i18n("Turn off
> > screen"), (uint)SuspendSession::TurnOffScreenMode); }
> > }
> >
> > ---
> >
> branches/KDE/4.6/kdebase/workspace/powerdevil/daemon/actions/bundled/suspe
> > ndsession.h #1216707:1216708 @@ -41,7 +41,8 @@
> > SuspendHybridMode = 4,
> > ShutdownMode = 8,
> > LogoutDialogMode = 16,
> > - LockScreenMode = 32
> > + LockScreenMode = 32,
> > + TurnOffScreenMode = 64
> > };
> >
> > explicit SuspendSession(QObject *parent);
> > ---
> > branches/KDE/4.6/kdebase/workspace/powerdevil/daemon/powerdevilaction.cpp
> > #1216707:1216708 @@ -85,7 +85,7 @@
> > void Action::trigger(const QVariantMap& args)
> > {
> > if (args.contains("Explicit") && args["Explicit"].toBool()) {
> > - // The action was explicitely triggered by the user, hence any
> > policy check is bypassed. + // The action was explicitly triggered
> > by the user, hence any policy check is bypassed. triggerImpl(args);
> > } else {
> > // The action was taken automatically: let's check if we have
> the
> > rights to do that ---
> >
> branches/KDE/4.6/kdebase/workspace/powerdevil/kcmodule/global/GeneralPage.
> > cpp #1216707:1216708 @@ -105,7 +105,7 @@
> > if (methods.contains(Solid::PowerManagement::HibernateState)) {
> > BatteryCriticalCombo->addItem(KIcon("system-suspend-hibernate"),
> > i18n("Hibernate"), 2); }
> > - BatteryCriticalCombo->addItem(KIcon("system-shutdown"),
> > i18n("Shutdown"), 3); +
> > BatteryCriticalCombo->addItem(KIcon("system-shutdown"), i18n("Shutdown"),
> > 8);
> >
> >
> > notificationsButton->setIcon(KIcon("preferences-desktop-notification"));
> >
> > _______________________________________________
> > release-team mailing list
> > release-team at kde.org
> > https://mail.kde.org/mailman/listinfo/release-team
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/release-team/attachments/20110125/913379f0/attachment-0001.htm
More information about the release-team
mailing list