diff options
author | Michele Calgaro <[email protected]> | 2018-11-04 00:26:20 +0900 |
---|---|---|
committer | Michele Calgaro <[email protected]> | 2018-11-04 00:26:20 +0900 |
commit | 12e0e7507ba21c17d6209091c682b9e7f71ad028 (patch) | |
tree | 90cd5330aa7c356a66db0afee1c41008e861a783 /src/tdepowersave.cpp | |
parent | e0525e314afe0e2fc58e7be6597541fd2b2ab886 (diff) | |
download | tdepowersave-12e0e7507ba21c17d6209091c682b9e7f71ad028.tar.gz tdepowersave-12e0e7507ba21c17d6209091c682b9e7f71ad028.zip |
Renamed Sleep to Suspend, following discussion on a more consistent
naming convention for shutdown actions.
Signed-off-by: Michele Calgaro <[email protected]>
Diffstat (limited to 'src/tdepowersave.cpp')
-rw-r--r-- | src/tdepowersave.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/tdepowersave.cpp b/src/tdepowersave.cpp index e6d6e53..58d8dfb 100644 --- a/src/tdepowersave.cpp +++ b/src/tdepowersave.cpp @@ -107,7 +107,7 @@ tdepowersave::tdepowersave( bool force_acpi_check, bool trace_func ) : KSystemTr // connect to events connect(hwinfo, TQT_SIGNAL(lidclosetStatus(bool)), this, TQT_SLOT(handleLidEvent(bool))); connect(hwinfo, TQT_SIGNAL(powerButtonPressed()), this, TQT_SLOT (handlePowerButtonEvent())); - connect(hwinfo, TQT_SIGNAL(sleepButtonPressed()), this, TQT_SLOT (handleSleepButtonEvent())); + connect(hwinfo, TQT_SIGNAL(sleepButtonPressed()), this, TQT_SLOT (handleSuspendButtonEvent())); connect(hwinfo, TQT_SIGNAL(s2diskButtonPressed()), this, TQT_SLOT (handleS2DiskButtonEvent())); connect(hwinfo, TQT_SIGNAL(batteryWARNState(int,int)), this, TQT_SLOT(notifyBatteryStatusChange (int,int))); connect(hwinfo, TQT_SIGNAL(desktopSessionIsActive(bool)), this, TQT_SLOT (handleSessionState(bool))); @@ -119,8 +119,8 @@ tdepowersave::tdepowersave( bool force_acpi_check, bool trace_func ) : KSystemTr m_globalAccel = new TDEGlobalAccel( TQT_TQOBJECT(this) ); m_globalAccel->insert( "Power button", i18n( "Execute configured power button action"), TQString(), TDEShortcut(TQString("XF86PowerOff")), TDEShortcut(TQString("XF86PowerOff")), TQT_TQOBJECT(this), TQT_SLOT( handlePowerButtonEvent() ) ); - m_globalAccel->insert( "Sleep button", i18n( "Sleep configured power button action"), TQString(), - TDEShortcut(TQString("XF86Sleep")), TDEShortcut(TQString("XF86Sleep")), TQT_TQOBJECT(this), TQT_SLOT( handleSleepButtonEvent() ) ); + m_globalAccel->insert( "Suspend button", i18n( "Suspend configured power button action"), TQString(), + TDEShortcut(TQString("XF86Suspend")), TDEShortcut(TQString("XF86Suspend")), TQT_TQOBJECT(this), TQT_SLOT( handleSuspendButtonEvent() ) ); m_globalAccel->insert( "Hibernate button", i18n( "Hibernate configured power button action"), TQString(), TDEShortcut(TQString("XF86Suspend")), TDEShortcut(TQString("XF86Suspend")), TQT_TQOBJECT(this), TQT_SLOT( handleS2DiskButtonEvent() ) ); m_globalAccel->readSettings(); @@ -191,7 +191,7 @@ void tdepowersave::initMenu() { STANDBY_MENU_ID = this->contextMenu()->insertItem( SmallIconSet("stand_by", TQIconSet::Automatic), i18n("Standby"), this, TQT_SLOT(do_standby())); SUSPEND2RAM_MENU_ID = this->contextMenu()->insertItem( SmallIconSet("suspend_to_ram", - TQIconSet::Automatic), i18n("Sleep"), this, TQT_SLOT(do_suspend2ram())); + TQIconSet::Automatic), i18n("Suspend"), this, TQT_SLOT(do_suspend2ram())); SUSPEND2DISK_MENU_ID = this->contextMenu()->insertItem( SmallIconSet("suspend_to_disk", TQIconSet::Automatic), i18n("Hibernate"), this, TQT_SLOT(do_suspend2disk())); SUSPEND_HYBRID_MENU_ID = this->contextMenu()->insertItem( SmallIconSet("suspend_to_disk", @@ -833,7 +833,7 @@ bool tdepowersave::do_suspend2ram(){ kdDebugFuncOut(trace); return true; } else { - KPassivePopup::message( i18n("WARNING"),i18n("Sleep mode failed"), + KPassivePopup::message( i18n("WARNING"),i18n("Suspend mode failed"), SmallIcon("messagebox_warning", 20), this, i18n("Warning").ascii(), 15000); kdDebugFuncOut(trace); @@ -841,7 +841,7 @@ bool tdepowersave::do_suspend2ram(){ } } else { KPassivePopup::message( i18n("WARNING"), - i18n("Sleep mode disabled by administrator."), + i18n("Suspend mode disabled by administrator."), SmallIcon("messagebox_warning", 20), this, i18n("Warning").ascii(), 15000); this->contextMenu()->setItemEnabled(SUSPEND2RAM_MENU_ID, false); @@ -849,7 +849,7 @@ bool tdepowersave::do_suspend2ram(){ return false; } } else { - kdWarning() << "This machine does not provide Sleep state" << endl; + kdWarning() << "This machine does not provide Suspend state" << endl; kdDebugFuncOut(trace); return false; } @@ -986,7 +986,7 @@ void tdepowersave::do_autosuspendWarn() { allowed = true; } } - else if (settings->autoInactiveAction == "Sleep") { + else if (settings->autoInactiveAction == "Suspend") { if( suspend.suspend2ram && (suspend.suspend2ram_allowed || suspend.suspend2ram_allowed == -1)) { allowed = true; } @@ -1014,7 +1014,7 @@ void tdepowersave::do_autosuspendWarn() { countdown->setPixmap("suspend2disk"); } else if(settings->autoInactiveAction == "Hybrid Suspend") { countdown->setPixmap("suspend2disk"); - } else if (settings->autoInactiveAction == "Sleep") { + } else if (settings->autoInactiveAction == "Suspend") { countdown->setPixmap("suspend2ram"); } else if (settings->autoInactiveAction == "Freeze") { countdown->setPixmap("suspend2ram"); @@ -1069,7 +1069,7 @@ bool tdepowersave::do_autosuspend(bool cancel) { return do_suspend2disk(); } else if(settings->autoInactiveAction == "Hybrid Suspend") { return do_suspend_hybrid(); - } else if (settings->autoInactiveAction == "Sleep") { + } else if (settings->autoInactiveAction == "Suspend") { return do_suspend2ram(); } else if (settings->autoInactiveAction == "Freeze") { return do_freeze(); @@ -1301,7 +1301,7 @@ void tdepowersave::handlePowerButtonEvent( ) { /*! * Handle the event for the suspend2ram/sleep button and call the related action. */ -void tdepowersave::handleSleepButtonEvent() { +void tdepowersave::handleSuspendButtonEvent() { kdDebugFuncIn(trace); // Only go to suspend on button event if we already resumed successful. @@ -1985,7 +1985,7 @@ void tdepowersave::setAutoSuspend( bool resumed ){ allowed = true; } } - else if (settings->autoInactiveAction == "Sleep") { + else if (settings->autoInactiveAction == "Suspend") { if( suspend.suspend2ram && (suspend.suspend2ram_allowed || suspend.suspend2ram_allowed == -1)) { allowed = true; } @@ -2560,7 +2560,7 @@ TQString tdepowersave::getSuspendString (int type) { return i18n("Hybrid Suspend"); break; case SUSPEND2RAM: - return i18n("Sleep"); + return i18n("Suspend"); break; case FREEZE: return i18n("Freeze"); |