Renamed "Suspend to disk" to "Hibernate" and "Suspend to RAM" to "Sleep".

This refers to bug 2602.

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/2/head
Michele Calgaro 8 years ago
parent fb91cbd8db
commit 193cb78c57

@ -1356,11 +1356,11 @@ void KMenu::insertStaticExitItems()
m_exitView->leftView()->insertSeparator( nId++, i18n("Session"), index++ ); m_exitView->leftView()->insertSeparator( nId++, i18n("Session"), index++ );
if (kapp->authorize("logout")) if (kapp->authorize("logout"))
m_exitView->leftView()->insertItem( "edit-undo", i18n( "Logout" ), m_exitView->leftView()->insertItem( "edit-undo", i18n( "Log out" ),
i18n( "End session" ), "kicker:/logout", nId++, index++ ); i18n( "End current session" ), "kicker:/logout", nId++, index++ );
if (kapp->authorize("lock_screen")) if (kapp->authorize("lock_screen"))
m_exitView->leftView()->insertItem( "system-lock-screen", i18n( "Lock" ), m_exitView->leftView()->insertItem( "system-lock-screen", i18n( "Lock" ),
i18n( "Lock screen" ), "kicker:/lock", nId++, index++ ); i18n( "Lock computer screen" ), "kicker:/lock", nId++, index++ );
TDEConfig ksmserver("ksmserverrc", false, false); TDEConfig ksmserver("ksmserverrc", false, false);
ksmserver.setGroup("General"); ksmserver.setGroup("General");
@ -1391,11 +1391,11 @@ void KMenu::insertStaticExitItems()
if ( maysd ) if ( maysd )
{ {
m_exitView->leftView()->insertSeparator( nId++, i18n("System"), index++ ); m_exitView->leftView()->insertSeparator( nId++, i18n("System"), index++ );
m_exitView->leftView()->insertItem( "system-log-out", i18n( "Shutdown Computer" ), m_exitView->leftView()->insertItem( "system-log-out", i18n( "Shutdown" ),
i18n( "Turn off computer" ), "kicker:/shutdown", nId++, index++ ); i18n( "Turn off computer" ), "kicker:/shutdown", nId++, index++ );
m_exitView->leftView()->insertItem( "reload", i18n( "&Restart Computer" ).replace("&",""), m_exitView->leftView()->insertItem( "reload", i18n( "&Restart" ).replace("&",""),
i18n( "Restart and boot the default system" ), i18n( "Restart computer and boot the default system" ),
"kicker:/restart", nId++, index++ ); "kicker:/restart", nId++, index++ );
insertSuspendOption(nId, index); insertSuspendOption(nId, index);
@ -3857,7 +3857,7 @@ void KMenu::insertSuspendOption( int &nId, int &index )
m_exitView->leftView()->insertItem( m_exitView->leftView()->insertItem(
"suspend2ram", "suspend2ram",
i18n( "Freeze" ), i18n( "Freeze" ),
i18n( "Pause without logging out" ), i18n( "Put the computer in software idle mode" ),
"kicker:/suspend_freeze", nId++, index++ ); "kicker:/suspend_freeze", nId++, index++ );
} }
@ -3872,24 +3872,24 @@ void KMenu::insertSuspendOption( int &nId, int &index )
if ( suspend_ram && !disableSuspend ) { if ( suspend_ram && !disableSuspend ) {
m_exitView->leftView()->insertItem( m_exitView->leftView()->insertItem(
"suspend2ram", "suspend2ram",
i18n( "Sleep" ),
i18n( "Suspend to RAM" ), i18n( "Suspend to RAM" ),
i18n( "Pause without logging out" ),
"kicker:/suspend_ram", nId++, index++ ); "kicker:/suspend_ram", nId++, index++ );
} }
if ( suspend_disk && !disableHibernate ) { if ( suspend_disk && !disableHibernate ) {
m_exitView->leftView()->insertItem( m_exitView->leftView()->insertItem(
"suspend2disk", "suspend2disk",
i18n( "Hibernate" ),
i18n( "Suspend to Disk" ), i18n( "Suspend to Disk" ),
i18n( "Pause without logging out" ),
"kicker:/suspend_disk", nId++, index++ ); "kicker:/suspend_disk", nId++, index++ );
} }
if ( hybrid_suspend && !disableSuspend && !disableHibernate ) { if ( hybrid_suspend && !disableSuspend && !disableHibernate ) {
m_exitView->leftView()->insertItem( m_exitView->leftView()->insertItem(
"suspend2disk", "suspend2disk",
i18n( "Hybrid Suspend" ),
i18n( "Suspend to RAM + Disk" ), i18n( "Suspend to RAM + Disk" ),
i18n( "Pause without logging out" ),
"kicker:/hybrid_suspend", nId++, index++ ); "kicker:/hybrid_suspend", nId++, index++ );
} }
} }

@ -758,11 +758,11 @@ KSMShutdownDlg::KSMShutdownDlg( TQWidget* parent,
FlatButton* btnLogout = new FlatButton( frame ); FlatButton* btnLogout = new FlatButton( frame );
btnLogout->setTextLabel( TQString("&") + i18n("Log out"), false ); btnLogout->setTextLabel( TQString("&") + i18n("Log out"), false );
btnLogout->setPixmap( DesktopIcon( "back") ); btnLogout->setPixmap( DesktopIcon( "back") );
TQToolTip::add( btnLogout, i18n( "<qt><p>Log out of the current session to login as a different user.</p></qt>" ) );
int i = btnLogout->textLabel().find( TQRegExp("\\&"), 0 ); // i == 1 int i = btnLogout->textLabel().find( TQRegExp("\\&"), 0 ); // i == 1
btnLogout->setAccel( "ALT+" + btnLogout->textLabel().lower()[i+1] ) ; btnLogout->setAccel( "ALT+" + btnLogout->textLabel().lower()[i+1] ) ;
hbuttonbox->addWidget ( btnLogout ); hbuttonbox->addWidget ( btnLogout );
connect(btnLogout, TQT_SIGNAL(clicked()), TQT_SLOT(slotLogout())); connect(btnLogout, TQT_SIGNAL(clicked()), TQT_SLOT(slotLogout()));
} }
else else
{ {
@ -786,8 +786,8 @@ KSMShutdownDlg::KSMShutdownDlg( TQWidget* parent,
buttonlay->addStretch( 1 ); buttonlay->addStretch( 1 );
// End session // End session
KPushButton* btnLogout = new KPushButton( KGuiItem( i18n("&End Current Session"), "edit-undo"), frame ); KPushButton* btnLogout = new KPushButton( KGuiItem( i18n("&Log out"), "edit-undo"), frame );
TQToolTip::add( btnLogout, i18n( "<qt><h3>End Current Session</h3><p>Log out of the current session to login with a different user</p></qt>" ) ); TQToolTip::add( btnLogout, i18n( "<qt><p>Log out of the current session to login as a different user.</p></qt>" ) );
btnFont = btnLogout->font(); btnFont = btnLogout->font();
buttonlay->addWidget( btnLogout ); buttonlay->addWidget( btnLogout );
connect(btnLogout, TQT_SIGNAL(clicked()), TQT_SLOT(slotLogout())); connect(btnLogout, TQT_SIGNAL(clicked()), TQT_SLOT(slotLogout()));
@ -891,13 +891,16 @@ KSMShutdownDlg::KSMShutdownDlg( TQWidget* parent,
#endif // COMPILE_HALBACKEND #endif // COMPILE_HALBACKEND
if(doUbuntuLogout) { if(doUbuntuLogout) {
// Ubuntu style logout window
if (canFreeze && !disableSuspend) if (canFreeze && !disableSuspend)
{ {
// Freeze // Freeze
FlatButton* btnFreeze = new FlatButton( frame ); FlatButton* btnFreeze = new FlatButton( frame );
btnFreeze->setTextLabel( i18n("&Freeze"), false ); btnFreeze->setTextLabel( i18n("&Freeze"), false );
btnFreeze->setPixmap( DesktopIcon( "suspend") ); btnFreeze->setPixmap( DesktopIcon( "suspend") );
TQToolTip::add(btnFreeze, i18n("<qt><p>Put the computer in software idle mode,"
" allowing for some powersaving. The system can be reactivated in a really short time,"
" almost instantly.</p><p>This correspond to ACPI S0 mode.</p></qt>"));
int i = btnFreeze->textLabel().find( TQRegExp("\\&"), 0 ); // i == 1 int i = btnFreeze->textLabel().find( TQRegExp("\\&"), 0 ); // i == 1
btnFreeze->setAccel( "ALT+" + btnFreeze->textLabel().lower()[i+1] ) ; btnFreeze->setAccel( "ALT+" + btnFreeze->textLabel().lower()[i+1] ) ;
hbuttonbox->addWidget ( btnFreeze ); hbuttonbox->addWidget ( btnFreeze );
@ -908,8 +911,12 @@ KSMShutdownDlg::KSMShutdownDlg( TQWidget* parent,
{ {
// Suspend // Suspend
FlatButton* btnSuspend = new FlatButton( frame ); FlatButton* btnSuspend = new FlatButton( frame );
btnSuspend->setTextLabel( i18n("&Suspend"), false ); btnSuspend->setTextLabel( i18n("&Sleep"), false );
btnSuspend->setPixmap( DesktopIcon( "suspend") ); btnSuspend->setPixmap( DesktopIcon( "suspend") );
TQToolTip::add(btnSuspend, i18n("<qt><p>Put the computer in suspend-to-memory mode."
" The system is stopped and its state saved to memory.</p><p> This allows more powersaving than 'Freeze'"
" but requires longer time to reactivate the system.</p><p>This correspond to ACPI S3 mode.</p>"
"<p>Also known as Suspend-to-RAM mode.</p></qt>"));
int i = btnSuspend->textLabel().find( TQRegExp("\\&"), 0 ); // i == 1 int i = btnSuspend->textLabel().find( TQRegExp("\\&"), 0 ); // i == 1
btnSuspend->setAccel( "ALT+" + btnSuspend->textLabel().lower()[i+1] ) ; btnSuspend->setAccel( "ALT+" + btnSuspend->textLabel().lower()[i+1] ) ;
hbuttonbox->addWidget ( btnSuspend ); hbuttonbox->addWidget ( btnSuspend );
@ -922,6 +929,9 @@ KSMShutdownDlg::KSMShutdownDlg( TQWidget* parent,
FlatButton* btnHibernate = new FlatButton( frame ); FlatButton* btnHibernate = new FlatButton( frame );
btnHibernate->setTextLabel( i18n("&Hibernate"), false ); btnHibernate->setTextLabel( i18n("&Hibernate"), false );
btnHibernate->setPixmap( DesktopIcon( "hibernate") ); btnHibernate->setPixmap( DesktopIcon( "hibernate") );
TQToolTip::add(btnHibernate, i18n("<qt><p>Put the computer in suspend-to-disk mode."
" The system is stopped and its state saved to disk.</p><p>This offers the greatest powersaving but"
" considerable time is required to reactivate the system again.</p><p>This correspond to ACPI S4 mode.</p><p>Also known as Suspend-to-Disk mode.</p></qt>"));
int i = btnHibernate->textLabel().find( TQRegExp("\\&"), 0 ); // i == 1 int i = btnHibernate->textLabel().find( TQRegExp("\\&"), 0 ); // i == 1
btnHibernate->setAccel( "ALT+" + btnHibernate->textLabel().lower()[i+1] ) ; btnHibernate->setAccel( "ALT+" + btnHibernate->textLabel().lower()[i+1] ) ;
hbuttonbox->addWidget ( btnHibernate ); hbuttonbox->addWidget ( btnHibernate );
@ -934,6 +944,12 @@ KSMShutdownDlg::KSMShutdownDlg( TQWidget* parent,
FlatButton* btnHybridSuspend = new FlatButton( frame ); FlatButton* btnHybridSuspend = new FlatButton( frame );
btnHybridSuspend->setTextLabel( i18n("H&ybrid Suspend"), false ); btnHybridSuspend->setTextLabel( i18n("H&ybrid Suspend"), false );
btnHybridSuspend->setPixmap( DesktopIcon( "hibernate") ); btnHybridSuspend->setPixmap( DesktopIcon( "hibernate") );
TQToolTip::add(btnHybridSuspend, i18n("<qt><p>Put the computer in both suspend-to-memory and"
" suspend-to-disk mode. The system is stopped and its state saved to memory and to disk.</p>"
"<p>This offers the best of both 'Sleep' and 'Hibernate' modes combined together. The system is"
" de facto in 'Sleep' mode but if power is lost, work can still be resumed as if the system"
" had been hibernated, preventing any data loss.</p><p>This correspond to ACPI S3+S4 mode.</p>"
"<p>Also known as Suspend-to-RAM + Suspend-to-Disk mode.</p></qt>"));
int i = btnHybridSuspend->textLabel().find( TQRegExp("\\&"), 0 ); // i == 1 int i = btnHybridSuspend->textLabel().find( TQRegExp("\\&"), 0 ); // i == 1
btnHybridSuspend->setAccel( "ALT+" + btnHybridSuspend->textLabel().lower()[i+1] ) ; btnHybridSuspend->setAccel( "ALT+" + btnHybridSuspend->textLabel().lower()[i+1] ) ;
hbuttonbox->addWidget ( btnHybridSuspend ); hbuttonbox->addWidget ( btnHybridSuspend );
@ -952,6 +968,7 @@ KSMShutdownDlg::KSMShutdownDlg( TQWidget* parent,
FlatButton* btnReboot = new FlatButton( frame ); FlatButton* btnReboot = new FlatButton( frame );
btnReboot->setTextLabel( i18n("&Restart"), false ); btnReboot->setTextLabel( i18n("&Restart"), false );
btnReboot->setPixmap( DesktopIcon( "reload") ); btnReboot->setPixmap( DesktopIcon( "reload") );
TQToolTip::add( btnReboot, i18n( "<qt><p>Log out of the current session and restart the computer.</p></qt>" ) );
int i = btnReboot->textLabel().find( TQRegExp("\\&"), 0 ); // i == 1 int i = btnReboot->textLabel().find( TQRegExp("\\&"), 0 ); // i == 1
btnReboot->setAccel( "ALT+" + btnReboot->textLabel().lower()[i+1] ) ; btnReboot->setAccel( "ALT+" + btnReboot->textLabel().lower()[i+1] ) ;
hbuttonbox2->addWidget ( btnReboot); hbuttonbox2->addWidget ( btnReboot);
@ -990,8 +1007,9 @@ KSMShutdownDlg::KSMShutdownDlg( TQWidget* parent,
if (maysd) { if (maysd) {
// Shutdown // Shutdown
FlatButton* btnHalt = new FlatButton( frame ); FlatButton* btnHalt = new FlatButton( frame );
btnHalt->setTextLabel( i18n("&Turn Off"), false ); btnHalt->setTextLabel( i18n("&Shutdown"), false );
btnHalt->setPixmap( DesktopIcon( "system-log-out") ); btnHalt->setPixmap( DesktopIcon( "system-log-out") );
TQToolTip::add( btnHalt, i18n( "<qt><p>Log out of the current session and turn off the computer.</p></qt>" ) );
int i = btnHalt->textLabel().find( TQRegExp("\\&"), 0 ); // i == 1 int i = btnHalt->textLabel().find( TQRegExp("\\&"), 0 ); // i == 1
btnHalt->setAccel( "ALT+" + btnHalt->textLabel().lower()[i+1] ) ; btnHalt->setAccel( "ALT+" + btnHalt->textLabel().lower()[i+1] ) ;
hbuttonbox2->addWidget ( btnHalt ); hbuttonbox2->addWidget ( btnHalt );
@ -1013,10 +1031,11 @@ KSMShutdownDlg::KSMShutdownDlg( TQWidget* parent,
} }
else else
{ {
// Standard style logout window
if (maysd) { if (maysd) {
// Shutdown // Shutdown
KPushButton* btnHalt = new KPushButton( KGuiItem( i18n("&Turn Off Computer"), "system-log-out"), frame ); KPushButton* btnHalt = new KPushButton( KGuiItem( i18n("&Shutdown"), "system-log-out"), frame );
TQToolTip::add( btnHalt, i18n( "<qt><h3>Turn Off Computer</h3><p>Log out of the current session and turn off the computer</p></qt>" ) ); TQToolTip::add( btnHalt, i18n( "<qt><p>Log out of the current session and turn off the computer.</p></qt>" ) );
btnHalt->setFont( btnFont ); btnHalt->setFont( btnFont );
buttonlay->addWidget( btnHalt ); buttonlay->addWidget( btnHalt );
connect(btnHalt, TQT_SIGNAL(clicked()), TQT_SLOT(slotHalt())); connect(btnHalt, TQT_SIGNAL(clicked()), TQT_SLOT(slotHalt()));
@ -1027,8 +1046,8 @@ KSMShutdownDlg::KSMShutdownDlg( TQWidget* parent,
if (mayrb) { if (mayrb) {
// Reboot // Reboot
KSMDelayedPushButton* btnReboot = new KSMDelayedPushButton( KGuiItem( i18n("&Restart Computer"), "reload"), frame ); KSMDelayedPushButton* btnReboot = new KSMDelayedPushButton( KGuiItem( i18n("&Restart"), "reload"), frame );
TQToolTip::add( btnReboot, i18n( "<qt><h3>Restart Computer</h3><p>Log out of the current session and restart the computer</p><p>Hold the mouse button or the space bar for a short while to get a list of options what to boot</p></qt>" ) ); TQToolTip::add( btnReboot, i18n( "<qt><p>Log out of the current session and restart the computer.</p></qt>" ) );
btnReboot->setFont( btnFont ); btnReboot->setFont( btnFont );
buttonlay->addWidget( btnReboot ); buttonlay->addWidget( btnReboot );
@ -1064,10 +1083,10 @@ KSMShutdownDlg::KSMShutdownDlg( TQWidget* parent,
if (canFreeze && !disableSuspend) if (canFreeze && !disableSuspend)
{ {
KPushButton* btnFreeze = new KPushButton( KGuiItem( i18n("&Freeze Computer"), "suspend"), frame ); KPushButton* btnFreeze = new KPushButton( KGuiItem( i18n("&Freeze"), "suspend"), frame );
TQToolTip::add(btnFreeze, i18n("<qt><h3>Freeze Computer</h3><p>Put the computer in software sleep mode," TQToolTip::add(btnFreeze, i18n("<qt><p>Put the computer in software idle mode,"
" allowing for some powersaving. The system can be reactivated in a really short time, almost" " allowing for some powersaving. The system can be reactivated in a really short time,"
" instantly.</p></qt>")); " almost instantly.</p><p>This correspond to ACPI S0 mode.</p></qt>"));
btnFreeze->setFont( btnFont ); btnFreeze->setFont( btnFont );
buttonlay->addWidget( btnFreeze ); buttonlay->addWidget( btnFreeze );
connect(btnFreeze, TQT_SIGNAL(clicked()), TQT_SLOT(slotFreeze())); connect(btnFreeze, TQT_SIGNAL(clicked()), TQT_SLOT(slotFreeze()));
@ -1075,10 +1094,11 @@ KSMShutdownDlg::KSMShutdownDlg( TQWidget* parent,
if (canSuspend && !disableSuspend) if (canSuspend && !disableSuspend)
{ {
KPushButton* btnSuspend = new KPushButton( KGuiItem( i18n("&Suspend Computer"), "suspend"), frame ); KPushButton* btnSuspend = new KPushButton( KGuiItem( i18n("&Sleep"), "suspend"), frame );
TQToolTip::add(btnSuspend, i18n("<qt><h3>Suspend Computer</h3><p>Put the computer in a suspend-to-memory mode." TQToolTip::add(btnSuspend, i18n("<qt><p>Put the computer in suspend-to-memory mode."
" The system is stopped and its state saved to memory.</p><p> This allows more powersaving than 'Freeze" " The system is stopped and its state saved to memory.</p><p> This allows more powersaving than 'Freeze'"
" Computer' but requires longer time to reactivate the system.</p></qt>")); " but requires longer time to reactivate the system.</p><p>This correspond to ACPI S3 mode.</p>"
"<p>Also known as Suspend-to-RAM mode.</p></qt>"));
btnSuspend->setFont( btnFont ); btnSuspend->setFont( btnFont );
buttonlay->addWidget( btnSuspend ); buttonlay->addWidget( btnSuspend );
connect(btnSuspend, TQT_SIGNAL(clicked()), TQT_SLOT(slotSuspend())); connect(btnSuspend, TQT_SIGNAL(clicked()), TQT_SLOT(slotSuspend()));
@ -1086,10 +1106,10 @@ KSMShutdownDlg::KSMShutdownDlg( TQWidget* parent,
if (canHibernate && !disableHibernate) if (canHibernate && !disableHibernate)
{ {
KPushButton* btnHibernate = new KPushButton( KGuiItem( i18n("&Hibernate Computer"), "hibernate"), frame ); KPushButton* btnHibernate = new KPushButton( KGuiItem( i18n("&Hibernate"), "hibernate"), frame );
TQToolTip::add(btnHibernate, i18n("<qt><h3>Hibernate Computer</h3><p>Put the computer in a suspend-to-disk" TQToolTip::add(btnHibernate, i18n("<qt><p>Put the computer in suspend-to-disk mode."
" mode. The system is stopped and its state saved to disk.</p><p>This offers the greatest powersaving but" " The system is stopped and its state saved to disk.</p><p>This offers the greatest powersaving but"
" considerable time is required to reactivate the system again.</p></qt>")); " considerable time is required to reactivate the system again.</p><p>This correspond to ACPI S4 mode.</p><p>Also known as Suspend-to-Disk mode.</p></qt>"));
btnHibernate->setFont( btnFont ); btnHibernate->setFont( btnFont );
buttonlay->addWidget( btnHibernate ); buttonlay->addWidget( btnHibernate );
connect(btnHibernate, TQT_SIGNAL(clicked()), TQT_SLOT(slotHibernate())); connect(btnHibernate, TQT_SIGNAL(clicked()), TQT_SLOT(slotHibernate()));
@ -1097,10 +1117,13 @@ KSMShutdownDlg::KSMShutdownDlg( TQWidget* parent,
if (canHybridSuspend && !disableSuspend && !disableHibernate) if (canHybridSuspend && !disableSuspend && !disableHibernate)
{ {
KPushButton* btnHybridSuspend = new KPushButton( KGuiItem( i18n("&Hybrid Suspend"), "hibernate"), frame ); KPushButton* btnHybridSuspend = new KPushButton( KGuiItem( i18n("H&ybrid Suspend"), "hibernate"), frame );
TQToolTip::add(btnHybridSuspend, i18n("<qt><h3>Hybrid Suspend</h3><p>Put the computer in both suspend-to-memory" " and suspend-to-disk mode. The system is stopped and its state saved to memory and to disk.</p><p>This offers" " the best of both 'Suspend' and 'Hibernate' combined together. The system is de facto in 'Suspend' mode but if" TQToolTip::add(btnHybridSuspend, i18n("<qt><p>Put the computer in both suspend-to-memory and"
" power is lost, work can still be resumed as if the system had been hibernated, preventing any data" " suspend-to-disk mode. The system is stopped and its state saved to memory and to disk.</p>"
" loss.</p></qt>")); "<p>This offers the best of both 'Sleep' and 'Hibernate' modes combined together. The system is"
" de facto in 'Sleep' mode but if power is lost, work can still be resumed as if the system"
" had been hibernated, preventing any data loss.</p><p>This correspond to ACPI S3+S4 mode.</p>"
"<p>Also known as Suspend-to-RAM + Suspend-to-Disk mode.</p></qt>"));
btnHybridSuspend->setFont( btnFont ); btnHybridSuspend->setFont( btnFont );
buttonlay->addWidget( btnHybridSuspend ); buttonlay->addWidget( btnHybridSuspend );
connect(btnHybridSuspend, TQT_SIGNAL(clicked()), TQT_SLOT(slotHybridSuspend())); connect(btnHybridSuspend, TQT_SIGNAL(clicked()), TQT_SLOT(slotHybridSuspend()));

Loading…
Cancel
Save